By Vitor Freitas January 06, 2015
To say the truth, I do not have a high level of proficiency on any programming language. Neither I have a favorite language, but there is something special about Python and Java for me. Nevertheless, I have a good proficiency on building software, whatever the programming language it is.
One should think programmatically. If you are building a commercial application, your focus must be on the resources you will use, the libraries available, the frameworks you will need to do your job. The programming language should not be a barrier.
At some point you will realise it is pretty easy to learn a new programming language. But there is a few important steps before you get started:
1. Know why you are doing this
Actually this is a general advice for anything you are starting to learn. Knowing why you are doing this is a huge step, it’s mainly your motivation to not stop, that’s what will keep you learning. If there is no substantial meaning for you, it’s more likely you will drop it.
2. Do a Hello, World
Always start with a “Hello, Word”. It will give you lucky. Just kidding. But it is always a good idea. It will help you set up your development environment and make sure everything is ready for you to start coding.
3. Think about something you want to build
Think about something simple. Create a fake scenario, define a few requirements like “create a blog application”, “create a poll application” or “develop a simple CRUD”. Preferably something you’ve already done in some other programming language, this will help you do analogies with the languages that you already know.
4. Read the basics first
You don’t need to spend much time. Just read a bit about the language’s syntax. How to write a if/else, a for, a while, how to create a function, how to create a class. If it’s a strongly typed or weakly typed language, how to create variables.
5. A framework before the language
Before you start learning Python for example, start with Django. You will realise that you can do a lot of cool stuff without knowing much about Python. Focus on how to use the Django resources. By the time you start to develop some stuff with Django, the Python problems will appear naturally. “Ok, I have this list of objects, how can I iterate through it using Python?” or “I have this string, how can I get just the first 5 chars of it using Python?”.
I’ve learned Python and C# this way. If you want to learn Ruby, start with Rails. If you want to learn C#, start with ASP.NET MVC. If you want to learn PHP, start with CakePHP.
The good thing about this is that you will see the applicability of the language resources more easily.
6. Start coding
“B-but, wait…”. No excuses. Just start coding. The problems will come up, the language use cases will appear and you will start searching on the internet by the time it appears. You will learn much more by coding than by reading a book or a technical documentation.
And remember: books are meant to be consulted, not for linear reading. The content tend to be very dense, and reading 500 pages before you start to code won’t help much.
Language documentation tend to be very technical, and sometimes lack for code samples.
7. Before you ask, Google it
Google is your friend. Use it. Sometimes you know someone that have a good knowledge about the programming language you are learning, and you are excited and everything, and we, human beings, tend to be lazy, and sometimes it seems to be easier just to ask before search for it. But trust me: you will find 99,9% of the answers you are looking for on the very first result of a Google search.
Another good thing about Google is that you will see lots of code samples. Personally I learn much more reading code snippets than reading the detailed documentation of something. That’s because it is straight to the point and you see an application of the resource.
8. Focus on problem solving
You don’t have to do the best solution. When you are learning something new, focus on solving the problem. It will force you to think programmatically and exercise the language you are learning. At a initial stage, forget about refactoring, best practices, design patterns. Focus on problem solving.