What are your strategies for diving into a large, complex codebase?
1–9 of 9 posts
Re: What are your strategies for diving into a large, complex codebase?
#2Re: What are your strategies for diving into a large, complex codebase?
#3Hopefully it is easy to get the codebase up and running so that you can explore it hands-on and try both happy-path cases and what happens when things go awry.
Walk through a feature of the code manually or step through it using a debugger while drawing boxes on how stuff fits together, and what the main building blocks are.
It will always take time to really understand a new large and complex codebase. If it is high-quality code it is easier, if you have experience with similar products it is easier. But to really feel that I grasp the really good parts and the dark and dangerous corners of a new codebase always takes me months.
Re: What are your strategies for diving into a large, complex codebase?
#4Re: What are your strategies for diving into a large, complex codebase?
#5Michael Feathers' "Working Effectively with Legacy Code" is a great book that I would recommend for such situations.
Re: What are your strategies for diving into a large, complex codebase?
#6Obviously for big code bases you can't do it all in a day, but just having a big picture model in my head when I resume on subsequent days helps fit it all together.
Re: What are your strategies for diving into a large, complex codebase?
#7If you are lucky enough that the large and complex codebase has extensive system-level and unit-tests, then that is where I would start. Hopefully it is easy to get the codebase up and running so that you can explore it hands-on and try both happy-path cases and what happens when things go awry. Walk through a feature of the code manually or step through it using a debugger while drawing boxes on how stuff fits toget…
Re: What are your strategies for diving into a large, complex codebase?
#8Michael Feathers' "Working Effectively with Legacy Code" is a great book that I would recommend for such situations.
Re: What are your strategies for diving into a large, complex codebase?
#9Michael Feathers' "Working Effectively with Legacy Code" is a great book that I would recommend for such situations.
Looks interesting. Is this useful if you work with relatively new code (no Cobol lurking in dark corners)?
So it's not really about old languages or old code. It's pretty easy to write (or inherit) new, difficult to test code, with no tests, in whatever language you please.