Earlier quoted context omitted.
Question: Why does some of the product source code look like it is the output of a decompiler? Answer: Our office was in the WTC and was destroyed on 9/11. Luckily everyone got out alive, but then we discovered we had no off-site backups of the source code. In order to continue development, we had to retrieve the released binaries from our customers and decompile them to get back source code.
Oh.. Ouch, ouch, ouch. I feel for you. That must have been hell.
You've just inherited a legacy C++ codebase, now what?
271–280 of 356 posts
Re: You've just inherited a legacy C++ codebase, now what?
#272Earlier quoted context omitted.
Question: Why does some of the product source code look like it is the output of a decompiler? Answer: Our office was in the WTC and was destroyed on 9/11. Luckily everyone got out alive, but then we discovered we had no off-site backups of the source code. In order to continue development, we had to retrieve the released binaries from our customers and decompile them to get back source code.
I see this as a case of: "see, allowing wfh would have saved you there."
I don't know what the practice was at that time, but some years later, people weren't allowed to have the source on their laptops, they had to SSH/RDP/etc in to a hosted development system to work on it, which might explain how losing the office resulted in losing the source code even with people doing WFH
Re: You've just inherited a legacy C++ codebase, now what?
#273Re: You've just inherited a legacy C++ codebase, now what?
#274Earlier quoted context omitted.
That's a feature! New warnings added to new compiler versions can identify problems that weren't previously detected. You _want_ those to -Werror when they happen, so you can fix them if they need it. Changing a compiler version is a task that has to be resourced appropriately. Part of that is dealing with any fallout like this. Randomly updating your compiler is just asking for trouble.
It is certainly not a feature because it make all infrastructure including just regular old checkout-and-build workflows break for historical versions of the code. It’s so annoying to have to checkout an older version and then have to go disable -Wall -Werror everywhere just to get the damn thing to build. Keep master clean of any warnings, for sure. But don’t put it straight into the build system defaults.
Re: You've just inherited a legacy C++ codebase, now what?
#275Earlier quoted context omitted.
The scripted, packaged docker with toolchain dependencies and _is_ the build. If someone decides to use a different toolchain, the problems are on them.
Yeah that works if you are not dealing with open source. If you are dealing with open source, though, it really won't save you that much trouble, if anything it will just lead to unnecessarily hostile interactions. You're not really obligated to fix any specific issues that people report, but shrugging and saying "Your problem." is just non-productive and harms valuable downstreams like Linux distributions. Especiall…
Re: You've just inherited a legacy C++ codebase, now what?
#276Earlier quoted context omitted.
Everyone who has been around this game for long enough has scars. At one point in the early 90s I was asked to take over maintenance of a vertical market accounting app that had a few hundred users. It had been written using Lattice C, but at the time was being built with the ultra modern MS C 5.1. The first time I looked at it, I saw that the make file set the warning level to 0 and redirected the output to NUL. Rem…
Was there a warning for implicit function declaration and implicit variable type for each variable and call that used those? Or how could there be that many warnings.
Re: You've just inherited a legacy C++ codebase, now what?
#277Re: You've just inherited a legacy C++ codebase, now what?
#278Re: You've just inherited a legacy C++ codebase, now what?
#279It'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…
I did encounter a bunch of bugs and problems underway, and wanted to reach out to the devs that wrote it - as it was customer made for my employer.
Welp, turns out it was written by one guy/contractor, and that he had passed away a couple of years earlier.
At least in the defense industry you'll find these sort of things all the time. Lots of custom/one-off stuff, made for very specific systems. Especially on the hardware side it is not uncommon that the engineers that made the equipment are either long gone or retired.
Re: You've just inherited a legacy C++ codebase, now what?
#280Not mentioned were code comprehension tools / techniques: I used to use a tool called Source Navigator (written in Tcl/tk!) that was great at indexing code bases. You could then check the Call Hierarchy of the current method, for example, then use that to make UML Sequence Diagrams. A similar one called Source Insight shown below [1]. And oh, notes. Writing as if you're teaching someone is key. Over the years, I got…
I can't believe I'm finding someone in the wild that also has used Source Navigator.
My university forced this artifact on me in the computer architecture course because it has some arcane feature set + support for an ARM emulator that isn't found elsewhere. We used it for bare metal ARM assembly programming