1.4: Daily Video 1

  • Many types of errors
  • You cannot write a program without errors
  • Four types
    • Logic Errors
    • Syntax Errors
    • Runtime Errors
    • Overflow Errors
  • Logic errors:
    • A problem by the programmer specifically
    • Nothing with the internals, but rather a programming skill issue
  • Syntax error
    • Programmer does something that doesn’t line up with the rules of the language
    • Syntax such as {}, (), ;, etc.
  • Runtime error:
    • When the program fails in the midst of a program
    • May only occur at certain inputs (letters when you intend numbers, etc.)
  • Overflow errors:
    • When the program maxes out the amount of memory allocation to a certain variable
    • i.e ints vs floats vs doubles.

Daily Video 1 Takeways

  • For errors in an algorithm or program:
    • Identify the error
  • A logic error is a mistake in the algorithm or program that cause it to behave incorrectly or unexpectedly
  • A syntax error is a mistake in the program where the rules of the programming language are not followed
  • A run-time error is a mistake in the program that occurs during the execution of a program. Programming languages define their own runtime
  • An overflow error is an error that occurs when a computer attempts to handle a number that is outside of the defined range of values

1.4: Daily Video 2

  • When syntax error:
    • Often you are directed to the area of the error
    • It could be at the line, the line above, the line under, etc.
    • Fix the error that is just a typo
  • When Logic errors:
    • use test cases
    • See the output and certain values
    • Some IDEs have certain debuggers to assist in helping logic stuff

Daily Video 2 Takeways

  • For errors in an algorithm or program:
    • Correct the error
  • The following are effect ways to find and correct errors:
    • test cases
    • hand tracing
    • visualizations
    • debuggers
    • adding extra output statement(s)

1.4: Daily Video 3

  • Often you need many testing “schemes” to help with testing
  • We start testing at the start of development
    • Start thinking
    • Start planning specifications
    • Plan how to test (influenced by specifications)
  • After testing programmers revise sections of their code that didn’t work
  • You keep testing, and then get users to test, and then release
  • And even after, you will get errors, leading to certain maintainence patches

Daily Video 3 Takeways

  • Identify inputs and corresponding expected outputs or behaviors that can be used to check the correctness of an algorithm or program
  • In the development process, testing uses defined inputs to ensure that an algorithm or program is producing the expected outcomes. Programmers use the results from testing to revise their algorithms or programs
  • Defined inputs used to test a program should demonstrate the different expected outcomes that are at or just beyond the extremes of input data
  • Program requirements are needed to identify appropriate defined inputs for testing

Personal Takeways

After watching all of the daily videos, I now realize how important testing is and how it can be applied to identifying and correcting errors in an algorithm or program. With this in mind, I will apply these important points to the final project that we will have to produce as a team

MCQ Results

I earned a 100% on this quiz, which demonstrates that I have a great understanding of identifying and correcting errors in a program or algorithm.