Upload
lee-clark
View
218
Download
0
Embed Size (px)
Citation preview
Unusual Control Structures and General Control Issues
A Presentation by CJ Castellani as told in an
American accent
Returns
• Multiple returns can enhance a routine’s readability and maintainability, and they help prevent deeply nested logic.
• They should still be used carefully
Recursion
• Recursion provides elegant solutions to a small set of problems
• Also use carefully
GOTOs
• In a few cases gotos are the best way to write code that is understandable and maintainable
• But that is rare• They should be used as a last
resort
Boolean Expressions
• Simple and readable boolean expressions
• Improves quality of code
Nesting
• Deep nesting can make things overly complicated
• It is easily avoidable
Structure
• Simplifying your programming is still relevant
• Any program can be built with a combination of good structured sequences and iterations
Complexity
• Minimize it to write high quality code
More Humor