When all you have is a hammer

… everything looks like a nail. The point I would like to make here is this: when all you know is C#, everything looks like a class.

(Note: When I say C#, I mean Java or C#. At the core both are the same. I only mean to avoid from having to repeatedly say “Java/C#” which is distracting.)

After having had to continually switch between PHP and C# over the course of a year, I’ve come to realize that different languages are better at solving different types of problems. Actually it’s not really about the language per se (which is just syntax), but the paradigm. PHP is excellent for UI-driven websites with fluid requirements and short release cycles. C# is excellent for Windows apps and web services. Java is excellent for mid-tier components that can run on Unix. C++ is excellent for writing device APIs. VBA on MS Access is excellent for form-driven apps that come with their own database on file. Perl is excellent for text processing.

Thus, the more languages you know, the higher the likelihood of your being able to use the best tool for the job. Ultimately, that’s all a programming language is: a tool, suited for a particular purpose.

For some reason there are people who identify themselves with a particular language. They have a mental block when it comes to learning new programming languages. I think that’s a mistake. Wouldn’t it be better to be able to use the best programming language for the job at hand, and to identify oneself with this ability?

Having said that, it isn’t easy to get the chance to practise a new language for a real project. But at the very least one should keep an open mind, and to jump in without hesitation when the opportunity arises.

P.S. There are also other variations to the first paragraph: when all you know is PHP, everything looks like an ordered map; when all you know is Lisp, everything looks like a linked list; when all you know is JavaScript, everything looks like a collection of named values.

15 April 2010 | Uncategorized | Comments

Comments:

  1.  
  2.  
  3.