CSC 216 F09/debug1: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Debugging Exercise=
=Debugging Vocabulary Exercise=


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


==Props==
==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.
*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 equal to the number of participants.


*A stopwatch or timer.
*A stopwatch or timer.
Line 24: Line 23:
  |-
  |-
| "Step Over" button
| "Step Over" button
| Similar to “Step Into” and “Step Return”, this button controls the execution of a program from a breakpoint.
| Similar to “Step Into” and “Step Return”, this button controls the execution of a program from a breakpoint
   |-
   |-
| Test Coverage
| Test Coverage
Line 30: Line 29:
   |-
   |-
| TestCase
| TestCase
| In JUnit3, the test class should always this class from the junit.framework package.
| In JUnit3, the test class should always this class from the junit.framework package
   |-
   |-
| JUnit
| JUnit
Line 45: Line 44:
   |-
   |-
| Breakpoint view
| Breakpoint view
| In a debugging session, this lists all available breakpoints and can be used to control them
| This lists all available breakpoints and can be used to control them in a debugging session,
  |-
  |-
|}
|}
<center>''Examples inspired from Dr. Gehringer's Lecture 4 notes and'' Big Java ''by Cay Horstmann.''</center>


==Procedure==
==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 cards are distributed to the participants. After each person receives a card, set the timer (preferably to '''only 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.
The exercise can be repeated by recollecting the cards, shuffling, and passing them out again.


=== Competitive Version===
===Competitive Variation===
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 eliminated students before passing out the cards again.)
 
===Silent Variation===
To make the game more challenging, the game can be played without speaking. This eliminates any shouting across the room and forces students to read each other's cards.


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.)
==Acknowledgements==
Created by Allison Hamann.
Examples inspired from Dr. Gehringer's Lecture 4 notes and ''Big Java'' by Cay Horstmann.

Latest revision as of 18:55, 23 November 2009

Debugging Vocabulary 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 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 This lists all available breakpoints and can be used to control them in a debugging session,

Procedure

The cards are distributed to the participants. After each person receives a card, set the timer (preferably to only 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 Variation

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 eliminated students before passing out the cards again.)

Silent Variation

To make the game more challenging, the game can be played without speaking. This eliminates any shouting across the room and forces students to read each other's cards.

Acknowledgements

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