Skip to content
Home » Blog Posts » Teach Students to Build Slices of a Cake

Teach Students to Build Slices of a Cake

Every student should be taught how to build a cake slice by slice

When student teams, and hackathon teams get their hands on an idea for an application, they always start with the database. Maybe this is the curse of knowledge showing up. They know you could store information in a database, and this is more searchable than a document. They never stop to think if you actually need a database.

Stop students from starting with horizontal layers

Last year a student team were building an application for afterschool clubs for kids. Each club would have a leader, and the kids could earn badges after they participated in various activities. The app would let the leader track each kid’s activity. This could be a lot of information, and complexity. Naturally, the team wanted to sort out the database before they considered anything else.

I stopped them as this would take too long. If they do the database, then they do the business logic, and then the web front end, they would be developing this slowly. I suggested a different path so that they could establish a few things, and confirm it was going in the right direction.

I told them to build this in thin vertical slices, as if it was a layer cake. Everyone likes cake, right?

Various cake/pie shapes with one showing layers and slices
Teach students to build their cake slice by slice.

I want my students to realise that they don’t know everything they think they know about the application their building. They are at the start, when they know the least about it. There is so much more they will learn about this before they finish.

Build a reverse cake

This is why they should build a reverse cake. Pick the key areas they need to include as in step 1 in the image above. Then break each of these down into slices, as step 2. Each slice should include a part of each layer in the application. Then they can pick the slice to start their work. Repeat the process for each slice. Stop when the cake is finished, or your is ‘full’. Sometimes you learn that you don’t need some features. Discover what you don’t need to build.

Each slice can be deployed. Going from the earlier example, the team could start by loading a list of activities to confirm they have the right web framework, and for those new to it, to learn about this too. This could even start with a static page, and then be changed out for a query of activities from a database. In other words, each slice should be as simple as possible. Another slice can add more depth if required.

Thin slices are better than thick ones

When students build apps this way, then they get small dopamine hits sooner as they gain small wins more frequently. They keep the work focused on smaller tasks, and therefore also gain shorter feedback loops on what’s working, and what needs rework.

Combining this with trunk-based development as discussed last week also makes the work move smoothly forward as the team stays focused on creating one slice at a time. Ideally, the team is mobbing on this so everyone is working on the same thing. They should also tend to thinner slices, rather than thicker ones too.

If you’re looking for exercises in helping your students think this way, then look at the Elephant Carpaccio exercise from Alistair Cockburn and the facilitation guide from Henrik Kniberg. This is both good for explaining how to split stories smaller, and also in the benefits of vertical slicing. The only issue I encounter with students is the notion of sales tax, which is a strange concept to those who’ve not been to the US.


This post is part of a project pulling together my materials and ideas about Teaching Team Collaboration: the Human-Side of Software Development for software development to students.

If you’d like to be notified of future posts, then please sign up for more using the adjacent form, or follow me on LinkedIn

Cookie Consent with Real Cookie Banner