Hacker News new | ask | show | jobs
by wesselbindt 39 days ago
I'm still confused as to why folks don't just write executable specs.
5 comments

Ambiguity is the grease that keeps everything turning.
Some of us do! That's called Gherkin.
So basically tests?
Yes, except a test can be turing complete - i.e. code.

An executable spec like gherkin or hitchstory is config - it has no loops or conditionals. There are a number of rarely recognized benefits to this.

Could you expand on this?
code
Literate programming would provide specs and code instead of working backwards from hard coded functions to figure out specs.
> working backwards from hard coded functions to figure out specs.

People do that? Actual professionals?

Yes all the time actually, especially when making system migrations. Uncle Bob writes about this in Clean Code. It is actually extremely common since it's the most apparent course of action to look at hard-coded values in maintenance and backport it as specs to new system.
If you're confused, and have tried Opus for coding, I'm keen to hear what problems or workflows it's not good at.

If you're genuinely confused, and haven't tried Opus for coding, then it's not surprising you're confused!

It is also okay for you to just not like the idea of LLMs for coding (but say that!).

I’m using Opus 4.6 and I’m so confused! Maybe I should try Opus 4.7, which is almost twice as expensive to get some clarity (but not too much, I need to save money for Opus 4.8)?
That's what the article is about - overcoming problems with AI cooding tools using specs in Yaml. If we've got that far, it might be better to write specs in a proper programming language instead and skip the AI layer altogether
Think the idea is to still get monumental acceleration between fancy YAML specs (bullet points with some indentation that an intelligent technical manager could write) and production ready code.
I have yet to see the monumental acceleration tbh. For people who never tried writing code themselves a semi-formal spec is definitely a step in the right direction though