Building a commute cost calculator

How a question about rising fuel costs became a full commute cost calculator, built in a day with an AI assistant. What worked and what I’d repeat.

Illustration of a fuel gauge reading low beside a row of rising blue blocks

Compare My Commute began as a question I wanted answered for myself, and ended up as a full calculator. This is the story behind building a commute cost calculator in a single day with an AI assistant: where the idea came from, how the work was run, and what I would keep doing next time.

It started with the fuel price

Fuel was getting more expensive, and I wanted a number. Not an average from a motoring club, but my number: my distance, my car, my week. If I swapped one day to the bicycle or the train, what would I really save?

The first version of the idea was small. A few fields, one answer. Then, as happens with every project I build, it gained scope. The list of “what about…?” questions kept growing. You can see where it ended up on the Compare My Commute project page.

Writing the brief first

I wrote the brief before any code, as I did for the bip gallery. I wrote down what the tool had to do, what it must never do, and the rules for how we would work together. The assistant read it and came back with questions instead of code. Each question had a suggested answer, so I could say “yes” to most and only think hard about the rest.

Most of the surprises in a project are decisions nobody made. A question list surfaces them while they are still cheap to change.

Building in rounds

After that, the work ran in rounds. The assistant built and tested, delivered a numbered package, and then waited. I tried it, wrote back what I found, and the next round began. Two rules made this work.

  • Hold points. Anything that changed how the page looked was a decision for me. Where a new block went on the page was never a guess. I was asked first.
  • Hold the next build. When I was still testing one delivery, nothing new arrived on top of it. Changing the thing under test makes the test worthless.

The numbering helped more than I expected. Every file carried a version, and every change was written in a changelog. When something looked odd, I could say exactly which delivery I was looking at.

Where the scope grew, and why it was worth it

Scope creep gets a bad name, and sometimes it deserves it. Here, most of it was earned. Looking at what other tools offered showed the gaps, and I filled the ones that mattered to a real commuter: a leased car, a hybrid, a bicycle with real costs, and the ability to mix transport across a week. Small touches grew from using it, too, such as sample data so a first-time visitor sees something worthwhile before typing a single number.

Testing it three ways

A calculator that gives a confident wrong answer is worse than no calculator. So the maths had its own tests, checked against figures worked out by hand. The page itself was driven in a real browser, clicking through the way a visitor would. And once it was ready for a live server, I ran a test script there too.

That last step taught me the most. My own server has layers a laptop does not: a front-end web server, a back-end one, and a security filter watching the traffic. A check that passes comfortably in a sandbox can fail, or raise an alarm, in the real thing. Better to learn that on a test day than from a visitor.

Release candidate, then release

I used the same version scheme throughout. While building, the middle number stayed even. When the feature list stopped moving, we declared a release candidate and the middle number went odd, which meant fixes only. After one round of fixes and a final test of my own, the number went even again and the build became the release.

The whole journey, from the first message to the release, took one working day, most of which was me testing and the assistant waiting.

What I would do again

  • Write the brief and answer the questions before any code.
  • Keep a hold point for anything visible.
  • Version every file and write every change down.
  • Test on the real server as early as possible, not just at the end.
  • Let the scope grow where the research shows a real gap, and not otherwise.

What I would change

I would tell the assistant about my server setup on day one. It is the kind of detail that feels irrelevant until it is not.

If you want to try the result, open the project page or go straight to the user guide. If you are interested in how other builds went, the bip series on working with an AI assistant covers a longer project.

Bob's Projects Avatar

Written by

Previous post

Leave a Reply

Your email address will not be published. Required fields are marked *

More from the blog