Introduction to Programming

Page 6

Page 6 — Hints, Tips, and Tricks

There are a few final things to consider when writing programs. You may have noticed that the example codes here have a fair amount of spacing between the commands. This spacing isn't essential, but in my opinion, it makes the code much easier to read and understand.

If you're having trouble working through the code, and you're not sure what you need to complete the program, try writing pseudo code, which is a mixture of English and the programming language. It's very helpful to write out the steps you need to create a program, and sometimes it's easier to articulate them in English rather than in some abstract programming language.

It's also important to debug your program as you work on it. Don't wait until the whole program is finished and then check to see if it works. Check each part as you go and make sure each one works properly before moving on to the next piece. This will save you a lot of time and unnecessary stress. And remember, you are going to make mistakes, and that's OK. Professional programmers spend half of their time debugging; it's part of the learning process.

Last but not least, have fun! Experiment, get frustrated, and then experiment some more. No pain, no gain.

 

BreBru.com Information Technology HTML