CSc 103 Programming Case Study

(Note: This is my first attempt - constructive feedback is welcome.)

This case study is a series of video recordings of a programming instructor writing a Java program to solve a typical data structures problem.  The purpose is to demonstrate to students a systematic approach to writing computer programs that is superior to the haphazard "compile and crash" mentality that prevails among novice programmers.

This is a live case study: it is not rehearsed or practiced in advance.  You will be watching an authentic episode of programming where the instructor has not seen the problem in advance and has no prior knowledge of the solution.

The significant feature of the demonstration is that considerable effort is placed in the design and coding phases of development, leading to a very small amount of time required for compile and test.  The total running time of the video is 1hr 55 minutes, and only ten minutes is required to perform the compile and testing in order to produce a correctly functioning solution.

The problem to be solved: Phone Map (12.25 from Data Structures and Problem Solving using Java, 4th ed, Marc Weiss.)


Part 1  PhoneMap class skeleton. (10:15)
Part 2  ConsoleUI and app main. (3:21)
Part 3  Revisions to skeleton. (4:06)
Part 4  Write JUnit tests. (8:41)
Part 5  Add new method to design. (4:02)
Part 6  Formal test plan.  Design changes.  (11:08)
Part 7  Write pseudocode.  (3:59)  pseudocode  from part 7
Part 8  More pseudocode. (10:30)
Part 9   Algorithm walkthrough (10:07)
Part 10  Coding ConsoleUI and part of PhoneMap (14:30)
Part 11  Coding remainder of PhoneMap (10:54)
Part 12  Code Review (1:35)
Part 13  Summary of code review, defects found (1:03)
Part 14  Compile and test PhoneMap, fix defects.  (5:12)
Part 15  Write unit tests for ConsoleUI (5:56)
Part 16 Compile and test ConsoleUI fix defect (9:48)
Part 17  Lines of Code metric (0:18)

Code Review Checklist (for Java) used in part 13

Complete project files (.zip)




Timeline

00:10
In-class discussion
00:20

00:30

00:40

00:50

01:00
Write class skeletons
01:10

01:20

01:30
Write Junit tests
01:40

01:50

02:00

02:10

02:20

02:30
Write method pseudocode
02:40

02:50
Pseudocode walkthrough (hand trace)
03:00

03:10
Translate pseudocode to Java (coding)
03:20

03:30
Code Review
03:40
Compile and Test
03:50
Finished

Time in Phase Summary
Design 174     (78%)
Code    24     (11%)
Review 16    (7%)
Compile 3     (1%)
Test        7     (3%)

Defects Removed
Compile 3
Test         1