Wed 27 Jun 2018
Where I Began
“It can be very dangerous to see things from somebody else’s point of view without the proper training.”
Douglas Adams
As I have said before, my first outreach into programming began with a GCSE Computer Science course which was cancelled after 7 months for various reasons. Those 7 months were possibly the best way to get a strong foundation of how programming languages work and the general structure in which they follow. The lessons consisted of us being taught a feature (how to do ‘if’ statements, how to call functions, how to cycle through array, etc) and then being given a series of tasks that we had to create a program to complete. The first and simplest of these tasks was Bob’s Change:
"""Problem:
Bob would like to buy some sweets, which cost 50p.
Bob has some money but, unfortunately, Bob is only 3
and has no concept of money yet. Bob’s solution to this
is to just hand over the whole of his change and hope the
shopkeeper will sort it out for him.
The function bobs_change takes in a number representing
how much money Bob has handed over (in pence). It should print
the amount of change owed if he has enough, or
“Sorry Bob, you don’t have enough” if he is short."""
The program would then consist of if statements returning an answer after comparing the money Bob has to the price of a product. For those starting out programming, tests of these kind are a rewarding and fun way of practicing and reinforcing skills that you have learned. When learning a programming language I would strongly suggest using these sorts of tests after learning something new to ensure you both remember that skill better and to also give you a sense of progression as a new programming language can be hard to remember if it goes unused. The rest of the tasks we went through in that course can be downloaded here. And an entire assortment of more advanced tasks in many different languages can be found at codewars.com.
Really learning a skill and then practicing it is all you need to further your knowledge of programming. Once you have a grasp of basic features, you can then start to make more advanced programs using numerous packages and modules that give you the tools to create graphics and deeper features.
This was how I learned to program. It broke the stages up so I wasn’t daunted by the fact I only knew what for loops were and there was so much more in the language, I only focused on the task and I found with every task I got closer to an understanding where I could begin to realise what could be done and put me on good footing for future projects.