So, what was up last week, when all of tech suddenly decided that writing software isn't good or useful or interesting?

Cuz, I gotta say, that sucks, and you're all wrong.

Like, I really don't get why so many of you are so eager to have statistical models write code for you.

I've been arguing for literally my whole career that the actual writing isn't the hard part of software development. But wow, did everyone take that in the wrong direction recently.

Understanding the system is the hard and valuable part. And I genuinely don't know how you think you're going to do that if you never get to do any of the safe and easy interactions with the system.

The statistical model is super duper never going to do that understanding for you. That's literally, exactly not what they do. So why are you so eager to give up all the space where you can experiment and make mistakes?
To be clear, I was not soliciting stories about how good or bad the autocomplete is in your code editor
I'm going to mute this now
@jenniferplusplus my plan now is to let it play out. if I'm right, and folks leaning hard into gen and not the skills puts us out past understanding, it will suck, a lot. maybe already happening. in the end I will make a LOT of money doing neverending incident command 🤷‍♀️
@renice But the role I want to play in society is to build things that help society. Absolutely no shade to the firefighters, but I want to do my volunteer rotation and then cycle off, not firefight constantly forever as the world grows ever more flamable.
@jenniferplusplus totally, I work to bend things back to sustainable. much preferable. also. if and when various house of cards crumble, I have a unique set of skills for that situation that will ensure I can eat and try again
@jenniferplusplus the one benefit I've found is that using it to spit out examples of obscure Win32 API calls can be quite helpful, although I wouldn't actually copy paste the code itself.
@bitflipped @jenniferplusplus I haven't had much success with even getting examples from it, but it has given me useful answers to questions of the form "Do BeOS and Haiku have a native API for X?" when just searching the documentation has run up against the fact I used a different word to describe something. It generally spits out code that has no hope of compiling but contains references to what I need to look up.
@jeremy_list @jenniferplusplus yeah that's pretty much the same as how I use it and the results I get. I don't use it for .net stuff, but when talking about the more esoteric Win32 API calls, some of them can be poorly documented, so it helps point in the right direction.
@jenniferplusplus Show me a statistical model that can debug, and maybe I'll be impressed, right?
@jenniferplusplus This: “if you never get to do any of the safe and easy interactions with the system.”
I’ve been wondering how to convey to people how important this is.
@jenniferplusplus and understanding the system is usually genuinely fun!
@jenniferplusplus @scottjenson I've been playing with copilot and I have found some genuine uses for it:
1. It uses context like comments and other lines of code and acts as an autocomplete++. If you have some repetitive code with some changes in variables it will pick up on those and make changes needed. In a docstring I wrote if a variable was 1, 2 or 3 bytes. I wrote the code for 1 byte and then copilot wrote the code for 2 and 3 bytes and correctly adjusted the asserts and encodings.
2. It has a clever way of looking inside functions and open tabs to write actually good comments about the code you are referencing. A few times have I found that it wrote the exact non-trivial comment that I wanted to write.
@jenniferplusplus @scottjenson That being said it most of the time fucks up and misses completely 🙄
@matzipan @scottjenson As I said elsewhere, using AI to write code for you is the software dev equivalent of sitting behind the wheel of a self driving car. Just waiting to take responsibility for when things go wrong.
@jenniferplusplus @scottjenson Of course. To the same extent that if autocomplete gives you the wrong thing and you press enter its your fault.
@matzipan @jenniferplusplus @scottjenson But isn't the right way to do this to... not write repetitive code. Copilot just makes writing bad code easier.
@matzipan @jenniferplusplus @scottjenson And regarding comments: If you can deduce the comment from the code, that's a useless comment. Either re-write the code to be more obvious or document the ideas/design decisions behind it.
@ljrk @matzipan @jenniferplusplus @scottjenson How much time should I spend deducing, when the comment could just say it?

@dr2chase @ljrk @matzipan @jenniferplusplus @scottjenson It's pretty important to avoid noisy comments, IMO. The vast, VAST majority of useful comments I've ever written or encountered (only some of which I wrote earlier) have been about WHY the code is there and written the way it is. Even for abstruse "clever" circumlocutions where you write down what that impenetrable snarl does, you're stepping all over your own hair if you don't also explain why you had to create the Gordian knot in the first place.

I mean, write down what whole blocks or functions do, sure -- by all means, document your API properly -- but comments are much less impactful and much easier to skim past if there's too much spurious chaff about what the code does tanking your SNR.

@Llammissar @dr2chase @ljrk @jenniferplusplus @scottjenson I am not sure if you're replying to me but I agree and this was one of those situations where it didn't simply parrot out "this function increments by 1" but it somehow parroted out a higher level meaning of the code.

@Llammissar @dr2chase @matzipan @jenniferplusplus @scottjenson Yup. If the code is hard to read, a comment is not a proper fix, fix it in code instead.

Code should be as expressive as possible and only things not able to be expressed in code should be written in comments. Otherwise you also easily run into wrong comments which were either wrong from the start or became wrong due to change anomalies resulting from the redundancy: If comments contain redundant information, a change in code may forget to update the comment and result in misleading comments.

I do admit, this is maybe a bit tainted through my background in code audits/security. In my experience, most comments are just wrong. And in many cases dangerously wrong. But reading those comments could mislead the reviewer to think the code was right. At some point I started stripping comments from code pre review because most comments are just distractions from the real problem and not design explanations – which they should be.

@ljrk @matzipan @jenniferplusplus @scottjenson I'm also a bit confused by this. If you mean you can change a variable name one place and have it change everywhere else, refactoring tools can also do that. But yeah, if you have duplicate code, the solution isn't "automatically update all the other places this code appears", it's "extract the duplicate code to its own thing", and again, refactoring tools can mostly already do that.

@cratermoon @ljrk @jenniferplusplus @scottjenson

No I am not talking about refactoring in this case.

But anyway, abstraction of repeated code does not come for free. It always comes at the cost of code understandability. I think this article (https://overreacted.io/goodbye-clean-code/) had an example of exactly what I mean.

Goodbye, Clean Code — overreacted

Let clean code guide you. Then let it go.

@matzipan @cratermoon @jenniferplusplus @scottjenson I know the article but the problem here is a different one: The abstraction was bad. A good abstraction requires deep understanding behind the principles of the algorithm, why it was "repetitive" and how this can be properly modeled. Simply pulling out functionality and splitting code because of length is bad. Maybe the data structure choice was wrong, maybe things weren't properly (de)coupled, ....

Let's say it this way: Length of functions, duplicate code, etc., are indicators of bad code: But short functions without duplication are not implicating bad code.

@jenniferplusplus
I agree, and I would have so many more than 2 nickels if I got a nickel for every time I argued the same. Unlike the meme. I would have so many nickels.

@jenniferplusplus Precisely. Writing code is the easy part. Verifying that it actually does what you want, plus what you think you want is actually what you really want... and engineering the whole design behind it, that's the difficult part.

Of course you can automate the easy part, but that's... a microoptimization not worth the huge cost. Especially since it comes at more debugging overhead.

@jenniferplusplus listen lady, we don't have time asking ourselves whether we should, as long as we're still preoccupied with whether we could, so why don't we circle back once we've successfully made everything even more awful and broken than it already is!

@jenniferplusplus so far the only thing I've liked is the fancier predictive text I've seen in VS2022

Mainly in reducing some tedious typing. For example if I type

thing.x = other.x + logic

When I type a line after starting with "thing" it'll usually predict

thing.y = other.y + logic

It still gets things wrong a little too often for my liking but reducing time spent on boring stuff is useful IMO.

@jenniferplusplus what we should be doing with this tool is automating the meaningless act of typing the code while our job as programmers should be the hard part: building a mental model of the program and transcribing it onto the machine.

Asking an LLM to write code to sort this dataset with a regex that selects for whatever seems like a good use to me. It's an annoying and menial thing to actually write code for, and I have better things to do!

That said, I refuse to use LLM code tools

@rolenthedeep That's exactly what I'm saying we should not do, please read the words I wrote

@jenniferplusplus sorry, maybe I'm talking about something tangential. Maybe I'm imagining a much narrower use case.

I would use an LLM for the kinds of code I usually write a script to generate. Serializers, boilerplate, class definitions with dozens of overloads, giant switches, rewriting strings as char arrays. Meaningless trivial stuff that's really just text more than it is code.

I guess that's really what I mean: using an LLM to generate the text, not the code.

@jenniferplusplus but I'm also assuming a skilled programmer who has already learned everything you can learn from packing a structure into a byte array. I could easily see new programmers getting wrong ideas from this.

I think it should be a tool like our IDEs generating boilerplate and nothing more

@jenniferplusplus unfortunately, some people mistake effective automation of the menial bits with effective automation of the entire thing
@jenniferplusplus omg, junior devs at our shop are using it like crazy. I'm not threatened by it at all, but I do worry people don't have a thorough understanding of the code they are using. Is that unreasonable?
@veirling That is exactly the correct concern, and is in no way unreasonable. If anything, that concern is too restrained.
@jenniferplusplus Thank u. Agreed. I'm getting more assertive about it. I don't like the solutions coming from ChatGPT. Dogsh1t really. Also? What about the joy of solving these problems. We freakin' get to work with puzzles everyday. How cool is that?
@jenniferplusplus That's the part I really don't get. I've been writing code for 25 years and still learn so much by lazy as stepping through the debugger.
How will people learn debugging and resolving corner cases if they let just generate the code by LLMs....
@jenniferplusplus I’ve used ChatGPT to write numerous things that I’d probably have failed to write if I relied on on Google/StackOverflow. 🤷🏻‍♂️
@jenniferplusplus I've gotten decent unit test code out of them.
Which is not the part I enjoy or the valuable part.
So, that gives me more time to get the interesting parts right.
@jenniferplusplus I’m just happy I don’t have to google how to read a file line by line anymore 😂
@jenniferplusplus oh! it's like moderation! where you can automate increasingly large parts of it, but by doing so you make the parts that can't be automated increasingly unpleasant, til doing it for a few months pretty reliably gives people PTSD.
Preventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc)

YouTube
@jenniferplusplus it doesn't really appeal to me either, but i sympathize in some ways: there's plenty of boilerplate for example. but personally i'd rather come up with better APIs, frameworks, and languages rather than automating the creation of boilerplate using a opaque, nondeterministic completion tool.

@alysbrooks I'm not sure why scaffolding boilerplate code would benefit from a multi billion parameter probability model built from stolen labor and paid for in climate catastrophes.

That seems like a job for a templating system

@jenniferplusplus right. i sympathize with people who find that use case appealing, but i don't think any perceived or actual benefits of handling boilerplate outweigh the downsides and they definitely don't justify the moral issues.

@jenniferplusplus

But now thanks to this technological advancement, managers can write firewall rules without needing security people!

https://github.com/eunomia-bpf/GPTtrace

What could go wrong?

(edit: above is only for tracing and the GPT is providing a good head-start, I'm half-trolling)

GitHub - eunomia-bpf/GPTtrace: Generate eBPF programs and tracing with ChatGPT and natural language

Generate eBPF programs and tracing with ChatGPT and natural language - GitHub - eunomia-bpf/GPTtrace: Generate eBPF programs and tracing with ChatGPT and natural language

GitHub

@jenniferplusplus @gizmomathboy The wheel of saṃsāra keeps turning. 5GLs, expert systems, CASE, rapid application development, UML, OOP, microservices, low-code and no-code, machine learning… everything has a season of silver-bullet hype and then contraction.

Just toss copies of Fred Brooks’ work at the hucksters and true believers while you pick the mix that gets the job done.

@jenniferplusplus

Fire all your junior programmers to save money, run out of senior engineers as they retire. It's a great way to turn your business into a permanent vassal state of Google, Microsoft, or Amazon.

Provided climate disaster hasn't completely destroyed civilization by then, in 20 years there may be huge opportunities for anyone who can figure out how to resuscitate old machines and do ASM on them when the entire tech industry is destroyed by its own self-enshittification.

@jenniferplusplus I've said, "Domain knowledge is 80% of my job. The other 20% is searching for the syntax to do it, because I can't remember that shit."

@jenniferplusplus

This. I tried to have this conversation with coworkers lobbying to use MML to answer chat queries on our website, and absolutely failed to convey that somebody has to generate the data for the system to harvest, and then edit and monitor its replies.

& besides, who doesn't immediately type "Agent" when they start talking to a chatbot? ("If the answer to my question was on your website, I'da found it by now.")

@jenniferplusplus I most often than not find using LLMs to be more time consuming than helpful. Sometimes they get things so utterly wrong I regret "prompting" in the first place.
@jenniferplusplus The thing I don't understand is why would you not want to build the mental model of the code and the understanding of how it is all connected? Over time I've learned that the best way for me to learn is to do the thing. Not to give it away to someone or something else. If I see something interesting that someone else has done I want to try it myself to see if I can learn from it.

@jenniferplusplus yeah, between LSP and copilot I'm really not sure what all the buzz is about. Neither of these tools save me from the part of my job that actually involves burning large amounts of time.

In the case of copilot even less so because it isn't building new tools to solve difficult problems: it's trying to build something akin to what it has seen before and usually that's not what I aim to do.

If you asked an LLM to envision what dynamic, OS based instrumentation would look like 40 years ago it would not magically invent DTrace.

@jenniferplusplus Nailed it. Thank you so much for putting this into words.