3 ms·
> I once inherited code that “worked” but operated on uninitialized values and out of bounds data unintentionally. I also couldn’t get it to complete a run with
by skissane 3y ago
> I once inherited code that “worked” but operated on uninitialized values and out of bounds data unintentionally. I also couldn’t get it to complete a run without crashing. Even when I fixed bugs, I couldn’t reproduce the results. My own mentor told me to look the other way and move on as if this was known and totally usual.
20+ years ago I worked as a research assistant, on a software engineering research project (at an Australian university). A defence industry consultant had built his own requirements database, in Microsoft Access, which (apparently) was being used on some military project. There was also an Italian academic who had written some tool for parsing English requirements into logical statements and feeding them into a theorem prover. The tool only ran on Linux, and he wouldn't give us the source code, only a binary. One programmer was working on porting the Microsoft Access database to VB6, whereas my part was building an RPC system using Perl 5 (I used some CPAN module, might have been RPC::Simple) which the VB6 code on Windows could use to call the tool on Linux.
Somehow we got it all to work, for a highly unrealistic contrived demo; and then the funding ran out and I left the project. Some months later, it had stopped working, they couldn't work out how to fix it, and they wanted to hire me back to fix it-but I declined. I always had the feeling the project was designed to maximise research funding (international collaboration got one type of grant, collaboration with the military got another) rather than deliver something with real world value, or even serious value as basic research. But it was my first ever programming job, I hadn't even finished my bachelor's degree, so I took what I could get. I'd moved on to something more obviously valuable (working on the university's course catalog database), and I didn't want to go back to that project. I never found out if they got the code to work in the end or not.