In a programming-driven computer science class, the best way to assess students is by having them write code and work through challenging problems. The AP Computer Science A course recommends having students work for 3-4 hours per week on computers writing code. The challenge for the instructor is in helping students to optimize learning in this scenario.
First, choose projects and challenges that are appropriate to test the specific skill and concept you wish to assess. Examples of good programming assignments are offered in the various PD4CS content segments, so instead of focusing on ideas, we’ll turn our attention to grading and rubrics.
One common way to grade a programming project is to design a set of test cases around the major components of the student project. You can either give the students a file that will call individual methods that the students must write, with the test cases clearly labeled, or you can require students to write code that satisfies a set of pre and post conditions. The pre-conditions are those assumptions that you will allow the students to make (i.e., input is within a certain range, a data structure consists of at least one element, etc). The post-conditions define the state of information after the function is executed including the expected output. This strategy is good for encouraging students to write reusable modular code segments, and to start practicing functional decomposition (i.e., the breaking of large code segments into smaller, reusable methods). You can also encourage students to consider what makes a good test case assuming they can’t write an infinite number of tests.
Providing a rubric is another way to structure your project grading, as it clearly defines the necessary components for student success. The best rubrics are those that leave little ambiguity for how a project is scored. If you have made your rubric clear enough, students can practice grading each other’s programs before they submit them to you. This strategy also often gets them to review each other’s code, which can be helpful for all students.
As an example, you may have a guessing game project that asks students to use loops to manage the series of guesses, variables to keep track of the current and most recent guesses, and conditional statements to determine how close each guess is. A rubric for scoring the use of the variables for this type of assignment might look as shown below.
Topic | Good | Acceptable | Unacceptable |
Variables | Contains variables for current guess, last guess, and target, uses best practice for naming and consistent typing, and all variables are properly scoped. (2 points) | Missing one of the three concepts (proper variables, names, and scope) (1 point) | Missing two or more of the three main concepts (proper variables, names and scope) (0 points) |
To encourage your more advanced students to push themselves, you can always offer bonus points for certain “ideal solutions”, or advanced features. The important point is that a rubric tells the student exactly what your expectations are before the assignment is given and helps remind them of what you want to see when they write code. A popular rubric making tool for teachers is RubiStar (http://rubistar.4teachers.org/index.php); the site includes a number of examples of rubrics for computer science.