Python, Ruby, PHP or Java? How to pick a programming language to learn

When starting out building web apps, you find there are a number of choices for the programming language you can use. For a beginner, the different options can be overwhelming. Over the years, programming languages ebb and flow in popularity. You might feel the pressure to pick something that is quick to learn and build a career on. 

The good news is that for the frontend (the part of the app the consists of the user interface), the choices are made for you. Since the apps will run in a browser environment, you are pretty much confined to using HTML, CSS and Javascript. HTML and CSS defines how the UI looks, and you use Javascript to create how the user experience behaves.

For the backend (the part of the app that provides the data and business logic), it’s a different story. Here is where the choices come in. Let’s look at a brief overview of some of the options you can consider.

Python
Python is a powerful programming language that has a strong following in the Data Science, Machine Learning and AI communities. It is also a great language for building web application backends. Frameworks such as Django and Flask has helped Python gain popularity in this aspect. The language has a nice clean syntax, supports object oriented programming and can be quick to learn. Being proficient in Python has the added benefit of enabling a transition to building ML and AI systems.   

Ruby
Ruby has been popular since the advent of the Rails framework. Together they go by the name Ruby on Rails. The framework stands out for making specific architectural decisions for you around how the code is organized, how data is accessed from a database etc. Rails is the foundation on which some great companies such as Shopify and Basecamp have build their products. Ruby prides itself in having an elegant, natural syntax. The strong community and continuous improvements in Rails means, Ruby on Rails will be popular for a long time to come. 

PHP
PHP was the go to language for building web apps and web sites in the early 2000s. It continues to have a strong following and powers both Facebook and WordPress. The language has a certain simplicity that allows you to put together a quick web site without necessarily going through a particular framework. The syntax of the language, with it’s dollar sign prefix for variables, can be off-putting for some. PHP is often partnered with the database system MySQL to make up the LAMP stack for developing web apps.

Java
Java is an extremely versatile language that is used not just for web apps, but a lot of other platforms such as mobile devices and embedded systems. Large-scale distributed backend systems often rely on many different Java based components, such as Zookeeper, Kafka and Samza. Although Java has traditionally been the go-to language for college programs, the learning curve for a beginners can be steep. 

Javascript
Javascript has come a long way since it’s humble beginnings as a browser scripting language. Today, it is no longer simply a frontend language, it can be used in the backend too via NodeJS. Using Javascript in both the backend and frontend eliminates the need to learn yet another new language. You can be up and running right away. You will come across a lot of coding bootcamps that teach full-stack javascript as part of the MERN stack.

Which one should you pick?

Now to the big question: Which language should you pick to build your career on? To start, it is unlikely that you will go through an engineering career working with only one programming language. In a large organization, you will find yourself using different languages in different parts fo the tech stack. Over time you will come across the need to learn new languages and retool as your organization evolves or as you switch to different companies. So learning how to learn will be important in the long run. 

The good news is that programming languages, like regular spoken language, has somewhat of a common “grammar” across them. Most of them consist of conditional structures (if blocks), control structures (such as loops), collections and libraries etc. With time, learning the next language becomes easier than the previous one. Beyond that, it is more important to focus on timeless software design and architecture principles. The programming language is simply the means through which a specific design and architecture is implemented. Mastering design and architecture should be one of the primary long term goals of any software engineer. 

For this reason, Javascript and the MERN stack, which is popular with many coding bootcamps, is not the best place to start. By choosing to use Javascript in the backend, you lose out on the opportunity to learn more intricate foundational software design and architecture principles. Although some of these principles can be demonstrated through Javascript, you will get a more well rounded experience learning them through languages that are primarily used in the backend. This is why Java is popular amongst colleges, since it lends itself well as a vehicle to explore these concepts. 

For a beginner though, either Ruby or Python would be a good place to start. Both languages will give you a good introduction to general object oriented design principles, while their frameworks can provide the structure to get started with building apps quickly. Ruby on Rails is particularly strong in this regard since the Rails framework is easy to learn right out of the box.

Subscribe to keep learning more

Sign up to receive exclusive updates and thoughts on learning how to become a Software Engineer.

Processing…
Success! You're on the list.

Leave a Reply

%d bloggers like this: