Andy McKay

Oct 15, 2006

What to learn?

Almost got into an interesting argument the other day on irc, but managed to get back to work and avoid the distraction. Somebody made the comment that they weren't too keen on Python because they'd learnt most of it in a day and there wasn't much more to learn. This is, of course, not true. But it is true that if you are familiar with other languages, you can become productive in Python in about a day. You just have to hop over to the Ruby irc channel to see the opposite.

 I've been learning Ruby and yes got productive and wrote a few teeny scripts in about a day. I've been progressing from this 10 liners into the world of a reasonably complicated Ruby on Rails application. That's taking it to the next level in terms of complexity.

When you hit that you hit the usual problems: its more than 10 lines, its probably not documented and tends to be disjointed to someone who new to it, there's syntax in there you don't understand. So I got help from the Ruby channel. And started a few arguments about what things meant. One was:
dict["key"] |= ["list item a",]
That's a bitwise or followed by an assignment. Usually except when the operators have been overloaded, which apparently they had. So no idea what that did. Fortunately I found out it wasn't involved in the problem and moved you. And then you notice people asking "What does X mean?". Followed later by "Thank you, just learnt something today.".

But is learning wierd syntax really useful learning? There's so much I need to learn, including, but not limited to: agile development, project management, xpath and xslt, javascript scoping and closures, threading details, Squid, carpentry, surfing... I'm betting 90% of programmers out there can at least learn things in communication, economics, project management and training. Learning wierdo syntax in a language is learning, but it's not productive learning. Incrementally learning things about $! does in that line of Perl, does not make you a better programmer. It's unlikely to get you better paid. Instead its a poor tool that obfuscates things and confuses your life.
A more appropriate refrain would be "Thank you for wasting the time and making life complicated for me". Things that we develop aren't simple every day, but don't confuse learning language and tool quirks with learning. Focus on the things that will help again and again, long after Python has gone because Perl 6 has come out running 10x faster under Parrot and we all switch to Perl.

 Life is short, code in Python. Life is short, learn the right things.