This post was published first at https://21-lessons.com/2020/02/05/learn-a-new-programming-language/
When you learn your first programming language or an additional one, have you wondered where to start learning?
A programming language comes with a lot of features, syntax and language constructs. If you look at it for the very first time, it can all be intimidating.
Over the last 13 years I learned something between eight and twelve programming languages. Looking back at it, I’d like to share my method with you.
Step 1
Install the language on your computer. Most languages have an installer on their website that works for your operating system.
Step 2
Open the language’s documentation website. Most programming languages have a documentation on their website that walk you through the basics.
Step 3
Read about these topics in the documentation
- How to run Code in this language
- Does it need to be compiled?
- Is there anything else you need to take into account?
- What is the basic program structure?
- Variables + Variable Declarations
- How do you declare variables
- How do variables work in this language? Are there any special behaviors to take into account? (Variables behave very similar in many languages but here and there this can differ)
- Data Types
- What kind of data types does the language offer?
- Assignments
- How do you assign values to variables? Is there anything to take into account?
- Expressions vs. Statements
- How do Expressions and Statements work in this language? What’s the syntax?
- Functions
- What’s the syntax for functions and how do they work?
- Loops
- What kind of loops are available? for, while, …
- Conditionals / If Statements
- How do Conditionals / If Statements work? Are there other types of conditionals the language offers?
Step 4
Write the first programs to apply all of these features. These programs should be small and are only meant to exercise the new knowledge. Once you become more comfortable with the new language these serve no purpose anymore.
Step 5
Once you become more familiar with the language basics, you can start to read and learn about the more advanced features. Advanced features can be:
- Classes
- Macros
- Higher-Order Functions
- Meta Programming
- Reflection / Introspection
- …
I’m curious to hear from you how this method works for you or if you have a different approach. Comment below and share your thoughts!
Top comments (0)