Learning new programming languages
The Pragmatic Programmer suggests learning a new programming language (at least) once per year. Specifically, you should learn a language that changes the way you think about things - learning C# if you know Java doesn’t count.
Last year I decided to learn Ruby - a lot of people told me how great it is. At first I thought it was pointless, but I eventually dived in. I’m glad I did! I’ve since fallen in love with language.
Ruby is an incredibly clean and concise loosly typed OO language - a much purer OO than Java as everything is an object. It has some very nice features such as blocks/closures and the ability to create new types on the fly.
But what it really taught me was the power of simplicity. Using Ruby I could solve problems quicker, with far less code which was easier to maintain and well designed. And the code looks so good to - zero fluff. Learning about simplicity was very much a theme for me last year.
On top of that I had to get to grips with maintaining loosly typed code. I never really mastered this in my Perl hacking days which is probably why I love Java so much. However, I’ve since become test-infected and cannot write a line of code that isn’t test first (seriously - I can’t - it’s annoying sometimes!). The great thing about becoming test-infected is you end up with very very strongly typed code. Effective unit tests show many more problems than the compiler as they actually test the code does the right thing rather than just if it’s syntacticly correct. And the tests provide an excellent reference manual for your objects.
So anyway, Ruby has changed the way I think and I really would write business applications in this language (if I could convince the clients I work for).
But it’s a new year now and I’m looking for a new language. So what do I learn?
Smalltalk has been recommended but I think I may have already learned some of it’s most important lessons through Ruby. From chatting to colleagues, I’ve narrowed the list down to:
So, which one should it be? How will they change the way I think? What will you be learning this year?