Programming techniques Flashcards
Sequence
“One of the 3 basic programming constructs. Instructions happening one after the other in order is sequence.”
Iteration
“One of the 3 basic programming constructs. A selection of code which can be repeated either a set number of times (count controlled) or a variable number of times based on the evaluation of a Boolean expression (condition controlled) is iteration.”
Branching / Selection
“One of the 3 basic programming constructs. Instructions which can evaluate a Boolean expression and then branch the code to one or more alternatives paths is branching / selection.”
Branching / Selection
“One of the 3 basic programming constructs. Instructions which can evaluate a Boolean expression and then branch the code to one or more alternatives paths is branching / selection.”
Recursion
“An advanced programming construct in which a block of code (often a function) is able to call itself. Recursion algorithms must be designed carefully so that terminating condition will be met.”
Global Variable
“A variable which can be used anywhere in the program.”
Local Variable
“A variable which is defined and can only be used within one part of the program (normally a single function or procedure).”
Modularity
“A technique of code design where a solution is broken down into a number of small self-contained and manageable chunks. Each Module of code should be designed to perform one set specific purpose. If during design it is found that the module starts to grow and performs more than one task then the additional functionality should be split out into a new module.”
Functions
“A block of code given a unique identifiable name within a program. A function can take either zero or more parameters when it is called and should return a value. The function should be designed and written to perform one task or action which is clearly indicated by its name.”
Procedures
“A block of code given a unique identifiable name within a program. A procedure can take either zero or more parameters when it is called. The procedure should be designed and written to perform one task or action which is clearly indicated by its name.”
Parameters
“Data structures passed into a Procedure or Function when they are initially called.”
Parameter Passing
“The process of providing a procedure, function or module with values at the point when you call it.”
Parameter Passing By Value
“If a data item is passed by value, a (local) copy of the data is used, which is discarded when the subprogram exits.”
Parameter Passing By Reference
“If a data item is passed by reference, the location (in memory) of the data is used. This means that any changes are retained after the procedure or function has been completed.”
IDE
“Integrated Development Environment”
“Software that performs the various stages of software design and implementation in a single integrated system. It will usually include facilities for project management, design, graphical design, programming, testing and producing documentation.”