Thursday, 28 September 2006

Computer language timestamp

My attitude on various computer languages has gone through a lot of evolutions over the decades (I remember as a grade schooler I thought the FOR...NEXT loop was way too complicated), and I wish I'd written out what I thought at the time since it would be interesting (and probably pretty embarrassing) to re-read later ("Perl is AWESOME! Anybody who writes anything using anything else is stupid and wasting their time"—imaginary me, circa 1998). So I've decided to start now and sort of document what the computer languages I actually use (or play with) are these days, and what I think of them. This may only be useful to me since I'm the only guy with a clear idea of how I used to think, but it's my blog and I write what I want.

  • Java—What I use for 100% of my time at work (I'm not counting stuff like SQL, Javascript, XML, or "AJAX" as programming languages in the context of this discussion) and probably 80% at home. Which means that unlike a lot of people this is a language I actually enjoy using. Like everybody else, this is not a language I liked at first. But as I have learned more and more about programming as "software engineering" I have got a lot more respect for Java.

    Another huge evolution has been my new conviction that programming languages are not in and of themselves relevant—except that sometimes knowing a better language can be a shortcut that lets you get somewhere faster than everybody else. Platforms are what matter. Not libraries, platforms, as in the 'official' language of a given computing platform used and supported by whoever puts out that platform. The languages that become important and widespread are the native languages for a platform, period. C is important because of UNIX, C++ because of Microsoft, Objective C for Apple. And Java for the Java platform, the only one that's portable. C# is rapidly becoming important because .NET is becoming Microsoft's platform; it will increase at C++'s expense, as, I think, we are already seeing. If Java's libraries were not so vast and complete as to qualify for 'platform' status Java would be a second-rate Ada for me. (In that Ada is the ultimate "software engineering" language, but it has poor libraries availible to the casual coder—and besides, it is not the "native language" of any platform.)

  • Lisp—My old favourite has been relegated to second place following my realisation regarding platforms trumping languages. Still for the most difficult problems I will turn to Lisp, and I still back the maxim that those who do not know Common Lisp are doomed to reinvent it, poorly. But IDE's like Eclipse make development in Java almost as pleasant. Anyway, Lisp is my language of choice for modelling complexity, but for simple tasks it doesn't have the libraries (and for some reason I find it a lot harder to get used to a third-party library in Lisp than in other languages).

  • Perl—Perl hasn't been one of my favourite languages since high school, and I stopped favouring scripting languages over languages that enforce good software engineering practices the first time I had to rewrite a 10,000 line program of mine that didn't scale (in fairness, that program was written in Scheme, not Perl). But I have recently started using Perl a lot more, since a "right tool for the right job" approach practically dictates that it be used for text processing and glue code. Nowadays though I don't write any larger programs with it, but I am very glad I got back into it.

  • C—I've been brushing up my C a lot this year, partly out of guilt at not contributing to Open Source (another topic in itself) and partly because it's the most important programming language in history. I got K&R for Christmas (I had read it a couple times but never bought it because of the price) and have gone through that, and done a few of the excercises, and also did some stuff with Glib and ncurses, and did a Linux kernel device driver tutorial.

    I have only used it for toys though, since I have yet to come up with a project for which it meets the "best tool for the job" criterion in 2006. But I am hugely glad that I decided to brush up on it, because a thorough understanding of pointers is actually a great help in writing Java code (which, although it doesn't have pointers, does pass objects around by reference; and understanding this clearly is paramount for judging the cost of some things, and eliminating redundant lines of code in others). So I think that getting my C knowledge straight has contributed enormously to making me a better and more knowledgeable programmer, even if I don't actually use C.

  • C++—This was the first PC language I learned, which led to me not touching it again for 8 years. I don't like C++, I still see it as error-prone and unportable, with its defining feature being that every language feature known to man has been crammed into it at some point. Nonetheless, I thought that as a professional programmer it is something I should be competant in, so I have set about relearning it from scratch. The language has changed so much from my Visual C++ 1.0 days that it's almost unrecognisable... I really would like to learn this well enough to have it on my resume and maybe use one day at work (it feels precarious having only Java as a sellable "work language" on my resume), but I do not see myself coding in C++ at home by choice any time soon.

  • Stuff I don't use anymoreScheme, which was once my weapon of choice, now isn't even installed on most of my computers. I'd probably use it (and Dr. Scheme) if I were teaching programming to beginners though since its regularity is very nice. Tcl/Tk used to be very good for portable GUIs, but there are other ways to do this now, and Java is more portable. Prolog was a real eye-opener to learn, but I haven't used it in a long time and my textbook is locked up in storage in Canada, so it's pretty irretreaveably forgotten for the time being. C64 BASIC was once synonomous with programming for me, but I have not used BASIC since high school. Logo however has the sole claim to glory of being the only language that I haven't used since elementary school.

  • Stuff I'd like to use moreAda, Fortran 95, Assembly. Mostly for learning purposes, although the first two, Ada especially, might be useful for something non-trivial if the problem played to the language's strengths. I haven't done much with Python or Ruby either, although despite this they would probably be my recommendations if a non-programmer asked me what programming language to learn since they are so user-friendly and have great libraries.

So there's a good snapshot of my views on various programming languages circa 2006; it will be interesting to put it in the time capsule and see how it stands up to future scrutiny.

Posted by jon at 11:28 PM in Programming 

Comments on this entry:

Left by jon at Thu, 1 Sep 5:10 PM

I agree with you Vahram that C++ is a more powerful language than Java. And I know that it can be very portable, but in the business world I think it's very rare for companies to use it that way. But for whatever reason being less error-prone has become more and more important to me over the years (that's why I'm thinking I would like to learn more Ada, even though it's not a very interesting intellectually like Haskell or ML would be). Anyway, thanks for the feedback!

Left by Vahram at Thu, 1 Sep 5:10 PM

Hi Jon.

Well, you're getting less categorical in your statements now. I do remember your love affair with Perl, but honestly, it has been one of the most unpleasant languages to learn and use in my practice. Poorly structured, somewhat counter-intuitive, and talk about annoying syntax. It can be good for scripting and string manipulation, but hardly for anything more serious and/or of larger scale.

I did some projects using Java (image manipulation, some servlets, and such). Can't argue that it's pretty clean and productive and portable and has lots of good libraries. But it still leaves an impression of a weaker C++. I think it's not as different as it advertises itself to be (not too many new ideas, nothing really revolutionary), it's just somewhat cleaner. Garbage collection has been around for decades, and it's not really a flawless technique. Making OOP a religious dogma and banning all other software engineering methods is also not the brightest idea.

As for the portability of C++. I'm working on a C++ project that is portable on a number of platforms, has order of millions of lines of code, and I think it would've been much more painful to develop the same project in Java. Not to mention the speed difference. But you do have a point about C++ being error-prone. There seems to be a tradeoff in all cases between the power of language and how much harder it is to use it correctly.

Anyway. Just my thoughts, not a call for a religious war :)

Left by Tom at Thu, 1 Sep 5:10 PM

I remember when you C++, and then when you rebelled against it with the highbrow sophistication of Perl!

Incidentally, my list is static at:

VBA for Excel: The only thing I ever use.
IDL: The first programming language I attained any proficiency with, which is awesome because it seems pretty specialized.
Java: I took a class on it. It was all right, but has only really been useful insofar as it makes writing and editing macros in Excel easier.

Also, how were those board games? I love board games and have heard a lot about the European ones. Keep me up to date on how that progresses for you and Emilie.

For American board games Cranium is still the undisputed champion for groups of 4+, because *everybody* gets into it no matter what their knowledge, skills, or area of expertise. The only drawback really is that you need 4 people to play it, but that makes the occasions when you do that much more fun.

Left by Vahram at Thu, 1 Sep 5:10 PM

I would also add ML or Haskell to your list of languages worth looking at. They have many interesting features I haven't seen in other languages. For instance, the type inference system, pattern-based definition of functions, and there's more. I worked mostly with Standard ML, but I know there are many dialects. O'Caml seems to be particularly successful, and it's a French product ;) I can honestly tell you it's a pleasure to use these languages. I have been writing something about static analysis of functional programs in ML, and it did its job better than expected.

Leave a new comment

« September »
Older articles
Non enim id agimus ut exerceatur vox, sed ut exerceat.