Concepts / First Slice of a Project

First Slice of a Project

Writing code is often only about 20 percent of the problem; the other 80 percent is testing, reviewing, deploying, and maintaining it.

  • Programming

When a Working Demo Is Not the Finish Line

Imagine a small feature runs on a laptop, produces the right output, and impresses everyone in the room. It is tempting to conclude that the hard part is over. Source material on this topic argues the opposite: writing code has become the inexpensive part of building software. Generating a working function or a small module is now fast, so the bottleneck has moved somewhere else.

The central claim is that writing code is often only about 20 percent of the problem. The other 80 percent is determining how the code will be tested, reviewed, deployed, and maintained across the organization that depends on it. This article explains why that remaining work deserves deliberate design from the beginning, and how the idea of a first slice helps a team do that.

Following Code Through Its Delivery Lifecycle

To see where the bottleneck sits, follow a piece of code after it is written. It has to be checked, read by another engineer, placed into a real environment, and then kept working and changeable for months or years. The diagram below shows that sequence. Each step asks something different of the code, and the arrow returning from maintenance shows that what happens later feeds back into new changes.

Write codethe inexpensive partTestcan behavior be checkedreliablyReviewcan another engineer readitDeploydoes it run in a realenvironmentMaintaincan it change safely monthslaterchange requests
What happens to code after it is written, in what order testing, review, deployment, and maintenance follow, and where maintenance feedback returns.

The four activities in the source each place different demands on the code. Testing asks whether behavior can be checked reliably. Reviewing asks whether another engineer can read and understand what was written. Deploying asks whether the code can be moved into a real environment and run there. Maintaining asks whether someone can change the code safely long after it was first written.

What a First Slice Is

Definition

A first slice is a minimal, functional, demonstrable version of a project. It runs through the important parts of the system at a small scale, so that the team has something concrete to demonstrate, review, and check against what the project is supposed to do.

The word slice implies a cross-section. Instead of building every layer of a system completely before anything runs, a first slice cuts through all the important parts at once, but thinly. Because it is small, it also gives the team an early chance to discover structural problems while they are still cheap to fix.

Storage, completeStorage, thinLogic, completeLogic, thinInterface, completeInterface, thinNothing runs yetuntil all layers existWorking demoruns end to end
How a first slice differs from building one layer completely before moving to the next. The first slice takes a thin path through every layer, so something can run end to end early.

Notice what a first slice does not contain. It does not describe a fully featured product. It describes a unit that works, is small enough to review, and can be shown to others. That is the practical meaning of a first slice, and it is what allows the surrounding 80 percent to be designed for early instead of postponed.

Tracing a Small Notes Feature Through a First Slice

The example below is an illustrative one written for this article, not taken from the source. It shows how a team might trace one thin path through a small notes feature, touching each important part of the system once before adding breadth.

Worked example

A thin path through a notes feature

A team wants a notes feature where a user can save a note and see it again. Design the first slice so that it is minimal, functional, demonstrable, and small enough to review.

  1. 1
    Choose the single path

    Pick one case: saving one note with a fixed title and body, then displaying it. Leave out editing, deleting, search, and sharing. These belong to later slices.

  2. 2
    Cut through each important part

    The path touches storage (keeping the note), logic (validating and passing it along), and interface (showing it). Each part is implemented at small scale, not completed in full.

  3. 3
    Make it runnable and demonstrable

    The slice must actually run from input to output so that someone other than the author can see it working and check it against the intended behavior.

  4. 4
    Plan the surrounding concerns now

    Before calling it done, ask how this path will be tested, how a reviewer will read it, how it will be deployed, and how someone will change it safely later. Design these in while the slice is still small.

Result

A small, working, reviewable path that exposes structural problems early, while fixing them is still cheap.

The Four Concerns to Design For

Each of the four activities in the surrounding 80 percent asks a specific question of the code. The table summarizes those questions. A slice built with only the first activity in mind, usually testing or simply getting it to run, may do well in a demo and then struggle with the other three.

ConcernQuestion it asks of the codeWhat it demands from the first slice
TestingCan the behavior be checked reliably?Behavior that is predictable and can be verified
ReviewingCan another engineer read and understand it?Code small enough and clear enough for a reviewer
DeployingCan it be moved into a real environment and run there?Nothing that only works on the author's machine
MaintainingCan someone change it safely months later?Structure that a future author can modify without breaking it

The four concerns named in the source and what each asks of the code.

Why Deferred Concerns Surface After the Demo

Deferring testing, review, deployment, or maintenance concerns is a common quick-fix pitfall. The problem usually does not appear during the demo, because the demo succeeded. It appears afterward, as the team tries to test, review, deploy, or change code that was never shaped for those activities. The timeline below shows that typical order of discovery, based on the pattern the source describes.

Demo succeedsthe work seems finishedTesting gapbehavior cannot be checkedreliablyReview is hardreviewers cannot follow thecodeDeployment scramblecode will not run in a realenvironmentMaintenance struggleschanges become unsafe
The order in which problems tend to appear when surrounding concerns were postponed after a successful demo.

The sequence in the diagram is an illustration of the pattern, not a fixed schedule. Any single project may surface these problems in a different order or not at all. The lesson is that the cost of finding them late is paid by people who must rework code that was never designed for those activities.

Mistakes Teams Make With the First Slice

  • Common mistake

    Treating a working demo as the finish line

    What it looks like

    The feature runs once on the author's machine, so the team moves on without planning how it will be tested or deployed.

    Why it fails

    The source identifies deferral after a successful demo as a common quick-fix pitfall. The remaining 80 percent of the work is still ahead.

    Do this instead

    Before calling the slice done, check what testing, review, deployment, and maintenance will require of it.

  • Common mistake

    Building every layer completely before anything runs

    What it looks like

    The storage, logic, and interface layers are each finished in full, and only then is the system run for the first time.

    Why it fails

    A first slice runs through the important parts at small scale. Waiting for completeness delays the early discovery of structural problems.

    Do this instead

    Cut a thin path through every important layer so something concrete runs end to end early.

  • Common mistake

    Expecting the first slice to be a full product

    What it looks like

    The first slice tries to include every planned feature, search, sharing, and settings.

    Why it fails

    The source is explicit that a first slice does not describe a fully featured product. It must be small enough to review and demonstrate.

    Do this instead

    Limit the slice to one working, reviewable path and leave other features for later slices.

  • Common mistake

    Assuming maintenance can be handled later by rewriting code once it is in use

Designing for the Surrounding Work From Day One

Designing for maintainability means considering the surrounding work during initial design rather than deferring it. Restraint in engineering means recognizing that the remaining work deserves deliberate design, not a last-minute scramble after the code already exists. In practice, this means asking the four questions from the earlier table while the first slice is still being shaped.

Best practice

Ask, before the first slice is considered complete, how it will be tested, how another engineer will review it, how it will reach a real environment, and how someone will change it safely later. Write down the answers in the slice itself, so the surrounding work is designed rather than improvised.

Checking Your Understanding of a First Slice

What do you think happens?

Does a first slice describe a fully featured version of the product?

  • Yes, it includes all planned features

  • No, it is a minimal, functional, demonstrable version

Reveal answer
Answer:

No, it is a minimal, functional, demonstrable version

The source states that a first slice is a minimal, functional, demonstrable version of a project. It describes a unit that works, is small enough to review, and can be shown to others, not a complete product.

MEDIUM

A team is building a file upload feature. Describe a first slice for it: name the single path it would cover, the parts of the system it would touch, and one question you would ask about testing, review, deployment, and maintenance before calling the slice finished.

Hints
  • Pick one upload case, such as one small file of one type, rather than every format and size.
  • Think about which parts of the system the upload passes through, even if each is only partly built.
  • Revisit the four concerns table and choose one concern that the upload code must support.

Key Takeaways

  • Writing code is often only about 20 percent of the problem; the remaining work is testing, reviewing, deploying, and maintaining the software.
  • A first slice is a minimal, functional, demonstrable version of a project that runs through the important parts of the system at small scale.
  • A first slice is not a full product. It is small enough to review and demonstrate, which allows early discovery of structural problems.
  • Testing, review, deployment, and maintenance should be designed for from the start, because deferring them is a common pitfall that appears after a demo succeeds.