
|
Home Blog Me Funbox Photo Gallery Entertainment Scripts Tutorials Programming Fundamentals Part 1 Part 2 Part 3 Part 4 Part 5 Part 6 Programming in C++ Visual BASIC Programming Horoscope Writing Site Center Links/Blogrolls Living Room Furniture |
AlgorithmsAn algorithm is a basic idea of a program before any code is actually written. There are a few ways in which this can be done, the two most common are through flowcharts and pseudocode. Once you have been programming for a while, one can usually make a flowchart in their mind without actually writing anything down.Pseudocode- pseudo meaning fake, code meaning instructions in which the computer understands When we say pseudocode, what we really mean is a simple outline of your program. Pseudocode is usually written in plain english, with each instruction being written on one line. The program starts at the top of the page, and works its way down, just like any program, with functions being in a seperate from the main page.
Main Program
Flow charts are another way to outline your program. With flow charts the information for the program would be in symbols specifically designed for that statement. Here are a list of symbols:
... Pseudo code goes here ... End Main Program Functions ... Your Functions would go here ... End Functions
Personally I feel that flowcharts can get confusing and way too complicated, so I like to stick with the pseudo code. It is important to have a good idea of what your program is supposed to do and what it is expected to do. Sitting down and just writing code trying to make it work anyway possible is not a good way to write code, as it can get complicated and turn into speghetti code. Speghetti code is having code that is all over the place when there is a simple solution. If you are having problems with your programming, then you are probably getting an error. There are two types of errors: syntax and logic. A syntax error will usually be caught by the compiler, or interpreter. This type of error includes forgetting semicolons in some languages or curly braces in others. Logic errors usually come from user error. Like putting a 3 where it is meant to be a 2. The compiler/interpreter usually won't catch these and is up to you to catch them. Next Section: Variables and Conditionals |
Copyright © 2004-2008 Sean Noble, All rights reserved
Read our Disclosure Policy








