PlayTime 020: Code is Cheap: Tests are Valuable (at EuroSTAR25)

Jun 5, 2025 (Jun 5, 2025) Loading...

These exercises are for everyone, for free. Paying Subscribers get to play together every week. This week's is open to subscribers and friends. Subscribers will see joining info below. Pop your name on the Miro board if you're coming.

We're at 3:30, Edinburgh time. Here's the local time for you.

We've got someting that can generate code from tests, and will guarantee to pass the tests. The idea of the exercise is to throw away the code, remove a test, re-generate the code and see if we can detect which test has been removed by exploring. Then we'll throw the code away again, damage the tests further, and try again.

We'll use cic.workroomprds.com

There are 10 names – we'll pick unique ones, follow the link, and open two tabs; one for code-server (so we can change the tests) and one for rs_js (so we can play with what we'e made).

In the code-server tab, your password is password. Click through the setup. If asked, open the repository, trust the code.

Open the terminal and the file browser (top-right, two icons, hit the one with a side bar split, and the one with a bottom-bar split), switch to "terminal" in the bottom.

Change to the right directory – you need to be in /code/rs_js . In the terminal, cd ~/code/rs_js. Note: ~ works as if it is /home/«your chosen name».

Activate the python venv: source ~/llm-env/bin/activate

We'll stop here until everyone is sorted...

To edit the tests: edit test/jest/relativeSizes.test.js in the editor and save. If there's a dot by the name, it's not saved and won't be picked up.

To delete the code: right-click relativeSizes.test.js and pick delete / move to bin from the menu

To re-generate the code: in the terminal, check that the venv is active ((llm-env) on the commandline) and run ./makeNewJSFromTests.sh relativeSizes.js

To pick up the new code – refresh your browser page "from origin" if at all possible.

We can all try each others's changes. We'll start by working with our own and collaborating.

Cheers –

James

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.