Use the Mikado Method to do safe changes in a complex codebase - Change Messy Software Without Breaking It (understandlegacycode.com)
from HaraldvonBlauzahn@feddit.org to programming@programming.dev on 25 Feb 19:20
https://feddit.org/post/26323207

#programming

threaded - newest

villainy@lemmy.world on 25 Feb 22:44 next collapse

You’ve inherited a 300k lines of spaghetti code. What do you do now?

Quit.

NGL this Mikado Method sounds pretty good 😉

thenextguy@lemmy.world on 26 Feb 00:43 collapse

I’m not a tdd guy, but I would reach for tests first. You don’t know the code yet. Testing is the only way to stay sane. And writing the tests if they don’t exist yet will help you learn the code.

kibiz0r@midwest.social on 26 Feb 01:14 collapse

Yes, but you do need to be careful with what level you test at. Too high level and the tests may be slow, flaky, and difficult to focus onto small details. Too low level and they may just bake-in the existing implementation.

thenextguy@lemmy.world on 26 Feb 01:45 collapse

That was such a huge problem on my last job. Most of the unit tests just executed the code and didn’t really test anything and any time you changed the implementation everything broke.

Thankfully it was truly my last job. 😊