Programming languages
I don’t have a favorite programming language. I know several programming languages including PHP, Python, C/C++, Java and JavaScript. I know a little Perl, Ruby, Visual Basic and C++ but not enough where I could feel comfortable making judgements about those languages. I would love to learn Smalltalk.
I learned object-oriented using Java which is a great language. It’s easy to learn, has garbage collection, a simple interpreter, has clean, consistent dot syntax and intuitively-named native functions. In addition, there’s loads of support for it. You don’t have to look far if you don’t understand something. I don’t like about it is that it’s purely object-oriented. I cannot write a script with Java (unless I’m using Groovy of course, which for all intensive purposes is considered a different language) and that is a bit of a downer. Everything must be done using objects and that’s great if you developing professional software but not so if I just want to write a little game for my son. I also don’t like the old school clunky array syntax. Really, you must use Vectors with Java and you’ll need the Iterator() object to loop through it, because there is no foreach loop.
I work with PHP and JavaScript everyday and so I should talk about them second. PHP is great language. Its easy to learn, most of its native library is crammed full of C functions so if you already know C you’ll feel right at home. Alternately, if you’re intent on learning C, PHP could serve as a good place to start. Its syntax is similar to Perl and C (almost as if it were a cross between those two languages). At first, I didn’t like the ‘$’ marking for variables, but I’d have to say it has grown on me. After all, its very easy to tell what’s a variable! Unfortunately, the downside is that the code is ugly as sin. Nested function can lead to long lines of code that can be hard to read. There are plenty of frameworks to choose from and believe me you’ll want one unless you want to be up all night coding. Zend is my choice but I’ll leave that for another article.
JavaScript is the other web language I work with and it sucks. Well, that’s a bit harsh. Most of the bare-bones language sucks which is surprising since it borrows so heavily from two good languages: Java and C. There are parts of JavaScript which are very good. But most of it stinks and here’s why: you need far too many lines of code to write simple things that websites need. The DOM tree can be quite tedious to navigate through and to top that off, there’s Internet Destroyer and all of its re-interpretations. Thankfully, to make this language more manageable, there are plenty of JavaScript libraries; jQuery, Ext, Prototype, Dojo and Mootools are some of the best in my opinion.
Python is my leisure language of choice for the desktop and it ain’t bad for the web either. Django and TurboGears are both solid frameworks that make developing a website a breeze and a blast. Mind you, website deployment is usually a bitch given the lack of hosting support. I like almost everything about Python: the syntax, the function library, the interpreter, the philosophy of the language: “there is one obvious way to do it”. The one thing I don’t like, and I’ll admit that its kind of nit-picky, is its lack of traditional operands. I’m so used to using &&, ++ and such that I can’t get into AND, OR or +1. Other than that, Python makes programming a pleasure and an ease and it supports classes, of course.
C and C++, while not as modern and streamlined as Python, deserve their props. There is a learning curve, but there is tremendous power with mastering them. C/C++ served as a blueprint for almost all programming languages after it. I’m in the midst of learning C and later C++ and while its a little more difficult than the other programming languages, the rewards justify it.