May 30, 2014
Why Do I Code?
I came across a post on reddit today given to first graders about programming. I’ve been thinking about kids and coding recently, as my teenage cousin has started to show interest in what I do and wanting to learn about it. She’s already so bright in math and languages, so merging those skills is exciting to her. With all of that swirling around my brain, I’ve tried to put together what it is about coding that I like so much, especially given that it can be such a tedious activity at times.
The Lazy Solution
Admittedly, spending an hour writing a script to do something can hardly be called lazy, but if the task it’s replacing would have taken hours, then that single hour is time well spent. Some may call it clever, but to me, spending less time doing a task I already don’t want to be doing is well worth it. Over time, I’ve become better at balancing lazy and “good”, because the flip side of this is that haste makes waste, and if I spend too little time doing something on the first pass, I may well get to spend even more time redoing it later.
A real life example – I was emailed 40 pictures in 40 separate files all with the same filename (thanks, iPhone Mail) the other day. I could have spent time opening each item, downloading the file, changing it’s name to prevent override, and repeat 39 times, but that’s no fun. So I optimistically opened AppleScript Editor as was pleased to find that AirMail has an AppleScript dictionary – making it well worth the money, by the way. A little debugging and some trial and error later, and I had a folder on my desktop with 40 uniquely named JPGs. Plus, I dusted off my AppleScript skills.
Keeping my Mind Sharp
Usually reserved for Nintendo DS games, I look at programming as a method for keeping my mind sharp. It’s like a puzzle, where I have a general idea for what something should look like, and an unlimited set of ways to get there. That’s incredibly appealing to me. I also am constantly learning when I code. That’s not to say I’ve yet to reach a level of competency with my toolchains, but there are an ever-expanding number of ways to do things in an ever-expanding array of languages to do it. One of my favorite ways to do this is to actively try not to use an existing control for a problem, like a side menu controller. I also will occasionally decide to write a view completely programmatically instead of using Interface Builder (or more likely, a mix). It doesn’t always result in the cleanest code, and even less often makes it’s way to production, but it’s a nice stretch goal to make new neural pathways.
I like to joke that I can’t draw a ruler with a straight line. I play a few instruments with mediocre talent. I like to think I’m a creative type, but I find that I have such trouble making something that wasn’t previously there. Except, with code, I can. There’s an old cliche around the ‘net that code is poetry, but I believe it. I can express thoughts and desires in a language and share it with others in various forms just as easily as a writer can turn thoughts and desires into a poem, which can be read, heard, turned in to a song, or anything else. Is that really so different?
There are probably more reasons, but that’s tapped me as of now. It’s good to think about these things and remind me why I’ve chosen the path I have, especially when some weeks I find my work frustrating. I may not be able to take a car apart and fix a broken transmission, but I can build a computer like the best of them. I guess we all have a skill.