Thursday, January 1, 2009

One New Language a Year: Smalltalk

The Pragmatic Programmers recommend learning a new programming language every year. I thought for a long time that this was a good idea, but didn't really act on it. Instead I'd dabble in a dozen languages a year. While this has built my intuition as to what various languages are like it has not made me a competent programmer in a new language. So for this year I'm going to actually pick a language, make a learning schedule and keep on it for the entire year. Now I almost certainly won't be able to stop myself from messing around with other languages to some extent (e.g. I'm slowly working through the Real World Haskell book), but my goal is to direct more of my focus and energy on a smaller target and hopefully get to the point where I really have an additional tool to use for solving real problems.

So then comes the question of which language to learn. In one sense I should probably pick a language that I don't know at all. The problem is that I've played with a lot of languages over the years. I don't think there are a lot of programming concepts/paradigms that I'm not at least familiar with. But there are a lot that I have not mastered. So I will just pick from the list of languages of which I'm not a master. A very healthy list.

Here is a short list of languages that I at least briefly considered:

  • smalltalk
  • haskell
  • something lispy (common lisp, scheme, emacslisp)
  • clojure (also lispy, but new and different)
  • erlang
  • mozart/oz
  • ruby
  • perl 6
  • javascript

All the languages above have some intriguing features but in the end I chose smalltalk (specifically squeak, but perhaps soon pharo). The deciding factors were:

  • My kids are getting close to an age where I might introduce them to programming so I'd like to have some mastery of a kid friendly programming language. While I think python fits that requirement pretty well, etoys seems like it might fit it even better (scratch also looks interesting).
  • I want to bump up my familiarity with deeper OO programming practices. In particular, I want to bump up my mastery of design patterns. Smalltalk is one of the languages where design patterns were first developed
  • I want to have a language where I can return to one of my first loves: graphical simulations. I could clearly do that in python, but well, learning a new language is always a good excuse to play around with graphics libraries.
  • I want to work on something that is really different in a fundamental way. Being forced to use the squeak development environment (instead of emacs) and an "image" instead of text files fits the bill
  • seaside just seems inherently cool and I'd like to get my mind around continuations.

I imagine my plan will change as I learn more and follow my interests, but as a first pass:

  • Learn etoys

    This will give me a chance to start off sort of easy and genuinely playful. I've been collecting some links and project ideas but initially I am planning on looking at: Powerful Ideas in the Classroom, Idioms for Composing Games with Etoys, Etoys chapter in Learn Programming With Robots, and poke around in the squeakland site.

  • Intro to smalltalk/squeak reading/tutorials.

    Some items that stand out as worth perusing include: Laser Game Tutorial, Squeak By Example, Design Patterns Smalltalk Companion (I've had this on the shelf for a while and it's really time I read it), Mark Guzdial's "Blue" book, and browse around on this list of smalltalk books.

  • Get familiar with seaside

    In particular I will work on porting over a Django app (which used to be a quixote app) to seaside. I'm not planning on migrating it to seaside for real, but it's nice to have a real world project with lots of ugly edge cases in mind to see how a framework really works.

  • Depend on smalltalk

    By the end of the year I hope to have some project that I maintain (even if just for myself) that keeps me involved with writing and maintaining smalltalk code.


Note: Haskell came in a very close second. It was actually a very hard decision. It seems like Haskell is poised to take off and it would be nice to be part of that wave. On the other hand. I already know that that language is pretty challenging to make progress on and will still be waiting for me next year.

FWIW: I recently came across this list of languages worth learning.

8 comments:

country mouse said...

a new language a year is a real good strategy up till about the age of 30-32. by that age, you should know enough technology to realize that knowledge in IT (and any other field) is split into core knowledge and fashionable knowledge. Fashionable knowledge is what lets you get past the resume filters but core knowledge makes it possible for you to get the job done.

Once you reach your early 30s, you should start shifting your learning process towards understanding how IT relates to business. I know this sounds age biased but, I have yet to see someone under the age of 35 truly understand the implications of IT on business operations. I think it has to do with how people change their values on what's important. As people age, family and partners are much more important than videogames, programming languages and technological whatnot. Your job becomes something you do so you can have a life not a substitute for a life. Something about that transition enables people to think differently about IT.

another reality to deal with is that as you approach your 40s, your job is incredibly vulnerable to younger, cheaper talent and outsourcing if you stay technology focused. bridging business and IT will help improve your corporate value but be aware that climbing the corporate ladder is a cruel form of musical chairs and that as you try to move up, there are fewer and fewer seats at the table.

Anonymous said...

bunny,
I just want to tell you how impressed I am by your blog. Maybe it's just cause you seem to be similar to me in many ways :-). I've just spend 2 hours reading a lot of your stuff.

FYI, launchpad.net had taken over sourceforge's python-mode.el (not GNU's python.el). It's pretty different from the one you're looking at, and I like it.

You should also read Xah Lee's stuff, if you haven't already, e.g.
http://xahlee.org/emacs/elisp_syntax_coloring.html
(incidentally, the last person I wrote to tell them how impressed I was was Xah. So you might like his site.)

me -> Beverley Eyre
bev@eyremail.net
ta

dustbunny said...

@country mouse: Well, since I'm 40 I must be really confused. :)

Interesting observations. I actually just love programming languages, so in a sense this is just entertainment for me. Also I'm working from the perspective that I want to keep my brain as sharp as possible and learning new stuff (computer or otherwise) is a good way to do this. This is part of my mental flossing.

I hear ya on the value of business knowledge. This is a real challenge for me. I find it absolutely soul sucking to think about the business side of things instead of coding. I actually feel sorry for people when they get promoted. But I do wonder what my future career path will be.

dustbunny said...

@beverley: Thanks. I'll take a look at that other mode. I've seen Xah's site before and always enjoyed it. I noticed at one point he seemed to have a bad rep on the emacs wiki site which I've never investigated the history of, but maybe that's blown over. But I agree he's got lots of good material.

Randal L. Schwartz said...

Welcome to the Smalltalk world! This is indeed a good time to be picking up Smalltalk, or coming back to it if you've been hanging out somewhere else for a few years. Vendors are reporting significant up-ticks in new Smalltalk projects, thanks in part to the industrial hardening of Seaside by some very dedicated volunteers and consultants.

jarober said...

If you decide to download Cincom Smalltalk NC (free download), you'll probably like the tutorial materials we have:

-- Smalltalk Daily: daily, short video segments focusing on an aspect of Smalltalk

http://smalltalk-daily.cincomsmalltalk.com

-- Industry Misinterpretations: Our weekly Smalltalk podcast

http://industry-misinterpretations.cincomsmalltalk.com

-- Smalltalk Videos: a regular stream of Smalltalk videos, mostly from conferences and events

http://www.cincomsmalltalk.com/userblogs/cincom/bloView?content=smalltalk_videos

-- Smalltalk tutorial page: tutorials, including a Seaside tutorial

http://www.cincomsmalltalk.com/userblogs/cincom/bloView?content=tutorials

and my blog:

http://www.cincomsmalltalk.com/blog

dustbunny said...

@randall: Thanks for your comment. I actually caught your tutorial at OSCON08 and smalltalk has been lingering in my mind off and on since then. Though I'm not intentionally working towards a career in smalltalk I learned python at a time when that wasn't really a hireable skill and that worked out well for me. So who knows.

dustbunny said...

@jarober: Thanks for the links. I had pretty much decided to use squeak from the beginning but I think you have motivated me to try another environment for some fraction of the time.