Thursday, June 26, 2014

Coder's High !!


I’ve never heard an artist describe a trance that measured up. Maybe they just don’t have the words for it, but creative trances seem far more like drug-induced stupors, in which things may seem clear at the time but are usually hazy fever dreams—for every “Kubla Khan,” there are a thousand awful poems and paintings born of these fever dreams that lack significance to anyone but their creator. Code may be buggy, it may need serious overhaul later, but it compiles, it works (more or less), and it’s the same outside the trance as inside the trance. After a minor writing trance, I’ll usually say, “This is going to need some serious editing.” After a coding trance, I’d say, “This is good stuff! That was seriously productive!”

The closest description of something like coder’s high from a noncoder I ever heard was from a chess player. He described how, in his most lucid moments of concentration, he could suddenly see the entire game laid out before him in his mind, all the possibilities for strategies and many of their upsides and downsides. It was beyond just a mental picture or movie, since it had more information than could be represented in any linear way. It was as though the linear, serial nature of his consciousness had broken down and he finally had access to the vast parallelized processes of the brain all at once. (Certainly the most frustrating moments of the trance were when I would realize I had to change code in five different places in five different files and had to wait for my fingers to make one change at a time.) I’ve also heard mathematicians also portray moments of thinking and insight in similar ways, where the depth of their trances reached a point that the entire logical system at least appeared laid out to them long enough that they could finally put two or three missing pieces together and generate a new insight.

But coding regulates that trance by linking it to an ongoing process of production and goal-directed achievement. Perhaps that is one of its most compelling qualities. Not only do you have the momentary high of total absorption, but it works in tandem with an exciting quest mentality, in which one is hunting perfection. “Coding” isn’t just sitting down and churning out code. There’s a fair amount of that, but it’s complemented by large chunks of testing and debugging, where you put your code through its paces and see where it breaks, then chase down the clues to figure out what went wrong. Sometimes you spend a long time in one phase or another of this cycle, but especially as you near completion, the cycle tightens—and becomes more addictive. You’re boosted by the tight feedback cycle of coding, compiling, testing, and debugging, and each stage pretty much demands the next without delay. You write a feature, you want to see if it works. You test it, it breaks. It breaks, you want to fix it. You fix it, you want to build the next piece. And so on, with the tantalizing possibility of—just maybe!—a perfect piece of code gesturing at you in the distance.


- More Here

No comments: