Writing and asking the purpose of program code.

Example from a lab early in a Data Structures course:

//Lab Followup: Write a comment after EVERY LINE YOU WRITE OR CHANGE
//that demonstrates that you understand the purpose of that line
//in terms of the problem goal.  
//Bad example:  i = i + 1;  //Add 1 to i or Increment i
//Good: The count of dog bites is updated when we are bitten by a dog.
Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: