Posts Tagged ‘Programming’

Where to Start

Posted: September 17, 2010 in Development
Tags: , , ,

One of the most frequently asked questions I get from beginners in programming, is that of where to start. This is very common amongst beginners, that they are given the tools to do almost anything, but they lack the inspiration of what these tools can be used for. As with anything, practice makes perfect, and programming is no different, so anything you can think of is really good exercise.

Besides practicing the use of the tools you are given though, I recommend a gradual move into practicing techniques, rather than syntactical practice. I look at programming as problem-solving, and each time you solve a problem you learn a technique for a given task, with practice you learn more and more techniques — some even for the exact same problem, just more efficient than the last. So, I suggest setting yourself goals, modest goals to begin with, practice the goal until you have a thorough understanding of the problem and solution, even try different ways of accomplishing the same goal — this way you will not only have understood the problem, but also gain a deep knowledge of various techniques to solve it, which will come in handy later on.

From Beginner To Intermediate
These are a few suggestions for you to practice, that get increasingly difficult to solve. If you finish all, go back to the first project and try to solve it with any new technique learned as you progressed. And if you are learning an object oriented programming language, such as C++, make sure you make everything an object in the project, as it will ensure a very good understanding of how OOP (Object Oriented Programming) works. Once you get familiar with OOP and comfortable working with it, you will not be wanting to go back to procedural programming — and then you can call yourself an intermediate programmer.

  • Hello World — Printing a string to the console.
  • Guessing Game (eg. guess a number) — Generate a random number, have the player try to guess the number.
  • Tic-Tac-Toe — Slightly more complicated game, will challenge you on several aspects of basic programming.
  • Pong — Very simple game, but requires animation, which can be quite difficult at first. Will get you familiar with time-based programming, real-time input interpretation and event handling.

Anytime you feel like you don’t know exactly how to solve a problem, write it out in pseudo-code, as such:

create keyboardInputVariable
generate aRandomNumber

while keyboardInputVariable does not equal aRandomNumber
     ask user for input
     set keyboardInputVariable equal to keyboardInput

// once outside this loop, the number has been guessed
print game-over string

By writing out pseudo-code, things become much easier to solve, as you have the solution in —almost— plain english.

I hope this helped you get started on your first projects. If i neglected to mention something, that you as a beginner, would like to know on the subject of getting started, let me know by commenting and I’ll update the post accordingly.

Advertisements

The C Programming Tutorial is now done. I spend most of yesterday and this morning writing on this, hoping to finish it some time this evening. However, it seems that I almost completed it this morning. There are only a few lessons missing, but don’t worry, I expect these to be the conclusion of it, so it is all set for you to start learning C. These last lessons will be concluding what you have learned and bringing it all together in a project — a game, your very first game.

I hope you will enjoy the series, as I put a lot of effort into making the lessons as understandable and straight-to-the-point as I could. Hopefully you’ll be writing C fluently in no time. If this tutorial yields success, I will continue to add more lessons, getting into more advanced topics.

If you do follow along with the lessons, please comment on the lessons if you had trouble understanding it, if you have questions or pretty much anything you would want to share or ask. I will make changes if necessary and provide you with answers, should question arise.

Happy coding, have fun! 🙂