News for hackers. Stuff that matters.
Re:Ask HN: Codebase at my work is a complete mess, what shou... by lexicality on Wednesday August 22, 2018 @06:56PM (#17823000)
There's a book called "Working Effectively with Legacy Code" by Michael C. Feathers which I heartily recommend.

I got it a while back when working on a similar sounding codebase and it was very useful. It's got chapter headings like "My Application Has No Structure" and "I'm Changing the Same Code All Over the Place".

If your company has a books budget get them to buy it, but I'd personally drop the £35 it costs on amazon given how useful this has been to me over the years.

Re:Ask HN: Codebase at my work is a complete mess, what shou... by planxty on Wednesday August 22, 2018 @06:59PM (#17823009)
Yes, so good. Martin Fowler's Refactoring is an excellent companion to Feathers' book.
Re:Ask HN: Codebase at my work is a complete mess, what shou... by jschulenklopper on Thursday August 23, 2018 @05:35AM (#17825851)
It will be worthwhile to know that a second edition of that book is expected to come out shortly.
Re:Ask HN: Codebase at my work is a complete mess, what shou... by flukus on Wednesday August 22, 2018 @08:38PM (#17823560)
Is there a chapter on what to do if your coworkers don't initialize variables? I just inherited a steaming pile of legacy where they didn't and I'm struggling to understand how they got it to run at all. At least I'm starting to understand why we held off on the spectre patches.
Re:Ask HN: Codebase at my work is a complete mess, what shou... by lexicality on Thursday August 23, 2018 @03:41AM (#17825342)
Not explicitly, no, but it does have some techniques for reading code that might help?

Do you mean global variables? I guess it entirely depends on what language and framework you're using, but trying to refactor things to have less global state is generally for the best.

Re:Ask HN: Codebase at my work is a complete mess, what shou... by ISL on Wednesday August 22, 2018 @07:28PM (#17823174)
This book was written for OP (and many others). It specifically addresses the "there are no tests, what do I do?" concern.