3 ms·
I've always been bad at looking busy. Alright, I admit I'm lazy, but that doesn't mean I suck as a programmer. In my first job, I'd automated pretty much all of
by mcv 13y ago
I've always been bad at looking busy. Alright, I admit I'm lazy, but that doesn't mean I suck as a programmer. In my first job, I'd automated pretty much all of my work. Where others would do stuff by hand, I researched how to write a script to do it for me. At some point, I had a collection of scrips and macros that generated most of my code straight out of the functional design.
So whenever the boss popped in, he saw me leaning back looking at my scripts doing all my work for me. I was usually the first one to be finished with a new task. I reduced compile time from many hours down to 30 minutes (which all the other programmers were extremely happy with). But all my non-programming boss saw was me leaning back or goofing around, rather than typing really hard (which is what programming is supposed to look like, right?).
- jroseattle 13y ago> I had a collection of scrips and macros that generated most of my code straight out of the functional design. Scripts that generated code? As in, code that would be compiled and executed?
- mcv 13y agoYes. It was Visual C++. Most of it was piles of conditions and generating texts based on that. It was all specified in excruciating detail in the functional design, which I received as a word document. I believe I had a word macro that selected what I needed and did some formatting or something, and then probably some regexp replaces to turn it into actual C++ code. It worked very well, and because the project had a number of iterations where we'd implement yet another kind of insurance based on the same kind of FD, I could reuse it quite a lot. But my first project there was euro-proofing some code. I had to dig through the code and figure out which numbers could represent money amounts. Another programmer was doing this by hand, but I figured it should be possible to automate it (there was a lot of code). After unsuccessfully trying to figure out a regexp to match what I needed, I ended up writing my own not-quite-finite state engine to parse the code and insert comments near all the suspicious numbers.
- jroseattle 13y agoInteresting. Externally, it sounds like lots of code being generated that's somewhat a mirror of each other. Were there cases where a bugfix was needed across code that had already been generated? How was that handled?
- mcv 13y agoI believe there was some typo or deviation of the regular format in the functional design once or twice, which I fixed by hand. There was also a clear error in the logic specified in the design, which I was required to implement anyway. I pointed it out, explained them how it should be, and it took a remarkable amount of bureaucracy and responsibility dodging to get it fixed, but it was no problem for my work. Generally after generating the big amount of code, I still checked everything manually and added the needed boilerplate. It's just the initial generation of hundreds of if-then blocks to build texts that I automated.