2011-04-10 20:31 +0000
Programmers tend to give advice like "unit test everything" or "use the right tool for the job". However, more often than not they can't really live up to these bold claims. After all, how do you fully test a function that can take arbitrarily large numbers as its input? How do you find the right tool for the job? Apodictic statements like these seem to be technical advice but I think they are actually obscuring matters. Unless you are forced to use certain tools (like when developing programs for Apple mobile devices) you will usually choose from the tools you know rather than from those available. And one could argue that those tools are actually well suited for the job since knowing them gives you lots of advantages over tools you have yet to learn and evaluate. This applies to programming languages just as well: Most programmers seem to have one language they prefer and know relatively well. When they are faced with a programming task they are very likely to choose this language. Obviously, this is not a technical decision but a personal preference or even a matter of taste. For some reason though, many programmers don't allow themselves to trust their aesthetic intuition and try to retroactively find an explanation as to why this is the best choice for the problem at hand. Or even worse: they feel that they should choose what everyone else is using in the respective field, so when they want to make a web application, they'll choose PHP and when they need to process large amounts of textual data, they'll choose Perl or whatever common knowledge prescribes.
When looking at the issue from that angle it suddenly becomes a social one. Although this social dimension of programming is often neglected due to the aforementioned pseudo-technical justifications, I think that it is indeed way more important than any other: When choosing a programming language you also choose a community. And this community will have its own culture with unique values and ideals which will eventually rub off on you. Now unless the programming language in question is an ad-hoc hodgepodge this is not a bad thing at all. It is a great opportunity to get in touch with ideas and learn about concepts. But it can also be a trap of sorts. Taking into account that humans are susceptible to conditions such as the Stockholm syndrome, programmers can lose the big picture and in the worst case start defending the disadvantes of their respective favorite language as actual advantages. So what to do? Alan Kay's dictum of perspective being worth 80 IQ points can help us here: Try to learn a new language or a new tool every once in a while, and try not just to judge it from your favorite language's point of view. Try to adapt to the culture around the language, try to really learn the idioms. And then transfer this advice to all other aspects of life.