Posted in January 2009

Reigning in your passion

One of the central features of the hacker mindset is that we thirst for novelity. Whether it’s the latest new operating system, programming language, framework or platform, we hackers are instinctively drawn to explore the great unknowns, to boldly go where no one has gone before. Without this quest to find something new Linus Torvalds wouldn’t have gotten eager volunteers to hack on his hobby operating system, the dot-com boom of the 90s would never have happened and we might still be using computers with 2Mhz processors and 64KB of RAM.

However while this inquisitiveness drives industry and innovation, it can be somewhat damaging for the lone hacker, especially for someone who is still very much in training (like myself). There’s so much to do out there, so many shiny toys to play with, it’s hard to make up your mind about which ones to try out. It’s very tempting to just go about trying one thing after another. Unfortunately, if you’re looking to be an ace coder at any point in the not-so-distant future, you’re going to have to reign in your passion and curiosity, sit down and make some choices. Case in point: me.

Ever since I’ve been coding seriously (about three years now) I’ve been writing code for memory managed environments: first Java, now Python. Memory management does have it’s advantages: you can focus on the higher level algorithms and data structures and let the environment take care of the details. I have a limited idea of pointers and manual memory management and I’m sure that a lot of the code I’ve written would have been rather more tedious to write in an unmanaged setting. However, at this point I do feel somewhat spoilt by having all this work done for me. Also I did flirt with assembly language a while ago and I’ve always had a love for working close to the metal: actually understanding and controlling what the machine did as it processed my instructions. All these things being combined, I’ve been developing a thirst to do something low-level and actually taking the time to learn to write C and C++. Luckily for me I’m having a software engineering course in C++ and a computer organization course next semsester which will give me ample opportunity for low-level programming. But with 3 weeks still to go before my courses start, I was tempted to start learning some C on my own. And I would have if it weren’t for my other great current interest: Lisp.

Lisp is more than a wonderful language: it’s a whole new way of thinking. It’s functional style combined with macros make it powerful tool for a wide variety of problems. Moreover, the Scheme dialect is great tool for learning basic algorithms and computer science concepts. I’ve been in contact with Scheme for more than a year, but I’ve hadn’t the time to actually sit down and learn it properly. I’ve also been hoping to go through and actually finish Structure and Implementation of Computer Programs. The next few weeks with nothing much to do seemed like a great time to buckle down, learn some Lisp and rehash some fundamentals. Unfortunately, it won’t be easy doing that and learning C/C++ at the same time.

Therein lies the hacker’s dilemma: you have two amazing problems (learning C or learning Lisp) both of which promise endless hours of intellectual enjoyment. It would be great if I could do both, but I’m only human and if I do both, I won’t  be very good at either. For me it’s just the question of learning a new language for my own benefit, but in many cases it can be more important: choosing a framework for your webapp, a platform to develop for, different ways to organize your project and your team. Staying stuck in this dilemma for too long isn’t productive at all. My courseload for my first semester at college was pretty light, and I wanted to do some serious programming in all my free time. Unfortunately I faced the same choice: between Lisp and Assembly. I never came to a clean decision and as a result most of my first semester was wasted. In my last semester I had a choice between studying programming languages and parallel computing. Since I would actually be doing a course, I had to make a choice and had quite a fruitful semester learning about programming languages.

Now it’s time for a choice as well. I really don’t want to waste the next three weeks not doing anything substantial. I’ll be learning C/C++ next semester anyway and I already know enough that the first few weeks shouldn’t be too hard. Keeping that in mind I’ve decided that I’m going to put C/C++ on the shelf for the time being and focus on Lisp and finishing SICP. Once the semester starts, I’ll have to reevaluate and probably devote more time to C++ keeping Lisp for the weekends. There are some more choices I’ll have to make soon: focusing full time on my current research or exploring Scala and Hadoop, but for the time being, I’m not thinking about it. But one thing is certain: I’ll only become an expert programmer if I can balance my curiousity and passion with a healthy dose of realism and focus. I have passion and enthusiasm (I think) but the focus could use some work. One more thing on the list for this year.

New Year’s Resolutions: Hacker Style

It’s that time of the year again, when you take a look at your life, decide what parts of it suck and then make a proclamation of change. Sure most resolutions don’t work out and resolutions probably aren’t the best way to make a lasting change in your life anyway. But even you don’t stick to your resolutions, they at least make you think about the things that need improving. Normal people might resolutions about exercise or spending wisely, but here are a few resolutions for the hacker in me:

1. I will learn to type faster

I normally type at about 35-50 words a minute depending on what I’m writing, what sort of a keyboard I’m using etc. Considering that I think much faster, typing represents a significant bottleneck in communicating my thoughts to the outside world. I’m going to learn to type faster, hopefully gettting upto about 100 words a minute over the next few months. I’d love to take a physical typing course if I could, but I’ll settle for an online course if I can find a good one.

2. I will learn to hack Emacs

If you’re a programmer typing faster will only increase your effectiveness so much. It doesn’t help to type fast if your tools get in the way. Emacs is the most powerful editor in the world with the possible exception of Vi (though I’m not convinced of that). It’s most important feature is that it is easily programmable in Lisp. The only other piece of software that comes close enough is terms of programmability is Firefox, but it’s still much harder to write a Firefox extension that it is to write some Emacs Lisp code. I’ve written a bunch of utility functions already, but I’m going to learn more, especially since I’ll be focusing on learning Lisp this year. My goal is to get to the point where I can improve the Scala emacs mode which is quite rudimentary at this point.

3. I will post to my blog more often

I think everyone should write a blog. Putting your thoughts in writing is productive and therapeutic and everyone can use a little once in a while. I’m glad to say that last year was my most focused blogging year, but I’m ready to take it further. I want to maintain a steady rate of a post at least every other day. I have just over a hundred RSS subscribers right now and I’d likely to get that number past 500 by the middle of the year.

4. I will set up an ergonomic work environment

I do most of my programming on my laptop, but I also spend a fair amount of time when I’m not coding on my Mac mini. My setup isn’t very ergonomic at all and considering how much time I spend a day in front of a computer, I’m seriously concerned about developing some form of RSI (especially since I have a family history of back and joint problems). I’d like to set up a more ergonomic workspace where I don’t actually type on my laptop if it’s not on my lap. I’m considering getting a better keyboard and hooking it up to the laptop (and using a second display) which would let me have a more comfortable position. Losing some weight wouldn’t hurt either.

5. I will actually USE version control for my files

I’ve had my files under Subversion control for the better part of last year, but I can’t say I used it properly. I’d often forget to add files and only realize it when I tried to pull my files to another machine at which points it was too late. Subversion also had a number of drawbacks (mostly branch and merge related) which meant I didn’t use it as much as I could have used a versioning system. But I’m moving to Git and I think it’s features combined with some careful usage on my pattern will let me actually use version control on my files in a useful way.

6. I will get a life

I try not to fit into the physically inept anti-social nerd stereotype. I really do, even though sometimes it’s relaxing to just the door and embrace my geekiness. But there is more to life than computers and code (belief it or not). Though I do have a great circle friends and do enjoy the occasional party, I feel there’s a lot of college life I might be missing out on. So I’m going to make an effort to be more social and try out new things next year. I don’t have anything specific in mind, but I would certainly like to go out more and meet new people. Here’s looking forward to a great 2009.

Follow

Get every new post delivered to your Inbox.

Join 331 other followers