Learning programming isn't as hard as some college graduates and
experts make out. In fact, it is easy to become a reasonably proficient
hobby programmer, within a short space of time, given the right mindset
and grounding.
That mindset includes being able to break down and solve problems, something that can be taught, as well as a disposition towards experimenting. Trial end error plays a huge part in the learning process, as does a good understanding of the basics.
All programming languages share some elementary concepts. Once these are understood, learning the actual language becomes much easier, and as they are also transferable in many cases, understanding them will help learn almost any programming language.
Remembering that a computer program is just a bunch of instructions that tells a computer what to do, the four basic programming concepts are:
Variables can also be tested against conditions, which allow the programmer to build a bit of decision making power (or logic) into a program. The programmer can tell the program to execute a specific instruction if a variable meets certain criteria. Humans do this all the time: "If it is sunny, then I'll go to the beach, otherwise I'll go to the mall."
On occasion, this is a decision that will have to be taken over and over again. Staying in the mall until the weather improves enough to warrant a trip to the beach, for example. Or, lying on the beach until the surf's up, checking periodically.
These are examples of loops, repetitive behaviour that can be built into the program. A human might build up a set of instructions:
In programming, we can give these subroutines meaningful names, and use them in code as a kind of shorthand, assuming that the steps that the computer needs to go through to actually achieve something are written (defined, in programmer-speak) somewhere.
Programming languages all have a certain syntax and structure that allow the programmer to build up these sets of instructions, and they're all different. But, these four concepts are common to almost every language, and are vital to being able to create even simple programs.
It is important to appreciate that these are merely building blocks with which it is possible to construct all manner of more advanced features. Some of these include objects, modules, libraries and various other ways to encapsulate behaviour such that it can be used to build complex systems.
However, much can be achieved with only these four concepts, in almost any language. Many aspiring programmers probably don't even realise that they have the means to start programming right away, without investing in software or following a college course.
All that is really required is a will to get started, and some help and guidance from someone who has trodden the same path. A book or two will also help, but they're not required for you to learn programming, now!
That mindset includes being able to break down and solve problems, something that can be taught, as well as a disposition towards experimenting. Trial end error plays a huge part in the learning process, as does a good understanding of the basics.
All programming languages share some elementary concepts. Once these are understood, learning the actual language becomes much easier, and as they are also transferable in many cases, understanding them will help learn almost any programming language.
Remembering that a computer program is just a bunch of instructions that tells a computer what to do, the four basic programming concepts are:
- variables - places to store information
- decisions - ways to interpret information
- loops - doing the same thing over and over
- subroutines - named chunks of instructions
Variables can also be tested against conditions, which allow the programmer to build a bit of decision making power (or logic) into a program. The programmer can tell the program to execute a specific instruction if a variable meets certain criteria. Humans do this all the time: "If it is sunny, then I'll go to the beach, otherwise I'll go to the mall."
On occasion, this is a decision that will have to be taken over and over again. Staying in the mall until the weather improves enough to warrant a trip to the beach, for example. Or, lying on the beach until the surf's up, checking periodically.
These are examples of loops, repetitive behaviour that can be built into the program. A human might build up a set of instructions:
- Lie on the beach
- If you get warm, check the surf
- If the surf's up, go surfing
- Go back to lying on the beach
In programming, we can give these subroutines meaningful names, and use them in code as a kind of shorthand, assuming that the steps that the computer needs to go through to actually achieve something are written (defined, in programmer-speak) somewhere.
Programming languages all have a certain syntax and structure that allow the programmer to build up these sets of instructions, and they're all different. But, these four concepts are common to almost every language, and are vital to being able to create even simple programs.
It is important to appreciate that these are merely building blocks with which it is possible to construct all manner of more advanced features. Some of these include objects, modules, libraries and various other ways to encapsulate behaviour such that it can be used to build complex systems.
However, much can be achieved with only these four concepts, in almost any language. Many aspiring programmers probably don't even realise that they have the means to start programming right away, without investing in software or following a college course.
All that is really required is a will to get started, and some help and guidance from someone who has trodden the same path. A book or two will also help, but they're not required for you to learn programming, now!