DEV Community

Cover image for Choosing a Programming Language
Douglas Minnaar
Douglas Minnaar

Posted on • Edited on

Choosing a Programming Language

Summary

I recently came accross 2 videos on the BigThink website that addresses the topic 'Five Programming Languages that Everyone Should Know'. The original videos can be found via the following links:

In the first video, Larry Wall (computer programmer responsible for creating Perl), begins by providing a very valid point. The point that he makes is that answering this question is very much influenced by context as well as the times. What may be good a few years ago may not necessarily hold true for current or future times. He then goes on to provide what he currently thinks are 5 programming languages that everyone should know and they are listed as follows:

  • Javascript
  • Java
  • Haskell
  • C
  • Perl

In the second video, Bjarne Stroustrup (computer programmer who designed and implemented the computer programming language C++), begins by making a very strong statement. Bjarne says:

"Nobody should call themselves a professional if they only knew one language.”

For the rest of the video, Bjarne gets straight to the point and nominates the following computer programming languages as the 5 that he thinks you should know:

  • C++
  • Java
  • Python
  • Functional Programming Language (doesn't specify anything particular)
  • High Performance Computing Programming Lanaguage (doesn't specify anything particular)

If you would like to have your say, I have created a survey where you can nominate your top 5 programming languages. This survey is for fun and I allow anonymous access. You will also see the current results straight after making your picks. If you're interested, please access the survey here.

In the next section I provide some detail into what "knowing" a programming language means.

EDIT (2018-03-21) - Fixed inaccurate explanation of side effects as seen in functional programming section


"Knowing" a Programming Language

I feel that it is important to provide some context and insight into what I perceive "knowing" a programming language entails. It is an opinion, therefore my thoughts on the matter should not be taken as 100% correct and applicable to all programming languages.

Below I provide a list of concepts that I consider to be the pillars of "knowing" a programming language:

  • Nuts and Bolts

By "Nuts and Bolts", I'm referring to the core features and mechanics that make the programming language work. These features have nothing to do with using libraries and frameworks. It is the language in it's purest form. More specifically, I am referring to things like compilation, type systems, memory managment, constructs, loops, evaluation mechanisms, variables, scope and closure to name a few. The "Nuts and Bolts" are the building blocks of a programming language and one cannot effectively use the language unless one has a firm grasp in terms of understanding how to use and apply those building blocks. This is where everyone starts when learning a new language. It's also the easiest part in my opinion. For some, they may feel that once they know the "Nuts and Bolts", they know the language. But for me this is merely the beginning and but the tip of a very large iceberg.

  • Libraries

Most programming languages come packaged with a core set of libraries. These libraries are reusable bits of code that can be shared, adopted, extended, and applied to various programming problems. Typically, there are hundreds, actually thousands of libraries to choose from. This is especially more prevalent as a result of third party and open source development. It is impossible to learn about all libraries relating to a programming language. Though it is good practice to at least make oneself familiar with as many as possible. This takes a lot of time and commitment.

  • Frameworks

I've often heard the terms "libraries" and "frameworks" used interchangeably. However, from my perspective, frameworks imply something far bigger than a simple library. Frameworks are usually created to help simplify development that may span multiple layers of an application architecture. Where libraries are easy to add, remove, or replace. Frameworks form an inherent part of ones architecture and cannot be easily removed or changed. Frameworks are big, and they require even more investment of time to fully understand and apply them. And often, just when you've achieved a good understanding of a framework, a new one comes along to replace it and one has to start all over again.

  • Design

So much about effective programming is about effective design. And the design of a programming language often determines how we design systems using that programming language. A good design is the key difference between a system that "works" over the long term and one that ultimately fails. A design that works in one programming language may not necessarily work for another programming language. Once again, it is only through time and experience that one is able to determine what designs work and what designs don't work at all. Also, different design patterns will emerge for different programming languages. This has a lot to do with the fact that some programming languages are imperative by nature and others are functional for example. As I've mentioned before, each programming language will have short-comings. For example, much to the dismay of many, the GO programming language currently does not support "generics". Therefore, one would need to use a different design than if one were programming in C#/Java (that do support generics). There is a constant tradeoff when designing programs for the real-world and it's different for each and every programming language.

  • Application and Practice

Each language will come with it's own set of good and bad practices. It is important to know about both. Each language will also come with subtle nuances and "traps" that one should be aware of. It's this practical side of working with a programming language that truly determines whether you know a programming language or not. It is knowledge only acquired by working continuously with the programming language and applying it in real-world scenarios that one can acquire a good sense of "knowing" what the programming language is all about.

As one can see (and I'm sure many are aware of), learning a programming language is difficult. And for me it only get's harder with time as one is required to write ever increasingly sophisticated programs. But there's an interesting "little" problem that exists when learning a new programming language. And that "little" problem is time. You cannot shortcut time and therefore you cannot shortcut experience. To "know" a programming language takes a huge investment in time to gain sufficient experience in becoming adept at that programming language. I have approximately 15 years programming experience where I have programmed in C++, Java, C#, Javascript, and SQL. I can honestly say that I feel that I still don't "know" these languages. But that's what programming is all about for me. To continuously learn and improve.

In the next section I am going to provide some insight into the programming languages that I think you should know. However, judging by what I have written in this section, you may have realised my subtle hint in that I don't think it is possible to "know" 5 programming languages. But I do think we should try because it makes us better thinkers and therefore better programmers.


The 6 Programming Languages I Think You Should Know

After watching the "Big Think" videos, it got me thinking. What do I consider as the top 5 programming lanaguages that someone (by someone I mean anyone practicing or interested in programming) should know. After thinking about it I decided that there are actually 6 that I would like to recommend.

Before answering the million dollar question, I would like to provide some of my working background as it does influence my choices. For the past 15 years, I have worked in 3 primary types of industry. Namely, financial services (banking and insurance), medical services industry, and the online gaming (gambling) and sports-betting industry (where I still work). The types of applications that I have been responsible for designing and building have always involved working within 3 primary areas of a system and they are listed as follows:

  • Databases

One cannot build applications without some form of long-term persistent data store. If experience has taught me anything, it's that applications come and go but data is forever. It's the one software asset that tends to outlive everything else within a system.

  • Frontend

Where there is data, there is a need to easily view, store, retrieve, and manage that data. Therefore, I have found that there is often a "one-to-many" relationship between databases and frontend applications. By that I mean that for each database there may be many applications built to interact with that database. The types of frontend applications that I have had to build involved using many different types of languages. For example, typically I would use one set of languages to build native applications and another set of languages to build web applications.

  • Backend

Very seldom have I been required to create simple CRUD (Create, Read, Update, and Delete) applications. There have always been business rules that govern the flows of different processes within a system. Some business rules are very complex and lead to the creation of many different kinds of domain models that involve integrating to databases and services (like API's for example). Often, I have been required to expose domain models through API's. Once again there are certain programming languages that work better at this level than others.

Based on my background and experience, I now provide what I feel are important programming lanaguages to know or learn. My top 6 programming lanaguages are listed as follows in no particular order:

1. Javascript

It feels like Javascript is everywhere these days, and it is. No longer being limited to clientside development, Javascript has matured into a language that can be used server side too. One only needs to read the job boards, and various blogs to realise that Javascript is very much here to stay. It always makes me think of Atwoods Law that states:

"any application that can be written in Javascript, will eventually be written in Javascript"

The fact of the matter is that there are very few jobs out there that do not benefit from someone having some Javascript knowledge. It is a very simple language to learn, however, it get's more complicated the more you learn. The Javascript language is full of subtle nuances that can trick even the most experienced Javascript developer.

For me, knowing Javascript goes hand-in-hand with knowing a language that can easily transpile into Javascript. The reason why you would want to learn such a language is if you are building a large javascript codebase and want to improve maintainability. My preference is Typescript which is a superset of Javascript. There are also other Javascript alternatives out there like:

  • Coffeescript - CoffeeScript is a programming language that transcompiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python and Haskell in an effort to enhance JavaScript's brevity and readability.

  • Elm - Elm is a domain-specific programming language for declaratively creating web browser-based graphical user interfaces. Elm is purely functional, and is developed with emphasis on usability, performance, and robustness.

There is also a "type checker" called Flow that can be used with Javascript. Though I'm not seeing adoption anything close to Typescript at the moment.

2. Object Oriented Programming (OOP) Language

At university, I majored in distributed computing using Java as my primary programming language. Although, I also done a fair amount of programming using C++ and a lesser known programming language called Eiffel. However, Java was always my favourite. Learning Java certainly enabled me to easily adapt to other programming languages. The only thing that I can say I hated about the Java programming language was "checked exceptions". And no, there is nothing you can do to convince me otherwise, despite any technical merit they may have.

It is the C# programming language that I ended up spending most of my time with. I have been developing in C# as my primary language for more than 10 years now. The biggest drawback to me was that C# was never open-source or cross-platform. But thankfully that has all changed in recent years, and I am happily developing C# applications on a Linux OS. It's strange, but of late, the Javascript language has changed so much, that when I am writing Javascript, it often feels like I'm writing C# code. More recently for example, when the async/await feature was added to Javascript, I felt right at home because I had been writing multi-threaded asynchronous programs for years in C# using a very similar pattern. I must admit though, I am not a fan of introducing "class oriented" concepts into the Javascript language.

So do I think you should learn C#, Java, or C++ etc? My personal feeling is that it doesn't matter all that much, but pick one. Like Bjarne Stroustrup mentions in the video from above. These are a cluster of languages and knowing one helps you to know them all. As you can see from my personal experience, it started with Java and C++ but ended up mostly programming in Javascript and C#.

3. Python

Python has been around for a long time. Sometimes referred to as a scripting language, I will take it one step further and call it a general purpose programming language. Lately, circa 2017/2018, it has been gathering massive adoption. One cannot talk about data science without Python being mentioned in the discussion. The other one is of course R but for now my first choice is Python. I am mostly a Python hobbyist programmer and have not used it in any production environment. That doesn't mean that I think of it as a hobbysit language. On the contrary. Once again, one only needs to visit a job board or some trending stats to realise that Python is a clear favourite of many. With the rise of Machine Learning and Artificial Intelligence, it seems that Python has become a popular choice in those domains too.

4. SQL (Structure Query Language)

Yes, SQL is a language. More specifically SQL is a fourth-generation language (4GL) that's closer to human language. I sometimes wonder if SQL is not the most omnipresent programming language in the world. SQL is everywhere, and in all my working experience, I have not once NOT had to work with SQL. Whether it was MSSQL, Postgres, MySQL, or Oracle, SQL existed in some shape or form. Of course SQL is not as sexy and shiny as the new NoSQL technologies out there, but SQL is here to stay for a long time yet. Interestingly, Couchbase, a NoSql database, uses the N1QL (pronounced "nickel") query language. The interesting thing about N1QL is that it adopts nearly full SQL ANSI-92 compliance. Even some tools like NoSqlBooster allow one to write SQL queries over a MongoDB database.

5. BASH

BASH is a scripting language and it is Turing-Complete. Like my prior choices in programming languages to know, the reason BASH makes it onto my list is for reasons of it's massive adoption and community. For me, the difference between being a King or a God of Linux is ones ability to program in BASH. That and being able to work with VIM ;)

Furthermore, Linux is by far the most used OS in server computing. Therefore, I think it is a good idea to master as much as possible about Linux as you're most likely bound to work with it sooner or later. Learning BASH scripts is part of mastering Linux. Knowing BASH will also help you to write repeatable and automated tasks that can be shared and used my many. Therefore, in addition to being a valuable sysadmin tool, I think it is a valuable devops tool too.

When writing about Linux, I'm always reminded by the following picture:

linux-cloud

6. Functional Programming Language

I have no experience developing software using a purely (or close to pure) functional programming language. Therefore, I cannot make any recommendation based from experience. However, in the absence of experience, I turned to data to help drive my decision. For the past year I have been keeping a close eye on functional programming languages. The 3 functional programming languages that always seem to attract the most attention (in my experience) are as follows:

  • Haskell - Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing.

  • Scala - Scala is a general-purpose programming language providing support for functional programming and a strong static type system. Designed to be concise, many of Scala's design decisions aimed to address criticisms of Java.

  • F# - F# is a strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming methods.

I suspect that functional programming is going to become THE programming skill to have in the near future. The reason for me saying so is due to the increased demand to write concurrent and parallel programs. That demand is driven by the changing physical architecture of micro processors. In a nutshell, as programmers we have only had to worry about writing programs that work with a single core processor. Until a few years ago that is. If we needed more speed, we would increase the speed of the processor. In recent years, the processor industry reached the limits of providing higher processing speed. As a result, the processor architecture changed to provide 2, 4 and more cores per processor to help run programs faster. But programs didn't run faster because nobody had programming languages that could effectively utilise the additional cores to write truly concurrent programs without side-effects (more on that later). Nobody except those using functional programming languages that is. It turns out that functional programming languages are very good for multi-core, multi-threaded, and distributed system domains. One of the biggest advantages that one will often hear being advertised as a reason to use functional programming is to eliminate "side-effects". A "side-effect" is when you have some code that is accessing or changing the state of some data (like a variable) that is outside the scope of that code. The problems associated with side-effects are exacerbated in the presence of multiple threads. Another important concept to understand as it applies to parallel computing is Amdahl's Law. To explain Amdahl's Law would require an entire dedicated article, and I won't be providing that here. I would however like to direct you to an interesting explanation of Amdahl's Law that can be found here. I should mention that programming languages like GO, Rust, Java and C# now have concurrency (the ability to write concurrent programs) baked into the language too and feel certain that this will only improve with time.

I encourage anyone that is new or experienced with programming to invest time in learning a functional programming languages. If anything it will help one to think better about how to correctly write programs without side-effects. Also, functional paradigms are making their way into many popular languages like Java and C# too.

It is Scala that holds the most interest to me in terms of functional programming languages. For me it is a rising star in the world of functional programming.

That concludes my musings in terms of the programming languages that I think you should learn. In the next section I conclude this article and provide a few more programming languages that I feel are also important, and anyone of them could easily have taken the place of the one's I have already mentioned.


Conclusion

In my experience, there is no programming language to rule them all. I have mostly picked up languages out of necessity to get particular jobs done in the easiest way possible. The programming languages that I discussed are by no means the most popular languages. But they are languages that have massive communities, massive amounts of documentation and learning materials, and massive amounts of jobs.

In closing I would like to mention a few programming languages that I would love to try. Anyone of them could easily have taken the place of the programming languages I discussed in previous sections. They are listed as follows:

  • Rust - Rust is a systems programming language sponsored by Mozilla Research, which describes it as a "safe, concurrent, practical language", supporting functional and imperative-procedural paradigms

  • GO - Go is a programming language created at Google in 2009. It is a compiled, statically typed language in the tradition of Algol and C, with garbage collection, limited structural typing, memory safety features and CSP-style concurrent programming features added.

  • Kotlin - Kotlin is a statically-typed programming language that runs on the Java virtual machine and also can be compiled to JavaScript source code or use the LLVM compiler infrastructure.

I suspect that I will be exploring Scala or Kotlin next as a potential "next skill".

Don't forget that if you would like to have your say, you can access the survey that I am running for fun at this link.


Top comments (19)

Collapse
 
eljayadobe profile image
Eljay-Adobe

There was a recent discussion on this dev.to forum about whether or not learning more than one language was important.

I like learning programming languages as a hobby, even if I'm not going to be using them to get paid money. But not everyone is interested in investing the time to master a language for fun, that they won't be using — and that's legit.

The survey was missing Lisp or one of its dialects like Scheme or Clojure. So I punted and picked Haskell, but it was a tossup between Haskell and SQL.

I did not vote for C++. I think C++ is overused in both industry and academics, where another language would be more suitable. It is a difficult language to learn, even more difficult to master. It makes for code that is a huge effort to maintain. Modern languages like Java and C# have demonstrated that the Preprocessor portion of C++ is more of a liability and anachronism — but C++ cannot divest itself of the Preprocessor without not being C++. That ship has sailed. Despite all of those barriers, C++ is a very popular language and will continue to be popular in the foreseeable future. I have a ~30 year love-hate relationship with C++.

You mentioned "I suspect that functional programming is going to become THE programming skill to have in the near future", and I fully agree with that statement.

That reminds me of this quote (from the Forward in "The Book of F#"):

I’ll wind down with a lie that OO people who are learning FP tell one another: “Learning FP will make you a better OO programmer.” It rings true, and in the short run it may even be true, but as you internalize immutability, recursion, pattern matching, higher-order functions, code as data, separation of behavior from data, and referential transparency, you will begin to despise OO. Personally, I went from being a Microsoft C# MVP to feeling guilt every time I created a new class file. Once you understand the defects that can be avoided, it stops being a technical choice and becomes an ethical one.
Bryan Hunter, CTO, Firefly Logic

Besides functional programming, I think the other up-and-coming kind of languages in software development will be Domain Specific Languages (DSL). The smart people at JetBrains have created MPS, which I think will be the kind of thing we'll be seeing more of: tools to support the creation of DSLs. (And by DSL I exclude EDSL. I think EDSLs are so inferior to DSLs, that I have nothing good to say about them.)

Collapse
 
drminnaar profile image
Douglas Minnaar

Thanks for the great response! That was really insightful. A pity I forgot to add Closure to survey. I should have added Erlang too. It's interesting what Bryan Hunter had to say about OO, though I don't agree with him :) ... I've too often seen this pattern of throwing the baby out with the bath water. For me it's not an "either or" decision between the 2 paradigms. But perhaps his objective was simply to make a strong statement to get peoples attention. In terms of DSL's, I actually really regret not mentioning any, so thanks for raising it. I noticed that Groovy was one of the top paying technologies according to the 2018 Stackoverflow survey.

Collapse
 
drminnaar profile image
Douglas Minnaar

Python is a really good general purpose language. Therefore, you could develop games using Python. I've heard that pygame (pygame.org) is quite popular for example. I suppose it really depends on the type of games you want to build. However, I personally feel that Python is better suited to other areas like data science. For building games, I think that "C" is always going to be a popular choice. Unity (unity3d.com/) is very popular these days too. I am busy learning Unity for fun. In the beginning I was surprised to see that it uses C#. Btw, if you're interested in getting into Python and seeing where it is applied then I would highly recommend MOOC platforms like Coursera and Edx to learn more.

Collapse
 
meredevelopment profile image
Mere Development

“Nobody should call themselves a professional if they only knew one language.”
Calm down Bjarne. There’s plenty of folks using just one language, making a living, doing good work. Elitist old gatekeepers with decades of experience aren’t helping anyone with this sort of comment. If anyone read the intro to this article and felt disheartened I feel for you. Don’t believe everything you read. Thankfully the rest of Douglas’s article is realistic and more positive.

Collapse
 
drminnaar profile image
Douglas Minnaar

Haha Yea Bjarne does make a pretty strong statement there. I also found the statement made by Larry to be quite controversial where he considers Java to be "heavyweight, verbose, and everyone loves to hate it". And they're not the only one's (in terms of leaders in the tech field) to have made these controversial statements. I think that passion for a subject sometimes gets the better of most of us :)

Collapse
 
rgchris profile image
Chris Ross-Gill • Edited

I'd strongly recommend taking a peek at Rebol. It's not popular, but approaches language from such an alternative perspective that an understanding of programming is deficient without it. Imagine you could write code using only JSON notation with a few extra types here and there...

Collapse
 
drminnaar profile image
Douglas Minnaar

I have never heard of Rebol until you mentioned it. I find it very interesting. I like it when a programming language encourages one to think different. For anyone else coming across this thread, I found this youtube video that may be of interest.

Collapse
 
michel4globant profile image
Michel Ortega

IMO it pretty much depends on what are you trying to "create" with code. E.G An iOS app(swift), VideoGames(C++ or C#),etc. Or if you just want to start to learn the basics and then decide what to "create", choose C.
Well, and there's the other part. If you want to make money coding, yeah, choose one of those languages from those lists that updates every year.

Collapse
 
johannesvollmer profile image
Johannes Vollmer

Side effects doesn't mean that a different thread manipulates shared data, side effects means that a function modifies some global state or object that is not a parameter (like this in Java) :)

Collapse
 
drminnaar profile image
Douglas Minnaar

Yes, I agree with you :) May I just say that by "shared data" I was attempting to infer "shared state" in the global scope. But shared state can be local too and I didn't make that clear. Therefore I should have been more explicit by specifically mentioning the scope of state. And lastly I should have made it clear that the potential problems of accessing scope outside the scope of the calling context are not limited to multithreading but exacerbated instead. Thanks for your response!

Collapse
 
anindyaspaul profile image
Anindya Sundar Paul

Why do you consider SQL to be a programming language?

Collapse
 
drminnaar profile image
Douglas Minnaar

When I chose SQL as one of the languages I think that one should know, I knew that it may raise a few questions. Therefore, I'm surprised that you're the first to ask :). I consider SQL to be a programming language because even though it is quite different to third generation(3GL) imperative languages like Java, C, C++, it is still a fourth generation language(4GL). I understand that many developers only use SQL to achieve simple CRUD (create, read, update, and delete) operations, but you can do so much more. SQL supports loops(FOR, WHILE), conditional statements (IF,CASE), variables, functions, types, procedures etc. This may cause many to cringe, but I personally know a developer who wrote an entire backend batch payroll system for a medium size enterprise using SQL ... legend :D

Collapse
 
anindyaspaul profile image
Anindya Sundar Paul • Edited

I am having difficulties trying to wrap my head around the fact that someone wrote an entire backend batch payroll system using SQL! Also, I didn't know SQL supports loops. Thanks for enlightening. There is so much yet to be learned!

Collapse
 
radicalbee profile image
Abdu

I just raised a question about what to learn, so life can be easier in future. I am glad to read your review. I can see C# there, and I like JavasScript very much.

Collapse
 
drminnaar profile image
Douglas Minnaar

C# and Javascript are my 2 loves. You can't go wrong with either.

Collapse
 
ghost profile image
Ghost

Python can be embedded in games to provide scripting support. So, Python can be a good tool for game developers. It may not be the main language, but make no mistake, it can be very useful.

Collapse
 
biffbaff64 profile image
Richard Ikin

I recently spent some time 'messing around' with Scala. I Like!
BeefLang is quite C#-like, and interesting.