Whole-Brain Coding

I was reading a post over on Ralph Loizzo’s blog that touches on some of the up-in-the-air aspects of coding, discussing OOP in particular.

My favorite bit was this:

If I break up an object into tinier and tinier parts, at what point do I stop?

[Yo: I’m about to get tangential to Ralph’s post. Read his post for the main argument – he just spurred some thinking up in my noggin that I want to share with y’alls.]

I love these sorts of problems. To me, this is where textbook learning stops and experience and intuition have to take over. One of the great things about coding is that, to be a good/great coder, you have to engage many different parts of your brain.

When I was growing up, I remember hearing people say things like, “If you like computer programming, then you’ll love math.”

I always thought that these people were absolutely nuts. While there is something intrinsically similar about certain types of math and computer programming, the two are different in many more ways than they are similar.

With math, and I’m not talking about the crazy number-theory math philosophy “Do numbers really exist?” side of things, but with the applied stuff, there are correct answers. You’re either correct or you’re incorrect.

With coding, the best you can hope for is to do something well. With so many different ways to effect a single outcome, it’s up to some very right-brained sensibilities to determine if you’ve met your goal, as there isn’t anybody (except maybe Chris 🙂 ) who can tell you if you’re right or not.

If you ignore your right-brain, and I’m talking generally about abstraction and aesthetics, then you can slap some code together that might work, but it also might just be one hell of a maintenance nightmare.

Then, focusing only on the right-brain, you might, again, have something that works, but which is so utterly inefficient and personalized that you’re the only person on Earth who could make sense of the code and maintain it.

I love the need for whole-brain thinking while coding, and I think it’s one of the reasons developers tend to engage in so many religious wars. Just look at the varied responses in my Python posts (here and here) – people make great arguments, but are they right? I don’t think we can even judge them like that, but the ideas are nonetheless very interesting.

And that’s exactly what Ralph is dealing with. He has his left-brain engaged in providing the logical, linear bits of the solution, and now he’s working on the feel side, the right-brained side, to figure out where to stop in his abstraction.

We’re a bunch of lucky bastards. There are few jobs on this planet that let you use so may bits of your brain on a daily basis. You sure as hell don’t get these kind of experiences working at the 7–11. When someone slides a pack of Ho-Cos across the counter, you don’t get to think about how you’re going to solve this problem.

But, as a coder, you’re still working, even when you’re tipped back in your chair and staring at the ceiling, lost in thought…