Picking the Right Programming Language for your Project

Ben Miller
4 min readApr 17, 2022

Should you use the hottest language, or stick with something more reliable and trustworthy?

Python vs. Go

Selecting a programming language to begin a project can oftentimes feel quite daunting. As with most things in software engineering, choosing the right tool for the job comes down to one key idea: trade-offs.

Software is full of trade-offs, whether you want to use one tool or framework over another, there is generally an argument to be made for what you choose and ultimately the answer you’ll find online in it depends.

The reason for this is because every project is different. That’s part of the beauty of software, no two projects are exactly the same (otherwise why are you building a clone of something that already exists? Outside of educational purposes of course). Yes, some projects may be similar and that’s why a lot of tools will be good for some tasks, and even better for others.

You wouldn’t use C to build a web app, especially one that doesn’t have a strong need to be performant. You wouldn’t (and currently couldn’t) use something like React for an embedded systems project either.

I often come across charts and people making arguments that one language is superior to another in a lot of different contexts which can make things confusing. For example, this article was recently published about the “greenest” programming languages in a ranking of energy consumption.

A ranking of the “greenest” programming languages
A ranking of the “greenest” programming languages

Despite what appears to be a pretty condemning list, efficient code written in Java can be a lot more carbon-friendly than poorly written C++. The carbon footprint for a poorly architected system running thousands of VMs in the cloud would be much greater than efficient processing regardless of the language of choice.

If it truly comes down to trade-offs, what are at least some guiding principles or ideas that can get you on the right track to getting started on your project and escape the analysis paralysis?

This is again a subject list, but these are what I use when guiding my decision for which tool I will use to at least begin my projects:

  • What timelines exist for the current project? Is it a demo/proof of concept with a tight deadline? Scripting languages such as Python and Ruby can be great for spinning up ideas, but might not necessarily be the right groundwork for a highly performant, long-term solution in some situations where Go or Rust might be more appropriate.
  • What is your familiarity with the language and what is the familiarity of the language among your team/peers? Context matters a lot and going rogue with a PHP microservice despite it having some really neat features might not make sense when the rest of your org is writing functional programming in a language like Haskell.
  • What is the medium in which your software will run? Is it a phone app? Maybe Kotlin or Swift is a good choice. Looking for something that will compile to both iOS and Android? Maybe something like Flutter or React makes more sense. The landscape will change a lot depending on where your code will run, e.g. in the cloud it might make more sense to use Golang vs. in an embedded system C++ might be an easier choice.
  • What libraries currently exist that solve the problem or part of the problem which you are hoping to achieve? Are you attempting to write a cryptography library when multiple bullet-tested cryptography libraries already exist within programming language ecosystems such Java or C++.
  • What services or frameworks do you plan on interacting with? Are you planning on using payment processing with Stripe? Message queuing with Rabbit? It might be a good idea to check ahead that your language plays well with or has SDKs in some of the tools that you intend on using.
  • Is this a project that has to be reliable? Or is it a project that is just for learning? If you want to optimize for learning it might be a fun idea to try a new language or use something that at the time appears to be cutting edge.
  • What do you foresee the bottleneck of your application/project to be? Is it developer time, or will it be a performance bottleneck?

This brief list is not an objective list by any means and there definitely are a lot more things to consider if you want to make your own list. At the end of the day, it all comes down to what your project needs the most from the tools that you choose to build it in. Not what might be the shiniest or most appealing language but make sure that you are at least trying to use the right tool for the job.

Happy coding!

--

--

Ben Miller

Software Engineer 💻 Pythonista 🐍 SSBM 🎮