Posted by: CJ | April 10, 2011

The Coding Psyche

As I’ve been getting more involved in coding stuff lately, various members of my family have asked what exactly a coder does. I mean, sure, they write code, but what’s the code supposed to do.

Answering that question in a particular situation is usually pretty technical. But I stumbled on a pretty good explanation of what it is coders are trying to do in general.

We programmers think differently to “normal” people. While we share a lot in common with practitioners of other scientific and engineering disciplines I think it’s fair to say that part of the programmer psyche is still unique. Many programmers don’t realize this and it’s hard to explain to “outsiders” but I shall try with an example.

Sudoku is a number-placement puzzle where the player tries to figure out how to place numbers in a partly filled grid such that certain rules are followed regarding the allowable repetition patterns of those numbers. Puzzles vary in difficulty based on how few numbers they reveal. A given puzzle has but one solution.

Many people enjoy this as a pastime. When first faced with Sudoku I like many programmers reacted in a very different way. I learnt the rules, devised a program that solved any given puzzle, satisfied myself it was correct and then forgot about Sudoku having never done one of these puzzles by hand, which basically defeats the whole point.

Non-programmers will probably find this bizarre. Programmers will almost certainly nod understanding. The point here is that programming trains you to find general solutions. So you can solve one Sudoku puzzle but what would be the point? There are billions of others unsolved! In terms of time investment, you’re better off solving all of them at once!

This particular explanation resonated with me since I find the idea of actually doing a sudoku puzzle by hand quite unappealing. (I.e. I actively dislike the thing and can’t imagine why anyone would play it.) On the flip side, I once spent several hours reading up on various ways of making programs to automatically solve sudoku puzzles. Best of all was that some of these programs could be easily modified to solve hilarious extensions of sudoku.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: