On this page:
11.1 Background
11.2 Presenting
11.3 Paneling
11.3.1 How to Ask Questions
11.3.2 The Goal
11.3.3 Questioning What Is Presented
8.14.0.4

11 The Team🔗

26 September 2024

Questions?

11.1 Background🔗

What’s the goal: find flaws, receive negative feedback

No sandwich.

How to set up a panel? 1 + 1 on 3. Why? (IBM, Bell Labs, NASA)

11.2 Presenting🔗

The goal is to present the design and implementation of a project component, hoping to get negative feedback on

  • the general design

  • the complex, likely faulty pieces of code

A side-benefit is to find out whether the code is readable.

What is a (top-down) overview? What is not an overview?

It is a birds-eye view of the project at this stage, with a focus on the most recent milestone. Amazing developers can deliver it orally; average developers like myself need diagrams, ideally included in a README file. (ASCII diagrams, napkin doodles scanned in, etc.)

An overview concludes with a goal statement, listing the pieces of functionality that need comments from the panelists.

How do Structural Diagrams Help?

A structural diagram explains the static relationships among components and within components (as needed).

Example:

Qwirkle is board game that asks players to compose a game map from tiles that have a color and a shape on them—matching matters eventually—and they need to know where which tile is placed. This cannot be done with a single form of data, so the game-piece component consists of several classes (structs) whose relationship could be explained up front:

Figure 1: A class diagram

A presenter can also explain how the desired functionality is allocated within these components and classes.

How do Dynamic Diagrams Help?

We may need to show an example sequence diagram.

A dynamic diagram explains the run-time order in which objects are created, in which methods talk to each other. They establish what holds when people inspect a piece of functionality.

It can also bring across how the control flow gets to the point in the code that we want to inspect for problems.

Example: Suppose you want to monitor events inside a process to make sure that they satisfy some constraints, say “open, read often, check eof, close.” Then you can use an Observer pattern, which you know from F III. You should document the dynamic relationship between the process and the observer so that people get a quick idea of what’s happening:

        Context

          |

          | new

    O o = | ---> Monitor

          |          |

          |          |

          |          |

          |          |

          |          |

          |          |  new(O)

          | ---------_----------------------> Process

          |          |                            |

          |          |                            | %% event e1 happens

          |          |   inform(e1)               |

          |          | <------------------------- |

          .          .                            .

          .          .                            .

          .          .                            .

          .          .                            .

          .          .                            .

          |          |                            | %% event e2 happens

          |          |   inform(e2)               |

          |          | <------------------------- |

          |          |                            |

          |          |   done()                   | %% no more events will happen

          |          | <------------------------- |

          |          |                            |

          |         ---- the monitor shuts down   |

          |                                       |

Figure 2: An example of a README diagram of dynamic relationships

What is an Overview for an Interface? A Class? A Method?

Each interface/class/method is a unit of code.

Follow the Design Recipe for Methods

11.3 Paneling🔗

11.3.1 How to Ask Questions🔗

good

     

bad

How does this function account for the special case of 0?

     

How do you deal with 0 in this function?

Why does this class come with getters for all fields?

     

Why did you introduce getters for all fields?

Where does the exception get caught?

     

Where do you catch the exception?

11.3.2 The Goal🔗

The goal is to discover the following kids of problems:

11.3.3 Questioning What Is Presented🔗

How to Question an Overview?

If the presenter does not present a structural and/or dynamic overview, push back and ask

How to Question a Structural Diagram?

How to Question a Dynamic Diagram?

Keep the answers in mind for the inspection of code.

How to Challenge an Interface/Class/Method Overview?

Does the Code Respect the Design (Recipe) Rules

Total: 60 mins