Better HN
topnewbestaskshowjobs
Log inSign up

codedrift_

9 karma · joined Aug 28, 2023 (3y ago) · 25 submissions

The messy part of building things is my happy place. Occasionally, I write about code and the people who build it.
Submissions

comment 23h ago · link · parent

Yeah, because it's probabilistic all the way down, adding stuff to the spec doesn't change the outcome.

"If the spec plus the AI is sufficient to generate software without the vulnerability, why didn't it just do that originally?" I ask this too. Best answer I've gotten is that LLMs simply don't know/understand systems yet in a way that would let them proactively find and fix these issues in the normal course of writing code.

I don't think that our test suites are robust enough to handle the idea of "re-engineer everything from a specification." There are plenty of examples of code that is being rewritten to Rust and proudly posted to X that looks like it passes all tests, and yet we learn very quickly that the tests never accounted for real world scenarios. I also oscillate daily as to whether or not we will ever be able to build test suites robust enough to handle this. In theory, yes, if we write good enough test suites with enough coverage, we'll get similar behavior... But there's just so few examples of what that looks like in practical everyday software that we ship.

comment 2d ago · link · parent

First off, thanks for finding the thread and leaving some feedback. Didn't think anyone actively using it would find it since it's a Sunday. The docs problem you mentioned is a lot harder than I thought it was going to be because I built the docs page on a completely separate piece of infrastructure. I out-clevered myself and need to figure out how to keep it in sync with either the CLI or the Cloud app. Currently the docs are in sync with neither and it sucks.

Would you just want in-app docs searching? You're one of the few people playing with the cloud side right now, because I think 90% of the current value is just in getting our agents to write better checks and gates, and we can do that for nearly free.

I do think the agents need some kind of docs-answering option. Rules got better when the agents could ask the CLI to "show me the syntax tree", so maybe "show me the docs on <blank>" would also help.

Out of curiosity, do you have more ast-grep or more Vale rules at this point?

3.

Show HN: Taskless, turn AGENTS.md and PR comments into runnable checks(taskless.io ↗)

7 points · by codedrift_ · 2d ago · 3 comments

comment 2d ago · link · parent

No, I think it's the right thing still. An API is probably the best example because an API has an incredibly long life and an LLM has no idea how long that life is. To an LLM, it's trivial to move an API from version one to version two. But the human impact of that is way more.

When things are designed right at the outset, the cost is way less down the road. And I agree that it's very easy to ask the LLM to go rewrite things. But there's still a consumer of that which gets written, and I think that's where the price gets paid.

So same focus, same choices that matter, they're just applied at a different layer plus a lot earlier in the process than we're used to as SWE.

5.

Nudeps: Bundler-like imports, none of the baggage(lea.verou.me ↗)

1 points · by codedrift_ · 4d ago · discuss

comment 5d ago · link · parent

Agree, if you just aim the agent at a fix in isolation, it's like rolling dice. I spend a lot more of the agentic time on bug exploration than the fix. As the human who's probably getting paged if the fix also breaks, I want to understand what's being fixed and why. My remedy has been to explicitly state what you're asking for. I specify the fix needs to be simpler and more maintainable, and I include good examples of bug fixes or links to GitHub of what effective fixes look like.

Asking it to just blindly wander the codebase won't give a good result, because there's a non-zero chance the code next to your bugfix is also badly written. The agent just propagates what it sees unless you steer it in a different direction.

The other thing I've started doing is turning the root cause into something enforceable: linters, static analysis, unit tests. I know as engineers we (mostly) do this, but agents are really terrible at writing good checks. eslint's "no-restricted-syntax" is my new best friend.

comment 5d ago · link · parent

Right now, I think there's going to be a groundswell of these tools. We don't know what's "right" or "best" yet. I'm getting 2000x flashbacks, where it was the wild west for web technologies. I'm more shocked there's only a thousand or so listed so far. Submissions are down or I'd have tossed a few more into there. Give it about 6-8 months and we'll probably see common themes emerge.

One early theme I've noticed is ADEs are getting smarter about answering if they're blocked. An idle chat that ended in a question mark is probably blocked because it's waiting on human input. But it also looks identical to an idle thread that finished its work.

We'll probably need something like these ADEs though, even if it's just VSCode with an Agent View. You outgrow markdown files quickly. At some point you have to enforce the markdown files, make sure workflows are adhered to, etc. At that point, you start looking for a tool.

comment 5d ago · link · parent

I think it's solving some of it, yeah. Most teams never catch it at all, so something watching on merge is huge. About the only thing I'd really pine for is StarSling to also add in regression prevention.

If the cause of slowdown has a fix, we should be able to add pre-commit checks that prevent the bad behavior going forward. Otherwise I'm afraid it'll creep back in.

Good news though, you can verify that a code check StarSling writes prevents the regression since you've already got all the testing infra built. It's just anything that runs earlier in the process will be cheaper, predictable, and faster.

comment 6d ago · link · parent

In a former life, I ran platform teams and the CI speedups we fought for rarely lasted. A few months later someone adds a sleep to a test or a new job skips the cache, and the build is slow again.

How does StarSling handle that drift? Does the loop keep watching a workflow after a PR merges, and will it catch a regression on a win it already shipped?

comment 6d ago · link · parent

Not everything needs a decision model either. There's so many places people are shoving JEV in like it's a magic determinism layer. If your answer is squishy, then sure, use a squishy system.

> Decision models are up to 444.6x cheaper and 193.6x faster than frontier models

Yes, and two lines of even the worst JavaScript runs circles around making a service call

comment 1w ago · link · parent

> automate a complex debugging process that would take me about 1-2 weeks of painstaking work before

This is the QoL improvements people should be talking about. Yes, I can build a custom harness to exercise this really obscure bug. Or the LLM does it while I go do the harder part of telling the PM why this is going to have a blast radius that requires another round of testing (which can also take a week or more).

comment 1w ago · link · parent

I see it as more of a spectrum.

Like, maybe untyped Python is good enough for you with pylint or another linter that helps the code me more idiomatic. Or maybe you reach for ty because you want to have some type checking to avoid common coercion bugs.

And then there's this, for when ty simply wasn't enough and you've inherited some monster codebase where absolute rule over types is required. It's probably overkill for most codebases, but I can think of a few legacy codebases that would benefit from this...

comment 1w ago · link · parent

> "Done does not mean DONE"

Ya know, respect. I don't feel like a lot of people who went the vibe coding route have had that moment.

comment 1w ago · link · parent

Yeah there's so many "bad habits" you can stop via a gate. My go-to is static analysis tools in the tree-sitter family.

I am currently testing a "too simple" gate. Claude loves to turn everything into helper functions, and if the helper function isn't actually helping (too short, doesn't perform enough actions, etc) the commit gets bounced and Claude gets told why it's wrong and what to do about it.

This has generally kept the worst of things out of the codebase.

comment 2w ago · link · parent

> For some reason I can “hold it right” and others cannot and for the life of me I cannot figure out what it is.

I don't think we talk about this as much as we should. I've been interviewing devs as part of [DAYJOB] and there's a lot of people who cannot get anything useful out of Claude. Forget features, we're just talking bugfixes.

I also don't know what's different about the behavior. My best guess is people are overprompting, adding a bunch of noise that interferes with what they're trying to achieve.

comment 2w ago · link · parent

> skill behavior changes across different models

This has bitten me so badly SO many times. Every time there's a new model, it's time to re-evaluate the skills. It got so bad I put a lot of the skill behind a CLI.

Evals saved me, but I really wish skills had a `writtenFor` field in their frontmatter so an agent could warn you it was running a skill written for a different model.

comment 2w ago · link · parent

Some of my current toolchain:

- I'm currently using Sentry's dotagents to share skills and pin versions

- I avoid a centralized "single brain" and instead have started a "knowledge" directory in each repo. I copy relevant learnings in so stuff stays isolated

- I use an OSS tool from my company to turn anything that could be enforced by code into something that can be enforced by code (keeps the markdown files leaner)

- My daily driver is cmux with a silly amount of sessions, so I'm constantly throwing away sessions and keeping context small

comment 2w ago · link · parent

> the more ignorant someone is, the faster they will produce

It's a lot easier to produce "correct" code when they don't have a reference point for what "incorrect" code looks like. The optimistic side of me believes we'll discover new ways to scale websites because of this knowledge gap. A lot of cool tech was built in the 2000s precisely because we didn't know how stuff scaled yet.

comment 1y ago · link · parent

> To achieve this, we require that packages are built on a trusted CI/CD platform

Given what happened with NX [1], I'm hoping GitHub Actions disallows certain types of commands in their YAML. Otherwise we still have a straightforward way to attach provenance to malicious code. =\

1: https://x.com/adnanthekhan/status/1958722939534417989

comment 3y ago · link · parent

But I can’t ask the AI why it renamed all my files to mediocre 80s bands.

comment 3y ago · link · parent

How is this better than deterministic codemods?

Next 12 to 13 (with app router) is a struggle for even seasoned teams. Not looking forward to AI handing off a 162833292 line PR.