This is why I believe we're going to need better tools for reading and exploring codebases

"Writing code is easy. Once you have a solution in mind, and have mastered the syntax of your favorite programming language, writing code is easy. Having an LLM write entire functions for you? Even easier. But the hard part isn’t the writing. It’s the reading. It’s the time it takes to load the mental model of the system into your head. That’s where all the cost really is."

https://idiallo.com/blog/writing-code-is-easy-reading-is-hard

Writing Code Is Easy. Reading It Isn’t.

Writing code is easy. Once you have a solution in mind, and have mastered the syntax of your favorite programming language, writing code is easy. Having an LLM write entire functions for you? Even eas

Ibrahim Diallo Blog

It's another way in which LLMs reflect the misprioritisation in dev learning, itself a reflection of the economic dynamics.. we always focused too much on writing code over reading it, and this production line mentality is why anyone would believe a machine that generates code could replace a developer

We're having to fully articulate the skills in building software for the first time

@sue "We're having to fully articulate the skills in building software for the first time" — very true! I think that believing an AI can do a job correlates strongly with having little or cursory knowledge of what skills the job entails. People who think therapy is just being a conversation partner think AI can be a therapist; people who think being a radiologist is just interpreting x-ray images think an AI can be a radiologist.

@sue

This is my confusion when I talk to people who have been "learning vibe coding" I have them describe what they did and it seems they have an LLM write some provisional code for them then they revise it and fine tune it so that it does what they want.

Which is just... coding. Do they think people code without looking at examples, libraries, specifications?

If they don't do that second part then they probably don't have a program that does what they want and they did not do any coding.

@futurebird Totally, using this stuff successfully is in practice indistinguishable from coding..!

@sue @futurebird

A lot of vibe coding statements sounded to me like a slot machine:

They look at the end-user visible properties (e.g. the GUI or some desired result), then pull the lever again if it's not what they want.

If vibe coding was generating a simple prototype (with the understanding that it needs to be cleaned up and checked and refactored and so on), so they have something "tangible"... I think I would be totally okay with it.

@wakame @sue @futurebird it is a slot machine, however the payouts are quite consistent. And the big failures are due to missing my intent.

But a lot of those cleanups are also achieved via the llm. The places where I have to go back in and “hand” code corrections are getting smaller.

@Jmj
Really? The thing ignores parts of my promt regularly and/or just proposes terrible solutions. I started just asking for very specific things by now, and then copy pasting code and debugging myself - just because "hidden" unintentional changes take so much time to fix. I have a small part of an app that I code using LLM, and I am so glad I can do the rest with low-code.
@wakame @sue @futurebird
@sue @futurebird except, in my case anyway, I generate 10x as much code than if I’d written it without the #llm

@futurebird @sue 💯

I think the refining, looking at libraries, examples, specifications is a thing that’s been made so ancillary and incidental and individual. As if it’s as a weird thing only you do, that no one else does, which is maybe even a distraction from the real work of TYPING.

We’ve taken the part of the work that actually allows working software to get made and de-languaged it. We’ve made it the elephant in the room

@anthrocypher @futurebird @sue

All this!! It’s weirdly disorienting to have people •finally• yelling from the rooftops the things I’ve felt like a voice in the wilderness trying to teach for the last 15 years.

@inthehands @anthrocypher @futurebird oh lol hard same, it's painful but also kind of cathartic to see how clearly what we've known was wrong with coding education play out like this

@sue @anthrocypher @futurebird

Totally! Cathartic and also heartening to know that I wasn’t the only one advocating for some of these ideas after all.

@inthehands @sue @futurebird idk y’all, we keep on our beat and it’s possible the rise of LLMs in software creation can be an opportunity for driving forward what was always most human in all this

@futurebird @sue The distinction, I think, is whether the example contains a hidden footgun.

When you are searching out examples the old way, you have (potentially) a lot more context to evaluate trust:
* who wrote it?
* what was it for?
* what assumptions does it make?
* what issues / comments did people have with it?

With an LLM, as far as I know, the only context you get is, "the model predicted this as the most likely output for my prompt and any system prompt it has."

I'm a noob though.

@futurebird @sue yes totally agree it’s just coding by another name.
But I do think there are two extra things going on. One is that the vibe part, you are feeding the llm very high level descriptions of the intent, not move value A to location B level stuff. And two the coding part, feels much more reading/reviewing code with small tweaks. You’re not generally banging out 100s or 1000s of lines of code.
(Note to self… read original post in thread before replying 😉)

@futurebird @sue
I dunno, this actually makes more sense to me than any other description of 'vibe coding' I've heard.

Some people really struggle with "the tyranny of the blank page" and will always start with a template or tutorial even if it has no relevance to what they're trying to accomplish.

@apLundell @sue

Also let's not act like horrible programs that are a bunch of libraries and functions all smashed together by someone who doesn't totally understand what they are doing without regard for elegance or efficiency is anything new. It's just what happens when someone tries to solve a problem with code that's beyond their expertise in programming or experience with those tools. It can also be a step towards learning.

@apLundell @sue

Go for it! Just... please not with anything important that other people will count on. Control the lights in your house or something.

@futurebird @apLundell That's where my mind is at too, it's another wave in the dependency-driven way of building.. And I really want to spend time working on learning pathways that start with code someone generated
@futurebird @sue I wonder if the success of "vibe coding" (for some value of "success") is a sign that our systems have just gotten so big and unwieldy that no one can wrap their arms around them anymore. That we need those starting examples more than ever.

@sue

Thank you for bringing this up. The blog's money quote for me:

"You'll notice that programmers often want to rewrite things from scratch, because 'the old code sucks'. What sucks is taking the time to read and understand it."

(Even though, even after you read and understand it, the old code still might actually suck!)

@sue

The first time?

The Open Group certifications at the senior levels articulate the skills well, and require both deep technical skills and interpersonal and industry skills for understanding requirements.

https://www.opengroup.org/certifications

Certifications

www.opengroup.org
@EricLawton congrats on your patronising input, hopefully there's a certification for that too

@sue

You don't think that it's patronizing to assert that only now have we recognized a problem and begun to address it, when people have worked on it for decades?

@EricLawton Picking flaws in what was clearly not the main point a stranger on the internet was making does not bode well for those professional skills you keep referring to, don't post in my replies again

@sue I'm yearning for tools like that, especially ones that can show me the blast area of an addition to or a refactor of the code base neighborhood it's applied to. Something along the lines of "I see you updated this thing here, please be aware that you'll also need to update those things over there."

Are you tracking any existing/new tools which meet your vision?

@simeon Not yet, am hoping some of the ai money will end up being spent on this stuff because it's otherwise totally unsustainable..
@sue absolutely! Or as my mother put it in 2022 ... https://hachyderm.io/@graham_knapp/109586631353219012
Graham Knapp (@[email protected])

me, a professional software engineer: <explains the use of AI coding tools> my mum, an 81 year old retired biologist: "I suppose that means debugging is going to be an even more important skill in the future." me: 🤯

Hachyderm.io
@sue tbf most of the LLM coding tools have “explain this code to me” features. of course there’s a risk that relying on this too much will give you a warped or shallow mental model. but i don’t think it’s true that the tool designers have not thought about how to help with understanding.
@shiftingedges I do think those features are helpful but asking a chat prompt to explain a codebase only takes you a tiny fraction of the way towards understanding it
@sue yeah sometimes i think of LLM-assisted coding as more akin to the introduction of stack overflow than as a phase shift in the craft. it really can save hours of frustration and confusion! but it can’t save you from having to think about what you’re doing. more than half the battle is learning to ask the right questions.
@sue i remember i once wrote a program in avr assembly and python (well, wrote one and modified the other to work with it) and my friend seemed surprised at how quickly i wrote it, but the thing was that i was thinking about how it would work for days before i actually coded it. Figuring out how it should all fit together is the difficult part, not the coding.

@sue

As I worked through my IT career, I started by spending most time on coding and unit testing, from specs, under supervision of a senior developer. But over 15 years, that transformed into more time with industry people understanding requirements of end users, managers, their customers, security folks, IT admin, … and far less coding.

@sue

Some years ago, I started to use Rust for my personal projects. One thing upsets me all the time. The readability of other peoples code.

'cargo fmt' is used in most cases to format the code in a standard way. But this squeezes nearly everything into one line. A nightmare for myself, needing to parse the whole line. I often give up halfway and ignore the tail.

Another annoyance is the use of fancy keywords/methods.
For results, there are methods like .is_ok_and() or .unwrap_or_else(). These seem to be useful to write short code, which should be easier to read. But it isn't.
Every keyword needs to be parsed itself because there are subtle differences between each.

@sue

I use only 'match' structures for that. They look somehow ugly. But parts of the inner structure are actually visible without even reading a single word.

And if they really look ugly, it is a sure sign to tear them apart and split into more functions. Just from the structure.
It doesn't hide anything.

My next strategy for readable code is to only put one thing into a single line (with a couple exception).

instead this:
if a.pos.x > b.pos.y {do_stuff(var1,var2);};

I do this:
if
a
.pos
.x
>
b
.pos
.y
{
do_stuff(
var1,
var2,
);
};

Horrible for many others. Extremely helpful for myself.

@sue

I work with the code. I want to edit parts of it, copy paste parts of it, comment out parts of it. I will read it tens or hundreds of times and will edit it a couple of times in the next few years. I don't want to spend any time, stumbling over the same fancy keywords again and again.

It is more work in writing, which isn't much at all. And you need a good mouse wheel to scroll and knowledge of the comfort functions of your IDE.

In general, I exchanged convenience for a better fit to my mental model.

@sue

I had experiences, where people said aggressively, they will never help other projects, when the code is not formatted with the standard tool.
I can live with not getting any help. But being dictated how to write my personal code was a little bit much.

I don't want to have this compressed code. I could spit out hundreds lines of code a day, don't even need an AI for it. But I would never be able to read it again.

My projects are a craft.
AI doesn't know, what that is.

And AI can't help me reading my code. Because reducing something to basic vectors removes the important details.

@sue one of my sons doesn’t let the AI do any coding, just idea generation. He wants to improve his coding skills

The code I care about, I let the AI code and bug fix, but am inspecting every line it generates and correcting where needed

Code that I’m doing for fun, like a friend wanted an android app, and I don’t even have an android: I detail requirements and feedback bugs much like QA would do, and never look at the code… and I’ve done this approach successfully for two apps

@sue That's why excellent comments are so important ... even in your own work, let alone work that will be read by others. I am continually grateful for explanations that past me left for future me in my own code
@sue @hrbrmstr Yeah, I can understand why semantic tooling to work with code doesn't progress as fast as we would like to, but maybe it hasn't as much investment as it deserves.