Lurker News
I saw this LinkedIn post from a Meta engineer and it resonated with me:

https://www.linkedin.com/posts/ali-hamie_im-an-engineer-at-m...
> I'm an engineer at Meta and I never felt this uncomfortable doing my job. I'm writing code these days and it all feels like a black box. This new standard of shipping with AI is moving so fast that if we're going to spend our time checking each line of code, it's going to take forever. That means you can end up with systems you've built where you don't truly understand how all the code works. You understand the high level, but not every detail. And maybe this is becoming the new standard. It goes against every instinct of being a software engineer. I'm used to understanding what I'm building. Now I'm trying to figure out how much I need to understand before I'm comfortable moving forward. Are other engineers feeling this too?
How are you handling this?

Comments (767) 238 threads

Earlier comments
ChrisMarshallNY11 replies#
Testing.

Lots and lots of testing. I usually interactively test with the LLM. Now that I'm spending less time, coding, I get to spend more time, testing.
In my experience, I test more, with an LLM, than I did, with my own code. I don't find coding errors, but I do find implementation errors.
On another note: I ran an LLM on a bunch of really mature code that I wrote, and could swear was "perfect," and it found a number of issues.
Nobody's perfect. Trust; but verify.

SimianSci8 replies#
So, in other words, we save time and money when it came to creating stuff, but we've made a whole bunch of new work around verification and testing of said stuff?

What have we gained aside from shifting where time and effort is spent in the design loop?

thevinter#
Better tested software duh
theK#
Isn't this the perfect classical capitalist advertisement? Every number goes up.

- code? up - build budget? Up - developer output? Up - developer oprrational costs? Waaay up!
Why is this Bad? Every one involved profits somehow.

alpha21io#
Shipping features and fixing bugs much, much faster.
onion2k#
we've made a whole bunch of new work around verification and testing of said stuff?

The verification is what we always wanted but never had time for. For 30 years I wrote side project games without extensive testing or a fuzzer or anything because I wanted to spend my time writing the game. Now I can do that and still have the testing I always knew I should be building.

ChrisMarshallNY1 reply#
Engineering will always be difficult.

Right now, we're in a "honeymoon" stage, where non-engineers think that they can somehow, magically produce stuff that is comparable to what experienced and disciplined engineers can do.
That won't last long.
Despite all the caterwaulin', LLMs are just another engineering tool, and good engineers will figure out how to implement them, in ways that absolutely blow away the garbage produced by non-engineers.
It's like that rich, no-talent guy that buys a PRS guitar, and thinks he'll beat the experienced musician that still uses his beat-up old strat, but consistently makes hits.

claytongulick#
I wonder.

In my optimistic days, I think we'll start putting mechanisms in place that will have LLMs help develop cognition, skills and expertise. It'll usher in an era of mastery and wonder.
On my bad days, I despair that the siren song of "good enough" slop will overwhelm even the most disciplined minds, and we're facing the atrophy of civilization.
Will this just end up exaggerating the pereto distribution? Will there end up being this tiny percentage of people that are driven by natural curiosity to do the very hard work of really understanding hard things? Will society even have any sort of reward for those people?

kreneskyp#
I'm largely building tools for myself and my agents. This allows me to battle test internally before releasing code to the wild. It adds some time but largely it's part of my regular work unless something breaks badly. (I also run multiple agent teams simultaneously and do staged rollouts to reduce blast radius of the latter)

This method also helps with the classic problem of being unable to identify essential complexity up front.

VCFundedGenYer#
no time is actually saved with LLMs. You spend more time testing or stepping on rakes finding out what it screwed up.

This is why LLM coding fails.

worstthread#
Are we seriously, no cap, on the techies website, asking what did we gain from more testing?

This truly is the worst thread on HN. Now we're down to explaining 102 topics. Geez guys, what did we gain from evading regression errors? Who knows!

michaelt4 replies#
I find the problem with "lots and lots of testing" as a solution - (assuming by that you mean lots and lots of automated testing) is it invites lots and lots of lines of code - making code reviews even more challenging.

If someone finds it burdensome to review my 50-line AI-generated bug fix, adding 200 lines of tests only gives them more lines to review.

AnotherGoodName2 replies#
Might be a little controversial to say this but automated tests can be reviewed at a lower bar than production code.

I have no shame in accepting vast quantities of ai generated automated tests at review time without really paying attention to them. It’s better to spend more time on the core implementation.

Silhouette3 replies#
I have no shame in accepting vast quantities of ai generated automated tests at review time without really paying attention to them.

I respectfully disagree. IME writing a good test suite is one of the areas where current LLMs perform worst. They certainly like to write plenty of tests but those tests aren't necessarily adding much value and they don't necessarily cover the important functionality.
Given how heavily LLMs and specifically agentic workflows still rely on producing something vaguely correct and then iteratively applying guard rails to reach something that actually works I humbly suggest that trusting a very substandard test suite to be one of those guard rails might be unwise.

Continue this thread — 3 replies

ThrowawayR21 reply#
Accumulating tech debt in the tests will come back to haunt you in the long run when tests become harder to maintain or less reliable as the project evolves.

Continue this thread — 1 reply

rgoulter1 reply#
You want tests to be obvious "at a glance". And then some of the tests should at least indicate it's covering (for the most coverage of the system it reasonably can) the cases we care about.

The name of the test should indicate what it's doing.
For unit tests, these should check only one thing, and the test can be structured into "assemble, act, assert" style tests.
On the implementation side: code which touches state is tricky. -- So, minimize the amount of code which touches state (or rather, shift as much code as you can to stateless code, which is easier to bring under test).

hgomersall1 reply#
So how do you test that gnarly function that outputs a long series of states that interact with each other based on order in non obvious ways? Like, say, a compiler?

Continue this thread — 1 reply

roncesvalles5 replies#
I take the complete opposite approach which is to have zero unit tests now, because LLMs are excellent at both reviewing code to understand what's going on, and also doing manual QA given environment instructions. Lots of unit tests will just bloat the context which ultimately dilutes the quality of the LLM's work and also creates additional work (it has to update the code and the tests each time).

Unit testing imo is pre-LLM. It was mostly to keep the human honest because the human can't possibly read all the code to make sure nothing broke.

nixon_why695 replies#
I'm flabbergasted at this comment.

Are you maintaining a list of all invariants you want QA'd by the LLM after each change? How many tokens does this process take?

Continue this thread — 5 replies

maxnevermind#
> LLMs are excellent at both reviewing code to understand what's going on ...

Have you ever worked on existing code base that has components that makes no sense but must be there?

orthogonal_cube#
> Unit testing imo is pre-LLM. It was mostly to keep the human honest because the human can't possibly read all the code to make sure nothing broke.

What?!
Unit testing was to ensure the code operated according to an intended specification or outcome especially when it deals with a complex support matrix. It extended well beyond the codebase itself! You can have language errors where output behaviors differ between one supported version to another (ex. Java 11 vs Java 17), runtime errors that are specific to operating system quirks (ex. RHEL 8 vs RHEL 9), or workarounds added to your codebase for known bugs in different dependency libraries you support at compile/run time (ex. Net-SNMP 5.2 vs 5.5). It wouldn’t matter if someone read all your code; you would still have the potential for errors caused by the components needed to run your software.
If your project doesn’t have to worry about these types of issues then lucky you and continue on without unit tests for as long as you can.

worstthread#
My name. Your fault.
perlgeek#
I think it really depends on the language and the project.

The more types of potential errors your compiler catches, the fewer unit tests you need. Haskell needs fewer (and potentially different) tests than Perl or Python.
The other thing where unit tests really shine is testing a complex algorithm. If you think of a problem with a very well-defined output (like sorting, searching, some types of computation, graph algorithms, geometry problems etc.), then it's pretty easy to come up with a stable API and thus stable tests. I'm pretty convinced that unit tests give you more bang for the buck than plain-English test plans that you need to spend tokens on to evaluate.

henrymerrilees#
Where it suits the problem, higher leverage testing techniques are now more accessible than ever! E.g., property-based and metamorphic testing. It is now easier than ever to triage failing cases they generate and refine generation to be more useful. Following initial setup, the marginal overhead of additional cases is minimal.
AstroBen1 reply#
How do you test code that you don't understand?

Black-box e2e testing isn't suitable, or practical, for a lot of applications. Unit and integration tests generally require you to understand the code you want tests for, to know what to actually assert
Are you just trusting the AI to do it all?

Continue this thread — 1 reply

Continue this thread — 8 more replies

plastic04110 replies#
The comments are horrifying. They do everything they can to avoid reading the code they are responsible for.

You must read the code before shipping it to production.
"But I don't have time!" That's not even an excuse. At least one person in your company should be able to explain the code! How would you answer when reviewer asks why did you use this very algorithm?
"We have tests." They could help. But don't rely on them entirely because there's a high possibility that the tests are wrong.
I can't believe how many people proudly admit that they don't read code. I'm not entirely against using LLMs to write or review code, but not even trying to read it should be prohibited. Someone responsible have to review it.
Edit: I know that LLMs are very good at writing code these days. My point is that this is less a matter of quality and more a matter of responsibility.

Aeolun1 reply#
> You must read the code before shipping it to production.

No you don't. You just need to be reasonably certain it works to specification. That was always the case, with or without LLM generated code. If anything I now have a lot more confidence in some of the code produced because the lower bound has become the LLM.

blub3 replies#
This profession really needs to be shaken up by regulators.

Releasing something to customers which hasn’t been reviewed by any human is gross negligence.

jlawrence68092 replies#
What makes you think people aren't "reviewing" what they ship to customers just because they don't read the code? If the testing goes well that may be all the "review" required.

Continue this thread — 2 replies

rTX5CMRXIfFG#
You want to regulate an industry 90% of whose output is just a bunch non-critical CRUD apps? You haven’t thought out the macroeconomics of that, you’d go hungry faster than you’re being obsoleted in the age of AI
aiisjustanif#
To be fair, while the threads don’t show it, majority of companies that survive by processing payments. Shopify, Airlines, Rental Car companies, Banks, etc. are still doing and generally can prove at anytime 2 party review is happening on any PCI related code. It’s just that many people don’t work on that, and regulating a new feature for the ESPN Fantasy Football service seems silly.
spongebobstoes3 replies#
why does someone have to read it?

we don't read the assembly code produced by the compiler, nor do we read the code of all open source dependencies, yet we can successfully build software

bigstrat20032 replies#
Yeah, that's because those things are either deterministic output, or produced by someone that was actually good at programming. LLMs are neither. If you don't read every line of code they produce, you are committing professional malpractice.
jaggederest#
LLMs, natively, are better at programming than nearly every professional software engineer, full stop. There are a lot of meta tasks (not programming, software engineering) that they are worse at, but the actual programming part, they've transcended human potential.

You have to treat them like an ignorant junior engineer in nearly every respect, but trying to match with them at programming per se is a fool's errand.
The reason to read the code is not because you can catch their errors in programming. It's because they may have missed the forest for the trees at the operational or strategic level, and so that you can learn from them to understand better. It's like trying to beat the engine in chess now.

cdelsolar#
no you're not lol. You're managing a team of ever improving engineers. Opus 5.5 is almost paranoid about testing literally all its assumptions. It's already a better coder than me and I've been doing this for 30 years.
plastic0411 reply#
I don't understand why so many people bring up compilers. The reason we don't have to* read the code of compilers or oss libraries is because the developers who created them have reviewed it to ensure that it works. But if you don't review your own code, who will?

* As long as it works

spongebobstoes3 replies#
code review isn't why programs are correct. careful testing is

Continue this thread — 3 replies

userbinator1 reply#
we don't read the assembly code produced by the compiler, nor do we read the code of all open source dependencies

When you actually have to debug, you sometimes need to.

Continue this thread — 1 reply

Continue this thread — 8 more replies

i2km3 replies#
What I don't understand is that for most SE jobs on mature codebases, writing code is maybe 5-10% of the work. And it's that 5-10% coding that keeps you 'grounded' in the code and keeps your tacit understanding up to date.

Get rid of that and you get a basically invisible productivity increase (call it 10% to be generous) but you've now lost tacit understanding. No amount of half-assed code review (or getting the LLM to generate "code quizzes" etc for you) is ever going to substitute for the tacit understanding you get from doing the 10% of coding yourself.
I really just don't get it. I mean, I can believe that using coding agents gives people a rush of power and fleeting illusions of increased productivity, but it's a mirage.
A lot of the comments here are trying to find some middle ground, i.e. trying to find some way to preserve tacit knowledge. But it seems to me that it's a waste of time. You either need to write the code yourself or completely give up on even reading or attempting to understand it. I just don't think there's any middle ground. Any well-intentioned attempt to preserve understanding of the code will fall afoul of human laziness and understanding drift

Continue this thread — 3 replies

4ndrewl11 replies#
This is how every product manager feels every day.

If you're an LLM prompter shipping products, you're outputs are more akin to a product managers, not an software engineer's.

Continue this thread — 11 replies

Load more comments