Tuesday, November 27, 2018

Week 14: CST 205

This week, we learned about debugging techniques. There are multiple ways to do this such as glass-box, black-box, testing edge conditions, and incremental testing. In glass-box testing, every path through a program is tested as opposed to black-box testing where a range of inputs are tested. In edge conditions, the largest+1 and smallest-1 values are tested. In incremental testing, the code is tested as it is written so errors are found and dealt with as soon as they appear. When debugging with JES or other IDEs,  the debugger can be used to watch variables behavior. The error messages given and printing outputs will help as well.

In software engineering, there are two ways to engineer: top-down (eg waterfall) or bottom up. In top-down design, a list of requirements are made which describe how it should work and what tasks it needs to do. Then the hierarchical design is used to describe the functions that are needed and those are broken down into the helper functions it requires. In bottom-up design, the smallest functions are made before the larger functions.

In debugging, there are 3 types of common errors. Syntax errors are when there is a problem with the structure of the program like a missing colon. Syntax errors are indicated by "SyntaxError:".In order to avoid these, make sure not to use reserved Python keywords, have a colon after headers and loops, use straight quotes, closed multiline strings, closed operators, correct assignments in conditionals, correct indentation, and non-ASCII characters in the code. Runtime errors are made when the program is running which will describe where the error is and that was executing when it happened like an infinite recursion error. A semantic error is where there is a problem with a program that runs without producing errors but doesn't give the correct result.

No comments:

Post a Comment

cst 499 week 8

This week, we finished writing the paper in order to do the best job possible even if it was a little bit late. Now that everything is done,...