Learning new programming languages (by )

I program computers for a living, mainly. This involves writing programs - instructions for the computer on how to do things, written in a "programming language".

There's a lot of programming languages out there; mainly because it's easy to create new ones, and an interesting exercise to do so. But if you browse a programming jobs site, you will see a lot of people who say "I am a Java programmer". Or PHP or Perl or C# or C++ or Python or Visual Basic. This means two things: that a few programming languages hold the majority of the "market share" and that people consider "their language" an important part of their identity.

A big part of the reason for this is that people are scared to learn new languages after they've gained experience in one. A lot of job ads ask for things like "four years Java experience" - there's this idea amongst clueless recruiters that you can arrange Java programmers into tiers based on how many years of experience they have; "This job needs a four year * Java programmer, while that one only needs *two years" - which means that you've spent the past four years working purely on Java projects. So if you're a three-year Java programmer, you're much better off staying clear of other languages, and getting your exclusive extra year, rather than going back to square 1 and being a zero-year PHP programmer.

Of course, this is really rather rubbish. Programming skill and skill in a particular language are only slightly related. The experienced programmer can learn a new language, and after a week or so learning the new syntax and libraries, carry over the concepts they learnt programming with other languages (as long as it's the same general kind of language - more on that later, though). When you learn a new human language, you don't need to relearn skills like critical thought just because the language you're reading the information you're criticising is different. Concepts like love and betrayal are the same the world over, no matter what language the poem is written in...

Most languages in use today - all those I listed in examples above - fall into the category of object oriented imperative. This means that they tend to express programs in terms of things passing messages between themselves, causing the creation of new things or changes to the existing things, although the terminology this is described in varies immensely. So learning different languages within that genre is really just a matter of a week or two working rather slowly with an open reference manual beside you, then within a month or two you'll be proficient in it, applying the same concepts you learnt in other languages.

Crossing to other paradigms is more interesting. Generic functional languages express programs in terms of transformations from things to other things, with the transformations depending on the kinds of things you are transforming. Elements of this exist in the object oriented imperative languages; in most, using the + operator on two integers will invoke integer addition, transforming the two integers into a new integer that's the sum of the two, while using + on two floating point numbers will invoke floating point addition, and using + on two strings will invoke string concatenation. But generic functional languages do everything in terms of such transformations; in an imperative language you might tell an object representing a group of objects to add a new object to itself, like putting something in a bag, while in a functional language you'd instead take the old bag and the object and transform the pair of them into a new bag with an extra object in.

Crossing between the three main paradigms - imperative, functional, and logical - does actually require some learning effort, since you learn to go about things in very different ways. However, it's incredibly rewarding, since some languages let you mix and match paradigms within your programs, and if you master all three, you can use whichever one is most appropriate to the particular task at hand.

Many universities will just teach you a single programming language. That's excusable for science students, who will probably be best just learning FORTRAN, but for software engineering or computer science students, it's a very good idea to learn at least one language from each paradigm - and then learn as many more as you can, to get into the habit of picking up programming languages easily, and to get used to keeping programming concepts separate from Java/C++/... concepts in your head. The Department of Computing at Imperial College, where I studied, was good in this respect; there was no standard language used in the course, almost every lecture course that involved programming required us to learn a new language.

Now, I think it's important that all the programmers working together on something use the same language, except when there's good reason to use more than one (for example, a web application written in PHP wil have to use JavaScript for the client-side stuff; that's all the browsers support). In some situations you can write different parts of the same app in different languages and link them together, but you face a lot of effort in getting them to interoperate properly. So if you are company developing an application, you have to pick a language and stick with it as you hire new programmers. That's fine. Sadly, the initial choice of language is often made based on whatever the lead programmer is familiar with or, worse, marketing information produced by proponents of particular languages (Microsoft hypes C#, Sun hypes Java, ...), rather than any actual technical suitability analysis. As such, the mainstream languages tend to be used almost exclusively. But there is another factor: looking on the job boards, you see a lot of programmers experienced in the mainstream languages. As such, they compete, and you can get them cheap, and be sure there's plenty more out there if you want to fire one.

However, I was intereted to learn that at least one recruiter has found that it's actually easier to recruit good programmers if you start a project in one of the functional or logical languages. It seems that better programmers are more likely to be able to grasp the other paradigms, and then be captivated by them as refreshing alternatives to the mainstream. They're then happy to leave well-paid secure jobs programming in 'boring' languages to go and work for less pay at a startup programming in an 'interesting' language, and they're likely to be a better calibre of programmer if they've mastered multiple paradigms.

To some extent, it's a shame that I'm designing a new programming language for my own project, ARGON. There won't be many CHROME programmers to write ARGON applications unless it becomes popular, which can lead to a chicken-and-egg problem. Maybe by the time I get it all implemented (in a few decades, perhaps) it will be considered normal to learn new languages on a whim; or maybe I'll have to do what Microsoft did with their .NET framework and write compilers from existing mainstream languages (or, rather, close variants thereof). We shall see.

No Comments

No comments yet.

RSS feed for comments on this post.

Leave a comment

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales