# Coding. Steps to Success 1.Create a PLAN including a detailed statement of requirements (SORs) 2.Write algorithms based on the SORs 3.Write pseudocode.

## Presentation on theme: "Coding. Steps to Success 1.Create a PLAN including a detailed statement of requirements (SORs) 2.Write algorithms based on the SORs 3.Write pseudocode."— Presentation transcript:

Coding

Steps to Success 1.Create a PLAN including a detailed statement of requirements (SORs) 2.Write algorithms based on the SORs 3.Write pseudocode from the algorithms 4.Write the code from the pseudocode 5.Test

Planning You will have been given a specification of what the program should do Turn this into a statement of requirements Make sure you include lots of –It will ….. –The program must…. –The user can…..

Algorithms An algorithm is a set of steps to solve a problem. Algorithms don’t have to be implemented by a computer It must solve the problem completely and in a logical manner For more complex problems you can adopt a “black box” approach – You know what the outcome will be but currently not the process to achieve it –Postpone the solution until you have more knowledge about how to solve the problem Algorithms are best not written in a programming style language – leave that to you pseudocode

Code Buddy Get a code buddy to work with Your code buddy should: –The first person to ask when you have a problem –Read your code and give you feedback –Be someone to talk ideas through with Your code buddy is NOT: –Someone you copy code from

Algorithms to Code Coding is a complicated business and when you are starting out it is difficult to look at an empty screen and write code. It’s a bit like someone giving you a sheet of paper and asking you to write a essay. 1.Write an algorithm –These are high level statements written in a structured way so that a reasonable person could follow them and produce the result you expect. The can be gaps in the finer detail of what happens 2.Convert the algorithm to pseudocode –Take each of the high level statements of your algorithm and turn it into pseudocode. –Some of the statement will result in more than one line of pseudocode. This is where you really begin to understand how your program will work. 3.Convert the pseudocode to target language code –This bit should bee easier because the pseudocode should roughly translate line for line with the statements in your target language. –You will be able to use some of the language construct and functions to help improve the efficiency of the pseudocode

Do Not Code Without a Plan Have a clear plan – without one you could end up in the wrong place! A A B B C C

Do Not Code Without a Plan You must complete your pseudocode BEFORE you start coding This will: –Help you be clear about what you have to do –Revise you ideas about the logic of the program before you code –Code the result faster

There will be problems! With a plan you can navigate a way round obstacles that crop up along the way A A B B

Download ppt "Coding. Steps to Success 1.Create a PLAN including a detailed statement of requirements (SORs) 2.Write algorithms based on the SORs 3.Write pseudocode."

Similar presentations