3 ms·
Early in my career I was given the task of writing a simple code generator: read some simple strucured text file and write a file containing C++ classes with ge
by andyjohnson0 10mo ago
Early in my career I was given the task of writing a simple code generator: read some simple strucured text file and write a file containing C++ classes with get and set methods. Pretty simple.
I worked on it all day, then tried running it - whereupon my choice of default output filename (main.cpp) caused it to overwrite its own source code. There were no backup copies.
I told no-one, stayed late to re-write it, and demo-ed it the next day. I like to think I learned some kind of lesson, but I'm not entirely sure what.