Photo by Stephanie Harvey / Unsplash

Exercise: Three Things

Exercises Apr 17, 2025 (Apr 17, 2025) Loading...

To be used as a 20 minute exercise in Workroom PlayTime 013

I built the same thing three times.

The small system, written as a web page, takes input in the form of an _inputValue_ and a _unit_, and a _scale_ to contextualise the number and the unit, and converts that number to a _textOutput_ expressing that number as something else in the scale, typically of the right size to be comprehensible. Typical scales are time and distance.

Starting with the same tests, (mostly) the same instructions, and the same names for the target files, I asked an LLM to iterate until the code it put into the files passed the tests.

Here they are, each with their tests. They all take the same configuration, which sets out the units the things work with.

You'll see that I've lied about the tests. I'd have sworn they all passed. Anyway, that's for another day.

Explore, compare and contrast (proper exercise stuff to follow).

Member reactions

Reactions are loading...

Sign in to leave reactions on posts

Tags

Comments

Sign in or become a Workroom Productions member to read and leave comments.

James Lyndsay

Getting better at software testing. Singing in Bulgarian. Staying in. Going out. Listening. Talking. Writing. Making.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.