<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jleray</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jleray"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Jleray"/>
	<updated>2026-07-15T16:27:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11369</id>
		<title>CSC 216/s08/no comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11369"/>
		<updated>2008-04-21T03:14:32Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Linked Lists in Person==&lt;br /&gt;
&lt;br /&gt;
This exercise will help students understand the structure of a linked list.&lt;br /&gt;
&lt;br /&gt;
===The Problem===&lt;br /&gt;
A linked list is a useful data structure but it can be very confusing for students first trying to grasp it.  This interactive exercise should help students understand the concept.  &lt;br /&gt;
&lt;br /&gt;
===Participants and Props===&lt;br /&gt;
&lt;br /&gt;
To run this exercise, you will need at least 6 students and some paper and writing utensils. &lt;br /&gt;
&lt;br /&gt;
===How to Execute===&lt;br /&gt;
====Set-up====&lt;br /&gt;
     &lt;br /&gt;
Each student participating in the exercise has a card with &amp;quot;Data = [name]&amp;quot;, name being the name of the student, written on it. One student is chosen to be the head of the list. Three students are then lined up to the left of the head of the list in alphabetical order. Starting from the head, each student will write &amp;quot;Next = [name of the person to their left]&amp;quot; on their card. The last student in the list should write &amp;quot;Next = null&amp;quot; on their card. This setup represents a basic linked list.&lt;br /&gt;
&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Java5.jpg Here] is an example card.&lt;br /&gt;
&lt;br /&gt;
====Insertion====&lt;br /&gt;
Now we will practice inserting a new node. One of the remaining students will write &amp;quot;Data = [name]&amp;quot; on their card, and become the new node. The new node will ask if the first node is alphabetically before itself. If the answer is no, the new node will stand to the right of the first node. The new node will then write &amp;quot;Next = [name of the first node]&amp;quot; on his card. If the answer is yes, the new node will ask the next student in line until they receive a &amp;quot;no&amp;quot; answer or reach the end of the line, in which case they will stand at the end of the line write &amp;quot;Next = null&amp;quot;. After the student has found their place in the line, they will write &amp;quot;Next = [name of the student to their left]&amp;quot;. The student to the right of the new student will write &lt;br /&gt;
&amp;quot;Next = [name of new student]&amp;quot; on their card.&lt;br /&gt;
&lt;br /&gt;
====Deletion====&lt;br /&gt;
Now we will practice deleting a student. The instructor will choose a student to be deleted. Starting at the head of the list, he will ask each student if their &amp;quot;Data = [the chosen value]&amp;quot;. If the answer is yes, the deleted student will pass the value of its &amp;quot;Next&amp;quot; to the student to their right. The student to their right will appropriately change their card, and the chosen student exits the list. Continue these exercises until the concept is understood.&lt;br /&gt;
&lt;br /&gt;
====Demonstration====&lt;br /&gt;
&lt;br /&gt;
[http://courses.ncsu.edu/csc216/lec/002/video/t13/ Here] is a demonstration of the exercise.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11342</id>
		<title>CSC 216/s08/no comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11342"/>
		<updated>2008-04-20T18:58:04Z</updated>

		<summary type="html">&lt;p&gt;Jleray: /* Insertion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Linked Lists in Person==&lt;br /&gt;
&lt;br /&gt;
This exercise will help students understand the structure of a linked list.&lt;br /&gt;
&lt;br /&gt;
===The Problem===&lt;br /&gt;
A linked list is a useful data structure but it can be very confusing for students first trying to grasp it.  This interactive exercise should help students understand the concept.  &lt;br /&gt;
&lt;br /&gt;
===Participants and Props===&lt;br /&gt;
&lt;br /&gt;
To run this exercise, you will need at least 6 students and some paper and writing utensils. &lt;br /&gt;
&lt;br /&gt;
===How to Execute===&lt;br /&gt;
====Set-up====&lt;br /&gt;
     &lt;br /&gt;
Each student participating in the exercise has a card with &amp;quot;Data = [name]&amp;quot;, name being the name of the student, written on it. One student is chosen to be the head of the list. Three students are then lined up to the left of the head of the list in alphabetical order. Starting from the head, each student will write &amp;quot;Next = [name of the person to their left]&amp;quot; on their card. The last student in the list should write &amp;quot;Next = null&amp;quot; on their card. This setup represents a basic linked list.&lt;br /&gt;
====Insertion====&lt;br /&gt;
Now we will practice inserting a new node. One of the remaining students will write &amp;quot;Data = [name]&amp;quot; on their card, and become the new node. The new node will ask if the first node is alphabetically before itself. If the answer is no, the new node will stand to the right of the first node. The new node will then write &amp;quot;Next = [name of the first node]&amp;quot; on his card. If the answer is yes, the new node will ask the next student in line until they receive a &amp;quot;no&amp;quot; answer or reach the end of the line, in which case they will stand at the end of the line write &amp;quot;Next = null&amp;quot;. After the student has found their place in the line, they will write &amp;quot;Next = [name of the student to their left]&amp;quot;. The student to the right of the new student will write &lt;br /&gt;
&amp;quot;Next = [name of new student]&amp;quot; on their card.&lt;br /&gt;
&lt;br /&gt;
====Deletion====&lt;br /&gt;
Now we will practice deleting a student. The instructor will choose a student to be deleted. Starting at the head of the list, he will ask each student if their &amp;quot;Data = [the chosen value]&amp;quot;. If the answer is yes, the deleted student will pass the value of its &amp;quot;Next&amp;quot; to the student to their right. The student to their right will appropriately change their card, and the chosen student exits the list. Continue these exercises until the concept is understood.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11228</id>
		<title>CSC 216/s08/no comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11228"/>
		<updated>2008-04-16T01:51:04Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Linked Lists in Person==&lt;br /&gt;
&lt;br /&gt;
This exercise will help students understand the structure of a linked list.&lt;br /&gt;
&lt;br /&gt;
===The Problem===&lt;br /&gt;
A linked list is a useful data structure but it can be very confusing for students first trying to grasp it.  This interactive exercise should help students understand the concept.  &lt;br /&gt;
&lt;br /&gt;
===Participants and Props===&lt;br /&gt;
&lt;br /&gt;
To run this exercise, you will need at least 6 students and some paper and writing utensils. &lt;br /&gt;
&lt;br /&gt;
===How to Execute===&lt;br /&gt;
&lt;br /&gt;
Each student participating in the exercise has a card with &amp;quot;Data = [name]&amp;quot;, name being the name of the student, written on it. One student is chosen to be the head of the list. Three students are then lined up to the left of the head of the list in alphabetical order. Starting from the head, each student will write &amp;quot;Next = [name of the person to their left]&amp;quot; on their card. The last student in the list should write &amp;quot;Next = null&amp;quot; on their card. This setup represents a basic linked list. Now we will practice inserting a new node. One of the remaining students will write &amp;quot;Data = [name]&amp;quot; on their card, and become the new node. The new node will ask if the first node is alphabetically before itself. If the answer is no, the new node will stand to the right of the first node. The new node will then write &amp;quot;Next = [name of the first node]&amp;quot; on his card. If the answer is yes, the new node will ask the next student in line until they receive a &amp;quot;no&amp;quot; answer or reach the end of the line, in which case they will stand at the end of the line write &amp;quot;Next = null&amp;quot;. After the student has found their place in the line, they will write &amp;quot;Next = [name of the student to their left]&amp;quot;. The student to the right of the new student will write &amp;quot;Next = [name of new student]&amp;quot; on their card. Now we will practice deleting a student. The instructor will choose a student to be deleted. Starting at the head of the list, he will ask each student if their &amp;quot;Data = [the chosen value]&amp;quot;. If the answer is yes, the deleted student will pass the value of its &amp;quot;Next&amp;quot; to the student to their right. The student to their right will appropriately change their card, and the chosen student exits the list. Continue these exercises until the concept is understood.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11227</id>
		<title>CSC 216/s08/no comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11227"/>
		<updated>2008-04-16T01:50:48Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Linked Lists in Person==&lt;br /&gt;
&lt;br /&gt;
This exercise will help students understand the structure of a linked list&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
A linked list is a useful data structure but it can be very confusing for students first trying to grasp it.  This interactive exercise should help students understand the concept.  &lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
To run this exercise, you will need at least 6 students and some paper and writing utensils. &lt;br /&gt;
&lt;br /&gt;
===How to Execute===&lt;br /&gt;
&lt;br /&gt;
Each student participating in the exercise has a card with &amp;quot;Data = [name]&amp;quot;, name being the name of the student, written on it. One student is chosen to be the head of the list. Three students are then lined up to the left of the head of the list in alphabetical order. Starting from the head, each student will write &amp;quot;Next = [name of the person to their left]&amp;quot; on their card. The last student in the list should write &amp;quot;Next = null&amp;quot; on their card. This setup represents a basic linked list. Now we will practice inserting a new node. One of the remaining students will write &amp;quot;Data = [name]&amp;quot; on their card, and become the new node. The new node will ask if the first node is alphabetically before itself. If the answer is no, the new node will stand to the right of the first node. The new node will then write &amp;quot;Next = [name of the first node]&amp;quot; on his card. If the answer is yes, the new node will ask the next student in line until they receive a &amp;quot;no&amp;quot; answer or reach the end of the line, in which case they will stand at the end of the line write &amp;quot;Next = null&amp;quot;. After the student has found their place in the line, they will write &amp;quot;Next = [name of the student to their left]&amp;quot;. The student to the right of the new student will write &amp;quot;Next = [name of new student]&amp;quot; on their card. Now we will practice deleting a student. The instructor will choose a student to be deleted. Starting at the head of the list, he will ask each student if their &amp;quot;Data = [the chosen value]&amp;quot;. If the answer is yes, the deleted student will pass the value of its &amp;quot;Next&amp;quot; to the student to their right. The student to their right will appropriately change their card, and the chosen student exits the list. Continue these exercises until the concept is understood.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11226</id>
		<title>CSC 216/s08/no comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11226"/>
		<updated>2008-04-16T01:50:16Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Linked Lists in Person==&lt;br /&gt;
&lt;br /&gt;
This exercise will help students understand the structure of a linked list&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
A linked list is a useful data structure but it can be very confusing for students first trying to grasp it.  This interactive exercise should help students understand the concept.  &lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
To run this exercise, you will need at least 6 students and some paper and writing utensils. &lt;br /&gt;
&lt;br /&gt;
===How to Employ the Exercise===&lt;br /&gt;
&lt;br /&gt;
Each student participating in the exercise has a card with &amp;quot;Data = [name]&amp;quot;, name being the name of the student, written on it. One student is chosen to be the head of the list. Three students are then lined up to the left of the head of the list in alphabetical order. Starting from the head, each student will write &amp;quot;Next = [name of the person to their left]&amp;quot; on their card. The last student in the list should write &amp;quot;Next = null&amp;quot; on their card. This setup represents a basic linked list. Now we will practice inserting a new node. One of the remaining students will write &amp;quot;Data = [name]&amp;quot; on their card, and become the new node. The new node will ask if the first node is alphabetically before itself. If the answer is no, the new node will stand to the right of the first node. The new node will then write &amp;quot;Next = [name of the first node]&amp;quot; on his card. If the answer is yes, the new node will ask the next student in line until they receive a &amp;quot;no&amp;quot; answer or reach the end of the line, in which case they will stand at the end of the line write &amp;quot;Next = null&amp;quot;. After the student has found their place in the line, they will write &amp;quot;Next = [name of the student to their left]&amp;quot;. The student to the right of the new student will write &amp;quot;Next = [name of new student]&amp;quot; on their card. Now we will practice deleting a student. The instructor will choose a student to be deleted. Starting at the head of the list, he will ask each student if their &amp;quot;Data = [the chosen value]&amp;quot;. If the answer is yes, the deleted student will pass the value of its &amp;quot;Next&amp;quot; to the student to their right. The student to their right will appropriately change their card, and the chosen student exits the list. Continue these exercises until the concept is understood.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11225</id>
		<title>CSC 216/s08/no comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11225"/>
		<updated>2008-04-16T01:50:08Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Linked Lists in Person==&lt;br /&gt;
&lt;br /&gt;
This exercise will help students understand the structure of a linked list&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
A linked list is a useful data structure but it can be very confusing for students first trying to grasp it.  This interactive exercise should help students understand the concept.  &lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
To run this exercise, you will need at least 6 students and some paper and writing utensils. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Employ the Exercise===&lt;br /&gt;
&lt;br /&gt;
Each student participating in the exercise has a card with &amp;quot;Data = [name]&amp;quot;, name being the name of the student, written on it. One student is chosen to be the head of the list. Three students are then lined up to the left of the head of the list in alphabetical order. Starting from the head, each student will write &amp;quot;Next = [name of the person to their left]&amp;quot; on their card. The last student in the list should write &amp;quot;Next = null&amp;quot; on their card. This setup represents a basic linked list. Now we will practice inserting a new node. One of the remaining students will write &amp;quot;Data = [name]&amp;quot; on their card, and become the new node. The new node will ask if the first node is alphabetically before itself. If the answer is no, the new node will stand to the right of the first node. The new node will then write &amp;quot;Next = [name of the first node]&amp;quot; on his card. If the answer is yes, the new node will ask the next student in line until they receive a &amp;quot;no&amp;quot; answer or reach the end of the line, in which case they will stand at the end of the line write &amp;quot;Next = null&amp;quot;. After the student has found their place in the line, they will write &amp;quot;Next = [name of the student to their left]&amp;quot;. The student to the right of the new student will write &amp;quot;Next = [name of new student]&amp;quot; on their card. Now we will practice deleting a student. The instructor will choose a student to be deleted. Starting at the head of the list, he will ask each student if their &amp;quot;Data = [the chosen value]&amp;quot;. If the answer is yes, the deleted student will pass the value of its &amp;quot;Next&amp;quot; to the student to their right. The student to their right will appropriately change their card, and the chosen student exits the list. Continue these exercises until the concept is understood.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11224</id>
		<title>CSC 216/s08/no comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/no_comparison&amp;diff=11224"/>
		<updated>2008-04-16T01:45:39Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Linked Lists in Person==&lt;br /&gt;
&lt;br /&gt;
This exercise will help students understand the structure of a linked list&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
A linked list is a useful data structure but it can be very confusing for students first trying to grasp it.  This interactive exercise should help students understand the concept.  &lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
To run this exercise, you will need at least 6 students and some paper and writing utensils. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Employ the Exercise===&lt;br /&gt;
&lt;br /&gt;
Each student participating in the exercise has a card with &amp;quot;Data = [name]&amp;quot;, name being the name of the student, written on it. One student is chosen to be the head of the list. Three students are then lined up to the left of the head of the list in alphabetical order. Starting from the head, each person will write &amp;quot;Next = [name of the person to their left]&amp;quot; on their card. This setup represents a basic linked list. Now we will practice inserting a new node. One of the remaining students will write &amp;quot;Data = [name]&amp;quot; on their card, and become the new node. The new node will ask if the first node is alphabetically before itself. If the answer is no, the new node will stand to the right of the first node. The new node will then write &amp;quot;Next = [name of the first node]&amp;quot; on his card. If the answer is yes, the new node will ask the next student in line until they receive a &amp;quot;no&amp;quot; answer or reach the end of the line. After the student has found their place in the line, they will write &amp;quot;Next = [name of the student to their left]&amp;quot;. The student to the right of the new student will write &amp;quot;Next = [name of new student]&amp;quot; on their card. Now we will practice deleting a student. The instructor will choose a student to be deleted. Starting at the head of the list, he will ask each student if their &amp;quot;Data = [the chosen value]&amp;quot;. If the answer is yes, the deleted student will pass the value of its &amp;quot;Next&amp;quot; to the student to their right. The student to their right will appropriately change their card, and the chosen student exits the list.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=11067</id>
		<title>Csc 216/s08/high virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=11067"/>
		<updated>2008-04-04T03:15:51Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Interactive Debugging==&lt;br /&gt;
&lt;br /&gt;
This exercise illustrates stepping through a program line by line to debug it.  It should help students understand the usefulness of a line by line approach to debugging like the one found in Eclipse.  &lt;br /&gt;
&lt;br /&gt;
===The Problem===&lt;br /&gt;
&lt;br /&gt;
A simple program is given below.  Feel free to write your own programs to apply this exercise to as well. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.util.Scanner;&lt;br /&gt;
public class Debug {&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		System.out.println(&amp;quot;Enter an integer&amp;quot;);&lt;br /&gt;
		Scanner s = new Scanner(System.in);&lt;br /&gt;
		//this line should store the input in the variable x.&lt;br /&gt;
	        int x = s.nextInt();&lt;br /&gt;
		//this line should add 5 to x.&lt;br /&gt;
	        x = x+5;&lt;br /&gt;
		//this line should return the additive inverse of x&lt;br /&gt;
		x = -1*Math.abs(x);&lt;br /&gt;
		//this line should double the integer&lt;br /&gt;
		x = Math.round(x/2);&lt;br /&gt;
		//this line should print -2*(x+5).&lt;br /&gt;
		System.out.println(x);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Participants and Props===&lt;br /&gt;
&lt;br /&gt;
This exercise will require members of the class to act as lines of codes and one to be the programmer/ debugger.  Cards with code on one side and comments on the other should be prepared before class.  An example of a card for this program is given here: [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side1.jpg Side 1] and [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side2.jpg Side 2]. An object, such as a ball, that can be passed between students will be needed to represent a 'flag'. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Play===&lt;br /&gt;
&lt;br /&gt;
Choose a programmer to run and debug the program. Choose several students to represent the lines of code in the program. Each student is handed a card with code on one side and the comment explaining what that code is supposed to be doing on the other side. The students who represent the lines of code should keep the side of the card with the code on it towards themselves and only show the programmer the side with the comments. The students stand in the order the code is supposed to come in. They then wait for the programmer to run them. The programmer passes a parameter of the correct type to the program. Each line of code then executes on the parameter given. Based upon the comments that the programmer is allowed to see and the parameter that he or she passed, they should be able to deduce what the desired, correct output should be. If the lines of code execute and the end result is different from what the programmer computed then it is necessary for the programmer to debug the program. The programmer will start debug mode and hand a flag, which represents the break point, to the first line of code. The first line of code will execute, and the rest of the program waits. The programmer can then query what the current value of the variable is. If satisfied the programmer will step to the next line of code, modeled by the chosen programmer saying, &amp;quot;Pass the flag down to the next line.&amp;quot; If not satisfied the programmer will ask the student to show him the code side of the card. The programmer will then make the necessary corrections and continue the debugging process.&lt;br /&gt;
&lt;br /&gt;
Here is a demonstration of the game: [http://courses.ncsu.edu/csc216/lec/002/video/g9/ Debugging Demonstration]&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=11066</id>
		<title>Csc 216/s08/high virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=11066"/>
		<updated>2008-04-04T03:14:11Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Interactive Debugging==&lt;br /&gt;
&lt;br /&gt;
This exercise illustrates stepping through a program line by line to debug it.  It should help students understand the usefulness of a line by line approach to debugging like the one found in Eclipse.  &lt;br /&gt;
&lt;br /&gt;
===The Problem===&lt;br /&gt;
&lt;br /&gt;
A simple program is given below.  Feel free to write your own programs to apply this exercise to as well. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.util.Scanner;&lt;br /&gt;
public class Debug {&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		System.out.println(&amp;quot;Enter an integer&amp;quot;);&lt;br /&gt;
		Scanner s = new Scanner(System.in);&lt;br /&gt;
		//this line should store the input in the variable x.&lt;br /&gt;
	        int x = s.nextInt();&lt;br /&gt;
		//this line should add 5 to x.&lt;br /&gt;
	        x = x+5;&lt;br /&gt;
		//this line should return the additive inverse of x&lt;br /&gt;
		x = -1*Math.abs(x);&lt;br /&gt;
		//this line should double the integer&lt;br /&gt;
		x = Math.round(x/2);&lt;br /&gt;
		//this line should print -2*(x+5).&lt;br /&gt;
		System.out.println(x);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Participants and Props===&lt;br /&gt;
&lt;br /&gt;
This exercise will require members of the class to act as lines of codes and one to be the programmer/ debugger.  Cards with code on one side and comments on the other should be prepared before class.  An example of a card for this program is given here: side 1 [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side1.jpg] and side 2 [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side2.jpg] .  An object, such as a ball, that can be passed between students will be needed to represent a 'flag'. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Play===&lt;br /&gt;
&lt;br /&gt;
Choose a programmer to run and debug the program. Choose several students to represent the lines of code in the program. Each student is handed a card with code on one side and the comment explaining what that code is supposed to be doing on the other side. The students who represent the lines of code should keep the side of the card with the code on it towards themselves and only show the programmer the side with the comments. The students stand in the order the code is supposed to come in. They then wait for the programmer to run them. The programmer passes a parameter of the correct type to the program. Each line of code then executes on the parameter given. Based upon the comments that the programmer is allowed to see and the parameter that he or she passed, they should be able to deduce what the desired, correct output should be. If the lines of code execute and the end result is different from what the programmer computed then it is necessary for the programmer to debug the program. The programmer will start debug mode and hand a flag, which represents the break point, to the first line of code. The first line of code will execute, and the rest of the program waits. The programmer can then query what the current value of the variable is. If satisfied the programmer will step to the next line of code, modeled by the chosen programmer saying, &amp;quot;Pass the flag down to the next line.&amp;quot; If not satisfied the programmer will ask the student to show him the code side of the card. The programmer will then make the necessary corrections and continue the debugging process.&lt;br /&gt;
&lt;br /&gt;
Here is a demonstration of the game: [http://courses.ncsu.edu/csc216/lec/002/video/g9/ Debugging Demonstration]&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=11065</id>
		<title>Csc 216/s08/high virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=11065"/>
		<updated>2008-04-04T03:13:49Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Interactive Debugging==&lt;br /&gt;
&lt;br /&gt;
This exercise illustrates stepping through a program line by line to debug it.  It should help students understand the usefulness of a line by line approach to debugging like the one found in Eclipse.  &lt;br /&gt;
&lt;br /&gt;
===The Problem===&lt;br /&gt;
&lt;br /&gt;
A simple program is given below.  Feel free to write your own programs to apply this exercise to as well. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.util.Scanner;&lt;br /&gt;
public class Debug {&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		System.out.println(&amp;quot;Enter an integer&amp;quot;);&lt;br /&gt;
		Scanner s = new Scanner(System.in);&lt;br /&gt;
		//this line should store the input in the variable x.&lt;br /&gt;
	        int x = s.nextInt();&lt;br /&gt;
		//this line should add 5 to x.&lt;br /&gt;
	        x = x+5;&lt;br /&gt;
		//this line should return the additive inverse of x&lt;br /&gt;
		x = -1*Math.abs(x);&lt;br /&gt;
		//this line should double the integer&lt;br /&gt;
		x = Math.round(x/2);&lt;br /&gt;
		//this line should print -2*(x+5).&lt;br /&gt;
		System.out.println(x);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Participants and Props===&lt;br /&gt;
&lt;br /&gt;
This exercise will require members of the class to act as lines of codes and one to be the programmer/ debugger.  Cards with code on one side and comments on the other should be prepared before class.  An example of a card for this program is given here: side 1 [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side1.jpg] and side 2 [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side2.jpg] .  An object, such as a ball, that can be passed between students will be needed to represent a 'flag'. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Play===&lt;br /&gt;
&lt;br /&gt;
Choose a programmer to run and debug the program. Choose several students to represent the lines of code in the program. Each student is handed a card with code on one side and the comment explaining what that code is supposed to be doing on the other side. The students who represent the lines of code should keep the side of the card with the code on it towards themselves and only show the programmer the side with the comments. The students stand in the order the code is supposed to come in. They then wait for the programmer to run them. The programmer passes a parameter of the correct type to the program. Each line of code then executes on the parameter given. Based upon the comments that the programmer is allowed to see and the parameter that he or she passed, they should be able to deduce what the desired, correct output should be. If the lines of code execute and the end result is different from what the programmer computed then it is necessary for the programmer to debug the program. The programmer will start debug mode and hand a flag, which represents the break point, to the first line of code. The first line of code will execute, and the rest of the program waits. The programmer can then query what the current value of the variable is. If satisfied the programmer will step to the next line of code, modeled by the chosen programmer saying, &amp;quot;Pass the flag down to the next line.&amp;quot; If not satisfied the programmer will ask the student to show him the code side of the card. The programmer will then make the necessary corrections and continue the debugging process.&lt;br /&gt;
&lt;br /&gt;
Here is a demonstration of the game:[http://courses.ncsu.edu/csc216/lec/002/video/g9/ Debugging Demonstration]&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=10652</id>
		<title>Csc 216/s08/high virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Csc_216/s08/high_virtue&amp;diff=10652"/>
		<updated>2008-03-25T23:24:07Z</updated>

		<summary type="html">&lt;p&gt;Jleray: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Interactive Debugging==&lt;br /&gt;
&lt;br /&gt;
This exercise illustrates stepping through a program line by line to debug it.&lt;br /&gt;
&lt;br /&gt;
===The Problem===&lt;br /&gt;
&lt;br /&gt;
A simple example program is given here[http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side3.jpg] but many more could be designed.&lt;br /&gt;
&lt;br /&gt;
===Participants and Props===&lt;br /&gt;
&lt;br /&gt;
This exercise will require members of the class to act as lines of codes and one to be the programmer/ debugger.  Cards with code on one side and comments on the other should be prepared before class.  An example of a card for this program is given here: side 1 [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side1.jpg] and side 2 [http://pg-server.csc.ncsu.edu/mediawiki/index.php/Image:Side2.jpg] .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Play===&lt;br /&gt;
&lt;br /&gt;
Choose a programmer to run and debug the program. Choose several students to represent the lines of code in the program. Each student is handed a card with code on one side and the comment explaining what that code is supposed to be doing on the other side. The students who represent the lines of code should keep the side of the card with the code on it towards themselves and only show the programmer the side with the comments. The students stand in the order the code is supposed to come in. They then wait for the programmer to run them. The programmer passes a parameter of the correct type to the program. Each line of code then executes on the parameter given. Based upon the comments that the programmer is allowed to see and the parameter that he or she passed, they should be able to deduce what the desired, correct output should be. If the lines of code execute and the end result is different from what the programmer computed then it is necessary for the programmer to debug the program. The programmer will start debug mode and hand a flag, which represents the break point, to the first line of code. The first line of code will execute, and the rest of the program waits. The programmer can the query what the current value of the variable is. If satisfied the programmer will step to the next line of code, modeled by the chosen programmer saying, &amp;quot;Pass the flag down to the next line.&amp;quot; If not satisfied the programmer will ask the student to show him the code side of the card. The programmer will then make the necessary corrections and continue the debugging process.&lt;/div&gt;</summary>
		<author><name>Jleray</name></author>
	</entry>
</feed>