Yet Another Programming Language

The other day someone asked me if I had written anything Python. My response was a quick “no”. I’ve invested a lot of time in Perl and PHP (and to some extent Java) and I’d have to have a really good reason to learn Yet Another Programming Language. CPAN and Pear are rich API libraries and any newcomer would have to rebuild all that stuff and I’d have to learn it all over again. This also made me feel very old and curmudgeonly.

This morning I came upon the latest Joel on Software article reviewing the book Beyond Java. The article directly answered my question about why Ruby or Python is better. The article got me curious, I went over to Safari Online to see if they had it. They did and I started reading. In three or four hours I got through the whole thing, the first time I’ve read an entire book online.

The author might as well have titled the book, “Java, Schmava – Ruby’s Where it’s At” and I expect this marks the last book he’ll write concerning Java. The rest will be about Ruby. The book confirmed my feelings that Java has gotten way complicated over the years – far beyond the simple servlets I used to write.

That said, I was impressed with the introduction of Ruby and what it can do. Recently I’ve found that my willingness to build web apps is tempered by my dread of building get another form to edit data in a database. It’s tedious and boring. I wrote a framework in PHP that discovers database schemas and creates objects for me, eliminating the need to write SQL most of the time, but that only goes so far. Ruby on Rails seems to have solved the database abstraction problem and the web interface problem.

Personally, I’d like to be able to settle on one programming language. Since every browser in the world supports JavaScript, it’s clear that language isn’t going anywhere, so it might as well be JavaScript. Unfortunately it hasn’t caught on in servers, despite support in IIS. It just drives me crazy keeping syntax straight while flipping back and forth between editors in Perl, PHP and JavaScript.

I’ve got a little tool I’ve been putting off writing and this book helped convince me that I should write it in Ruby. We’ll see how it goes.

3 Comments

  1. I recently had a potential hire send me some example source code, it was php and javascript intermixed. What made the context switch even worse was he prefixed all his javascript variables with ‘$’. Man was that confusing, naming variables (which proformed similar functions in both php and javascript) the same exact thing.

  2. Ah yes, Java has gotten way more complicated. I used to write simple servlets back in the Java 1.2 days, but now Java is about a ton of stuff that I have not kept up with like EJBs, Spring, Struts, JFaces, Hibernate – it all seems a bit over-developed. “Heavyweight” is the word that gets thrown around a lot.

    And yes, writing plain vanilla PHP pages gets to be tedious. It definitely feels like I’m working at a lower level of abstraction than what is warranted for the task.

    If you like Ruby on Rails, but want to see something that’s in PHP instead, check out CakePHP, which I’ve messed with a little bit. And of course Python has a slew of these frameworks like Django, Twisted, etc.

    Another really interesting web framework is Seaside, which is a web framework for Smalltalk. The really interesting thing about Seaside is how it abstracts aways all the details of web apps and makes them look like regular callback-based GUI apps, from the programmer’s perspective. Lisp has a Seaside-like framework which I have not tried called UnCommon Web Framework. Interesting stuff. I have a few links to this stuff on my blog as recently I’ve been messing around a lot with various languages.

Leave a Reply

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