32 ms·
One of the most complex pieces of code I have ever written, I wrote while traveling home intoxicated on the midnight train. It was something I had been conside
by Aeolos 6y ago
One of the most complex pieces of code I have ever written, I wrote while traveling home intoxicated on the midnight train.
It was something I had been considering, analyzing, debating and discarding as impossible for several weeks prior to that. Then when it came down to it, not only was I able to implement it, but it worked perfectly for more than 6 years before anyone was able to improve on that design.
I attribute the success to two things: (a) the fact that I had done a lot of analytical work beforehand; (b) the inhibition-lessening effect of alcohol that allowed me to enter the zone and implement the solution without worrying about complexity or other external factors.
Once the core idea worked - and worked it did! - all that was left was to revisit it the next day, sober this time, and fix the remaining issues, documentation and tests.