How you can learn any Programming language/Framework, the right way.
Break out of tutorial hell, Learn and build things your way!
Programming languages are the backbone of the tech industry. They lay the foundations on which the web and its applications on it are built.
Programming languages are essential tools for creating software applications that can solve a wide range of problems and perform various tasks.
Although programming languages are not the only things that matter in tech, they are beyond a shadow of a doubt play a crucial part and vital for everyone to learn.
Throughout a software engineer's career, In general, the number of languages that a software engineer knows or learns can vary depending on their career goals and the specific requirements of their job. Some software engineers may focus on mastering a few core languages, while others may have a broader knowledge of a wider range of languages.
Ultimately, the key to a successful software engineer is to have a strong foundation in computer science principles and a willingness to continue learning and adapting to new technologies and tools. New programming languages keep coming into the picture from time to time.
Programming languages are like communication channels between users/programmers and systems.
What are Programming languages?
Technically defined, Programming languages are formal languages that are used to write instructions for a computer to execute. These instructions are known as code.
These instructions are written in a specific syntax that is understood by the computer.
Programming languages are used to create a wide range of software applications, from simple programs that perform basic calculations to complex systems that control entire networks of computers.
Systems, OS or compilers do not understand any human readable languages, they interpret everything in binary code that is 0s and 1s. Languages such as Binary code, Machine and Assembly language are all known as Low-level languages.
These are the kinds of languages that a computer or machine can understand and interpret. While these are the types of languages the computer can understand they are not necessarily the languages we as programmers or users can write in.
The type of programming languages that developers write in are called High-level languages. These are designed to be easy to read and understood, allowing programmers to write source code using logical, meaningful words and symbols.
Some examples of High-level languages are Java, Python, Go, C++, Swift etc
Before we get to some examples of different types of programming languages, let us look at some main features and characteristics which remain the same for the most part irrespective of the language you learn:
Characteristics of programming languages
Simplicity: the language must offer clear and simple concepts that are easy to understand, facilitating learning and application. But simplicity can be a difficult balance to strike without compromising the overall capability of the language.
Capability: Apart from being easy to use, the language must be well-equipped with a robust set of features to perform a wide range of tasks. If a programming language was designed to be used in a specific area, it must provide the necessary means (operators, structures, and syntax) to achieve ideal results. More often than not it is the capabilities of a language that enable us to assess which language is right for the specific job or project
Abstraction: the language can define and use complicated structures or operations while ignoring certain low-level details.
Efficiency: Programming languages that can be translated and executed efficiently help avoid the excessive consumption of memory and time.
Structuring: Languages allow programmers to write their code according to structured programming concepts to avoid creating errors.
Compactness: A language with this characteristic can express operations concisely without having to write too many details.
Principle of Locality: also known as the locality of reference, this phenomenon describes a computer program’s preference for continually accessing the same areas of memory over a short period. By enabling the usage of loops and subroutines, a programming language can exploit the principle of locality for optimising the overall performance of an application. (More on this later)
Approach to learning multiple programming languages.
More often than not the most popular way for people to learn any programming language is through watching tutorials and videos on it. Which works fine if you do it the right way. But in all. honesty, it is not the most optimal and best way to learn.
Before we get to what are the best resources to learn different programming languages let us look at the approach to learning any of them.
A lot of people go to websites like youtube and search for tutorials on programming languages they'd like to learn. There are tons of video tutorials on the internet but the problem is all of them mostly are end-to-end tutorials. Due to this, the tutorials are hour-long at least. Watching these tutorials from beginning to end is a HUGE MISTAKE.
These tutorials give you a false sense of knowledge and progress. Additionally, not all the things on the tutorial are required for you to start working with the language. You waste a lot of time watching it all.
The Right Approach:
Irrespective of which language you learn, Be it Java, C++, python or anything else.
The fundamentals of all programming languages are the same. Isn't it logical? If the fundamentals are the same, it means the concepts and logic remain the same for any language. The only difference lies in implementation, which can be adapted.
The difference lies in capability, functionality and syntaxes but the core foundations and fundamentals remain the same for any language. Let me affirm the same with a few examples:
Pick any two programming languages you want, Let's say Java and Python
I chose java and Python as examples as they are two very different languages. Python is a dynamically-typed language when compared to Java which is Statically-typed.
// define a string to reverse
String original = "Hello World!";
// create a new empty string
String reversed = "";
// iterate over the characters in the original string
for (int i = original.length() - 1; i >= 0; i--) {
// append each character to the reversed string
reversed += original.charAt(i);
}
// print the reversed string
System.out.println(reversed); // prints "!dlroW olleH"
The same approach in python would be:
string = "hello"
# create a new empty string for the reversed string
reversed_string = ""
# iterate over the original string in reverse order
for i in range(len(string)-1, -1, -1):
# append each character to the reversed string
reversed_string += string[i]
# print the reversed string
print(reversed_string)
The point is language is different but the approach remains the same.
The way data structures such as Stacks, Heaps and linked-list are implemented may differ but they are still the same in both languages and working is almost identical.
When you learn a language, you restrict your learning to a language. When you learn the fundamentals and core, you can adapt to any language. As software engineers, we are expected to keep evolving, learning and implementing new technologies.
5 Step process to learn any language.
Before you watch tutorials or blogs. Learn to first read the documentation. Every language and framework has official documentation with its tutorials.
Official Documentations are your best friend. They have the answers to all your questions. Learn to read and work with documentation.
The above is an example. It is the official documentation of Golang.
The fundamentals remain the same, so do not waste time learning the new syntax, learn how it is to be implemented and what's different in working. Learn what the language can do better and where it fits.
Pick a project. It can be as small as making a calculator app to building an e-commerce website. This is Vital.
You need to apply everything you learn and consume. That is the only way you retain information. You learn by doing.
If you learning a framework or language by trying to build a project with the help of a tutorial, that's completely fine but do not replicate the tutorial. Instead, build it with a touch of your own. Or build something else which is similar.
Learn in public and ask good questions. For example, if you are learning python or Kubernetes. Join their community and mailing channels. Collaborate with others on their projects. Be humble, ask good questions and help others too. This is where Twitter and Open-source shine. I have already written a blog on how you can get started with Open-source. You can check it out here for more details.
When contributing to open-source, Contribute and work with large codebases. They will help you enhance your skills and knowledge faster. This way, keep practising and making projects while always questioning WHY a certain function is written in a certain fashion or implemented (Learning fundamentally).
Pro Tip: When you learn something new. Document your learnings. One way to do that can be to create a GitHub Repository and learn, practise and document your learnings. Attaching a sample from my own GitHub to give you a gist
Don't:
- NEVER. At least as a beginner, never try to learn or master multiple languages and frameworks at the same time. Huge waste of time.
Conclusion
Everybody wants to do big projects and everything right. But the harsh reality is you need to make mistakes to learn the right thing and what is right. You wanna build right? then you gotta learn right first.
These are some basic and simple yet very effective ways to learn any programming language and framework. Learning is vital to becoming successful. These are some of the ways I used to learn multiple languages such as Java, Python, Golang, C++, Javascript, HTML, and CSS. I keep learning similarly to upskill myself efficiently.
Keep learning, Keep growing!
And that's a wrap for now. Thank you for reading. All the best for your learnings.