Many new programmers struggle when it comes to selecting their first language to learn. Which is easiest, the most professionally useful, the most newbie-friendly? Lets find out by showing you a range of options, their strengths and weaknesses, and some information about the most common programming languages in demand today.
Many new programmers struggle when it comes to selecting their first language to learn. Which is easiest, the most professionally useful, the most newbie-friendly? Lets find out by showing you a range of options, their strengths and weaknesses, and some information about the most common programming languages in demand today. At the end, we’ll make some recommendations and you’ll understand a bit more about why they were chosen.
The Task At Hand:
Every job requires the right kind of tool, and each programming language can be thought of as a separate tool. Just like some tools are good for hammering nails, driving screws, and leveling screws, some programming languages are innately more suitable than others for tasks like designing a website, interpreting text, or reacting to user input.
Lets go through a few common use cases:
Language | Typical Usage |
Java | Thick-client applications, large web apps, web applets, cross-platform |
C# / .Net | Windows applications, iPhone apps |
PHP | Web Application back-ends |
Javascript | User interaction through web browser |
Python | Science apps, computer admin tools, automating repetitive tasks quickly, can run on Linux and Windows (like java) |
Ruby | Robust & Large web applications |
Perl | Working with lots of text |
Bash | Automating Linux Activities (like starting/stopping processes) |
C/C++ | Medium to Large projects, Embedded development, applications where speed is a factor |
All of these languages can perform the same (or nearly the same) tasks as all the others, but the amount of effort can vary widely from language to language. You’ll see that in some of the examples in the next section…
Detail-Oriented
All programming languages rely on structure to perform their tasks. This structure is known as Syntax. The syntax for English and Japanese are night and day, but the syntax for French and Spanish are very similar (if you remember your language classes from high school!). The same applies to computer languages. Lets look at some examples:
Java | C# |
public class HelloWorld { | public class Hello1 |
vs
Perl | Python |
#!/usr/bin/perl | #!/usr/bin/python print “Hello World\n” |
You can see that Perl and Python are nearly as identical to each other as Java and C# are!
This makes sense because many languages are modeled after one another. By choosing a language that is syntactically similar to many other languages, you can practically learn multiple languages at once!
Hey, by the way, if you looked closely at those examples, you’ll notice some are simple, others are complex, and some require semicolons at the ends of lines while others don’t. If you’re just getting started in programming, sometimes it’s best to choose languages without many syntactical (or logical) rules because it allows the language to “Get out of its own way”. If you’ve tried one language and really struggled with it, try a simpler one!
Setup:
If you’ve seen your use case mentioned in the table above, or have decided on a language already, you’ll need a way to run it. Generally, scripting languages require something called an Interpreter whereas C and C++ require compilers. Almost all of the languages mentioned in this article (with the exception of C#) are easiest to set up with any flavor of Linux — it really doesn’t matter which kind. C# is a special case because you need Visual Studio and Windows to use that.
PHP really requires a lot of work to set up in tandem with Apache/IIS, so we’ll save it for your own Googling or another article. The languages and links below are the easiest to set up.
Language | Windows | Ubuntu Linux Console Command |
Ruby | apt-get install ruby | |
Python 2.7 | apt-get install python | |
C#/.Net | http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express | N/A |
Java | http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.eclipse.org/downloads/ | apt-get install openjdk |
C++ | http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express | apt-get install build-essential gcc |
You can see that things on Linux can be quite easy to set up, but of course requires some amount of familiarity with the operating system. If you’re not scared to jump into Linux feet-first and take some time to Google your issues, I highly recommend that you use Linux. Either way, you’ll be using the command line in order to debug your programs anyways.
Popularity Contest:
TIOBE.com maintains a who’s-who popularity list for all the most popular computer programming languages. It’s created by crawling various search engines and scraping the results. You can view all of their charts and graphs at http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
These are the top ten:
1 | 1 | * | 16.975% | -2.32% | A | |
2 | 2 | * | 16.154% | -0.11% | A | |
3 | 4 | * | 8.664% | -0.48% | A | |
4 | 3 | * | 8.561% | -1.21% | A | |
5 | 6 | * | 6.430% | +0.82% | A | |
6 | 5 | * | 5.564% | -1.03% | A | |
7 | 7 | * | 4.837% | -0.69% | A | |
8 | 8 | * | 3.169% | -0.69% | A | |
9 | 11 | * | 2.015% | +0.69% | A | |
10 | 14 | * | 1.997% | +1.12% | A |
So All This Information Is Nice But…
You need to make a decision, right. Well, lets make a couple more charts and then get you started:
1. I’m a Windows User and I want to Get Into Programming
If you’re making something simple and want some experience that will translate into real-world usefulness, start with C#/.Net — setup is easy, the Visual Studio really helps you out, and there are plenty of resources to help you, including technet and MSDN directly from Microsoft!
Those languages aren’t as easy as Python, but Python isn’t going to help you out as much if you’re looking to make a simple graphical application. That being said, if you just need a command-line utility, take a close look at Python.
2. I’m familiar with Linux and I want to make/automate something
Python. Simple, fast, incredibly powerful, easy to use and experience with it translates fairly well into other languages. Absolutely a must for beginners willing to get their feet wet with Linux.
3. I want to build a website
Javascript and PHP — These languages require the most amount of know-how to set up (you have to install a webserver and make sure it’s configured to run PHP) but aren’t too complicated once you get that ball rolling. PHP isn’t going to get you as much experience working with modern programming languages unless you use it in an Object-Oriented style though.
Javascript is very useful to know and is easy to learn. You’ll get a lot of use out of it, even without PHP. In fact, you can make and run Javascript programs without any setup, right in your browser.
Just give me a Language!
Python. It’s easy, already used by thousands, very extendable, doesn’t require as much attention to detail, and allows beginners to learn logic basics before going into object-oriented programming.