3 ms·
I'm currently working on the reincarnation of a project that was killed by technical debt -- TWICE. The original codebase was about 20 years old. It was contro
by luca_ing 10y ago
I'm currently working on the reincarnation of a project that was killed by technical debt -- TWICE.
The original codebase was about 20 years old. It was control code for something best described as an industrial robot. Written for the last 20 years by greybeards who knew a lot about the manufacturing process, and were reasonably good at getting a product out the door.
But the whole thing was riddled with #ifdefs for this customer or that, or one batch of machines or another. All long forgotten, written by people who had since left, or been pensioned.
It was in dire need of improvement and extension, but it would have been superhuman to inject new features into this rat's nest. Plus their electronics supplier was discontinuing the control electronics the system was designed for. The UI also looked like it had been designed by German engineers in the 1980s. Which was the case.
So they made the defensible decision to start from scratch. A team of engineers was to develop an brand new machine, with all new electronics and all new code. They got to work -- and had to scrap the new software about three years in. It was just utterly misdesigned, and riddled with bugs.
It featured wonderful WTFs like the embedded realtime code depending on the Qt libraries.
I observed its instability myself: it would just spontaneously crash every five minutes, sometimes just while idling. Once the project lead was on holiday, the programmers revolted, went to the head of the company, and the project lead found himself without a project on his return. Whee.
Now we've started from scratch again, and have at least succeeded in making different mistakes this time around. Fingers crossed, this might end up working.
- vkuruthers 10y agoSounds like the software managers were not on top of things, otherwise how would they have allowed this type of design to be implemented? Not to say I haven't seen this effect myself many times...
- luca_ing 10y agoManagement, you say? Management ordered the creation of new software. Shouldn't that be enough? The project lead was responsible for this design, and above him there was nobody with any expertise in the matter. From what I've heard he's an extremely good C++ programmer. He's just a terrible architect.
- specialist 10y agoHuh. Should I ever inherit an #ifdef mess again, I intend to replace #ifdefs with Strategy patterns. #1 figure out all the known defs in actual use #2 rerun the preprocessor with each variant (combo) #3 capture the output(s) #4 aggressively apply the Strategy pattern, refactor code Last time, I removed dead code piecemeal manually. It sucked.