2013
01.09

I am an unabashed fan of type safe, or at least, strongly typed language. I got my formative training in programming and computer science at Carnegie Mellon which has a department full of type theorists. I spent a lot of time playing with ML-family languages, NJ/SML in college and F# in the beginning of my professional career. One might, (okay, a few friends would definitely) say I’m a bit of a snob when it comes to programming languages.

And yet, more an more of the time when I come across an idea for a new project, I find myself reaching into my toolbox, not for F#, Ocaml, or Haskell but rather for python. It’s crept up on me little by little. When first picked up python I have to admit it was with a sense of mild distate.  My wife works in biological science and needed a couple of cross-platform data wrangling scripts. None of the languages I knew well fit the bill and python seemed like an obvious choice, if only to branch out and learn something new. Early experiences with the language didn’t do much to change my opinion about python in general. Significant whitespace felt gross and inelegant. It felt like the language was trying desperately to hold my hand and protect me from myself. It felt clunky and awkward like a pair of borrowed shoes.

Little shoots of positives started creeping their way through the wall of my snobbery. It seemed like the library I needed was always available, ready to bolt in to my script. The mantra of “batteries included” seemed pretty built in to the standard library and I found that my “zero to done” time on these little side scripts plummeted. It was getting harder and harder to justify my distaste of the language and I started to get a feel for the places where it excels. Eventually my proficiency in the language improved and it started to bleed over into my fulltime work, where C# and Javascript rule the roost. For quick prototypes and one and done tasks I found myself reaching for python first. This was greatly magnified when I began doing more and more data analysis work and discovered the absolutely excellent scikit-learn.  I’d say at this point python has pretty thoroughly won me over. It’s my goto language for lightweight services or prototyping tasks to be sure. There are just too many solidly written libraries for me to choose anything else. The “get things done” philosophy wins out over my ideal languages preferences

That isn’t to say the language doesn’t have its share of warts. The syntax is still ugly, and there are a few limitations in the lambda syntax I could do without. Also, I’ve yet to find a web library I really love, although I have been experimenting with Flask and it’s reasonable so far. I also fell victim to the dreaded global interpreter lock (GIL) and made the classic misunderstanding of how interacts with multithreaded code. I think this is more a matter of  poor documentation but it bit me for a few hours threading CPU bound code before discovering this would result in zero improvement. This also means using additional cores on CPU bound tasks requires using clunky multiprocessing solutions which chew up memory, or dropping down into C which eliminates pythons productivity edge.

Still, despite these points of contention python has earned a place near the top of my toolbox. It’s become my trusted pair of channel locks I can always use to get the job done in a pinch, even if it’s rusty around the edges and a bit stiff to work with. I highly suggest you give it a whirl. You might end up pleasantly surprised.

 

2013
01.02

I’ve had an epiphany about productivity, and finally managed to put a finger on a bad habit that’s been eating at me. I have a tendency to be a purposeless user of technology. It’s not a matter of me doing anything particularly wrong, it’s that I am, by nature, indecisive and risk averse when it comes to my use of my time.

When given an idle moment I could make a choice about how to spend the time. I could pick up the guitar, tackle a project around the house, hack on some code or spend some time playing a game I’d really enjoy. Unfortunately making that decision takes a bit of cognitive stress. I’d have to actually allocate that time and consciously chose to not do all the other things I’ve just mentioned. My lazy brain opts instead to take the path of least resistance and thus it’s much easier to flip open the laptop and scan hacker news for interesting tidbits, or refresh twitter for the umpteenth time while I “try to figure out what I should do”. Minutes become hours and then it’s suddenly time to crash for the night and I’ve had net gain zero from my little bit of free time.

It’s an insidious habit and one that’s particularly easy to self-justify. After all, I’m not idly flipping through meaningless facebook posts or watching meaningless television or movies (usually). My twitter feed is well curated with interesting people saying interesting things. Similarly, my google reader is full of articles that have real value. Unfortunately, the 100th article of the day gets me very little marginal return for my precious investment in time which in the long term is crushing my free time productivity. I’ve started to recognize that I have the same habit when it comes to consuming content. When I’m tired and want to veg out, I end up watching tired old favorite movies again and again and spending hours I’ll never regain.

Note that I don’t think there’s anything wrong with the technology I’m using. Netflix is awesome! Google reader coupled with Hacker News has been an astoundingly good resource for keeping myself current with trends in technology and has provided me with many, many useful ideas I’ve carried in to work. Social tools, email, and chat all fall into the same bucket. I’ve learned new things, and kept in touch with people who I’d otherwise have lost long ago. It’s not the tools I’m using and I really can’t even blame it on their addictive nature. The culprit is truly my lazy brain.

In the spirit of a new years resolution I’m making a pact with myself to become much more meaningful in my use of technological tools, and more meaningful in how I spend my time. The practical consequence of this is I’m making a pledge to myself to not sign in to any computer, smartphone, television, console or other gizmo without first doing an explicit mental check and clarifying the purpose. If I can’t express to myself the purpose for what I’m doing, I’m not going to sign in. When I complete my task, or session I’ll sign out, log off, etc and take another pause before I start the next task.

Obviously this is going to require some degree of self-discipline but I’m hoping that adding a mental check will be enough of road block that I can short-circuit my brain out of the path of least resistance and make it easier to choose to do something meaningful with my time. I think this will also give me a chance to put some useful restrictions on my consumption of “useful” content. I doubt if I’ll even notice the difference if I halve the time I spend per day reading the articles because I’ll simply filter out more of the irrelevant content. I can put this freed up time to good use, writing, hacking, or doing a thousand other more useful and enjoyable things.

I’m certain I’m not the only one afflicted with this form of NADD . I’m hoping maybe if you’re reading this it helps you reframe your own use of time. Maybe we can all start using our technological tools with a little more purpose and stop letting them nerd snipe our lazy brains.