• 0 Posts
  • 13 Comments
Joined 3 years ago
cake
Cake day: June 21st, 2023

help-circle
  • From what I’ve seen, you can’t just give a LLM a two sentence prompt and come back later to a nice polished project, despite all of the breathless hype telling you otherwise.

    Honestly? The coworkers I’ve seen who are using it most effectively do exactly this. There’s no reason to write out paragraphs of prose to need to correct it anyway when you’re only accepting a small set of changes to begin with. If good code isn’t self-evident in the codebase, it’s an issue with the codebase that needs to be addressed, and no amount of do/don’t lists or paragraphs of prose will stop an LLM from mirroring what it already sees.

    It uses git commits as a memory store

    This I haven’t seen, unless you’re referring to all the conventional-style commits it generates which end up as noise for reviewers. (We only review the final diff anyway so whatever)

    Personally, I don’t let LLMs commit anything for me. While committing everything myself, I go through and review all the changes. It’s a practice I’ve been following for a long while now and has always proven useful to me to help with reinforcing my understanding of the changes, spotting any leftover changes from debugging, and so on.

    But - if you treat it like a code generator tool that needs your input, supervision, and guidance to keep on track for modestly-sized chunks of code that you construct an entire codebase with, it can absolutely save you time.

    This, I agree with to some extent. For small changes, I’ve seen it able to work somewhat well. Usually those changes are straightforward, obvious changes that are easy and quick to review.

    That being the case, tell this to the people I work with. I’ve certainly tried. Shit, someone relatively high up the management chain did just a couple weeks ago and people retained it for all of 30 seconds.

    And the last few years have seen a decent jump in performance. The frontier ones have decent context and reasoning skills, which is handy when you’re sifting through someone’s poorly documented business logic. But they are nowhere close to being able to manage a large codebase by themselves.

    Agreed again, of course. I wasn’t claiming there weren’t improvements. What’s being promised simply isn’t what’s being delivered, and they need to be viewed from a realistic lens. Unfortunately, I have limited control over anyone but myself, yet I am subjected regularly to slop that others produce.


  • Seriously have you tried Opus 5.5?

    Opus wrote all the code I’ve been deleting for the past few weeks at work. Nearly 100k lines of code for CI/CD on a couple simple services.

    It comes with a full test suite too! Brilliant tests, like asserting that the README contains specific substrings and the sha1 checksums of the source files don’t change. Naturally, should those checks fail, the CI generously informs the developer that they made the mistake of modifying the code. A LLM would at least have had the courtesy of updating the checksums.

    But was it Opus 5.5?

    No clue! Why should I care? Is it my job to mandate that everyone uses the newest model that exists? It was using Opus something-or-another, which was the revolutionary new model that would end software development before the next revolutionary new model that would end software development came out. Or maybe it was the newest version, no idea.

    I’ve used Astra (which might end humanity or something?) and gotten the same level of unmitigated slop, though. It took me a while to get it to produce any code I’d accept at all, and most of it still needs to be rewritten.

    If you genuinely are producing code that fast, then I don’t see any way how anybody could keep up with what it all does.


  • In 1865, William Stanley Jevons noticed that as steam engines became more efficient and required less coal to produce a unit of work, more coal was consumed overall. The now cheaper unit of work opened up many new applications, increasing the total volume of work needed.

    Every time a tool makes writing code cheaper, demand for software grows faster than its production cost falls. That is how the number of programmers grew from a few thousand in the early fifties to hundreds of thousands in the nineties, from millions in the two thousands to tens of millions today, despite the fact that a modern developer has a framework, an IDE, a package manager, and search engines…

    What we’ve seen with AI is the opposite. Mass layoffs, lower salaries, lower demand for programmers. We’re seeing the opposite effect now, which leads you to question whether AI is making writing code cheaper at all.

    Logically, the paradox makes sense. When you boost the productivity of your employees, they become more valuable. You want more of these boosted employees because they produce more for their cost than before.

    When coal use becomes more efficient, your costs shift from coal to other parts of your business. The coal becomes more valuable because the value one rock provides is greater for the cost than before. You want to burn coal because each piece burned becomes that much more profit.

    With AI, we’ve seen businesses (supposedly) demand tokens. They melt through them. But tokens aren’t getting cheaper, they’re getting more expensive. They aren’t producing more for their cost like coal did because the price rises with the consumption and over time. Instead, businesses are juggling back-room deals for free credits or discounts that are all temporary. The “token factories” are struggling to turn their sold tokens into revenue that reflects the demand. Many are struggling to turn a profit at all.

    It isn’t sustainable.




  • Serde (and all of dtolnay’s stuff) famously only publish major.0.minor version numbers.

    Infamously*. It’s been the source of more than one argument lol. Not that I’m going to go tell him he’s doing it wrong though since serde is great still.

    But it’s an overstatement to say that “pretty much no-one” relies on major/minor. Most packages make an attempt to follow semver rules around major/minor. Dtolnay is one of the few exceptions.



  • Responding to the edit:

    Edit: if this is about MINOR leaking into PATCH, that’s not a problem since you can select a dependency version range (e.g. “2.0.0-rc, <2.1.0”)

    Correct, this was my point. Pinning the exact version is simpler, but you can constrain the range like this as well to avoid semver issues.

    However, by not pinning to an exact version, your reexport may vary between installs despite the user using the same v1.0.1 version of your package, which may be unexpected and arguably violates the purpose of having immutable versions in crates.io. The user can manually install both version 1.0.1 and, for example, version 2.0.0 to avoid it changing unexpectedly (though Cargo.lock will also prevent it from changing once it’s been set), but that makes less sense than just copying the struct to 1.0.1 rather than reexporting.

    Plus, the whole point (in the article) was to make the transition easier within the ecosystem by avoiding a split between major versions. If v1.0.1 depends only on a subset of v2’s versions, then you still get a split between, say, [1.0.1, 2.1.0) and [2.1.0,).


  • If you exactly copy 0.1.0 MainStruct to 0.2.0, there are no breaking changes in the struct when you reexport it from 0.1.1.

    Even if you make minor changes, it still follows semver from 0.1.0 -> 0.1.1.

    If 0.2.1 introduces changes to MainStruct, then 0.1.1 can reexport those changes unless you pin 0.1.1 to exactly version 0.2.0 (which should never change).

    It was harder to visualize with 0.y.z versions, so I switched to x.y.z versions to make it easier to explain further down my post.


  • What did you mean by this?

    Adding some amount of additional functionality, like new methods or struct members (under the assumption the struct previously had nonpublic members of course). Maybe even new trait impls if you don’t consider new trait impls to be breaking (most of the ecosystem doesn’t even though it technically is).

    These changes would all be reflected in 1.0.1 if someone updated the transitive dependency from 2.0.0 to 2.1.0.

    One would likely assume user of v1.0.1 doesn’t really know or care about the semver “hack” going on and just doesn’t expect v1.0.1 of the library to change over time or between environments.

    Users upgrading from 1.0.0 to 1.0.1 would also see these non-patch changes.

    (I expect people to know this. But for those who don’t, cargo differs from semver.org for 0.y.z, where MINOR is effectively treated like MAJOR).

    This is why I switched the version numbers in my example, but I think you caught onto that.



  • Unless you depend on exactly 0.2.0 and not 0.2.x, it’s still not semver compatible. Any patch increments in 0.2.x would be reflected whenever someone who depends on 0.1.1 updates their dependencies.

    These numbers aren’t super helpful, so suppose you have 1.0.0, then release 2.0.0 and 1.0.1 simultaneously (where MainStruct is identical to before, and 1.0.1 reexports it from 2.0.0). If 2.1.0 comes around and adds a ton to MainStruct then that could be reflected in 1.0.1 if you don’t pin the dependency to exactly 2.0.0.


  • The article fails to actually explain how to do durable workflows in Postgres:

    In a Postgres-backed durable workflows system, application servers directly communicate with Postgres to execute workflows instead of going through a central orchestrator. A client submits a workflow for execution by creating an entry for it in a Postgres workflows table. Application servers poll the table for workflows to dequeue and execute. As a server executes a workflow, it checkpoints the output of each step to Postgres. If a server executing workflows crashes or fails, another server can recover its workflows from their checkpoints.

    What you want are a locking clause (FOR UPDATE for example) to “acquire” an item from your queue and SKIP LOCKED to skip over rows that are being processed. Contrary to what you’d normally do, you’d hold a long-running transaction which maintains a lock on the row you’re processing, then on completion either commits (success) or rolls back (failure) its changes to that row.

    You also don’t want to poll. Use LISTEN instead.