AI generation when writing software is a false economy. You are replacing writing code with code review. Code review is harder and requires you to already have an understanding of the domain which often means that you would’ve even able to write it yourself to begin with. If you code gen something because you don’t know how to write it yourself, you by definition cannot review it without going though an effort equivalent to writing it yourself in the first place.

Unless of course you don’t care about code review and so doom yourself into treating software like magical incantations that break randomly for no perceivable reason; but no good mage would do that, surely.

@mary what if I told you that is tue intention all along?
@mary I got so frustrated by CoPilot yesterday in VS Code. It was suggesting full pages of code that was technically correct but not the approach I was intended to use. Switched to a different editor.
@mary absolutely, I've been chanting the same is true for ai art / assets. Companies who onboard ai art even without laying off artists directly, will change their function to be asset reviewers in the pipeline, checking models, removing a 6th finger here and there etc.
This has already been the case for buying asset packs from the store, just with higher reliability.
the work still need to be done, the only thing org is replacing is the creative part of the job (engineers and artists alike)
@mary
Same problem as with outsourcing:
Yes, writing the code becomes cheaper, but the effort for review and quality assurance results in overall higher costs.
@wakame @mary I’m fairly certain our clients are paying more because of the outsourcing because I just spent weeks explaining how they needed to pin the correct certififcate. Weeks.
@mary this is basically what happened in the Warhammer 40K universe - progress stopped, the technical class no longer know how their machines work, they just perform the old rituals

@mary Totally agree on the core message.

Every once in a blue moon I do I find uses for AI in coding though. But each time I'm annoyed by how silly the reasons are that it's useful: Like figuring out how to use an API when its official documentation is so abysmal that it gets more in the way than anything else.

Similar cases are languages without modern syntax and poorly designed libraries. AI being a bandaid that helps, but I'd much prefer the underlying tools being improved instead :(

@mary besides, if you're a coder, writing code is a lot more fun and engaging than reviewing it.
@outlyer @mary This. If you don't want to develop software then why did you become a software developer?
@mary its like making a text generator write assembly, i think the only place this can be used freely without harm is on things like browser javascript that cant fuck up things fr. but in other cases (SPECIALLY ON MECHANICAL STUFF) is shoting on your legs using code writen by a machine and reviewed by humans, we already have too many code writen by human and reviewed by human that accidentally harms people
@mary in simple words:
Code written by person = less review time
Code generated = more review time
@mary Gilt für alle Anwendungsbereiche, oder?
@mary writing code with generative ai seems so obviously stupid to me, and I don't know how anyone could think it's a good idea
@mary Management: magical code incantations will save money? Fire those programmers!
@mary I'm just getting started with github copilot, but as a platform admin rather than developer, I'm finding it useful in smaller ways. Create a few tasks for an Ansible playbook, create a function for a script. Of course we still need to review and test, but it's a jump start on the process.
Yes, we still need the skills, but if it shaves off an hour a month it's paid for.
@mary to add to it: the more you only do reviews (and not direct coding) the harder reviewing becomes. Reviewing is easier if your are also writing software regularly. That keeps you sharp and up to date.
@mary
No good mage, but a rogue disguised as a mage might try to pull it off for as long as they could.
@pluralistic
@mary People can't use bots to jump over their heads. But that doesn't mean you can't use a bot to jump. I've been reading other people's code my entire career, I'm good at it, the bot is a net benefit. It is a 100% change to workflow, so anyone who sincerely tries it will have to be comfortable with their cheese being moved. If not, text editors still exist, no one is taking that away from anyone. If someone wants to be a modern day John Henry, we'll sing your ballad.

@mary agreed, code gen shifts the work to you colleagues

I would love for merge requests that are written with ai assistance to be tagged so i know to review them more carefully

@mary don't get me wrong but, haha, you think datacenters run without a good supply of incense and prayers? You think no programmers ever copy anything from stack overflow without truly understanding what it does?

I mean I get your point and partially agree, but I think you underestimate how much of this world already ran on thoughts and prayers and reboots and incantations and questionable copy pasted code, way way way before LLMs were even on the horizon :P

@anthropy @mary The difference is. 1 youngster developer doing that until it hits his face vs. its the standard of programming.
@lindworm @mary partially agreed! but also here; I think the majority of developers are actually juniors, even excluding the fact that any senior developer is a junior in the areas they're new to (and they generally do like exploring new things instead of doing the same old), so this stuff is a lot more common than we're willing to admit heh
@anthropy @mary I can tell you from the experience of a developer working 30years in that. Nope. Sure we copy and paste but we do not miss the third step. And check! once it has hit you to be reckless, you will never do it again. If you on the other hand get code generated by the computer you are scientifically proven to value its correctness more that that of human writers. Even with obvious errors.
@lindworm @mary I mean sure, I think we all try to verify what we copy paste in a sense, but if you dont actually fully know the exact parameters a certain function accepts, and e.g someone else makes a subtle off-by-one or bits-instead-of-bytes kinda error and you copy paste it, then really it doesn't matter where it came from, that problem will persist until e.g the compiler/linter/IDE/test suite/etc yells at you, and if it doesn't, you got yourself an OpenSSL Heartbleed or whatever happening😅
@anthropy @mary Also if you copy and paste from stackoverflow, you copy small snippets and most of the time not complete boilerplates with bogus (malicious) library inclusions.

@anthropy @mary I get more and more code on my desk that is entitrely written by ai and has bugs, deasdtracks, datadumps and all shit in it, that the "developers" do not find anymore. "Oh it calls a library, no clue why and whats it doing, but it will be ok!1!!"

There is a shift to "Its to complex to understand, ahhh computer knows better".

@lindworm @mary I don't mean to exclude there's definitely a whole wave of people who know actually nothing and try to wield a new tool not made for them to build things they truly don't understand, like fools with hammers, thinking they see nails everywhere. I do very much agree you need to read and understand what you're copy pasting-- I'm just saying that this is not an absolute thing, and we are all prone to failure, and expertise and seniority doesn't imply perfection, including in copying.

@anthropy @mary Indeed we are, but you would not let a youngster or an untrained person work on an atomic bomb :-) In IT that has become a normality and we put gasoline on that dumpster fire with AI.

Seniority does in fact not imply perfection, far from it. But it always includes experience :-)

@mary Reality: Codereview? No time for that, call me when you found a bug.

In general, when it comes to cognitive effort, it is easier to recognize a correct solution than to produce it yourself.

Code review is tedious for sure.

@mary

@mary more useful to help you imagine automated tests imho
@mary Very well put. The hard part about coding isn't one person making something work. It's about a team consistently collaborating to express user needs and an evolving shared understanding of a system. LLMs make the easy bit easier and the hard parts harder and harder.

@mary I actually sometimes use it the opposite way, I ask the LLM to write the docstring for my function, with the objective that its description of it will make me think about it better and double check its conclusion, potentially finding things like a confusing interface and unforeseen corner cases.

Not perfect, but useful.

I sometimes use it to write code when indeed, i don’t know enough about the language or technology to do it myself, and indeed, it requires a lot more iterations.

@tshirtman @mary I am quietly hoping that using ai to generate docstrings will transform code docs. Because there seem to be few forces stronger than the desire to correct an incorrect statement.

@mary Good developers review their own code. Just writing code and not reviewing, is like gen AI, with the false sense of confidence.

Writing code + reviewing own code ≈ reviewing others code (initially). Getting better at reviewing others code is the skill to sharpen.

@mary But it will write good code testing--if you can spec out what you need, it'll write its own code testers. Which should be what reviewing is doing anyway, right?
@mary this is a good take. I was doing code review where a colleague used gen AI to write some code where I didn’t have much domain knowledge. When I asked them to explain why they took the submitted approach they were unable to. So now rather than code review ensuring multiple people understand what’s going on, either nobody does, or most of the work is pushed onto the code reviewer.
@mary sounds like a sorcerer problem imo

@mary

I'm not sure. It actually seems to work as a more tailored version of stackoverflow, *especially* when starting out in a language.

A friend tested it recently for a straight-forward use case in a language he was not familiar with.

Even with some errors, just having a code example that got the syntax mostly right, included the libraries for this kind of job and called the interfaces for this kind of task was a big time saver compared to starting from scratch.

@z3r0_geek creating more code is the simplest and least time consuming part of solving problems with technology, and the part that must be executed most judiciously because of the ongoing cost incurred in carrying the code that has been created.
@hugo @mary Same goes for proofreading.
@hugo @mary The worst part (besides that 240h debugging is more accurate) seems to be the "code is a mass noun" battle has been thoroughly lost, hasn't it?
@sehe honestly I'm resharing this and figured it was probably just a bit of a typo 🤷
@hugo No worries. I know you didn't write it. Yeah, no that ship hath sailed though... This "typo" is improbably common (say on reddit, stackoverflow, github, etc). As a reluctant descriptivist I will have to admit that ... program code is no longer only a mass noun. ¯\_(ツ)_/¯

@hugo @mary

In the days before OpenAI, we had our own "code generation" problems: all the cut and paste we reduced to DRY.

But if we needed something quick, we'd look at each other's implementations for guidance, which were sometimes Quite Horrible. Come code review time, that sort of thing had to be pointed out....

@tuban_muzuru the challenges with LLMs of course being (a) the rate at which they generate new code, (b) even less of a chance that the user (LLM user vs copy-paster) has an idea of the problem or how the code is supposed to work, and (c) the "plausibility problem" of the level of subtlety that can sneak into the code as a result, pushing the complexity and duration of review and other activities much higher.

@hugo

I'm a beta tester for Bard->Gemini. They aren't good tools for code assist - yet.

What they need - and in the case oif Bard->Gemini - are getting - is expert system and rules-based backstops, which can issue authoritative answers.

@mary This points at what is going to be one of the major interesting research problems going forward: developing new programming languages that are optimizied for reading comprehension/review instead of being optimized for writing.
@mary So many times I have chosen to rewrite someone elses broken code than try to fix it. Every time I did it turned out to be faster.
@RueNahcMohr @mary I've found that true when rewriting my own.
@mary i tested copilot a few times and this is why I turned it off pretty quickly everytime. It just spew out so much stuff and I had to constantly switch from writing to review mode and it usually was not worth it...

@mary I see two possible outcomes from this:

1. People notice and accept that LLMs are not helpful for developing working software.
2. People get used to very bad software that breaks all the time for seemingly random reasons.

I'd say it depends on the extend to which corporations are held accountable for the harm that their insecure, unmaintainable crap software will be causing.

@mary It's always harder to read code than to write it.
@mary have you never assumed during code review that the author mostly knows what they're doing?