You've just inherited a legacy C++ codebase, now what?
gaultier.github.io
You've just inherited a legacy C++ codebase, now what?
1–10 of 356 posts
Re: You've just inherited a legacy C++ codebase, now what?
#2Re: You've just inherited a legacy C++ codebase, now what?
#3 0. You reach out to the previous maintainers, visit them, buy them tea/beer and chat (eventually) about the codebase. Learned Wizards will teach you much.
But I didn't see that anywhere. I think the rest of the suggestions (like get it running across platform, get tests passing) are useful stress tests likely to lead you to robustness and understanding however.But I'd def be going for that sweeet, sweet low-hangin' fruit of just talking to the ol' folks who came that way before. Haha :)
Re: You've just inherited a legacy C++ codebase, now what?
#4Re: You've just inherited a legacy C++ codebase, now what?
#5It's funny. My first step would be 0. You reach out to the previous maintainers, visit them, buy them tea/beer and chat (eventually) about the codebase. Learned Wizards will teach you much. But I didn't see that anywhere. I think the rest of the suggestions (like get it running across platform, get tests passing) are useful stress tests likely to lead you to robustness and understanding however. But I'd def be going…
Re: You've just inherited a legacy C++ codebase, now what?
#6Re: You've just inherited a legacy C++ codebase, now what?
#7It's funny. My first step would be 0. You reach out to the previous maintainers, visit them, buy them tea/beer and chat (eventually) about the codebase. Learned Wizards will teach you much. But I didn't see that anywhere. I think the rest of the suggestions (like get it running across platform, get tests passing) are useful stress tests likely to lead you to robustness and understanding however. But I'd def be going…
My step 0 would be: run it through an UML tool to get a class diagram and other diagrams.
This will help you a lot.
> Get the tests passing on your machine
Tests? On a C++ codebase? I like your optimism, rs
Re: You've just inherited a legacy C++ codebase, now what?
#8Re: You've just inherited a legacy C++ codebase, now what?
#9It's funny. My first step would be 0. You reach out to the previous maintainers, visit them, buy them tea/beer and chat (eventually) about the codebase. Learned Wizards will teach you much. But I didn't see that anywhere. I think the rest of the suggestions (like get it running across platform, get tests passing) are useful stress tests likely to lead you to robustness and understanding however. But I'd def be going…
IME, this only works if you can get regular help from them. A one-off won't help much at all.
Re: You've just inherited a legacy C++ codebase, now what?
#10Things that get flagged by a static analysis tool (today) will often be areas where you can tear out entire functions and maybe even classes and files because they'll be a re-creation of STL concepts. Like homegrown iterator libraries (with subtle problems) that can be replaced with the STL algorithms library, or homegrown smart pointers that can just be replaced with actual smart pointers, or replacing the C string functions with C++'s on string class (and related classes) and functions/methods.
But you won't see that as easily until you start scanning the code. And you won't be able to evaluate the consequences until you push towards more rapid test builds (at least) if not deployment.