Exercise: Three Things
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 aninputValue
and aunit
, and ascale
to contextualise the number and the unit, and converts that number to atextOutput
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.
- Version C, instructions and tests.
- Version D, instructions and tests.
- Version E, instructions and tests.
Starting at C??
- Version A, instructions and tests.
- Version B, instructions and tests.
I'd have sworn all the tests passed, but A and B show failures in the HTML handler. So now you have D and E.
Exercise 1
10 minutes, microphones on
Pick one. Explore it. Whatever way you like – knowing that they have the same configuration and pass the same tests, but have different code and may hav differing behaviours.
What looks wrong? Share.
Exercise 2
5 minutes, mics on
Pick another. Explore it, starting with what you saw that was 'wrong' in Ex 1.
Differently wrong? What else looks wrong?
Share.
Review
5 minutes, shared notes in Miro
Write down one novel way you'd try if you came across this situation at work.
Write down one artefact you wanted to use.
Share any conclusions about testing these things which pass the tests
Extension
- Assess the tests
- Look at the instructions
- Write automation to see differences between C, D and E
- Use
diff
or similar to see differences between the underlying code - Try it yourself! Get the test files into a directory. Ask your LLM of choice to make code to pass the tests in
test-whatever.js
, then give it feedback based onshow-test-whatever.html
. Give itrules.md
, too – and whatever source you might imagine. You'll need to make (JavaScript)main
,htmlhandler
,relativeSizes
, HTML pageindex
. You'll ask for CSSstyles
if you like (there's no test, but you'll want the LLM to have read the rules, the index page and the htmlhandler. You can either use the units from here, or ask for a JSONconfig
file to suit yourself (there's a test for that). Certainly change the rules, the tests and whatever else.
Comments
Sign in or become a Workroom Productions member to read and leave comments.