This page is a paraphrase of Alex Allain’s article, “5 Ways You can Learn Programming Faster” on cprogramming.com.
Originally, I just had a link to Allain’s article, but some of the links on the site might be too distracting or confusing for Middle School kids.
So here’s my paraphrasing of Alex’s page.
1. Look at example code.
Take a look at what has already been written. This will give you clues to how to write code and how it is organized. Try to understand what each thing means in the code, and what it does.
2. RUN the example code.
Reading by itself is okay, it helps you get ideas and you get better at reading, but if you want to get good at something, you have to actually do it. So instead of just reading the code, run it after you read it. See how it executes, and how that compares to how you understood what you read. Make sure that you type it in instead of just cutting and pasting. This will make you more involved with each part of the code.
Now that you’ve typed in the example code and run it, change something. The best way to learn is to play with things to see how they affect the program. A bit of advice here: before you make a change, save your original, then save a copy of it under a different name or version so that you can always open your original if you don’t like your experiment. I actually learned this practice from Mark Stichman when I was working at Polymorph Recording. Every time we’d make a change in a mix or recording, we would save it as a separate file. This way you can be free to make changes – free to play.
3. Create your own as soon as possible.
Do. Do. Do. The best way to learn to do something is to do it. The best way to learn to write your own code, is to write your own code. The previous bit of advice about changing example code is a stepping stone. But start writing your own code – NOW! Just think of what you want your robot to do. Break it down. Write the code you know.
4. Use a debugger.
If you are using the KISS-C IDE, you are already doing it. The debugger tells you if the program won’t compile and tells you where the errors in your code are. Another benefit of programming with an IDE such as the KISS-C IDE is the color coding. When you type a // everything after it in that line turns green to tell you that it will be ignored by the compiler. When you type /* everything on the page after it turns green until you type a */. Then everything between the /* and the */ stays green, and everything else turns back to black or whatever. The colors help you be aware of the syntax or rules of the code – very important!
5. Learn from various sources!
There are two truths about learning that are both true and yet seem opposite:
1 – Only you are your true teacher
2 – Everything and everyone around you is your teacher.
There are many ways to explain something, and there are many ways to understand something. In order to learn as much as you can about something, learn from different sources. These can be school teachers, Botball Coaches, books, other website, or even and especially other kids. Did someone else discover something cool? Maybe they can show you how they did it! Did you figure something out? Maybe someone else can learn from you!
One of the most highly recommended resource for learning is community forum.
For the Botball community forum click HERE.