I like to learn new things. As a programmer I have this affinity toward shinny and cool things. I remember while still at Uni, I used to tell my friends that we should learn both J2EE and .Net, then we wouldn’t have to worry about getting a job.
However, not until after reading “The Pragmatic Programmer: From Journeyman to Master” book by Dave Thomas and Andy Hunt, my affection for learning programming languages goes to the next level beyond Java and C#. Among other excellent recommendations/advices in this book , Dave and Andy taught us in their "Your Knowledge Portfolio" section that in order to be well-rounded developers, we need to set a goal to learn at least one new programming language every year.
They also suggests to treat your skills like an investment portfolio so you should:
- Invest regularly
- Diversify portfolio
- Balance portfolio for risk
- Buy low/sell high (be an early adopter of new technology)
- Rebalanced you portfolio periodically.
Why a year, what can you learn in year you would ask. Won’t we just turn into a jack of all trades? No, the idea is not to be a master in all the languages. No one can do that. But the ideas is to open your mind to different way of thinking through and solving programming problems. So it is much more than just learning different kind of weird syntax. Learning the syntax is one of the most easiest task.
Instead try learning different concepts and abstractions in these different languages. Learn about lambda expression in language such as LISP, Python. Learn about mixins in Ruby. Learn about actor/agent in Erlang. Learn about curry function, monads, fixed combinator in Haskell, or OCaml. Learn about macro in LISP.
In fact, you are in dangerous becoming a blub programmer otherwise. Blub programmer is a concept coined by Paul Graham in his article Beating the Averages.
Paul argues that some languages are more powerful than others and there exists a hypothetical mid level power language called Blub. He describes the Blub programmer as:
- “As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub. “
Although It is debatable that there exists such a continuum in programming language power. But the concept of Blub programmer succinctly described the dangerous of becoming a narrow focused programmers.
Most people without the experience of a programming language can't see that language features as really useful things. If the only language I know were C# and the only web framework that I know were ASP.Net probably I would still thing that ASP.Net is the best web framework in the world. I wouldn’t know it is such a leaky abstraction of web programming. I wouldn’t know there are better alternatives. And if all other .Net developers thing the same way, Microsoft wouldn’t have to fix it and created ASP.Net MVC.
I also found learning different kind of abstractions in different languages increases my knowledge and understanding of the main languages that I used(Java and C#). It is not until I learn the concept of pattern matching that I really understand the Visitor pattern.The other day, I showed my program that does screen scraping(written in Ruby using Mechanize and hpricot) to a Java developer. I used Ruby for this app because I think it is the right tool for the job at hand.
To my surprise he screamed what is that weird looking syntax and hard to understand code, you should have used Java. What, Ruby syntax is weird and hard to understand? That is the weirdest things I've ever heard. Beside that, how long it would take to write the same app in Java. Three or five times at least and with much more noise. Or could it be that I’m the Blurb programmer. What a paradox :)).
Departing thought, don’t think in Blub!
0 comments:
Post a Comment