반응형

(KOR)

메서드 호출

  • 메서드 이름이 정확합니까?
  • 메서드의 argument들의 수가 정확합니까?
  • argument들의 타입이 정확합니까?
  • argument들의 순서가 정확합니까?
  • 사용된 메서드를 포함하는 패키지가 정확합니까?

 

(ENG)

Data Initialization

  • Any improperly initialized variables?
  • Variables of correct datatype? (x = 2 vs. x = 2.0 vs. x = "2")
  • Any misspelled variable names?
  • Variables with similar names confused?

Computation

  • String subscripts within bounds?
  • Any non-integer string subscripts?
  • Off-by-one errors in indexing or subscripting operations?
  • Mixed-mode computations?
  • Intermediate result overflow or underflow?
  • Division by zero?
  • Floating point inaccuracies?
  • Operator precedence understood?
  • Integer divisions correct?

Comparisons

  • Comparison relationships correct?
  • = used instead of ==?
  • Floating point comparisons correct?
  • Boolean expressions correct?
  • Improper comparisons of floating point values
  • Operator precedence understood?

Control Flow

  • All cases covered in if or case statements?
  • Should there be a default case in if..else statements?
  • If statement used when elif should be used or vice versa?
  • Will each loop terminate?
  • Will program terminate?
  • Any loop bypasses because of entry conditions?
  • Possible loop fall-throughs using case statement correct?
  • Any off-by-one iteration errors?
  • Indentation correct? Remember indentation is essential for Python syntax.

Method Calls

  • Method names spelled correctly?
  • Number of arguments correct?
  • Types of arguments correct?
  • Order of the arguments correct?
  • Package containing method used imported correctly?

Input/Output

  • Print used when puts is appropriate or vice versa?
  • Format string correct when using str.format
  • Spacing correct. Is a sep and/or end argument needed in print statement?
  • Input checked for validity?
  • Textual or grammatical errors in output?
  • Files opened correctly?
  • Files closed after using?

Other Checks

  • Use of single quotes when double quotes required?
  • Warning messages?
  • Import statements correct?

 

Comparisons

 

참고자료/출처

http://facweb.cs.depaul.edu/sjost/it212/documents/debug-checklist.htm

반응형