Categories
Engineering Philosophy

Digital Legos

Sometimes I get anxious, antsy. Spend too long in meetings or clearing out
emails.Sometimes I just want to code. It is akin to an addiction. Do it too
much and you overdose and your quality suffers. Do it too little and you go
into withdrawal, just begging to get that next hit.

Consider this metaphor. In Homeworld the various races travel
around space by means of hyperspace jumping. For all races except one this is
just another form of faster than light travel. For the outlier race, the
Bentusi, it is different. For them Hyperspace travel is an experience, a reason
to live. By their own account, “hyperspace sings in our
ears”
. So to is coding to the programmer. To live is to program. You cannot
separate the two.

What breeds this addiction? This affliction differs from person to person,
but for me it has always been to play. Code is just another toy for me, like
legos or Lincoln logs. It is about challenging yourself to make interesting
unique work with the pieces you have. I have a bunch of loops and conditional
statements and variables how can I make a list of unordered numbers become
ordered? How can I make it run fast? How can I make it use space efficiently?
You do not need any special education, all you need is the will to learn. You
can do that right now. Do not even leave this blog page. Go ahead and pop open
the web developer tools (Ctrl+Shift+K for Firefox, F12 for Chrome and IE. Press
Ctrl + 2 after opening up the development tools in IE to get the console). Play
with some javascript right now by typing at the prompt the following and
hitting enter:

alert("Hello World")

This creates a simple popup with “Hello World” displayed. Neat huh, not very
flash but you just did something. Try something else, type this and hit
enter:

confirm("See Some Buttons?")

This creates a similar popup but with an ‘Ok’ and ‘Cancel’ button. Are you
feeling it yet? Play with some math, go ahead and add some numbers at the
prompt:

3 + 3

It adds them for you and shows the result. You can multiply and divide and
all sorts of fun math stuff. Remember my example of turning unordered lists
into ordered lists. That is a solved problem for us. Look at this:

[1,5,2,3,6,7].sort()

What do you get? The numbers come back in sorted order. Try putting some
words in there and see what happens:

["bear", "cat", "chair", "apple"].sort()

Was that fun for you? It is not everyone’s jam, but I live for this. I live
for the thrill of trying to solve problems and build things with all these
digital parts. Its exploration, its discovery, its adventure. For some people
it is just a way to get around, but for others it can be a real journey.

Leave a Reply