How to master a programming language?

Do you want to become a great coder? Do you want to become master of a programming language but do not have a thorough understanding of them?

There’s a lot to learn and you’ll probably forget things as quickly as you learn them. Trust me: that’s normal.

Learning how to code just needs a right mind set, attitude and passion.

Understand the “Philosophy” Behind the Language

There is a reason we have a plethora of programming languages. Different languages are optimized to solve different types of problems or designed to work at different levels of abstraction within a computer system.  Understanding what the language you are learning is used for and at what level it works best at is critical to understanding how to apply that language to solving actual problems.

For an inexperienced programmer while learning the earliest versions of Java, the language might seem verbose and unnecessarily complex because of the Object Oriented Philosophy behind it.

Learning the Object Oriented Philosophy will help to appreciate and understand Java and other OOP languages at its core as an Object Oriented Approach.

Invest at least 10,000 Hours

clock

Malcolm Gladwell coined the famous 10,000 Hour Rule”, which says that you must invest at least 10,000 hours into a subject in order to become a master at it.

All you need to do is start. Dedicate some time each day or week to check off the to-do list of learning programming. You can take as long as you want or move as fast as you want. If you’ve decided to become a great programmer, you’ve already accomplished the hardest part: planting the seed. Now you just have to add time and your skills will blossom.

Mastery can only be attained through 10,000 hours of deliberate practice.

How you practice matters far more than how much time you spend practicing.

No Speed Limit: Learn from Scratch

Learn_Programming_from_scratch

“There is no speed limit” Some person might learn a code in an hour and some might take a day to understand the same piece of code.

It is one thing to understand an example before you, but it’s another to synthesize a solution from scratch.

You might read the code from a book, watch video tutorials on YouTube, listen to podcast but resist all this and apply the knowledge in a practical way and type down the code

Typing them in, instead of glancing at them stimulates memory and retention.  Typing in the examples and making them work is perhaps the most important part of the learning process. Even if the language is totally foreign to you, you will start to notice patterns in the code syntax that will unlock the meaning of what you’re keying in.

Perhaps most importantly, when typing in code examples, you will make mistakes.  Finding those mistakes and correcting them is also an invaluable part of the learning process.

Make it Run!

Makeitrun

Always, always, always make your program run. Debug it until the result is correct.

Besides, nothing is more exhilarating than seeing the code you wrote run for the first time!

Then type the sample code into a compiler–if you type it, instead of copying and pasting it, you will really force yourself to go through everything that is there. Typing the code will force you to pay attention to the details of the syntax of the language–things like those funny semicolons that seem to go after every line.

Then compile it and run it. Make sure it does what you think it does.

Publish Code

Someone will instantly correct you and you probably won’t make the mistake again. You can speed up your learning 1-2 orders of magnitude by sharing your work with others. It’s embarrassing to make mistakes, but the only way to become great is to learn from mistakes.

Don’t Worry

dont worry

Don’t waste time or get stressed worrying about what you don’t know. Remember, every great programmer at one time had NO IDEA what assembly was, or a compiler, or a pointer, or a class, or a closure, or a transistor. Many of them still don’t! That’s part of the fun of this subject–you’ll always be learning.

Get mentors

Mentor

If you don’t know how to do something, simple things like forms. Usually you would search Google for the answers, and if you don’t get it there, you would start to panic. When you get in over your head, ping mentors. They don’t mind, trust me. Something that you’ll spend 5 hours panicking to learn will take them 2 minutes to explain to you.

Treat Yourself

Build things you think are cool. Build stuff you want to use. It’s more fun to work on something you are interested in. Programming is like cooking, you don’t know what you make is good until you taste it. If something you cook tastes like dog food, how will you know unless you taste it? Build things you are going to consume yourself and you’ll be more interested in making it taste not like dog food.

Write English

Code is surprisingly more like English than like math. Great code is easy to read. In great code functions, files, classes and variables are named well. Comments, when needed, are concise and helpful. In great code the language and vocabulary is not elitist: it is easy for the layman to understand.

Be Proliferative

Write web apps, iPhone apps, JavaScript apps, desktop apps, command line tools: as many things as you want. Start a small new project every week or even every day. You eventually have to strike a balance between quantity and quality, but when you are young the goal should be quantity. Quality will come in time.

Teach concepts as you learn them

There is a concept in programming called rubber duck debugging, which describes the technique of explaining one’s code, line by line, to an inanimate rubber duck. It’s used when a particular segment of code is broken, but there’s no obvious reason for it.

Strangely enough, most programmers have a “Eureka!” moment in the middle of explaining the code as they suddenly see where the error in coding logic occurs.

“If you can’t explain it simply, you don’t understand it well enough”  by Albert Einstein

The more you understand a topic, the better equipped you are to explain it in such a way that someone who has no knowledge of said topic can still come to understand it.

As you try to teach a topic, you’ll come across certain concepts that you can’t seem to explain in a clear manner. Not only is this an awesome way to diagnose weaknesses in your knowledge, the actual process of finding the proper explanation can help solidify the concept in your mind. It’s called learning by teaching

Try teaching it to a rubber duck (or an invisible friend). It may feel silly at first, but you may find it incredibly fruitful when it comes to memory retention.

Experiment with Personal projects

Create a couple of throwaway side projects!

Think of a few project ideas that you’d like to implement. For absolute newbies, you might consider a game of Tic-Tac-Toe or Hangman. For seasoned programmers trying to learn a new framework, try coding a simple mobile app or web game. As long as it interests you on a personal level, go for it!

Relax and Bookmark Everything

bookmark

The truth is that no programmer remembers everything they’ve learned.

In fact, trying to memorize everything might just end up being a huge waste of time and effort. Reference sheets exist for a reason.

So, when to memorize and when to reference?

When it comes to conceptual material, always internalize it to the best of your ability. By that I mean understanding the theory even if you can’t convert it into actual code.

For everything else — such as specific function names, parameter lists, or even language quirks –reference sheet.

Also read10 Most Popular Programming Languages of 2016

  • Juan

    I will try to follow those steps.
    Thanks.

  • BlacKhalifa

    I have been learning code from programming hub app and I’m finding it difficult to comprehend without a tutor or mentor, I would be more than glad if any if you pros could volunteer to impact knowledge. Thanks a lot.

    • Programming Hub

      Dear Khalifa,
      Your request has been noted down. We are working on several such models that can help users across the world learn programming better. Thanks for your inputs, means a lot to us. Stay awesome! Thanks!