When starting on the path of programming, it’s important you invest your time wisely in choosing to learn something that will both benefit you in the immediate future with visible results on your platform of choice, as well as getting you set up for any future languages. Your choice will depend upon a number of factors, so let’s take a look at their characteristics, ease of learning, and likelihood of earning you a living. I’ll also show you some code to display “hello world”, the first application many people write when learning a new language.
In this first part, we’ll be looking at languages used to program software – as in applications which run on the computer or mobile devices. Next time we’ll look at the increasingly significant area of web-programming languages, used to create dynamic websites and interactive browser-based user interfaces.
Java is a full object-oriented language, strongly typed, with an extensive feature set focused on networking and cross-platform compatibility. Applications written in Java can run on virtually any OS – though the performance won’t be as good as something designed to run natively.
It is the language of choice for most Computer Science courses, and consequently almost everyone has at least a little Java programming experience. Android applications are written in Java too, though you can’t simply run a regular Java app on your Android mobile nor vice-versa.
Though actually separate languages, they are often grouped together, as C++ is basically an enhanced version of C, adding object oriented features. C++ is the serious programmer’s language of choice, forming the basis of most computer games and most advanced Windows software. It’s high performance, but requires a lot more precision on the programmers part when it comes to memory management and consequently has a steep learning curve. Not recommended for absolute beginners.
Pronounced C sharp, this is Microsoft’s clone of Java (though the two have since diverged with more pronounced differences) – a general purpose object-oriented strongly-typed language. Performance is good, though not as fast as C++. Software written in C# requires .Net framework to run and is Windows-only.
Another of Microsoft’s contributions, Visual Basic is an event-driven language focussed on simple GUI-based apps. Event-driven means that the code you write will generally be reacting to what the user does – what happens when they click that button, for example. It’s incredibly easy to learn and get a simple app up and running, but ultimately limited and perhaps not the best for actually learning fundamental programming concepts.
Objective-C / Cocoa
This is the Apple Mac language upon which most OSX and iOS applications are built. Technically, Objective-C is an extended version of C with object-oriented features, much like C++, but is nearly always combined with the Cocoa framework for building graphical user interfaces and higher level features on the Mac platform. You must also be careful with memory management.
The syntax and concepts you need to learn are quite complex compared to a language like Java or C#, but on the other hand, Apple provides a comprehensive free development environment (XCode) and tools which make the process of creating real, useable apps fairly easy. There’s also a wealth of written and video tutorials out there to guide you, so it’s certainly more accessible than C++. It’s basically your only choice for OSX and iOS development, but you’ll be able to write for both the Apple desktop and mobile environment with the one language.