Friday, May 22, 2009

One New Language a Year: (was) Smalltalk

OK, so I had this crazy plan of doing the "one new language a year" thing. I really like the idea of this. Get out of your comfort zone, prevent settling for a "blub" language, learn new techniques. So I choose smalltalk and thought this would fit the bill. I was really excited to work with turtles all the way down. "Real" object oriented programming. Etc.

And here it is May and I'm just not doing so well. Best laid schemes and all that. In fact I've decided to abandon it for, get this, emacslisp. Only time will tell if this was a good decision or just my normal fickleness.

Part of this decision is just pure pragmatism. My learning windows for this plan are of necessity going to be early in the morning before breakfast or late at night after the family's in bed. I've tried both slots for a month or more and both put me to sleep. You can't learn much while you are asleep so no matter the plan/desire I have to be doing something that engages my attention.

OK, I said it. Smalltalk puts me to sleep. And I feel bad for saying it. I really want to be the guy who likes smalltalk and wields it with authority. But there is just so much I don't enjoy about it and while I'm sure there are some cool things to learn from it, it just doesn't entice me. At least not at 6 am. We'll see if emacslisp can do better.

Smalltalk is like this quirky, fairly attractive girl who on paper seems like a good match for you ("Wow, you like continuations? Me too!") but for whatever reason just doesn't ignite that spark. In addition, she has lots of eccentricities that if she was "the one" would be charming/braggable. But if you are indifferent to her they just come off as irritations/oddities.

I also wonder if watching this video put the final nail in the coffin: "what killed smalltalk" (also). Just hearing about smalltalk being dead (I'm not defending this thesis) sort of activated my pragmatism module which some how grabbed the reins of my brain and executed veto power.

The thing that bugs me is that I don't see myself as a practical dude. In fact, I find the thought of being practical a little bit horrifying. I'm always doing things just because they are interesting, not because I'm trying to be more efficient, etc. And here I am making a practical decision. Ugg.

I wonder what the rules are about abandoning your "one new language a year" language halfway through the year. Is there some governing body I should contact? Do I need to ask permission first?

For what it's worth, smalltalk is not permanently abandoned; it is just pushed down on the list. If I stick with the language a year program I will almost certainly head back to smalltalk at some point. We'll see what happens next time around.

Does working with python as your primary language makes it harder to learn new languages? Every language that I've learned so far has been a productivity boost or has some other sweetener (my language history: basic -> pascal -> c -> c++ -> java -> perl -> python). emacslisp is a booster just because it is the only option in emacs (I will be looking into pymacs though). haskell looks like it might be a next step in the awesomeness hierarchy. But smalltalk doesn't *seem* (in my limited experience) like a significantly more productive tool past python. smalltalk feels like a language from which many great ideas have been lifted. And the ones that haven't yet are either in the process of being stolen (pypy - turtles all the way down) or aren't worth the trouble (image files, etc).

What's funny is that I've talked to others who have had the same initial fascination with smalltalk and then given up on it due various pain points or lack or practicality.

I guess in the end part of it is that smalltalk doesn't seem to solve a problem that I'm having in a vastly superior way and (surprisingly to me) isn't more fun. On paper it seems it should be. And I actually feel guilty for not liking smalltalk. I've failed the gods of language geekdom.

Any way, on to the new hotness of, er, emacslisp.

So why emacslisp? At the start of the year I was trying to decide between smalltalk and haskell. I was in sort of an object-y mood at the time so smalltalk won out. I'm not defaulting to haskell at this time primarily because I want to give it the full year (and it just feels like it has to be a calendar year starting in January). emacslisp works because I know it will be useful. It will make a real difference to my productivity immediately (I mostly live in emacs) and I like lispy languages (though I've only dabbled and/or used them for a semester in an ai class). *And* I don't feel too bad about giving it only half a year.

My goal with emasclisp is to get to the point where I can program in it as easily as I think (how it is for python with me now). I want to be able to whip out useful helper functions like this and be able to write my own modes and/or hack on existing emacs packages.

Any way, smalltalk, it's not you it's me. When I get my head right maybe we'll meet again and give it another shot. I wish you all the best. (but please don't call - I'm not sure emacslisp would understand us "just being friends").

23 comments:

Tattoo said...

Just wanted to note that you chose this language-a-year -project to develop yourself. Well, here's your first lesson. It ain't always pretty ;D

dustbunny said...

You'd think by this point in my life I'd know myself better. As a programmer/computer geek I spend most of my life learning new stuff and I think of myself as a good learner. But I'm still caught unawares sometimes when I try to put new stuff in my head and my brain seems to work extra hard to prevent it from going in.

But yes, I think that is an important lesson and I don't consider this experiment a failure. Just a different result than I expected.

Anonymous said...

Just curious, did you try out Seaside?

country mouse said...

Emacs lisp? Would you consider taking pity on a poor disable speech recognition user and fixing up vr-mode?

http://emacs-vr-mode.sourceforge.net/

It fixes some of the mismatches between Emacs and speech recognition and makes it much easier to manipulate text within Emacs. It doesn't need too much. What it needs is a better method of identifying client and Emacs window associations. The current system gets confused with multiple instances of Emacs running since it uses Windows title bars and program names.

Please, please, please. It's *really* important as the original author no longer has time to keep it up-to-date.

Or maybe, just maybe you could make your annual mission tools for helping the disabled (like me)

(Have I guilted you enough :-)

Anonymous said...

there is just so much I don't enjoy about itI'd love to hear more details about what you didn't like specifically (+ examples).

shevy said...

Exactly how I feel with ruby.
I mean, so far every new OLD language was inferior to ruby.

I dont feel it makes sense to learn a language when you know that you won't be coding in that language anyway, simply because what you want to do _in_ and _with_ ruby (or any other "better" language) is so much easier to do. And thus faster to achieve.

I do however that a purely graphical programming language might be an interesting concept. I just dont think that Squeak is the way to go...

dustbunny said...

@country mouse: i will keep that challenge in mind. it may actually be the case that my crappy emacslisp foo is better than nothing. :)

dustbunny said...

@anonymous: i left some more complaints at the comments for this post at reddit. what is your work/paid language such that smalltalk is superior/more fun?

dustbunny said...

@shevegen: i suspect that people who prefer smalltalk to their "work" language are mostly c++/java/c# programmers but i'm curious if there are expections to this rule.

i have feeling that almost any language i try to learn will have to be cutting edge/newish (haskell/clojure) or a no option environment tool (emacslisp/javascript).

Anonymous said...

Have you considered Erlang, it's been receiving a lot of hype recently.

Ramon Leon said...

If you don't think the image is worth it then you don't understand the image. The image is why Smalltalk has full refactoring support while all the other dynamic languages are still stuck doing symbol lookups in files. Lisp BTW is another image based language, emacs is a lisp image. The image is what makes Smalltalk so cool, you didn't stick it out long enough to grok that.

That's what it means to work on a runtime system, having a running image rather than just a bunch of files that are continually restarted to boot up the runtime system.

jamesl said...

Dont give up on Smalltalk.
Uncle Bob was wrong !
(But I think his intention was not actually to say it was dead)

Phil said...

Elisp is the most practical language I know. It's amazing how easy it is to drop into an Elisp buffer and improve your workflow any time you notice something that could be better. It's all about lowering the barriers to hacking. The only danger is becoming too obsessive about productivity so you never get anything done.

dustbunny said...

@anonymous: erlang is definitely on my short list for future candidates

dustbunny said...

@ramon: saying i don't understand the image is an understatement. i don't mean that sarcastically. i really just mean i don't understand it in any depth. to me it is just one of the things that oddly hasn't been sucked up by other languages.

I did for a while use visualage for java which iirc had the "envy" engine which was inspired by/loosely based on the smalltalk image. and that sucked. it frequently got corrupted and had other weirdnesses. i have no doubt that smalltalk "does it right" wrt images. i'm just intrigued why it hasn't been been seen as an overwhelming win and copied relentlessly.

either it's time just hasn't come yet or the disadvantages outweigh the advantages. i'm genuinely interested to see what happens with this issue in the coming years. but there has been 30 years for people to evaluate this idea outside of smalltalk.

i may well return to smalltalk again but for whatever reason it doesn't hold my attention at this time. i'm quite sure if i had come across it before the perl/python phase and just after my java phase i would have been very excited about it. as far as a fun / clean language it definitely beats java.

at this time i was wasting too much energy being mad at it for not being python. so cutting my losses at least for a while seemed a better use of my time.

dustbunny said...

@jamesl: i haven't given up. i can assure you some smart dude will say something completely fascinating about smalltalk in the near future and i'll come groveling back.

dustbunny said...

@phil: glad to hear the good words about elisp. every little bit i've learned about emacs and elisp has more than paid for itself in productivity so it seems like an obvious move to push in that direction as hard as possible for while and see how far i much i can milk those gains.

Anonymous said...

emacs lisp ? I would go for Scheme, PLT has a lot of great stuff...
Have you considered Self, after Smalltalk you have to check out Self ! http://selflanguage.org/documentation/index.html

Anonymous said...

"I do however that a purely graphical programming language might be an interesting concept. I just dont think that Squeak is the way to go... "

There is your problem ! Squeak has arguably the worst interface of all the Smalltalks - and that includes GNU-Smalltak which does not have any !!
(because is a cli script version)

Try Smalltalk/X or VWST or VAST for a much nicer Smalltalk experience

dustbunny said...

@anonymous(re:scheme): scheme is definitely on my short list of "new language for a year" languages. emacslisp is just a choice of pure pragmatism at this point. i know I will have opportunity to use it frequently. Working thru SICP is definitely a big draw to me.

dustbunny said...

@anonymous(re:graphical lang): i actually never considered using anything besides squeak. if/when i come around again i will definitely more seriously consider other environments.

dustbunny said...

@ddadmin: I think if had the time/energy to really sink my teath into seaside it would be the thing to get me really into smalltalk. As it is, my day job involves creating command line tools for sysadmins in python. I don't think that this is a place where smalltalk competes well. So I'm admittedly biased.

I do think I may get into smalltalk someday, but for now it just doesn't entice me enough. But I do like reading about it and following blogs on it. I just don't enjoy programming in it. :(

generic cialis said...

Interesting article, added his blog to Favorites