Skip to content

Lesson 5 of 6

Day 5: Demo It on the Customer's Own Data

Turn the result into one page the customer can read, plan the demo as a short story with the answer first, rehearse it, and prepare for the thing that breaks.

6 minForward Deployed Engineering

After this lesson you will be able to turn a result into something a customer can see, and run a demo that leads to a decision.

What the demo is for

The demo has one purpose: to let the head of membership decide what happens next. Everything in it should serve that. She does not need to see the code, or hear about the week in the order it happened.

She needs three things: the answer to the question she agreed, enough of her own data to believe it, and a clear line between what is real and what is not.

One page, not a product

The list is a file and the back-test is some lines in a terminal. For the people in the room, put both on one page. It should take an hour to build. A proof of concept that spends day 5 on design has lost a day.

Create report.py. It builds a single web page from the functions you already have.

"""Build report.html: the one page shown in the demo.

Usage: python report.py
"""

from html import escape

from backtest import measure
from loader import load_members, load_visits
from score import EXPORT_END, call_list

PAGE = """<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Members to call this week</title>
<style>
  body {{ font-family: sans-serif; max-width: 760px; margin: 2rem auto; padding: 0 1rem; }}
  table {{ border-collapse: collapse; width: 100%; }}
  th, td {{ border-bottom: 1px solid #ccc; padding: 0.4rem; text-align: left; }}
  .number {{ font-size: 2rem; font-weight: bold; }}
  .note {{ background: #f2f2f2; color: #111; padding: 0.6rem 1rem; }}
</style>
</head>
<body>
<h1>Members to call this week</h1>
<p>Proof of concept for Brightwell Leisure. List made for {made}.</p>
<h2>Would this have worked four weeks ago?</h2>
<p><span class="number">{caught} of {listed}</span> members on that list cancelled in the next four weeks.</p>
<p>A list of the same size picked by chance would have held about {chance}.
{left} members cancelled in those four weeks, and the list missed {missed} of them.</p>
<h2>This week's list</h2>
<table>
<tr><th>Member</th><th>Plan</th><th>Visits, 4 weeks before</th><th>Visits, last 4 weeks</th><th>Last visit</th></tr>
{rows}
</table>
<p class="note">Not real yet: the data is one export, made by hand, and nobody has been called.
This page shows who is likely to cancel. It does not show that a call changes that.</p>
</body>
</html>
"""


def build():
    members = load_members()
    rows = call_list(members, load_visits(members), EXPORT_END)
    result = measure()
    cells = "\n".join(
        "<tr>" + "".join(f"<td>{escape(str(row[key]))}</td>"
                         for key in ("member_id", "plan", "before", "recent", "last_visit")) + "</tr>"
        for row in rows
    )
    page = PAGE.format(
        made=EXPORT_END.isoformat(),
        caught=len(result["caught"]),
        listed=len(result["listed"]),
        chance=round(result["by_chance"]),
        left=len(result["left"]),
        missed=len(result["missed"]),
        rows=cells,
    )
    with open("report.html", "w", encoding="utf-8") as handle:
        handle.write(page)
    return len(rows)


if __name__ == "__main__":
    print(f"wrote report.html: {build()} members on the list")

Two details are worth a look. The page is a file written to disk, which opens in any browser with nothing running behind it. And every value from the data passes through escape, so that an odd character in the data cannot break the page.

python report.py
wrote report.html: 13 members on the list

Open report.html in your browser. At the top is the back-test in one sentence: 9 of 13. Under it is this week's list. At the bottom, in a grey box, is what is not real yet.

That grey box is on the page on purpose. A working page makes people assume a working product. Saying on the page itself what is faked stops the customer leaving with the wrong idea, and stops the page being forwarded without the warning.

Plan it as a story

Twenty minutes is enough. Write the order down.

  • The question, in the words of the brief, and the pass test agreed on day 0. One minute.
  • The answer: yes. Of 13 members the list picked four weeks ago, 9 cancelled, against a pass test of one in three and about 2 by chance.
  • Their own data. Open the list and pick one member. "M101 came five times in the four weeks to the end of March and has not been in since 18 March."
  • The misses. Five members left without being on the list, three of them with no warning that visits could show.
  • What is faked, and what was left out: nobody has been called.
  • What you recommend next, and the decision you are asking for.

The answer comes second, not last. People listen differently once they know where a talk is going, and a customer who has to wait fifteen minutes for the result spends them guessing.

Show the misses yourself. If the customer finds a weakness that you did not mention, they will wonder what else is missing. If you show it, they see that the number can be trusted.

Rehearse, and plan for what breaks

Run the whole demo once, aloud, on the machine and screen you will use. It takes twenty minutes and finds most problems: a font too small to read, a command you have to hunt for, a number you cannot explain.

Then prepare for failure, because the demo is the one hour when it matters.

  • Build the page beforehand and do not run anything live that you do not have to.
  • Keep a copy of report.html and a screenshot of it somewhere that needs no network.
  • Close everything else on the screen, especially anything that shows another customer's name.
  • Have the brief and the data note open in another tab. Questions about scope and data are answered there.

The questions to expect

Three questions come up in almost every demo of this kind. Have a short, true answer ready for each.

"Can we use it on Monday?" Not as it stands. The list came from one export made by hand. The write-up says what a weekly list would need.

"Why did it miss those five?" Two were coming less often, but not by half. Three kept coming until they left, and visits cannot show that.

"Will calling these people stop them leaving?" The proof of concept does not answer that. It shows whom to call. Whether calling works is the next test, and the write-up proposes a way to run it.

The last answer is the one to give most plainly. It is tempting to let a good demo suggest more than the work showed.

Before you leave the room

Ask for the decision the brief was written for, and write down what was said and who said it. If the answer is "we need to think", agree a date for it. Then send the write-up the same day, while the demo is fresh. That is the last lesson.

Key takeaways

  • A demo is for the customer's decision; lead with the answer to the question in the brief.
  • Show the customer their own data; a row they recognise persuades more than any chart.
  • Say what is faked before anybody asks.
  • Rehearse once from start to finish, and keep a saved copy of everything you will show.
  • Show the misses yourself.

Try it

The team lead asks how long each member on the list has been with Brightwell. Add a "Joined" column to the page. In score.py, add the joining date to each row of the call list, and in report.py add the heading and the column. One member on the list has no joining date in the export, so show the words "not known" for that member. A good result is a page with 13 rows where M023 shows "not known", and six tests that still pass.

Official documentation

Ready to use this in a job?

Rolebound applies to matching roles for you.

Start now

Written with AI and checked automatically. Nobody has run these steps by hand, and tools change, so a command may behave differently in the version you install. Spotted a mistake? Tell us.

    Cookies on Rolebound

    We use necessary cookies to sign you in and keep the site working — those cannot be turned off. We would also like to set analytics and advertising cookies so we can see which pages help people get interviews and which adverts brought them here. Nothing optional is set unless you say yes, and you can change your mind at any time from “Cookie settings” in the footer. Read our Privacy Policy.