CSC 216 F09/debug1: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
===Props===
===Props===


*Two sets of note-cards or sheets of paper--each a different color. Each card in the first color contains a description of a term or concept while each card of the other color contains a matching answer. Both colors should be combined into one stack of cards and shuffled. Note: The total amount of cards must be ''exactly'' equal to the number of participants.
*Two sets of note cards or sheets of paper--each a different color. Cards in the first color (for example, green) contain a description of a term or concept while cards of the other color (for example, white) contain a matching answer. Both colors should be combined into one stack of cards and shuffled. Note: The total amount of cards must be ''exactly'' equal to the number of participants.


*A stopwatch or timer.
*A stopwatch or timer.
Line 13: Line 13:


{| border="1" cellspacing="0" cellpadding="5" align="center"
{| border="1" cellspacing="0" cellpadding="5" align="center"
!Term
!Term (green)
!Description
!Description (white)
  |-
  |-
| Debugger
| Debugger

Revision as of 02:02, 18 November 2009

Debugging Exercise

Goal

The goal of this exercise is to reinforce terms and concepts of debugging in Eclipse.

Props

  • Two sets of note cards or sheets of paper--each a different color. Cards in the first color (for example, green) contain a description of a term or concept while cards of the other color (for example, white) contain a matching answer. Both colors should be combined into one stack of cards and shuffled. Note: The total amount of cards must be exactly equal to the number of participants.
  • A stopwatch or timer.

Examples of pairs

Term (green) Description (white)
Debugger A program that can execute another program and analyze its run-time behavior
Unit testing The most basic kind of testing
"Step Over" button Similar to “Step Into” and “Step Return”, this button controls the execution of a program from a breakpoint.
Test Coverage A measure of how many parts of a program have been tested
TestCase In JUnit3, the test class should always this class from the junit.framework package.
JUnit An open-source regression-testing framework for Java
White box testing A testing method that uses information about the structure of the a program
Line breakpoint Another name for "simple breakpoint"
Field breakpoint Another name for "watchpoint"
Breakpoint view In a debugging session, this lists all available breakpoints and can be used to control them

Examples inspired from Dr. Gehringer's Lecture 4 notes and Big Java by Cay Horstmann.


Procedure

The cards are passed out to the participants. After each person receives a card, set the timer (preferably to 2 or 3 minutes). The student's goal is to find the student in the classroom who has the matching term or description to his or her own card before time runs out. For instance, a student's card reads "Test Coverage", he or she needs to find the student with "A measure of how many parts of a program have been tested."

The exercise can be repeated by recollecting the cards, shuffling, and passing them out again.

Competitive Version

If a more competitive atmosphere is needed, several rounds of the game can be played. In each round, the last pair of students to find each other is disqualified from the next round, until 6 or 8 students are left. At this time finding matching pair becomes too easy. (Remember to leave out a matching pair of cards from the card stack for each pair of disqualified students before passing out the cards again.)