Throughout my career as a software developer, I have used many popular programming languages for different projects. Today when I look back, I believe the first one (C, to be specific) was the toughest one. Each subsequent programming language I used felt more comfortable and intuitive. For example, when I picked up Java from C in 2005, I struggled only a bit to pick up object-oriented programming (OOP) concepts (I had also worked in C++ before Java, so OOP concepts were not totally new to me).
Now when I start learning a new language (recently, I started learning Python and Swift), I know exactly which concepts I need to look at to start programming in less than a week.
In this post, I will share the wisdom I have collected through my experience in working with different programming languages. I hope this will help beginning programmers to hesitate less about which language to choose and get started immediately.
This article will also help experienced programmers to realize how risky it is to bet everything on a single language they have been working with for years and motivate them to learn something new. So let’s get started.
Programming Is a Concept
The first reason why I think the choice of programming language is not priority one is that programming is actually a set of patterns that helps us instruct a machine effectively to solve a real-world problem. This is a concept at its core. If you pick up two programming books on different languages and flip through the first five chapters, you will definitely notice the pattern. There will be lessons on defining variables of different data types, assigning values to those variables, and performing logical and mathematical operations on those variables. There will also be lessons on how you can instruct the computer to take logical decisions through “if,” “else,” and “switch” statements, and repeat the same set of operations via the “for” or “while” loop. So, by the time you pick up a third programming language, you will know what to expect in the first 10 chapters. Obviously, there will be some language-specific features that you have not seen before. But that should not be more than 30 percent of the total effort needed to learn a new language.
I always suggest that new programmers focus more on how to write good algorithms or pseudocode. Whenever you have a problem that can be solved through logical decision making based on data and calculations, you should think about how you could complete that task if you had to do so manually with a pen and paper. Then you should jot down the steps in a notebook and brainstorm how the steps can be arranged so that you can optimize the output with a minimum number of steps.
For example, suppose you work for an insurance company, and you have to calculate the premium needs to be collected from a prospective customer for providing a ‘life cover’ benefit with a $100,000 face amount. If you have to do this without using an enterprise software application (using a pen, paper, a calculator, and reference documents), you have to follow the steps below:
- Determine the age of the customer based on the date of birth provided.
- Lookup premium rates (the premium for each $1,000 face amount) from the product specification chart based on age.
- Multiply the premium rate with the requested face amount of $100,000.
If you clearly understand the steps mentioned above, you will be able to convert them into a software application of your chosen programming language by following the steps below:
- Capture the inputs related to the customer request through a desktop or mobile user interface (UI).
- Use the inputs to determine customer age using standard calendar functions available for your language.
- Query an enterprise database to look up the premium rates based on customer age.
- Multiply the premium rate by the requested face amount to determine the required premium.
- Display the calculated premium in the UI.
All popular programming languages provide methods to accomplish the steps mentioned above. So, if you wrote a program in Java to do this, how long do you think you would need to replicate that in Python?
Computer programs only help us execute the instructions repetitively and very fast. But it is up to the programmers to determine how they write the instructions, which again depends on how good they are at writing algorithms. If you can logically break down a problem into self-contained, small, unique steps, then the chances are very high that you will be a good programmer. Algorithms are eternal. They actually drive each and every software program that has ever been written in whatever language. If you understand the algorithm, you can easily convert that to a running application with minimal effort.
You should also focus on data structures and should have a good understanding of which algorithms work well on which data structures. Data structures define how your data are organized within the application. All kinds of software manipulate small or large sets of data in order to produce a meaningful result. So, how efficiently your program will work depends on the kind of data structure you use. Some of the popular data structures we commonly use are Lists, Maps, Sets, and N dimensional matrices. Algorithms work on data structures to produce results.
Another key concept you should focus on is design patterns. Design patterns capture how programming tasks with similar types of challenges can be solved by following a pattern that has proved to be successful in the past and has been able to repeat its success in different kinds of projects. Most of the popular design patterns are language agnostic and can be implemented in any programming language. An example of a simple, still-popular design pattern is Factory Pattern, which encapsulates creation of objects in object-oriented programming languages.
“Head First Design Patterns” and “Design Patterns: Elements of Reusable Object-Oriented Software” are my favorite books that explain the design patterns in an easily understandable manner.
Armed with the above concepts, you can conquer any programming language in a very short time. What you really need to learn for any language are specific keywords, syntax, application programming interfaces (APIs), and certain concepts. Those aspects can be mastered by starting a simple mini-project straightaway.
Personally, I am not fond of “Hello World!” types of projects; you have to choose something that feels real even if it is not on a large scale. You can simply build to-do list software or a spending tracker for yourself. For the first few days, you have to refer to a book or online documentation for the syntax and APIs. However, the more you write code, the less you will need to refer to documentation.
Programming Is About Communication
Programming is about instructing a machine as to which actions to perform in which order to solve a real-world problem. So efficient communication is more important than the choice of programming language for an efficiently written software program.
As per my experience, a person with good communication skills (both verbal and written) is likely to be a good programmer. Programming is a way of communicating to a machine how to execute certain steps so that the software can achieve some defined business goal. A programmer talks to a machine in a language understandable by the compiler, which again converts the instructions into microprocessor-readable instructions.
Twenty years ago, programmers used assembly language to code microprocessors. It was a very low-level language that demanded understanding of underlying hardware architecture to program the machine. As programming has advanced, we have created programming languages that are closer to natural language. The goal is always to allow us to instruct the machines in a language we feel comfortable with. As all programming languages are trying to make the code clean and easily understandable, the gap between the coding syntax is also getting reduced. This can reduce the learning curve to learn a new programming language.
A Python programmer can write a 10-line code to solve the same problem that will take more than 100 lines of code for a C or COBOL programmer. However, a C programmer can easily learn Java by mastering OOP concepts. Similarly, a Java programmer can easily switch to Python with less than one month of effort.
If you can instruct a machine in Java, you will definitely be able to give the same instructions in Python. So your focus should be to learn any popular general-purpose, preferably OOP, language. If you do that, switching to any other language is not as difficult as you might think.
No Programming Language Is One-Size-Fits-All
Another reason you should not focus on any specific programming language is that the choice of language can change based on the type of problem you are trying to solve. For a robust server side enterprise software, you will probably choose Java; for data science-related projects, you should choose Python or R; for mobile development, you need to choose Swift. The reason behind this is that the availability of frameworks and packages makes a programming language preferable for certain projects. Frameworks handle most of the boilerplate code and enable the programmer to focus more on the problem to be solved.
So my advice is to master the basic programming concepts described earlier (data structures, algorithms, and design patterns) in whatever language your current project uses. If you do that properly, it will be easy for you to move to any other programming language as you change projects, switch companies, or want to pursue some personal side projects.
Before you embark on any new project, you have to research the best fit for the project. You should not simply go and use a language because you already know it and are comfortable with it. That can lead to a disaster.
The Programming Landscape Is Evolving Fast
Technology is evolving very quickly. Some of the popular programming languages like Perl and Ruby are on the way to extinction, and new programming languages like Swift, Kotlin, and R are gaining popularity. As we are trying to uncover new ways in which programming can be used for improving our life (e.g., home automation, self-driving cars, robotic surgery), we are constantly creating new programming languages (e.g., R), frameworks, and tools to make it better and faster. So, if you want to future-proof your career in this era, you have to evolve very fast by learning new programming concepts (e.g., deep learning) and languages so that you can keep pace with this rapid change and be relevant tomorrow. Always try to put more focus on basic programming principles, which are timeless (as specified in the above sections).
So, I hope I was able to convince you why you need to prioritize programming concepts over the programming language. If your base is strong, you will survive this ever-changing technology domain by learning new programming languages that are fit for the purpose. This will help you remain relevant and become truly unshakable.