Z: Revenge Is Sweeter (Than You Were Before)
You might have realized from my previous post that I often bring a lot of emotion to programming. I code best and come up with the best designs when I’m happy and on a roll, but that’s also when I miss the most blatant bugs. When I’m down and struggling, I take longer to synthesize information, but because I force myself to inch my way toward progress, I sometimes discover things I had never known and would never have known had I assumed a working knowledge of what to do next.
Over the past 13 work days, I’ve been working on porting the AEMB to QEMU, an open-source processor emulator. The 100-over hours since receiving the assignment have been a collection of ecstasy (the happy feeling) and head-banging (the sucky feeling). Why those two terms would be associated with the same illegal narcotic is interesting, because they—as I have demonstrated in the parenthetical—are somewhat at odds with each other. Why they would possibly be used to describe my experience at Aeste has nothing to do with their hallucinogenic relation but has everything to do with how I work.
When my code works, I’m happy. When my code doesn’t work but I know what’s wrong, I’m happy. When my code doesn’t work but I have no idea what’s wrong, I start to feel a little frustrated. After a long while of getting nowhere, I wage war with the code. I disown what I wrote and take it apart vehemently in order to expose its weaknesses. I show no mercy and often decide to torture the code: peeling off layer by layer, slicing away veil by veil, having it shout out more and more information at each level until it finally breaks; hopefully by that time it would have given me the intelligence I needed. If not, I modify my tactics and make it go through a more intensive interrogation. “You are my code, how dare you break on me?”
Debugging is a cruel process, like war. It drains my energy and it doesn’t make my opponent (code) feel any better. It, however, is the only option to fix broken code. Given this inevitability, my response is to make programming an experience, not just a task. I approach vanilla code with a shyness, slowly attempting to understand what it does and how it does it. Later on, after knowing it better, I make more demanding requests until it breaks on me and decides to stay unfixed.
Then my debugging response kicks in. This has no bearing whatsoever on how I make friends, by the way. I’ve had great moments of euphoria when I fixed a big bug, but also of prolonged pain when I introduced too many changes in too short a time, resulting in a situation where I spent a full day debugging to no avail. No amount of coaxing would make the code work, and I drastically decided to revert to a previous version and work from a different angle of attack. After a few more hours of modifying-testing-committing, the desired change was introduced without bugs. That was a moment of immense relief. That was a moment of precious victory. That was a moment of sweet revenge.
The AEMB emulator on QEMU is now dual-threaded. It took a toll on me, but there rarely is too high a price to pay for victory in war. There is also a joy often undocumented when the final level is cleared and the final boss is defeated. You look back at the time you spent playing the game, writing the code, or fighting the dragons, and sigh a sigh of satisfaction. A tear wells up as you look at the work of your hands: beautiful. Then you turn around to face the sunset and wonder what challenge awaits you next.