It seems that time of year has come again where lots of people (mostly students) want to bombard forums with “What language should I learn?” “How do I learn to program?” and various other questions about starting out as a programmer.
Something that seems to be extremely common about this is that each person asking the question seems to think that there individual situation is uniquely different to anyone else trying to learn to program. Normally they include some background but never a direction that they want to move in.
The background is normally made up of “I can use a computer”. Which is great in many ways however many people can also use a computer so how is your situation different?. What you should be asking is how can I learn to “write a web application”, “how to write a windows application”. Or better yet how should I solve a particular problem.
If you want to learn to program. You should have a goal. Programming is about using a tool to solve a problem. If you have no problem to solve then you don’t have anything to program. This makes it rather difficult to start. Or ask you’re self which tool should you get from the DIY store when you have not planned or thought about doing any DIY!
So how can somebody get started?
The first most important point that somebody needs to know before trying to pick their language of choice to learn is that you need to know what you want to do first. If you don’t have a specific problem you need to create one. It will also need to be achievable. If you want to write computer games start with something like “brickout” instead of “counter strike” for example. Since the first can be done by a single person with no programming experience in a number of weeks the 2nd requires a significant amount of man power in the order of 1 million hours for an individual from scratch.
So you cannot think of a problem?
If you are unable to come up with your own problem to solve and you still want to learn to program that pick a problem from “off the shelf”. Even if the problem has been solved before it is probably worth your while to go and solve the problem in your own way. It will give you something to aim for.
There must be an easy way to start?
There really isn’t. Just like any other trade it is difficult to learn to start out in. Probably the most simple way to get started is to keep things really basic. If you have still not picked a language that you want to learn in then select a number of languages that you cannot decide between and try to setup and learn the environment. I would suggest writing a basic console based application on a simple problem this is what the “hello, world” application is for.
It is actually worth your while to do. If you write the “hello, world” application in several different languages it will give you a basic test for the environment you will be learning in. If you found it really hard to get it to run compared to another environment then you should probably pick the easier environment as it is the path of least resistance.
If you find “hello, world” is not a difficult enough task try writing a more complex task in each language again. You should probably repeat this 2-3 times and you will probably have a clear winner to which environment you will be learning it.
You should also be aware that almost all modern languages are based around the same principles. They each encourage you to break up code into “manageable” chunks. They all support the same control flow with loops / case / if’s / functions / basic variable types (for storing data). Code management in programming is actually half the battle when things get start to get really complex.
The skills learnt in one language are almost directly transferable to any other modern language. Take an example of php vs sap.net. Both languages / environments are meant to make web sites. They both solve the same problem. Both have the same goal. Both are very different in how things are named however they both still have an overlapping skill set. Typically all the modern languages solve all the basic problems that you will come across in your first year. Or there will be a solution available somewhere.
The most important thing I should probably mention is that the online communities have people who will help each other. If you ask open ended questions which are not specific you will get poor responses or questions back. If you ask smart well researched questions (showing several attempts) you will get much more useful responses.
In short anyone asking “I want to learn to program? What language should I learn?” Should always be met with the direct response of what are you trying to make / build / solve? Anything other response is probably either biased or shaky at best.
The Best Tip?
Programming is about breaking a problem up into smaller parts then managing the problem. This is a basic principle. If you cannot break a problem into managable parts then it does not matter which programming language or enviroment you work with you will almost always end up with a big bag of mess in front of you.