Common Genius

The online technical home of David Nelson
Welcome to Common Genius Sign in | Join | Help
in Search

Variable Irony

A commentary on technical issues ranging far and wide.

Programming and Chess

So much for the series on C# vs VB.NET. Maybe I will get back to it someday.

In the meantime, I read a blog post today, most of which didn't make any sense to me. It starts out talking about chess, and its relationship both to war and to political maneuvering. It then goes on to discuss, in a very random fashion, whether programming, and in particular hacking, can draw the same parallels.

However, amid the randomness, there was a certain part which really resonated with me:

"[quoting Edsger Dijkstra, see post for reference]'The competent programmer is fully aware of the limited size of his own skull. He therefore approaches his task with full humility, and avoids clever tricks like the plague.'

"So it’s all hogwash. The very thing which draws you to programming is your undoing. Unless you are it’s undoing. I hate you, Edsger Dijkstra!"

The same is true with chess. When I learned to play chess, what drew me to it was not its historical significance or its artistic beauty, it was how exciting playing chess could be! I would conjure up traps and combinations and tactical assaults and hurl them at my opponent, all the while trying to dodge the positional darts he was throwing back at me. I would charge my pieces across the board, attacking, defending, capturing; it got my adrenaline pumping faster than anything else could at a young age.

But the more I studied and the more I played, the more I discovered that, if I wanted to be a good chess player, I couldn't just throw my pieces across the board. I couldn't charge into the enemy lines at will, break open his position and declare victory. I had to be careful not to over-extend my position, not to let me pieces get cut off and trapped, not to leave my weak side vulnerable, not to allow counter-attack. There were so many things to consider. And suddenly, it just wasn't as exciting as it used to be. Some would say that taking on these additional considerations is what makes chess so intellectually challenging. And they are right. I still love playing chess, I do find it challenging and mentally stimulating, and I do appreciate its artistic beauty. But it just doesn't get my adrenaline pumping the way it used to.

The same can be said for programming. What first drew me to programming was that, as the programmer, there was nothing I couldn't do. I was the master of the digital domain over which I ruled. Give me any problem and I would conquer it with for loops and conditional statements and recursive functions. And in the end, when my program displayed the output I desired, I would declare victory.

Then I went to school to "learn to program", and then I got a job as a "programmer". And now, there are so many more things to worry about. Its not just a matter of getting the right answer any more; its how you get to that answer that matters. I can't use conditional statements because they might be confusing to other developers. I can't use recursive functions because they suffer performance problems. What happens if the network goes down? What happens if the database goes down? What if a malicious user gets on the system? What if the power goes out? How do you make your user interface powerful and intuitive at the same time? How do you make your system efficient yet robust and highly available? How do you integrate different platforms? All these things add to the challenge of programming, which can be rewarding in itself. And I do love being a programmer. At the end of the day I still love it when I see the answer I expected to see.

But I miss the adrenaline rush.
 

Published Friday, February 22, 2008 1:01 AM by dnelson

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Robert said:

Well said. I may go full time with a team of developers soon and when I look at parts of thier source code all the life drains out of me. There are sections that seem so overly complex, almost like they were trying to write code that not even they could understand. I know there is still a lot of ground for me to cover in .Net, I'm still pretty much a newbie considering these guys experience, but yeah, I still enjoy it too. I think it takes things like blogs and personal websites/projects to keep me motivated and moving forward. At least the better I get the more I can throw things around and it actually looks like methodology. I guess that's really it, keep hacking until you get so good your instincts mimic ideological methodology. Say that ten times fast. :)

February 28, 2008 6:59 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems