One Language To Rule Them All May 05, 2011

PHP or .NET? C# or Java? Perl or Python? Cobol or Fortran? The debate over program language performance has raged since the inception of computers. Everything from server hardware to the compiler/interpreter to type-casting has been placed on the chopping-block. Where do you stand? What side do you take? How do you choose what language to use when starting a new project?

Perhaps we have become so technical in arguing about language performance that we have lost sight of the biggest factor of all: the human element. Sure, sure, there is legitimate realm to speak of compilers and assemblers and interpreters and syntax and built-in features and all sort of cool nerdy things, but in the end it all comes down to the person writing the code. Here are three principles to keep in mind when deciding what language will give you the best performance:

Principle #1: Use what you are comfortable with

Good PHP code will out-perform bad .NET code any day, and good .NET will always out-perform bad PHP! And how does one write good code? By studying, learning, and using a language over time. If you don't know what you are doing, you are probably making some pretty dumb mistakes. Some people have been writing in Java their whole lives, but have never taken the time to actually learn how the language works and do in-depth performance testing. For example: does an iterated for loop always out-perform foreach? Is there any situation where foreach is better? If you've never tested it, you'll never know.

Testing takes time. Valuable time. But nothing in life comes easy. Where you invest your time, there you will reap knowledge. Don't settle for being an intermediate in three languages, become an expert in at least one of them!

Principle #2: Understand the differences in application

Have you ever wondered why people make new programming languages? It always starts with a need. When you understand why a language was written, it gives you insight into the type of applications it is best suited for. I have never seen anyone use PHP for a desktop application; it was made for the web. Every language has good features and bad features. It is about understanding the limitations, leveraging the good features, and knowing where to simply use something else.

Principle #3: Never get comfortable

Some people learn one, or perhaps even a few, programming languages but never move on. Personally, I don't want to have the same skill set in twenty years as I do now. But that is exactly what happens to thousands of programmers: they get comfortable, and they stop learning. You have to stretch yourself. Learn Ruby. Discover databases. You never know what you may find. That one feature causing you so many headaches may be easy if only you would learn a different way of doing things.

There are no comments
Leave a Comment

Name

Email (will not be published)

Website (optional)

Comment