February 19th, 2007 - by vinnie

If you hang out on enough web development forums, mailing lists, or chatrooms, you’ll eventually get asked this question:

What language should I use to program my next project?

As someone who has been on a few of said forums, mailing lists, and chatrooms for a while now, I hate seeing this question. Yes, it comes around a lot, but repetitiveness isn’t what bugs me about it. What bothers me is that there’s usually very little background information attached to that question, which makes it as open-ended as asking what mode of transportation you should take to get to the store. I can tell you anything from a skateboard to a jet and either vehicle can get you to the store, but to give you the best answer I need to know how far you have to travel, what you plan on buying, and how much money you have, among other things. The same holds true for the programming language question, so let’s look at some factors that can help you choose which language to use on your next project.

What do you want to build?

This should be the first question you ask yourself when choosing a language, because some languages are better at some things over others, and some language just plain can’t work in certain contexts. Are you building a desktop application? If so, you might want to look at a language like C++ or Visual Basic over say, PHP. Conversely, for a web application, PHP or Ruby (optionally with a nice framework like Rails or Symfony) will get you up and running much faster than trying to write your own CGI handler in C.

Some languages, like C# or Java, try to do it all, so this question may not lead to one clear answer for you if those are among your options. Keep them in mind, and try to filter your selection down with the following questions.

What platform(s) am I going to be running on?

This is almost as big of a decision-maker as the kind of program you’re writing. Some languages only work well on one platform, so if you’re on another platform the choice gets limited pretty quickly. For example, if you’re writing a Windows program you might not want to learn Objective-C and Cocoa, which is a programming framework for Mac applications. Conversely, if you’re building a website that is intended to run on a Linux server, PHP is a much better option than C#. Many languages, like Python and Java, are cross-platform, so at first it may not look like it matters, but look closer. Some server-side languages might “work” on Windows, but with Apache and not IIS, or may not perform well on Windows relative to Linux/OS X. Yes, it might still be possible to work in a language on a second-class platform, but it might be more painful than it’s worth.

What do I already know? Do I like it?

Prior experience is also a good way to gauge which language you should use. If you like a C-style syntax, the style of a language like Ruby or Visual Basic might make you scream and run back to the safety of curly braces and semicolons. On the other hand, if you’ve been writing Java code for the last 7 years and are TiredOfTheVerbosityOfItAll, then maybe a more terse language like Python would be a nice change of pace.

Does the language have features for my project?

Look at your project and see what your needs are. Is it a simple frontend to a database with a couple of forms? Well, just about any language is capable of handling something like that nowadays. Do you have to deal with processing large amounts of text? Well, Perl was built just for that so maybe it’s worth a look. Different project requirements may make you decide to switch it up.

To conclude…

I’m not here to tell you which language you should choose. You and I may look at the same project and end up with two completely different ideas about which language is best to go with. I don’t expect people to run through this process every time they come across a new project, but hopefully this article gives you something to think about when you decide you want to start playing with another programming language.

3 Responses to “What programming language should you use?”

1 What is php?

As php is similar to C, yet very easy to learn, I always recommend to people to use php. If the person asking has to ask, then they are not going to be able to learn perl or python. It’s a good self-filter, like when people ask which car they can afford. If they are asking, then they should buy a Corolla.

2 Chris Garrett

I told a friend recently he should learn PHP and that it was ASP with a C-syntax ;) Wrong but it made him feel comfortable trying it out. Since I learned basic at age 9 I have always had a fondness for basic but my tool of choice (when I can’t avoid coding) is PHP now despite having been a ASP/.NET MVP in a previous life. What I would recommend though is always down to the scenario I am presented with. It’s funny though how most platforms will fair just as well as any other for most purposes, commoditisation arrives in all fields it seems.

3 Richard Kiptoo

depending on the expirience you have for a specific language.But it is advantageous for a person to familiarise with atleast two languages probably one for object oriented and the other for structured.

Share your thoughts...

Popular Articles

Top 10 Commentators


Subscribe to this feed! Subscribe by Email!

Random Bits Podcast

You need to download the Flash player from Adobe

Blogs Worth Reading