Learning Your First Programming Language

On July 1, 2012

Learning your first programming language

So you have decided to enter the programming world and learn your first programming language. In the beginning, you may have some confusion regarding the approach you need to take to learn programming.

It's very natural for someone to get discouraged in the initial phases. Some people start believing that programming is just not for them and they quit.

While it's true that every one cannot fall in love with programming, but sometimes the main culprit is the lack of proper teaching method used, or taking the wrong approach towards learning something new. 

If someone taught you programming just as someone tells a story it would be more interesting and an enjoyable experience. Since it may not be possible for everyone to find such a teacher, it's best to dive into the programming world by yourself as soon as you can. 

Don't let others voice mislead you. It's never too late to learn programming.(Though a bit old but, an excellent discussion regarding this is there on Hacker News). Even if you don't intend to make a career out of it, it is always good to learn something new every once in a while. 

You will only benefit from learning a programming language. You will gain a better understanding of how things actually work in the computer world. 

Once you have decided to learn programming all by yourself, you have to make sure that you learn it in a way that keeps you interested. Based on the limited experience that i have, this are the few steps that i would suggest you to take, so that learning to program becomes an enjoyable experience for you, rather than a tiresome work.

Choose the right programming language
Choosing a language that would be easier to learn is the very first step you should take. There are all kinds of language available out there. Some are easier to understand than others. Even the hustles involved in setting up a language and understanding its basic syntax and semantics may leave you frustrated.

Every language is built to satisfy a specific purpose. That's why some languages require additional tools and software to set up, whereas some are just as simple as copying and pasting a directory on your existing machine.

Choose a language that's easy to set up and configure. It's always a good idea to ask some fellow programmer who can at least help you in picking up a language that would be easier to learn.

Though different programmers would recommend different programming languages to begin with, i find C to be the language that every first time programmer must learn.

C is a simple language and it's easy to understand. With some good logical skills you will find that C gives wings to your imagination. Also, once you learn C, learning another languages would be much easier.

Still, it's a personal choice so, choose a language that you feel best suits your interest.

Learn the story behind the language
Though this won't affect your programming skills but, it's always a good idea to read the story behind a language, especially if it's your first one.

Every language that exists was invented to solve a particular problem that existing languages couldn't answer satisfactorily. Learning the story behind what led to the invention of the language is always interesting.

If you have some extra time, try to know something about the programmers who invented it. Nothing is more interesting than meeting someone who thought leagues ahead of others and went ahead and created something that would make other fellow programmers life easier.

It's a good place to get some inspiration and insight which is definitely required at the beginner phase.

Understand the basics of the language
It's very important to learn the basics of the language in which you are going to program. Once you have chosen the language, focus on the very basics of that language. Understand the basic data types, how to use conditions and loops in that language.

At the starting phase this much is enough. Understanding the basics is the key point. You won't be able to move ahead and dive deeper into the language if your basic knowledge about the language is wrong.

So, take your time and have some patience. Every one has his own learning speed. So don't feel frustrated if you think it's taking you lot of time. It's a different world so it would take time to adjust to it.

Play with the language
Once you have gained proper understanding of the basics, start playing with the language. Try out different things with the language. See if there are other ways to do the same task.

Assign different data type variables to each other. See the results and find for yourself which data types are compatible with each other and which are not. Do such kind of stuff yourself. Don't rely on the knowledge on the books. Test their validity for yourself.

What if you change this one thing? will it work? Don't keep the doubts in your mind. Just make the changes and see the results. If there is any error. See the error message. Thats the basic of becoming a good programmer some day.

Many languages have their own development environment. Knowing some tools is as important  as knowing the language. Spend some time tinkering with the tools and changing different environment variables.

This way you are more likely to remember them and you would become comfortable with the  operating environment.

Do some logical programs
Do programs that test your logical ability. Make different patterns of characters and numbers. This is perhaps the most important quality of a good programmer.

If you have good logical skills then even with basic programming knowledge you can create some great stuff. But, if you lack logical skills then even with good grasp over a language you will find it's hard to apply new changes to your project.

As you are beginning your journey as a programmer, it's best to start developing your skills from the beginning itself.

With so much reference material available online for every language, you may always find the conceptual or theoretical knowledge. But, if you want to make something that has never been made before then you must have good logical skills. 

Do some interesting programs daily. Try to understand the flow of execution from one place to another place. Once you understand the flow of execution you are ready to create some really good programs just by using the basic loops and data types.

Start challenging yourself
With basic things covered and some logical ability gained, now it's time to challenge your mental muscles and start programming some really cool programs.

To gain mastery over anything you have to go beyond the obvious and push your limits. This is what separates the innovator from the followers. 

Don't compare yourself with others. Just make sure you advance every day and improve as a programmer with every passing day. The best way to do this is to do something that you have never done before.

You can only learn your limits once you dare to cross them. Even if you know you will fail, don't hesitate from trying to make the next best thing.

Program as much as possible
With everything said and done, the one thing that will determine your grasp over a language is directly proportional to the time you spend programming in it.

There are no shortcuts to attain mastery over any thing worth learning. Programming is the same. It will, at least, take few hundred hours of practice to gain some good grasp in programming. Always be willing to go that extra mile and immerse completely into what you are doing. 

When you do this daily or for some time, you will realize that you have started to understand the way the computer programs actually work and, how the machine is nothing, but just a tool that can do whatever you command it to do.

What next?
This is just the beginning. As you advance ahead in this field, you will realize there are a lot of other things that are required to become a competent programmer and compete with other professional programmers out there.

There are various architectures to be learned to make easily scalable programs; how to maintain your source code; how to use existing frameworks and apis that reduce the code for you; how to save time by using advanced tools and technologies.

But, i would recommend you to not bother about these things right now. If you start with learning lot of things at once, it will only confuse you and may also discourage you.

The key is to have patience and improve slowly and steadily one step at a time. Though the path may not be clear now. But as you cover a few steps you will automatically see the next steps. Just keep on walking the path which helps you grow daily.

If this post helps you in any way, i would be glad to hear from you.

Image Source: mrbill

share this on : twitter | facebook | google+