Five Programming Languages You Really SHOULD Learn Right Now

eweek.com’s article on ten programming languages you should learn right now is the most ill-informed pieces I’ve read in a while. Here’s my (hopefully better) attempt.

Five Programming Languages

  1. Scheme. If you come from a “curly braces” background you should learn a functional language. As Eric Raymond says about the very similar Lisp:

    LISP is worth learning for a different reason ā€” the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot.

    I prefer Scheme because it is purer (no need for funcall).

  2. Erlang. Another functional language. Concurrency done right. In the multiprocessor future this could be very important indeed.

  3. Ruby. A conscious attempt to make a programming language that is a joy to use. String handling from Perl, OO from Smalltalk, closures from Lisp/Scheme.

  4. Javascript. The only way to create a rich UI in current web browsers.

  5. C. For when things must be fast. Use with Ruby, Python and many other languages when you need to optimize a section of your code for performance.

C, Ruby and Javascript are on the original eweek list. As for the other seven on there:

Maybe

PHP – Quick and dirty. Yes, it’s quick, but it’s dirty.

Python – Dynamic, fairly intuitive, list comprehensions are great. But explicit self? No ternary if? Significant whitespace? The OO feels tagged on.

No

VB.NET – Hidebound, moribund offering from equally hidebound and moribund company. Plus it is inferior to it’s sibling C# in every conceivable way.

C# – Java with a little extra syntactic sugar. Not worth paying the Microsoft price for.

Perl – Somewhat deserved reputation as “write only”. Other languages (Ruby) have absorbed the lessons of perl (mainly – have brilliant regex support) and moved on. Once important, but less so every day.

Java – Bruce Tate wrote “Bitter Java” (2002), then he wrote, “Better, Faster, Lighter Java” (2004), then he wrote, “Beyond Java” (2005). You get my point.

Agree? Disagree? Think I’m a lunatic? Make a comment!

30 Replies to “Five Programming Languages You Really SHOULD Learn Right Now”

  1. Wow, the comments on reddit can be a little harsh on an article you whip up in 10 minutes on a Saturday morning. I guess it was the wrong place to post something that’s rude about Python!

    I don’t know if this is a permanent link but you can currently see the comments at http://programming.reddit.com/info/irqi/comments

  2. About python’s lack of a ternary if: maybe it’s unnecessary to have one since the boolean operators return their operands ala scheme/lisp/javascript/etc…

    For example, let the variable a have the value 2 (a = 2). Then:

    print (a == 1) and “a is one” or “a is not one”

    gets you the same result as

    print (a == 1) ? “a is one” : “a is not one”

    But, one can use boolean operators strung together in ways that might be less confusing that nested ternary operators:

    print a or b or c or d

    instead of

    print (a ? a : (b ? b : (c ? c : d)))

    This is expecially noticable when a,b,c,d are expressions instead of variables. The ternary operator really starts becoming cumbersome if the expressions are complex since they must be stored in throw-away variables. Boolean operators seem cleaner…

    print func1() or func2() or func3()

    rather than

    print (a = func1() ? a : (a = func2() : a ? func3()))

  3. I agree that Python’s “x and a or b” is pretty powerful if you need to chain more conditions together. But there’s a catch: “x and a or b” is not equivalent to “x?a:b” when a evaluates to False. In fact, if a is an empty dict or list, your expression will always return b, no matter what x evaluates to! This is why they’ve added a real ternary operator in Python 2.5: x = true_value if condition else false_value.

  4. Conditional Expressions are in 2.5. Read about them here:

    http://docs.python.org/dev/whatsnew/pep-308

    They take the form:

    x = true_value if condition else false_value

    Examples:

    contents = ((doc + ‘\n’) if doc else ”)
    level = (1 if logging else 0)

  5. I was just about to say what Troy said about python.

    No comment on the quality of C# but: with the both express editions and the mono project, the price is actually $0.

    As for C… I wouldn’t use it directly for making python stuff fast. Pyrex is so much nicer. If it weren’t for all the legacy code out there, I wouldn’t use C at all… D is so much cleaner!

    Good top 5 list though. Erlang especially looks really cool. Thanks!

  6. Scheme. Why should we belive that will be any more useful than LISP?

    Erlang. Seems to be useful for a very small set of problems, but it cetainly isn’t a good general purpose language. And really, how may people are going to work on the kind of program it is useful for?

    Ruby. Flash is the pan or the real deal? I think it is still to soon to tell, but it is probably worth looking into.

    JavaScript. No question there.

    C/C++. It sucks. It has always sucked. It will always suck. Still, it is something everyone should be exposed to because it is so common.

    VB.NET – I seriously doubt that you have ever even seen a real comparison between VB and C#. .Net. COM interop in C# takes a rediculous amount of extra code. (And Microsoft Research is pouring their new stuff into VB, not C#, but that isn’t a reason to learn it now.)

    C# – Do you plan on writing code for GNOME? If so, you better learn C#. Unless of course you want to spend ten times as long trying to code in C.

    Perl – No offense to perl users, but it does seem like it is on the way out.

    Java – If you know VB or C#, you can pick up Java in about a day.

  7. Don’t forget that in addition to Python’s other shortcomings, it’s lambdas are crippled in that only one line of code is allowed in them.

  8. Jonathan Allen,

    > Scheme. Why should we belive that will be any more useful than LISP?

    Because there is immense conceptual power that can be learned in Scheme. Likewise Haskell and Lisp. Even if you never code professional projects in these languages, you can apply lessons that you learn here back to other programming languages such as Ruby or even C#. Still, it’s arguably easier to learn these things in a language more directly focused on functional programming.

    > Perl – No offense to perl users, but it does seem like it is on the way out.

    Perl is still brilliant for its original purposes, which is for text processing and as a glue language to tie other systems together. The spread of regular expressions has arguably helped other languages catch up for text processing, but I’m not sure there’s another language even now that’s as convenient for stitching together shell-type scripts.

  9. Well, I came from Reddit and I agree with you completely, with the possible exception that if you don’t know any Java you should learn some Java, but everyone knows Java. It might be worth doing a week of X86 or Sparc assembly, too. Really DSPs are where the interesting assembly things are at but the learning curve for that is crazy steep.

  10. perl is not irrelevant. there is still no equal to CPAN, and i don’t see one on the horizon. also note that all those years that you thought perl was “going nowhere”, people were making it more efficient, fixing bugs, cleaning it up. this is called “maturity” and is desirable in your tools.

  11. 1. Lisp. More useful than scheme
    2. Python. Get a grip, Python is awesome
    3. Javascript. A given.
    4. C. Yes, it’s important to know the Portable Assembly Language
    5. Assembly for Z80, 8051, pdp-11, vax, x86, etc (CISC-style)
    6. Assembly for ARM, MIPS, etc (RISC-style)

    If you know these, you can be a decent programmer.

  12. From a programming theory standpoint, your list is probably better. But eWeek made it clear that the list they created was a list of languages that would look good on a resume and provide job opportunities. Your lists are both valid, but they’re answering different questions.

  13. The eWeek article is based purely on how many jobs there are, on hype and so on. Actually, knowing what eWeek usually writes about, I strongly doubt anyone in the eWeek staff has ever written a program longer than 100 lines, let alone knowing what Erlang is.

    As for the language list — I couldn’t agree more, from a technical point of view. Java and C# got their hype, which brought them more clients than their actual quality. I’d always use C/C++ over C# or Java.

    As for Scheme — it’s clean and small enough to be useful, both embedded and on its own. I’m went the Scheme way, after using LISP for about two or three years, and it’s — if not better, at least cleaner.

    I have to admit (shame on me…) that I didn’t really try to learn Python so far — I simply didn’t… like it? It’s a strange feeling. I hugely apreciate Python’s ideas and language, but I hate it as a tool. I went through the tutorial at some point but never did anything serious.

  14. Heck with those Reddit guys, I came from Reddit too and your language-learning list is identical to mine, except that I also add Haskell, maybe Smalltalk, and I’m totally sold yet on Ruby. Python’s lack of closures longer than one line makes it seem kinda boring, and Perl is just too big and messy for me to remember unless I use it fulltime.

    You might also want to think about how you’d write a good desktop gui app without too much hassle, having written off java, vb.net, and c#. Maybe Boo?

    Learning languages based on what employers are looking for *now* is all well and good, but it doesn’t prepare you all that well for the future. Your list does.

  15. > Perl is still brilliant for its original purposes, which is for text processing and as a glue language to tie other systems together.

    On what systems? Would you say it is like VBA for Windows?

  16. Hey, I came from Reddit also.

    I’d agree on Scheme, although Common Lisp has the libraries to do useful stuff. L#, Lisp for .NET may be worth checking out. But yah, learning Scheme is a good way to learn tail recursion techniques.

    Erlang… yeah, sort of… ish… I’ve been playing with it recently, and while it does concurrency real well, it sucks so bad when it comes to strings it isn’t funny. Take the concepts of Erlang and add proper data types (keeping the atoms/symbols) and lose the Prolog syntax and you’d be onto a winner.

    Python – I’m going to have to disagree with you on this one. Ternary operators are coming in 2.5, and quite frankly, I very rarely miss them. It doesn’t really make my “Most important language feature” list. The significant whitespace is only a problem if you’ve not spent much time in Python. It’s make eyeballing code a lot easier than “attack of the curlies” does. The whitespace tends to be the strawman of Python. šŸ˜‰

    Explicit self fits in with the whole “Explicit is better than implicit” design philosophy of Python, and for a newbie, it’s more intuitive than implicit references to instances – there’s a reason that C++ and Java have a this keyword, it’s for code clarity. Python just makes it mandatory.

    I don’t understand what you mean by “OO feels tacked on”, perhaps an example would clarify.

    With regards to Ruby, as you may have guessed, I use Python, and to be honest, with Python and Ruby it’s an either/or choice for the most part – they’re pretty similar, and they seem to be cross-pollinating each other with good ideas. I played with Ruby, but it didn’t do anything that Python couldn’t, so I lost interest, this tends to be a common experience amongst Python and Ruby developers – once you’re familiar with one, there’s not much to make you want to try the other one.

    Python is faster and has a more extensive library of modules, but Ruby feels familiar to Perl programmers, and of course, has a killer app, RoR. Although I’d mention that Django and Turbogears are shaping up nicely; there’s a joke that Python has more web frameworks than keywords.

    Python also seems to be documented far better, but this is only a matter of time. I’d say the main difference between the two is simply personal syntactical preference. About the only thing I wish Python had is pattern matching for functions.

    Oh, also, with IronPython 1.0 just being released for .NET and Jython being long established, knowing a bit of Python can be helpful when working with .NET and the JVM – although I note that JRuby is getting an official blessing.

    Javascript and C? I fully agree with your assessments there. I’ll disagree that PHP can be quick… it’s quick to write, but to write it well is hard (well, for a PHP newbie). That said, it’s a default SSL on most Apache installs these days.

    And good luck on dissing Python on Reddit.com – go for the double and diss Ruby next post. šŸ˜‰

  17. I am and always will be an eternal newbie, but I’d like to comment this: Shouldn’t all these languages be categorized in these 3 clearly distinct subsets:

    1) Compiled languages, for example: C
    2) Interpreted languages: for example Perl
    3) “Bytecode” (intermediate) languages: for example Java

    Development style differs hugely depending on the category. Maybe we should choose at least one of each? šŸ™‚

  18. >Agree? Disagree? Think Iā€™m a lunatic? Make a comment!

    Not much point when you delete the ones you don’t agree with.

  19. Pingback: ChrisBellini.com » how to be an awesome developer in 74 seconds
  20. Mr C: Perhaps I got a bit over-zealous on deleting “offensive” comments. Not sure you were adding much to the discussion, though: ‘Am I the only one who is fed up of these “my language is better than yours” flame-baiting, blog-me-up-scotty, poll-o-ramas?’

  21. >Not sure you were adding much to the discussion

    Perhaps a fair point. Maybe not. Who knows. That’s why I posted it. There are a load of blogs, articles etc on “what is the best language”. They all get lots of responses, because it’s a pretty emotive issue – we all have our favourites and it can easily degrade into a slanging match of “your language sucks because it doesn’t have feature x” followed by a response of “yes it does, you just don’t know how to use it”. blah blah blah.

    Next year, there will be a different set of “5 languages you must learn” and so on – it’s not practical, or possible to keep up with every cool language / framework / methodology. You would spend your life chasing your tail and never doing any real development work.

    Which is why I also said in my post something like: “pick a language, learn it well, pass on your knowledge to others”.

    Hey, just my opinion. But that’s the whole point, right?

  22. Hmm, not bad. I’d suggest a slightly different partitioning:

    1) a “hard” language, where you care about memory. You’ve never programmed if you can count the number of coredumps of your own code.

    C, maybe C++ or assembly. Java?

    2) a “soft” language. Ruby, maybe Perl. Best is Python so you can test things interactively, it has readable syntax, no braces, it’s brief, and it has both functional, OO, and Lispy features.

    3) a Lispy language, because you have to think in such a different pattern. Code, data, who cares? It’s all big blobs! Scheme, Common Lisp, maybe Smalltalk or Prolog or CLIPS if you dont have to worry about getting a job. šŸ™‚

    arent languages great?

  23. C/C++ is my favourite language, I prefer it, it is the most powerful and flexible. It is also good if one familiarize oneself with Assembler, because it puts you closer to the machine reality and its understanding.. I mean, even if you don’t need ASM in your job, it is good just to familiarize yourself with it.

  24. Steve Yegge’s latest post is somewhat related (even talks about Ruby v Python a little) and a lot more articulate than mine: http://steve-yegge.blogspot.com/2006/09/bloggers-block-4-ruby-and-java-and.html

  25. Having just written a script in Ruby I know from experience that its Regular Expression support is not as good as Perls – its engine does not support the same rich options nor performs as fast. Though the white-space nonsense in Python makes Ruby the obvious choice between those two.

    What I’d like is a language with ECMAScripts syntax (including nice new E4X native XML types) and versatility, Perls regular expression engine and language integration and Pythons list handling, tidy Virtual Machine and extensibility. Throw in decent inheritance (ala both Python and Ruby) and it’d be grrrrrreeeeat.

  26. “Not worth paying the Microsoft price for” — you mean, free?

    http://msdn.microsoft.com/vstudio/express/visualcsharp/

  27. Not a cash price, Gabe, a toll on your soul!

    I know that because it has a published standard and it’s been going in some interesting directions that people are questioning how high that price really is. But why find out?

  28. Dude have you ever learned any type of programming in college.

    Ask any type of IT pro or student what are the top 5 programming languages
    and he or she will say C#, C++, Java, Visual Basic, and MySql (database programming)

  29. How wonderful to be young and to be so sure that you know it all Mr. Bentley!

    I suppose that’s what I deserve for writing a piece like this that takes a similarly strident tone.

    As an “IT pro” (what a horrible designation) I caution you that popularity and “should I learn that” do not necessarily go hand-in-hand, particularly in a fast-paced field like computing.

  30. I think that the languages that you should learn really depend on the type of programming you plan on doing. I would agree that you should start with C. It provides a strong foundation for you to build on as a programmer. After that there are a lot of different directions that you could head in depending on the type of programming that you will be doing. Personally I use WPF/C# on a daily basis because I do primarily Windows programming. I also use JAVA very often while maintaining legacy applications.

    In short I don’t think that there is a specific list of languages that will make you the perfect developer for any job (unless the list is ALL).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.