site banner

The Motte is very very slow

Is it just me or lately The Motte has been getting very slow to load and occasionally timing out?

9
Jump in the discussion.

No email address required.

I'm paraphrasing a bit; I ended up with a bunch of prompts, including "write tests to cover every endpoint" and "write tests to increase code coverage" and "stop skipping this specific file, I've seen you consider it six times now and you keep saying it'll be hard and going to do something else, knock it off, go do it for real" and at one point it started just writing tests that verified an endpoint returned a success code instead of actually checking the data and I had to tell it to go back and fix them.

But nevertheless, it was fundamentally "go write a bunch of tests kthx".

What kinds of tests does it write?

Pretty simple ones. In general it's either "call endpoints and verify that the right thing happened in the database", or "change the database and verify that the right thing happened from the endpoint".

How does it know what to expect or assert in the tests?

By reading the code. It's not a black box, it just goes and reads the code. Then it tries stuff.

Then if the stuff didn't work, it reads the error messages and fixes it.

Same way a programmer does it, except it does it while I'm in the kitchen making a snack.