under 5 pages!
[pintos-anon] / sigcse2009 / principles.tex
1 \section{Design Principles}
2 \label{sec:designprinciples}
3
4 Pintos's projects are built on a number of principles.
5
6 \paragraph{Read before you Code}
7 Each project involves a significant amount of reading code before
8 students write the first line of code.
9 Because software maintenance constitutes the vast majority of all
10 software development efforts~\cite{Boehm1981Software}, this setup mirrors the 
11 environment in which most software engineers work.
12 Simultaneously, we limit the amount students have to read
13 by encapsulating lower layers, such as device drivers.
14 We went to great lengths to write the entire Pintos baseline code,
15 and in particular the portions students must read, in a style that shows,
16 by example, the coding style we expect from students.  
17 % cut for length
18 %This style includes purely syntactical convention such as the choice of the
19 %GNU indentation style, and extends to commenting style and naming conventions.
20 We continuously refined the internal code documentation over several
21 semesters, focusing on those 
22 portions that initially proved difficult to understand or confusing.
23
24 \paragraph{Maximize Creative Freedom}
25 OS design involves a tremendous amount of creative freedom, both in the
26 choice of algorithms and data structures.  Our projects are designed to
27 stimulate creativity by avoiding the prescription of specific approaches
28 to accomplish each project's goals.  Instead, students design their
29 own data structures and associated algorithms as much as possible.
30
31 \paragraph{Practice Test-driven Development}
32 %Test-driven development~\cite{Edwards}
33 Each project includes a large number of test cases that is accessible
34 to students, as shown in  Table~\ref{table:tests}.  
35 They must implement the API that is exercised by these test cases.  
36 Students are encouraged to add their own test cases.
37
38 \paragraph{Work in a Team}
39 The projects presented in this paper are designed to be accomplished by teams of 
40 2-4 students.  Working in a team provides an environment that more closely resembles
41 industrial software development, and it provides a way for students to brainstorm and
42 implement together.  In addition, we teach and require the use of group collaboration tools,
43 notably shared source code version control systems such as CVS.
44
45 \paragraph{Justify your Design}
46 Design justification and rationale is as important for learning as creating an artifact 
47 that fulfills a set of given requirements.  We designed a set of structured questionnaires 
48 in which students describe their design and discuss choices and trade-offs they made.
49
50 \paragraph{Provide a Reproducible, Manageable Environment}
51 Operating Systems are inherently concurrent environments, which can be difficult
52 to debug.  For educational use, we must provide an environment that is
53 manageable and reproducible, which we do by providing the option
54 of running Pintos in a simulated, fully deterministic environment.  
55 As a result, Pintos kernels can be debugged in a manner that
56 is substantially similar to how user programs are being debugged.
57
58 \paragraph{Include Analysis Tools}
59 Static and dynamic analysis tools are now being widely used; an OS course should
60 be no exception.  In Section~\ref{sec:dynamicanalysis}, we describe how we 
61 extended the QEMU emulator~\cite{Bellard2005QEMU} to 
62 perform tailored analyses that find errors such as race conditions.
63
64 \paragraph{Provide Extensive and Structured Documentation}
65 If using an instructional system requires too much undocumented knowledge,
66 the system is often not shared or falls into disuse because the learning curve
67 for instructors is too steep and training teaching assistants is difficult.
68 Pintos includes an extensive 129 page manual, a sample solution,
69 and grading instructions for teaching assistants.  The project documentation 
70 highlights sections students must read from sections that merely provide supplemental information.
71 %Even though Pintos uses an existing and complex architecture, our experience indicates
72 %that the manual is sufficient for most students.
73