IT Hare on Soft.ware

Tap to confirm selection


Your mileage may vary. Batteries not included

The choice of programming language for your Next Big Project can be difficult. Even worse, it can seem easy… when it is not. On the one hand, strictly speaking, you can write any program in any of Turing-complete languages. On the other hand, that doesn’t mean it will be easy. In fact, writing a program in a poorly suitable programming language could be extremely difficult.

When asking yourself which is the best programming language, it is important to first determine what you need to accomplish. Some programming languages are completely unsuited to some tasks, while other languages are a natural fit. An example of this would be attempting to parse data out of a log file, find data which interests you by certain patterns, and create a .CSV file out of it. A language such as C++ may easily be an overkill for such a task, while a language such as awk was designed with exactly such a task in mind (with something like Python being a not-so-bad middle ground). However, if you don’t know awk but do know C++, and this is a one-off task, you still may be better with C++ because of the awk’s learning curve. Indeed, sometimes the best language to program with is simply the language we are most familiar with; however, trying to shoehorn a task into a language that isn’t appropriate is likely to have negative consequences down the line.

The whole paragraph above is written just to illustrate one simple point: there is no one single “best programming language”, and it depends on the task in hand, on the whoever is doing it, on project scope and lifecycle, on the way stars are aligned, and so on.

Best Programming Language to Learn

Despite what you might have been told in university, there is no definite answer as to what programming language is best to learn first. There are a couple of main factors that should be considered. First, is there a market for the skill of being proficient in that language? It doesn’t make much sense to learn a language that is rarely used unless you have a firm plan as to how you can leverage it to your advantage. RedMonk performs language usage surveys, and their survey shows that Java and JavaScript (which are unrelated languages) are the most widely used languages. C and its derivatives, C++ and C#, are also very popular languages. A closely related question is “whether the language growing or declining?” Learning a skill if its usage is in decline may not be a wise move. An example of a language that was once popular and has since declined is Perl.

The second big factor to be considered is “how difficult is to learn the language”? In other words, learning how to drive on an F1 car might be a disaster, despite of all the advantages of F1 car over a simple front-wheel-drive with an automatic. Yes, C++ might provide you with a very efficient way of doing many tasks, but for learning purposes it can (and will) become overwhelming. If aiming to become a C++ developer, probably Java is a better learning/staging choice.

Web Programming Languages

One category of programming languages is web programming languages. Web programming is traditionally divided into server-side and client-side. For client-side web programming, JavaScript is pretty much unavoidable (and also you’ll inevitably need to use HTML and CSS, though they’re not programming languages, but “markup languages”). For server-side web programming, usually it is one of the following programming languages: PHP, Ruby (more specifically – “Ruby on Rails”), .NET, Java (aided with some web framework), or Python (usually with Django framework) While the precise number is not known, more than 70% of websites are estimated to be using the PHP web language. Many popular website frameworks and platforms, such as WordPress, are built using PHP. Having at least a cursory knowledge of PHP can be helpful to tweak the software to accomplish your goals. While ITHare doesn’t recommend PHP for new projects, favouring Python instead, there is always a chance that you’ll need to make changes to existing PHP codebase, and it actually isn’t that bad.

One thing which is “almost inevitable” for web development, is a database. And when speaking about database for not-so-large project, it is still usually “almost inevitably” an RDBMS. And when speaking about RDBMS, we’re speaking about SQL. SQL is an odd member of the programming languages family (some family members don’t like it, and some even say it is not really a “programming language”). However, whether it is a real programming language or not, you still most likely need to know it to develop an end-to-end web application.

One popular open source combination for Web is known as LAMP – which stands to Linux+Apache+MySQL+PHP. It isn’t a bad combination, though IT Hare prefers to read ‘P’ in ‘LAMP’ as ‘Python’ :-).

Which Web Language to Learn First

There are many different opinions regarding what the best web language to learn first would be. As usual, the answer is “it depends”. For example, if you’re joining a large project – you’ll be told what kind of workforce they need. If, on the other hand, you’re starting a web development project on your own – you’re likely to need several things, including: JavaScript, HTML, CSS, SQL, and one of {PHP, Python+Django, Java+some-web-framework, Ruby On Rails, .NET}. The sheer number of languages to be learned can be overwhelming, but unfortunately, currently there is no other way around (unless, of course, you can hire all those developers and just sit there receiving dividends and asking “Why the feature #2345 is not implemented yet?”).

Programming Languages, page 1/2 :

C++ Guidelines – Made-to-Measure vs One-Size-Fits-All

“After bashing all those Big Name guys for making those over-arching sets of guidelines, it is perfectly logical for me myself to do the same ?”
“DON’T use C-style cast, EVER. If you DO need a cast – DO spend time on figuring out which of C++ *_cast<>s you really mean (and maybe, you’ll find a way to avoid that cast at all)”

C++ Performance: Common Wisdoms and Common “Wisdoms”

“over(ab)using C++ features is a different story, we’ll discuss these features below on case-by-case basis”
Another Quote:
“Compiler will use all its Next-to-Divine Wisdom to show you that it is smarter than you are, and to ignore most of those inline specifications you carefully wrote.”

C++ for Games: Performance. Allocations and Data Locality

“Allocations and related lack of spatial locality can be DAMN EXPENSIVE”
“During the times of Ancient Gamers (also known as times of Atari, ZX Spectrum, and Commodore64), CPUs were running at clock speed of a single-MHz (and one operation usually took several clocks). At the same time, memory run at about the speed comparable to that of CPUs.”

MMOG Server-Side. Programming Languages

“From the 50’000-feet point of view, 90% of the differences between modern mainstream programming languages (as they’re normally used – or better to say, SHOULD be used – at application-level) are minor or superficial.”
Another Quote:
“On the server side (unlike client-side) protection from bot writers is not an issue (as server-side code is never exposed to players)”

Asynchronous Processing for Finite State Machines/Actors: from plain event processing to Futures (with OO and Lambda Call Pyramids in between)

“With ‘callback pyramid’ it is not easy to express the concept of ‘wait for more than one thing to complete’ , which leads to unnecessary sequencing, adding to latencies (which may or may not be a problem for your purposes, but still a thing to keep in mind).”
Another Quote:
“Don’t even think of converting all of your code to a so-called Continuation-Passing-Style”

Client-Side. Programming Languages for Games, including Resilience to Reverse Engineering and Portability

“from all the popular compiled languages, C++ tends to produce the binary code which is the most difficult-to-reverse-engineer (that is, provided that you have turned all the optimizations on, disabled debug info, and are not using DLLs)”
Another Quote:
“Bot fighting is always a two-way battle with bot writers inventing a way around the MMO defences, and then MMO developers striking back with a new defence against the most recent attack; rinse and repeat.”