Now a popular question I’m seeing around programming discussion boards is “Where do I start programming?” or “What language should I use?”, so here is an article to try and help beginners understand programming better and be able to pick a language. This article is more a synopsis of main-stream languages out there to help you choose a language.
Now first things first, all of this is just one Software Engineer’s perspective and I’m sure there are those out there with different opinions.
The first question you should ask yourself is who is going to be using your program / web application. If it’s just you then you’re set to go as you know what you want. But if it’s going to be used by others then you really should ask potential users about what they want to see in the application, and how they want to use it. This will give you a great start for planning. And yes planning and design is very important as it saves you so much more time finding problems in a design than in the actual application.
This article will be split up in two main areas: non-web based and web based programming.
Non-Web Based Languages
This includes areas such as compiled and interpreted languages. What’s the difference you ask? Well compiled languages need to be converted to machine code or “executable” before being run, whereas interpreted languages are just scripts that get interpreted into machine code when they are run. Traditionally, compiling code makes it far more efficient and quick.
C
C is an extremely popular, and extremely powerful compiled language. But because of its power it is relatively hard for first time users to understand. Having said that though, many a first timer has started with C and had good results. C is an old language (1972) but is likely to be used for a long time in the future.
C is a good choice if you want efficient programs to be run from the command-line (DOS prompt or unix shell). I say command-line because it is quite difficult to actually get graphical C programs going. Much more difficult than using Windows Forms in C++ as discussed below.
C++
C++ was originally an extension to C, and so the syntax is largely the same. The difference is that C is not a proper object-oriented language, although it is possible to do some object oriented aspects. C++ is a fully fledged object oriented language that lets you make classes of objects which is very useful for such things as games and larger applications. But saying this, C++ does not force you to be object oriented. Additionally any command-line applications are just as easily created in C++ as in C.
When you couple C++ with Visual Studio, Microsoft .NET and Windows Forms, you have a very easy way to make a graphical interface for your program. I won’t tell you exactly how to do it, there’s tutorials out there for that. But get Microsoft Visual Studio and you’re well on your way.
Java
Java is another very popular language. It is both similar and different from C++. It uses similar syntax to C++, and is very object oriented. Java has a huge code base of libraries so you don’t have to reinvent the wheel. When C++ is used with the .NET framework, it too has an extensive library base.
Java is more of a interpreted language and can be slightly slow to use sometimes. Additionally, the huge library base can make your program feel cumbersome sometimes compared to C/C++. But the great thing about Java is that the same code can be run on almost any computer or device out there that has the Java Runtime Environment or Java Virtual Machine installed (except in some cases). C/C++ however need to be compiled for different systems. For example you can’t run Windows executables on Linux or Mac.
Java is a good place to start learning programming since it takes care of low level memory operations, something you have to always be aware of in C and C++.
C#
C# (C sharp) is Microsoft’s answer to Java. Syntax is very comparable, and methods of development very similar too. C# makes large use of the .NET framework libraries which are very useful and powerful. In my experience, C# is a great language because it has many of Java’s features, but it is also compiled and so it’s nice and quick.
Although C# is largely associated with Microsoft, it is platform independent and can be run on Linux and Unix machines.
I highly recommend C# if you want a great language, plenty of support, great control over your application, and a quick responsive application.
Python
Python is a very good programming language for beginners. In saying that, it is also quite powerful as you can do just about anything you want. It’s power and ease of use comes from the fact that it is a “batteries included” language – everything you need is all included without having to spend a long time searching for / installing / learning new packages etc.
Python is quite different in syntax from the above languages, but it is a syntax that is simple and intuitive.
Web Based Languages
The Internet is growing extremely rapidly, so why not contribute your part? Many applications can be written in both web based and non web based forms. But web based has the huge benefit of being easily accessible by the rest of the world. I see many applications being taken to the Web in the future to reap these benefits. All of the below languages are useless if you don’t know HTML. HTML is the foundation of the web, and luckily it is quite straightforward. All things take practice though. When HTML is complimented with CSS and JavaScript you have the opportunity to create a great website. HTML, CSS and JavaScript are all interpreted real-time by the user’s web browser. I think it is quite important to have a good idea of how to use HTML, CSS and JavaScript before you continue from here.
You need something on the back-end doing some work and processing to give you dynamic content. This is done with server-side languages – i.e. languages that get run on a server and their result returned to the user.
PHP
PHP is a fantastic web language. You have huge control over everything you do, and a great set of libraries to use. PHP is a language that just flows and lets your site be extremely dynamic and interactive. It requires very minimal installation, and can be run on many systems.
ASP.NET
ASP.NET is largely used with either C# or Visual Basic. Visual Basic you ask? It’s a language that is quite popular, but personally I don’t think it’s a great language to start with since C# can be used instead, and as far as programming languages go Visual Basic has quite different syntax and so it can be hard to switch from Visual Basic to C, C++, C#, Java, and even PHP which all have somewhat similar syntax.
ASP.NET is Microsoft based, and is very powerful. .NET does have a linux/unix implementation called Mono. When ASP.NET is used with Visual Studio you can practically create a web site without knowing any HTML, CSS or JavaScript at all. I don’t advise you do this if you want control over your website, but the option is there if you’re in a hurry to get something done.
Note that the .NET libraries are accessible from all .NET supported languages.
JSP
JSP or Java Server Pages are basically web based Java. This is great if you are familiar with Java already as you can just dive right in.
Python and <insert web framework here>
Python can be used with web frameworks to create fairly powerful, complex and efficient web sites. Such frameworks are Django or Pylons. Choosing the right framework is important as it depends on what you will be doing – each framework has its strengths and weaknesses.
Conclusion
There are far too many languages to talk about, but I hope I have given you an overview of the programming world so you can make a better decision as to where to proceed. There are plenty of tutorials out there, and Google is your biggest asset.