Overall Pseudo-Code Tidbits

Overall Pseudo-Code Tidbits - Do not declare variables in...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Specify suggested method names and parameters (what they are expecting) and what they return, if anything. Do not use words such as ‘make’ or even ‘assign’ Rather use words such as Set. Set is a great word for assigning the value of something to a node or variable. Like Set current to parent node; Set x to 1. Increment x; etc. Use increment / decrement vice add 1 or subtract 1. Alternatively use increment by 5 or decrement by 2 rather than add 5 or subtract 2 Avoid writing a book. Don’t use ‘the’ and words that make your cryptic code wordy… Be specific: Don’t say, add string to array or add object to array if it needs to be parsed first. Make your methods clearly visible in your pseudocode. Certainly indent and use scope delimiters such as loop … end loop; while … end while Make sure your statements make sense and are clear.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Do not declare variables in pseudocode unless it is critical to your algorithm. Comments in line are very appropriate if they aid in understanding the pseudo-code. Dont say words such as Create an NLR Itrerative Method. Merely state: NLR Scan Iterative (. Parameters )) Dont use data names such as d, x, z. This means nothing. Recursive routines: simply cay Call NRL routine (parameters) from within the NRL pseudocode. Programmer will note that it is recursive. Grammar grammar grammar!! Use apostrophes!! If something is possessive, then so state. Like print current nodes data vice print current nodes data. The former is possessive and desired; the latter is plural! Clearly this is not the intent. Make it right! Any abbreviations must have keys. LC is current.left? Ech!...
View Full Document

This note was uploaded on 07/26/2011 for the course COP 2551 taught by Professor Roggio,r during the Summer '08 term at UNF.

Ask a homework question - tutors are online