Programming Languages

Programming Languages

Programming Languages

I saw this interesting post regarding the popularity of programming languages and it made me start thinking – why so many languages?

I’m a big lover of Programming Languages. I know there is not one language suited for all tasks and whilst I may dislike certain languages I also realize that in the end most things can be accomplished in any of the common general purpose languages available today. Not all will be as concise or as readable or as “pure”, but give or take you can express most problems in a slew of different languages. Of course there is the odd whack job who thinks you can do everything in SQL or COBOL, in fact I remember meeting a guy who actually wrote a COBOL compiler in COBOL – now that was a dedicated individual!

When I wrote my Ph.D. I developed five different special purpose languages and wrote interpreters for them all. The core language was called CARESS – no it was not a contraceptive, but stood for “Concurrent Assignment REpresentation of Synchronous Systems”. It was even used by the third year undergraduates at the time. Nothing earth shattering but I felt the need to write these languages and they became a integral part of my Ph.D. Naturally, those languages don’t exist today. But many from the 70’s, 80’s, and 90’s do.

But why so many? I’d like to think it is not just about making money and market share, but rather because developers are passionate people who feel so strongly about their craft, that they design a whole language that enables them to express themselves perfectly.

Looking at the list I get a warm satisfaction seeing that my old love “C” is at 2, and Python is at 7 and rising.

I’m looking forward to doing a lot more with Python later this year, although sadly it seems my current project will take longer than I hoped – if only I had a more expressive language …

John Tucker, BA (Warwick) MSc, PhD (Bristol), FBCS, CEng

John Tucker, BA (Warwick) MSc, PhD (Bristol), FBCS, CEng

One of the things I learned whilst working on my Ph.D. was a sense of rigour. My advisor: Professor John Tucker fought long and hard with me to curb my sloppy ways and instill a deep seated sense of precision and rigour in my thesis and code. This was not an easy task but I believe it was the single most important lesson I learned during my Ph.D.

Nothing frustrates me more than when I see sloppy code or practices. If you have a set of coding standards for testing, documentation, naming conventions, and even layout – use them. If you don’t, then maybe you should get some.

One of the reasons I am drawn to Python for my next major project is that the language has a very clean semantics and when you write using Python it just flows very naturally. The precise indentation requirements make even the layout of code always look consistent. Also, with facilities like doctest it becomes possible to combine the code, with the documentation and testing in a very clean and precise bundle. One can certainly not accuse Perl or even “C” of being rigourous.

No one would ever say John Tucker was a great coder, but he certainly helped me write better code and design stronger systems that have lasted for years. I think a big reason for this is the sense of rigour he instilled in my over twenty years ago. Thanks John!

Drupal Rocks!

Drupal Rocks!

Wow what a truly brilliant system Drupal is. Dries Buytaert, creator of Drupal, is a rock star for sure. I was able to knock this site out in a few hours thanks to Drupal. I have spent the last fifteen years building custom web development solutions and over the last twelve months I have seriously questioned why am I bothering when systems like Drupal are available.

Luckily there are reasons why Drupal does not work for us, primarily to do with mass customization and new application creation. However, if you are looking for a solution that covers all the basics and more, you’d be hard pressed to find a better system than Drupal. I question what I’m doing every time I use a Drupal site.

Thanks Dries your masterful code is appreciated here in Austin, Texas!

The Original K&R - Still a Classic!

The Original K&R – Still a Classic!

If you look closely you’ll notice that the favorites icon for Code Trials is a faded blue “C”. This is taken from, the seminal book on programming, the first edition K&R, or more fully titled: The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie.

Of all the books on programming I’ve read, this is by far and away the one that had the biggest impact on me. I programmed in “C” for a close to twenty years. I think “C” is a beautiful language. Sadly I have not written much “C” in the last ten years, and when I do I’m rusty.

After the dot.com crash, I wanted to switch to an interpreted language for web development and back in 2000 with so much experience in “C” the only real option for me was Perl. Perl is a fun language for sure and thanks to its incredible selection of libraries there is pretty much nothing you can’t do in Perl.

However, Perl is not a beautiful language. Don’t get me wrong, I like programming in Perl and have written some of my “best” code using it. But it does not have the beauty or elegance of “C”. In the new year I will embark on the creation of a new platform that will permit Digital Cheetah to build 1000’s more custom websites for a fraction of the development required with traditional systems. For this project I will not use “C”, or Perl or Ruby or Java. I will use, what to me is rapidly becoming the perfect language, Python.

Over the coming weeks and months I will revisit why I love Python so much.

If you were building websites back in the late ’90s you will probably remember how XML was cropping up everywhere. It was going to replace SQL and HTML and cure the common cold too. The vendors were promoting it as a panacea for all the evils of the web. As a result I became very disenchanted with the whole XML movement.

Over the last ten years the hype has subsided and thankfully XML has not taken over the world. However, it has emerged as a fine language for transmitting complex and arbitrary data structures between systems and over the web. It is well supported and most languages provide routines for its easy manipulation. I have just written a library that required importing and exporting complex data structures between websites and found it easy to do in XML. I saved a lot of time because I did not have to invent yet another encoding and I am able to reuse the code for my next project.

I for one will be making more use of XML in the future.