One of the lessons I learned from going back to school for CS was to be suspicious of code that worked as intended the first time.

Writing unit tests before or concurrently was critical to discovering ways the code might fail and in the process understand how the program was operating.

The meta goal became to automatically distrust things that worked without anyone knowing why.

Why?

Because if you don’t know why it worked before you have no idea if it will continue working.

All of the above was, “Everyone knows” status.

And then LLMs came along and everyone seemed to say, “Actually, forget all that and throw your integrity away.”

The transformation was invasive and pernicious.

@CptSuperlative I think you're on to something significant here!

After almost 20 years of programming, I mostly write code that works as intended the first time, but that's because I write it in small increments.

Even without test-driven development, an essential part of software development is continuously exercising every line of code to ensure it works as intended. Programming and software design are "whitebox problems"¹: we know the design and can make sure to test all paths in it.

@CptSuperlative Conversely, using LLMs to generate code, turns programming and softwsre design into a blackbox problem, which means we no longer know and exercise all the paths, because we move too fast.

This is especially bad in agentic development, where it is a blackbox approach at a high level of abstraction. There are many layers of abstraction which we don't exercise properly.

Notes:
¹ Whitebox testing https://en.wikipedia.org/wiki/White-box_testing

White-box testing - Wikipedia

@CptSuperlative I think there's a strong argument somewhere here, about why LLM generation of code will result in lower quality, with uncertainties in security, data security, etc… but it needs a bit more fleshing out on the usage side: how LLMs affect the psychology of developers to stop them from evaluating all the code they write.

I think it's implied by the fact that most developers don't even properly read all the code they generate…?

@CptSuperlative (Also sorry for formalizing this in your replies 😁 I know I'm mostly restating and generalizing your very good point!)

@nielsa

No worries, I enjoyed it