I was having a discussion with some programmer friends who said that they see Ruby programmers (in particular) producing a lot of code that’s ‘too clever’. So I’m wondering what would that look like? I’m referring to the unnecessary use of an obscure language feature in a context in which something straightforward would have worked just as well or better. Know any good Ruby examples of this?
Share
After giving a straight answer to your question, I’d like to also dispute the premise; whenever a group of programmers characterizes the users of another language in this way, the odds are that they are telling you more about themselves than about the community they are describing.
You could, for example, accuse c programmers of being too obsessed with low level details, or haskell programmers with being blinded by their desire for functional purity; perl mongers for brevity, etc. But you would, IMHO, by getting the causality backwards when you do so.
When I want to write a program that is best expressed in a certain style, I try to choose a language that supports that style. Sometimes you want a tool that lets you do unusual things, and for such a task having a language such as ruby is as valuable as having mathematica for math or javascript for browser manipulation in your toolkit. If I want to play with typography I hop into postscript because that’s what it’s best at.
It’s like saying ‘Have you ever noticed that people who use power drills are always poking holes in things?’ It’s true, but it kind of misses the point.