Reflection 2.1 - Elements of Good Code

[Due by the start of class on Monday, March 7 along with Reflection 2.2 assigned separately]

Introduction

The goal of this unit is for each participant to gain an understanding of good program code. But, wait. Isn't code good if it works and bad if it doesn't?

Well, yes, but ...

Many CS curricula will define:

But programs are also written for people. Those people are, first and foremost, the person(s) writing the program, but also other people or programmers who might view the code. The initial programmers need to be able to read the code so they can debug and modify it. Later, they may need to review and revise it. Alternatively, other programmers may be assigned to revise the program.

Good code is code that functions correctly (produces the desired outcome) and that meets certain stylistic considerations that make it more easily read or understood by human readers.

 

Readings

As we get started I ask that you read the following articles:

Article Author Focus
Assessment of Code Quality Stegeman, Barendsen, and Smetsers Section 3.1
Introduction to the roles of variables Jorma "Saja" Sajaniemi The section titled "The Role Concept" and the green ones in the table
Why Good Code Matters, part 1 Philip East The whole document

 

Reflection

This activity is almost entirely about the readings. The reflection is here mostly to keep you on task and to let me see if you have questions and what you are thinking.

For each of the three readings listed above write a 1 to 2 paragraph response. These can include any combination of things such as:

 

Submission

As with the prior work, I do not see there being any right or wrong answers in this activity.  Similarly, length of your answer does not necessarily correlate with the quality of your answers.  Instead, I will be looking to see if you have considered a broad set of ideas/concepts for this reflection and will be looking at the clarity with which you have crafted your response(s).  This includes things like spelling, grammar, formatting, etc.

Remember that I will be grading this on purely a 1/0 basis.  You get credit for submitting something on time and that shows that you put time and effort/thought in to crafting a meaningful response.  One of the things that I have found helpful - for both of us -when I grade like this is to ask you to provide a brief self-assessment of your own work.  As such, I would like you to add a 2-3 sentence self analysis at the end of your deliverable.  This should consist of a reflection on the quality of what you submitted.  This reflection should contain whether you think your work is

and then a brief explanation of WHY you made this assessment

I want to be able to give you some guidance as to how this kind of response would be graded if it were part of a competency demo.  If I look at what you submitted and think it is marginal and you think it is excellent, then we should talk so that we are on the same page. On the flip side, if I think your reflection is excellent and you think it is marginal, then we should also talk. I appreciate your honest admission when an assignment was rushed and you know it.  It allows me not to have to have a detailed talk with you if we both understand this is sub-par but you admit is an exceptional situation

 

To submit your work you should word process your entire reflection (including the final, self analysis) and save/print as a PDF. 

You should then look on Blackboard for the submission link for this activity.