4 ms·
If we're going to visit the circles of hell, let's do it properly: Step -1: Get it under source control and backed up. Step -2: Find out if the source code co
by hyperman1 3y ago
If we're going to visit the circles of hell, let's do it properly:
Step -1: Get it under source control and backed up.
Step -2: Find out if the source code corresponds to the executable. Which of the 7 variants of the source code (if any).
Step -3: Do dark rituals over a weekend with cdparanioa to scrape the source code from the bunch of scratched cd's found in someone's bottom drawer. Bonus point if said person died last week, and other eldritch horrors lurk in that bottom drawer. Build a VM clone of the one machine still capable of compiling it.
Yes, I have scars, why do you ask?
- galangalalgol 3y agoI was assuming it already had unit and system tests with decent coverage. I forgot how bad stuff gets. Maybe VM clones of various users too, and recordings of their work flows?
- Cerium 3y agoI'm always careful to dump the bash history as soon as I get access to a machine involved in a legacy project.
- eschneider 3y agoOooh, smart!
- cqqxo4zV46cp 3y agoYep! Learned this one the easy way! I don’t get to say that often, so I’m taking full advantage.
- eschneider 3y agoThere was that time when I had to dump the roms off a 'test' MRI machine because that's the only version of the code they had, then decompiled it, and rewrite it from that. I think about that a lot now that I'm older and spend a fair bit of time in MRI machines...
- reactordev 3y agoDang man that’s tough, at least you know they work ;)
- eschneider 3y agoOh, we tested those a lot. Fun fact: you can see under the foil in scratch cards with those. Might, um, have something to do with "every card a winner" scratch cards no longer being a thing.
- denkmoon 3y agoThis gave me a good laugh. I too have been here.
- skipkey 3y agoEveryone 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. Removing that, I ran nmake and prayed. About 45 minutes later it finished building, evidently successfully. It turned out that having the warnings actually print added 10 minutes to the build. It was averaging more than one error per line of code at /w3. And it was around 40k lines of code. Not large by the standards of today but huge back then for MSDOS. Peeking, it used K&R c and included no header files. So step 1 for me was to hook up some scaffolding using various tools from mks to make sure as I edited things that the error count didn’t increase. The biggest thing I learned from this project was to not combine other coding with the warning removal or other cleanup. Makes it much easier to spot when you introduce bugs.
- rightbyte 3y agoWas 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.
- skipkey 3y agoYes, plus a bunch of warnings for unsafe type conversions where the compiler did pointer to int, back to pointer conversions. In the process of cleaning it up I found at least a dozen serious bugs.
- skissane 3y agoQuestion: 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.
- fransje26 3y agoOh.. Ouch, ouch, ouch. I feel for you. That must have been hell.
- skissane 3y agoI wasn’t there for 9/11, my involvement with that code base started a few years later. But it was clear it was a traumatic memory for colleagues who had been
- guappa 3y agoI see this as a case of: "see, allowing wfh would have saved you there."
- skissane 3y agoFrom what I was told, WFH and people starting late actually really helped, in that there were only a handful of people physically in the office when it happened. But apparently the server with the source code on it was in it too. I don’t know if they forgot about off-site backups entirely, or if they thought they had them but only discovered they were incomplete or faulty afterwards 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
- bluGill 3y agoNo it wouldn't have - 2001 was 4 years before distributed version control. Work from home might have had current copies of some branches checked out on local machines, but nobody would have had full history or code from release branches on their machine.
- ta2234234242 3y agoSome people believe that if you read the C++ standard recreationally, it should be interpreted as a call for help, and intervention is required, putting the subject under 24/7 monitoring and physical restraints. /s Step -4: Get the version of windows and the compiler it was last known to compile with.
- fransje26 3y agoStep -3.5: Do the service pack and .net framework update dance, wave a dead chicken, and hopefully, by shear luck, install them in the correct order. If not, uninstall and goto -4; Been there. Done that.
- thrwwycbr 3y agoShouldn't it be step -3 to -1?
- hyperman1 3y agoOf course not. You try to do 0 but that's impossible because you need to do -1 first. So you drop everything, try to do -1 but that's ... It's yak shaving's evil twin!