Skip to content

One Scan, Step by Step

Run the One Scan, Step by Step MicroSim Fullscreen

About This MicroSim

One scan in the running example touches four parts of the app: the React front end, an Express route, a background job and the storage bucket. This MicroSim walks through the scan in seven steps on a timeline with one lane per part.

Before each step appears, you predict which part does it. The step then lands in its lane, so you can see the reply go out at 0.5 s while the checks run on until 40 s. The first half second is zoomed in so the early steps don't pile up. All timings and the scan ID are illustrative.

At the end you answer one question about why the server replies early. Then a What if? checkbox shows what happens when a deploy restarts the server in the middle of the job.

How to Use

  1. Click any of the four part boxes at the top to read what it does.
  2. Read the question for the step and press the button for the part you think does it. Your first choice counts.
  3. Read the feedback, then press Next step.
  4. After step 7, press Final question and answer with Answer A to Answer D.
  5. Turn on What if? to see a deploy stop the job at 20 s. Hover any numbered step on the timeline to read it again.

Iframe Embed Code

You can add this MicroSim to any web page by adding this to your HTML:

<iframe src="https://arunbatchu.github.io/good-enough-engineering/sims/one-scan-step-by-step/main.html"
        height="624px"
        width="100%"
        scrolling="no"></iframe>

Lesson Plan

Learning Objective

Explain which part of the app does the work at each of seven steps of one scan, and why the server replies before the checks finish, with at least six of seven predictions correct.

Grade Level

Adult professional (Good Enough Engineering)

Duration

10-15 minutes

Prerequisites

React front end, Express route, file storage bucket, database row, background job and status code 202 (Chapters 2 and 3).

Activities

  1. Exploration (3 min): Click the four parts and read their definitions. Predict where the photos go before you start.
  2. Guided Practice (7 min): Step through the scan. At each step, say which part does the work and why before you press a button.
  3. Assessment (5 min): Answer the final question, then turn on What if? and explain why the scan stays at "running".

Assessment

Six of seven correct predictions shows mastery. A learner should also choose answer A on the final question and explain, using the timeline, why the server replies with 202 before the checks finish.

References

  1. 202 Accepted - MDN Web Docs. The status code a server sends when it has accepted work it will finish later.
  2. Express Routing - Express team. How a route answers one URL.
  3. Chapter 3: The Code Under Your App - this book. The Background Job section.