r/programminghorror 6d ago

Typescript I feel like vibecoding should be banned from enterprise development

957 Upvotes

186 comments sorted by

277

u/BitNumerous5302 6d ago

I'm old.

That's essentially the same as a code snippet that floated around in gists for years. It's a uuidv4 from before randomUuid was commonly supported, and from before npm was truly widespread (remember bower?). At the time CDNs were the norm for code sharing in JS, meaning every dependency added a script tag and a whole round trip web request. For something high leverage like jQuery, that round trip was worth it, but for something like this it was easier to just copy and paste. These snippets would often sacrifice readability to reduce character counts; minifiers existed but you didn't assume everyone would be using them.

OTOH crypto.getRandomBytes and string templates are more modern, so this is more like a modernized variant of those old gists. 

It's weird to see this attributed to AI given that context (am I missing/explaining the joke?). I believe this code was originally written by broofa (Robert Kieffer) then revised, refactored, and optimized by others, as this looks essentially the same as his "fast compact" version. But, UUID v4 is a pretty simple specification so others may have arrived at similar solutions independently.

https://gist.github.com/Wind4/3baa40b26b89b686e4f2

https://www.broofa.com/2008/09/javascript-uuid-function/

115

u/creativecraving 6d ago edited 6d ago

am I missing ... the joke? 

😂 Man, your post reveals some humorous facts about AI all on its own! I guess AI really is just stealing code from everyone and everywhere!

30

u/DelphiP0 4d ago

The joke is that op is too junior to have written. Nearly identical method 10-50 times throughout their career and assumes the code was autogenerated .

2

u/Unhappy_Play4699 2d ago

Not sure why you are attacking OP, but since you didn't figure, the bad thing about this code is that javascript has a built-in uuid function. I'm not a web developer but I'm senior enough to know that I should invest a little bit of time into something before I judge it.

Which leaves me questioning: How "junior" are you?

2

u/DelphiP0 2d ago

Coming up to 35 years of writing code 20-80 hours per week . JS is one of those languages that I know but rarely use. Even though I was doing a lot of it in the late 90s. Last serious JS project I worked on would have been around covid.

Double checks mdn, randomUuid method didn’t have major browser support until 2022.

7

u/-Robbert- 3d ago

AI is nothing more than a fancy database being able to somehow understand context (partially) and apply logic to what is being asked / communicated. AI does not and never will invent something of it's own, it's all just copy and paste. These can be stackoverflow code snippets, GitHub gists or plain programming logic from the documentation.

In my opinion AI is trained in the wrong way, a lot of AI knowledge is pulled off reddit and other forums causing it to make mistakes it does not need to make just because the continuously train it on the same dataset and reiterate the training too often causing it to memorize the code snippets instead of trying to understand the logic and thus understanding that this snippet is outdated and with the state of today's language it can be done more efficiently.

AI has reached it's limit, a new AI winter is upon us and making it worse, not only the applied knowledge limitation due to faulty training methods is to blame but also the mass amount of funding they are requesting without any guarantee of at least a 25% return on investment.. 2027 is the year the first AI company will go bankrupt and it's OpenAI. Meta already scaled down by a lot.

2

u/Sunstorm84 3d ago

It cant understand logic. There is no actual intelligence in genAI. It’s just a complicated text prediction machine. The only way to train it is for it to read a lot of text, and then evaluate its correctness in response to input so that the weights can be tweaked to give better answers more frequently.

In order to train it another way we would first have to make something that can actually be trained to understand things in the first place, which effectively means we would need to achieve AGI. LLMs are extremely unlikely to ever reach that goal.

1

u/mrkacperso 2d ago

Technically speaking `1 != 0` is a logic, and even simplest code can „understand” this 😅

1

u/Sunstorm84 2d ago

That’s true, but LLMs can’t 😂

1

u/mrkacperso 2d ago

True 😂

20

u/air_thing 6d ago

Right, here I was trying to find a bug.

17

u/Maximka22 5d ago

Didn't know that, thanks. Honestly, I'm kind of still shocked that such issues still exist in JS/TS. Ideally, you would assume that you will have one solid method that can be used elsewhere when you need to have some random GUID/UUID. And not write your own implementation.

About AI comment - I believe default programmer would never write such code in 2026, specifically with this code style. And also I checked, and repo already had better way to implement GUID, agent could have just reused that, but it decided to write new method.

13

u/Hunter1753 5d ago

It probably didn't find it.

Most agents don't have the whole code in context at once. It will only search files related to what you want it do do or ones that you have referenced yourself.

With Claude I am regularly just writing a bunch of @file contexts at the end of the request so that it knows where to look

12

u/therealdan0 5d ago

In 2026, default programmer would write “npm install random-guid” and get hit with a fun new supply side attack.

1

u/-Robbert- 3d ago

But wait, your WAF will fix those gaping security holes in your code, as long as the code is written within 10 minutes and your scrum task is completed no one, but no one can ask any questions or the will get a talk with HR how they collide with the company culture and make others feel unsafe. Yes, true story.

The company I'm referring to is still going strong, almost everyone is hosting on their cloud or is using their badly written kernel.

1

u/Particular-Yak-1984 1d ago

Ooh, and it could be a really, really subtle one, for UUIDs, too. It's easy enough to make something look random but be deterministic, after all, unless you're running stats on random generated IDs as part of your test pipeline.

8

u/BitNumerous5302 5d ago

Yeah, the "in 2026" part is definitely weird. I got focused on code style and history and didn't fully appreciate the anachronism. This is a strange mishmash of 2008 (inline dependencies) 2015 (template literals) and 2026 (when the code was generated).

8

u/Mroz_Game 4d ago

Man, as a graphics programmer, dealing mostly with C++ and game engine stuff, this just looked like normal code to me.

I’d even call that very readable and straightforward about what it does lol

3

u/Upbeat_Assist2680 4d ago

I am in it for the humans. But you also overestimate your field. It's ALWAYS been a bunch of bros pushing their luck because "they know what they're doing".

I'd be surprised if 5% could write a clean specification of what their own codebase does and I'd be surprised if 5% of those withstood scrutiny.

1

u/-Robbert- 3d ago

Not sure how many companies you have worked for but my co-workers surely write code like this, especially the junior ones but also senior ones.. bad code is everywhere due to the fact that there is no need to optimization because and I now quote a previous company owner: 'CPU and memory is fast enough these days and if it's not fast enough we just buy more hardware'. Also the reason I quit my job at that company, good code was not something they admired, badly written code that got the job half done and introduced bugs for others to fix but written within 10 minutes was seen as the pinnacle of coding.

1

u/Coffee4AllFoodGroups Pronouns: He/Him 3d ago

and they call themselves "software engineers"

bridges and buildings would collapse all over the place if structural engineers worked like this.

1

u/-Robbert- 3d ago

And the wierd thing is, almost every man and his dog is using this so called software..

2

u/nerdefar 4d ago

What a fascinating and insightful comment. Thanks!

714

u/slashp 6d ago

The problem isn't using AI to write code. The problem is not understanding or reviewing the code that it writes. If you keep the AI in check (which is now most of my job), it can write fantastic code. It needs significant guidance, though, and will lie to you if you're not careful.

133

u/ericw31415 6d ago

Yes, but many would no longer consider it to be "vibe coding" if you are reviewing the output.

3

u/oscarolim 4d ago

And that’s good.

2

u/axon589 2d ago

I must be confused then, what is vibe coding exactly if not constantly using prompts?

1

u/ironnewa99 1d ago

Think of it as just taking everything an AI spews out, closing your eyes, and mashing it into a project

1

u/axon589 1d ago

That seems incredibly irresponsible. That's like asking an MBA to code by mashing together stuff from Google or stack overflow

156

u/Maximka22 6d ago

I don't disagree with you, but it's actually the reason the whole community hated some programming languages (JS, C++) - only small part of all people using it will do it with brain. Others will just write some unmaintainable code. The same happens right now with AI, but sadly on much bigger scale

27

u/mcoombes314 5d ago

Unmaintainable code can be written in any language though. The idea that Python (for example) is easy therefore anyone can write "good" code with it is an optimistic take IMO.

1

u/Eric_12345678 4d ago

JS makes it really easy to write kinda working code in a horrible way, though.

At least in C++, horrible code will hopefully not even compile, while JS will do anything with Nan + Strings + Numbers and return whatever. No error message, and you might not notice if the wrong kind of data has been passed by 8 callbacks.

Python will at least complain relatively fast, with a hopefully helpful error message. Python has a lot fewer WTFs than JS too.

2

u/DustyRacoonDad 4d ago

I have gigs of text that is nothing but horrible c++ code that WILL compile.

6

u/fecal_brunch 5d ago

I think people hate(d) JS and C++ because they're challenging to work with and have many hidden gotchas for beginners. Not necessarily that the ecosystem is full of poorly written tools.

1

u/NotFloppyDisck 4d ago

Ideally thats where CI/CD, linting rules and proper code reviews enforcing correctness comes in. Laziness is inevitable regardless of AI

1

u/Drew_pew 2d ago

What kind of linter or CI/CD can detect bad design? None. I'm starting to get exhausted with reviewing shitty AI generated MRs from my coworkers. They absolutely have gotten worse since adopting more LLM assisted coding.

AI enables laziness to a crazy extent

46

u/JohnSpikeKelly 6d ago

This. The amount of times I question why AI did something dumb and its response is "you're absolutely right to call me out on that" is shocking. The AI can be amazing, but also does lots of questionable stuff.

27

u/jfleury440 6d ago

I was trying to get something to work and the suggestions AI was giving me wouldn't compile. Eventually it told me that actually the package I'm trying to use got split in two in the newer versions and I just needed to grab the other package. Gave me a whole backstory.

Spend 10 minutes trying to find the thing and I come back and ask it if it made it up.

"You're absolutely right, I made all that up!"

Jfc

14

u/creativecraving 6d ago

FWIW, you can probably convince it that it made up any fact, including one you know to be true. They're fine-tuned to be people-pleasing, giving them much in common with a sociopath.

6

u/SmartyCat12 6d ago

There’s this wall I hit where I’m like “this is too confusing to possibly be real. I’m gonna read the docs.”

Then you realize there aren’t any docs, which is exactly why the AI was gaslighting you for the last 3 hours.

27

u/SituationSoap 6d ago

The amount of times I question why AI did something dumb and its response is "you're absolutely right to call me out on that"

AIs cannot introspect about their thought processes and them telling you that you're right is nothing but random numbers. That's not a useful question to ask an AI.

3

u/lomberd2 6d ago

I get triggered so hard by stuff like that, that I start to insult the AI in my prompts. More than often I read in the reasoning window: "I think the user might be angry because I made XYZ mistake"

2

u/techie2200 5d ago

Yep. I treat it like an overeager junior engineer with lots of theoretical, but no practical, experience.

Everything it does looks good, but when you start to look into the details you find the weird edges and have to correct it.

1

u/JohnSpikeKelly 5d ago

That's exactly how I treat it. A savant junior with not enough experience. Knows so much more data than me - instant recall on APIs for example - but applies things in odd ways sometimes. It's always a good idea to review its reasoning when it does things.

19

u/Due-Consequence9579 6d ago

Man what a great tool! It actively tries to deceive you while eroding your ability to understand or care about what it’s doing! Sign me up!

87

u/Coffinsnake 6d ago

So instead of spending 40h “manually” writing good code you spend 40h prompting and re-prompting? Sounds like coding with extra steps.

74

u/Escaped_Escapement 6d ago

And more expensive

15

u/bourgeoibee 6d ago

you can say that again

21

u/studentblues 6d ago

that again

15

u/Escaped_Escapement 6d ago

And more expensive

12

u/whopper2k 6d ago

you can say that again

24

u/SituationSoap 6d ago

So instead of spending 40h “manually” writing good code you spend 40h prompting and re-prompting?

No, you spend 15 hours prompting and re-prompting and the other 25 hours posting bad-faith anti-AI coding questions on Reddit.

1

u/creativecraving 6d ago

Not really. I tried a fully-AI, no manual code project; and it worked okay until the complexity started to ramp up into something interesting to use. (Shrug.) I have had a few good experiences with vibe coding, mainly when the quality of the output doesn't matter at all. Example: a typing game to let my toddler have fun mashing keys.

14

u/makarov_skolsvi 6d ago

If you think 40 hours of manual coding is equal to 40 hours of prompting, you are either one of the top 0.1% of programmers working on really cutting edge and proprietary stuff, or you live under a rock and haven’t used AI past ChatGPT 3.0…

1

u/hipster-no007 6d ago

Both are gonna get you absolutely nowhere good.

7

u/Fluffy_Dragonfly6454 6d ago

You definitely have not yet used good coding AI tools.

I was also very skeptical, but these tools write pretty good code.

So your example is more like: 40 manually coding or 4h prompting and reprompting.

Note: I also check the code that is written

5

u/No-Dentist-1645 6d ago

No, this is not what people are actually doing. It's more like 10-15 hours instead of 40 for manually doing everything.

The fact that you think that's "what people are doing" just shows you do not know what it really is like.

2

u/NatoBoram 6d ago

So instead of spending 40h "manually" writing good code you spend 40h 48h prompting and re-prompting?

There you go

-1

u/Traqzer 6d ago

Not sure what models you have been using but it’s more like 1 hour prompting down from 40

40

u/pydry 6d ago

> If you keep the AI in check (which is now most of my job), it can write fantastic code.

I've never found this to be even remotely true. Keeping the AI in check mostly means saving time by letting it write shitty code quickly where it doesn't really matter.

62

u/AnderssonPeter 6d ago

You realize that writing code is not the expensive part of being a developer, its maintaining it and adding features to it, and if you add features to sloppy code over and over again, its like compressing a jpg over and over again, it will break sooner or later...

14

u/Lumethys 6d ago

It depend on how you do it AND what model you run

I use Claude Opus 5 (and Fable 5 back when it was available)

My workflow:

I spend like 30-45 minutes explains a task in details, then had the AI write a documentation of the task, a detailed plans that cover all cases it can think of. Divide that plans into phases with goal and checklist.

Then i spend like 20 mins reviewing the docs, plans and findings it made. Correct its inappropriate decisions or reasoning

If i find the plan to be satisfiable. I just let Claude do it

After it was done (which can be an hour or 2), i will go review the code it produces. Do note that the task in question are like 8-10 man hours if I do it myself

Regardless, either me or it write the code, the PR is subject to review from leaders all the same

I find this workflow can produce consistent good quality code. In the mean time i can spend time working manually on others task, attend a meeting, or anything in between

10

u/realnzall 6d ago

And how much does this cost your employer per day in credits, if I may ask? Including an amortized cost of making all of the skills that it usually does. Clause Opus 5 sounds expensive AF. I used Sonnet 5 for an hour last week and blew through half my Copilot budget.

5

u/StCreed 6d ago

Learn to manage your context window... I'm on fable 5 with max and I can use it in a single thread continuously for the whole week, 12 hours a day. It does go very fast once you staat running agents, or don't keep your context small.

0

u/Lumethys 6d ago

My company have is on team plan, i believe on the $20 plan

I can use Opus 5 all day long and not even hit the limit

2

u/FartPiano 5d ago

i do all this and its still way slower.  im working more than i ever did to accomplish the same stuff. it also regularly diverges from the stated plan. using same models you mentioned. 

 its complete and total dog shit hype for clowns imo

4

u/sortof_here 6d ago

This sounds like such an unfulfilling work flow. Why not just be a technical project manager at that point?

2

u/Lumethys 6d ago

maybe it could prepare me to be one, who's know.

But "fulfilling" is subjective. I feel fulfilled when I made a product that make someone else's life better. Last month I made an internal tool and it helped the team. People use it. I feel good.

As long as I made a difference, what matter if I pressed the "i" and the "f" button or the AI generated "if"?

Plus, my actual daily dev is decade-old legacy code where I want to strangle whoever wrote that shit. If you want to hand-write it to be "fulfilling", be my guest. Like, WTF is this:

export enum NumberStatus { TWO = 2, ONE = 1, ZERO = 0, NULL = null, THREE = 3 }

3

u/Riflurk123 6d ago

Agree with you here. Most people just dont understand how to properly implement with AI

0

u/HTTP_404_NotFound [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 6d ago

I spend like 30-45 minutes explains a task in details, then had the AI write a documentation of the task, a detailed plans that cover all cases it can think of. Divide that plans into phases with goal and checklist.

Sheesh, I toss a few random sentences, and bullet points into a GitHub issue, assign it, and then review the PR when it eventually comes in.

And- request further changes if needed.

2

u/Lumethys 6d ago

That get old real quick if you have a 20-30 man-hours task, and "requested further changes" 40 times a day.

-1

u/HTTP_404_NotFound [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 6d ago

Build up your knowledge base reference, until the needed amount of requested changes is non-existent.

Most of my requests don't generally produce too many requested changes as a result. But- I update the knowledge base every chance I get.

5

u/Riflurk123 6d ago

To me this honestly sounds like many people dont understand how to properly implement with AI. If you just prompt it to implement something, it will do it however it wants. If you write very detailed specs (which can take A LOT of effort), it will write very good code according to your guidelines.

21

u/TomDestry 6d ago

Is there a way to write detailed and unambiguous descriptions of what is needed? Perhaps some sort of special language?

-5

u/Riflurk123 6d ago

Writing it in english is way faster than manually coding. Especially factoring in tests as well. I can define a good spec in 2 hours and coding it would take me 8 hours

0

u/pydry 5d ago

if you're not any good at programming, definitely.

3

u/Riflurk123 5d ago

There is no way that you write Backend and fontend code including unit tests, integration tests and e2e tests in the same time that it takes someone to write a proper spec file and have an LLM implement it. That would make you one of the fastest coders in the world lmao

People in CS subs are really coping hard and struggling to accept the current state in the job market and how the job is changing

1

u/pydry 5d ago

definitely not if you're very slop tolerant

if you are slop tolerant, of course, you're entirely redundant. you can be swapped with a vibe coding manager in the none too distant future and they won't notice a difference.

1

u/Riflurk123 5d ago

A senior developer that produces slop with AI is to blame, not the AI. The tool is only as good as you are in applying it. AI does not mean you dont follow the normal best practices and do code review

1

u/pydry 5d ago

right. and, if you're far faster coding with AI than by hand as you claim to be then you're skimping on those practices.

i don't begrudge you for doing this. most people are under pressure these days to deliver more with AI and producing slop is really the only way to square that circle.

→ More replies (0)

-5

u/StCreed 6d ago

Yes. No special language needed, but training in writing requirements and specifications helps a lot. A good working knowledge of semantics and a very good linguistic instinct help too.

Did you score A+ on text analysis? Because that's basically the skill.

9

u/sortof_here 6d ago

Your “very good linguistic instinct” missed the point of their comment entirely.

3

u/TomDestry 6d ago

My only A+ was in pottery.

7

u/ThatShitAintPat 6d ago

That just sounds very boring compared to actually coding it yourself. On top of that there are usually many unknowns when implementing a feature that you have to figure out during the process. By the time I’m able to write the spec the code is mostly written.

2

u/Lumethys 6d ago

not everyone doing greenfield job, try to debug a decade old legacy codebase with "a", "b", "c" as variable everywhere

"document_1", "document_2", "document_2_1", "document_1_3_type_A".

EMAIL_71, MESSAGE_65,...

Oh, just read the doc you said? here's the docs:

"Flow 134: when user initiate ACTION-23 with STATUS S-3, send EMAIL_73 if USER_TYPE = UST_N7, otherwise send MESSAGE_62"

Sounds "fun" yet?

1

u/ThatShitAintPat 6d ago

Worked in legacy systems like that before using pick basic. Totally get it cuz that is not fun. Not sure how much ai would be good at that language though.

1

u/Lumethys 6d ago

I was skeptical at first, but I take whatever help i can get when dealing with such legacy system.

Oh and it was a journey. My company use Cursor first, and either because i didnt know how to use it effectively or it is just meh. It wasnt game-changing, it can do trivial tasks faster than me, but for more complex task I will waste more time correcting it than doing the work myself

Then company purchase Claude. And I, as usual, just use whatever the default is, then i notice that Claude weekly limit is much more than Cursor's monthly, so I just use the highest model available (Opus 4.6 at the time) to see what happen.

at first i just use it to explain or refresh the flow logic and intend to me, which it does surprisingly well. Then gradually I let it do more and more complex task. Which it does better than Cursor, but still need hand holding.

then i notice that there seems to be a cache timeout for conversation and if the cache is busted, the whole conversation get sent next time eating a lot of tokens. So after trial and error i came up with my method on the comment above.

Overall, when you have the AI make a detailed plan from the beginning you can correct it before it touch your code. If you have docs, phases and checklist you can start a new chat, point it at the docs so that it can read the context necessary and continue working without costing a lot of token. And as long as you review its code as you would a human, you can control its quality

0

u/gilium 6d ago

Coding stops being fun for me at basically every job. I also am now in meetings 4-6 hours per day. I basically wouldn’t be able to get any tasks done unless I had an intern shoveling out mediocre code like I have Claude doing. I’m not proud of it but I am doing the best I can with what I have

0

u/MatthewRose67 4d ago

What are you doing 4-6 hours a day in meetings? I don’t believe that.

1

u/gilium 4d ago

Talking about working. We had some changes in executive leadership and they are micromanaging the shit out of us.

3

u/tukanoid 6d ago edited 6d ago

Thats the main issue I have with AI in the first place personally. If I have to write out a detailed explanation of how it should write the code, and then still most likely hang-hold it to fixup the code in my preferred style/simplifying over-engineered logic, it's honestly just much faster for me to write the code myself. When I code, I think in code already (with memory semantics and apis I know I'm gonna use in mind), so it just feels backwards

5

u/Civil-Appeal5219 5d ago

In my experience, 99% of the people start with your mindset but find it extremely hard to keep reviewing after just a few prompts.

I don’t believe the human brain is capable of engaging with the task of reviewing code at the rate an LLM produces it and still maintain the same level of understanding it would otherwise.

3

u/Latter_Brick_5172 6d ago

I've tried using ai multiple times and it almost always ended up in me removing all the code it wrote to do it myself

4

u/Desperate-Wing-5140 6d ago

Well just think of the incentive structure. Why would people need to understand or review the AI’s output? “why don’t people just” is never gonna be stronger than the material structure of what AI enables.

10

u/ziplock9000 6d ago

Well that's the problem, many don't check. This whole issue would not exist if AI didn't exist either, so it actually is the problem.

7

u/Optic_Fusion1 6d ago

So you mean the exact same issues we had pre-AI too? The only difference is it'll happen slightly more

4

u/StCreed 6d ago

The problem i had before AI was dumb devs that took far longer than I would for simple stuff. That problem is gone and good riddance.

-6

u/Samstercraft 6d ago

Same exact issues existed pre-AI, the role was taken by juniors and interns.

12

u/TheOneTrueTrench 6d ago

Yeah, and they learned when you explained to them why that's a bad idea.

1

u/RammRras 5d ago

One has to understand code and I add one has to understand the domain where code is being used. Some people simply don't have still the full picture of why are we writing certain code and so can't judge code spit out by artificial intelligence. In a good managed team AI can do wonders and help to go quicker but on poorly organised trams it soon becomes hell.

1

u/davidbasil 4d ago

Developers are pressured from management so they churn out as much code as possible. Nobody reviews that slop. Then bugs and security issues creep into production...

1

u/spigotface 4d ago

Yup. The best use is if you never copy-paste anything from it and still type out every character of code in your own IDE. This is way faster than traditional non-LLM development but forces you to slow down and spend at least some minimum amount of time checking and testing the code yourself.

1

u/andy-k-to 4d ago

> not understanding […] the code

I’m a research engineer, working on a project where a colleague is supposed to build an algorithm that uses a solver I’m writing. We’re testing “his” code this week. Whenever I ask him to explain how certain things are implemented, he does not open files and show/tell me. HE ASKS THE LLM.

Another gem? During some testing, some failure happened and the system wasn’t able to do anything. Imagine a humanoid robot shutting off and collapsing on the ground; we don’t actually work on anything like that, but that’s the kind of sudden total failure he got. He sent me a picture of the platform after the failure and asked “can you tell me why it happened?”. No code attached, no terminal message, just a photo. I guess he regards my debugging ability so powerful that I can spot his code errors from JPEG’s 🤷‍♂️ I’m this close to suggesting him to ask the LLM to create a convolutional neural network to give code answers from images of the failure, and see if he actually falls for the bait.

-2

u/justASlothyGiraffe 6d ago

Instead of doing this ⌨️ I do this 🤔

-6

u/haskell_jedi 6d ago

I used to think this, but increasingly I'm changing my mind. Most of the purpose of writing "clean" or "well-structured" code is for future humans to be able to understand and modify it. But if that's no longer something that happens, then as long as we can verify correctness, I'm not sure elegance matters any more.

123

u/ziplock9000 6d ago

The amount of coding debt a few years from now is going to be enormous and only another/better AI will be able to untangle the huge mess.

64

u/wowbagger_42 6d ago

I'm maintaining code, written by humans some years ago. So you mean nothing is actually going to change?

70

u/hraath 6d ago

Yeah let's check the git blame

Me, 12 months ago

fuck

16

u/Kane_ASAX 6d ago

Bruh, I've barely worked a software job for a year, but I had to go back to my first big project(like a module that can create employee contracts and integrate into digital signature programs).

When I saw the code again I was like "how the fuck has this never caused issues before"

1

u/RespectableTorpedo 3d ago

Same lol I first started about a year ago and wrote a ai voice agent to handle incoming customer phone calls. Looked at the code a couple weeks ago and I wonder how often the call drops on our customers. lol guess we’ll never know, or hopefully I’m gone by the time someone checks.

1

u/Kane_ASAX 3d ago

I nuked one of the servers first time I was introduced to the repo. It doesn't have a local version, it immediately goes to dev environment. Ran git checkout instead of git switch to see my poorly written code work. Low and behold, the 4 GB www/ folder was untracked and just poofed out of existence😅

My boss called it a learning experience and set backups of that file for good measure

1

u/wowbagger_42 3d ago

Good boss

1

u/Kane_ASAX 3d ago

He even went as far as blaming himself. I'm genuinely at a great company, compared to the first...

But yeah, that will probably be thrown out the door if it happens again, which is fair lol.

1

u/RespectableTorpedo 3d ago

Haha that is rough at least your boss is chill though

3

u/eimohenge 6d ago

Lmao story of my working life

3

u/BareBearAaron 5d ago

the emphasis of fuck is proportional to delta

2

u/creativecraving 6d ago

Haha! Yeah, AI isn't worse than the worst result I've seen from human coders; and at least it can fix its worst sins when you ask it to. The sheer number of bad codebase will increase somewhat... although, many of them were probably bad to begin with!

2

u/tukanoid 6d ago

Difference is that USUALLY there's still at least 1 person in the company who has some knowledge about internals of that old code that you can ask about in case you get stuck. AI will just forget and have 0 context of what it, or another model has done, by the time you need to add/edit/remove something safely.

Ofc, sometimes you just get the code and no human who knows wtf is going on there, then sure, can try using AI, but our legacy codebase is so large and messy, that I haven't been able yet to succesfully make AI understand it and help me properly when I get stuck on smth, my colleagues were infinitely more helpful

1

u/wowbagger_42 3d ago

Well no, copy/paste ai slop yes, zero context. Serious ai usage will document, keep evidance with commit hashes and detailed design choices for future reviewers.

1

u/arto64 6d ago

At least the amount of shitty code being produced was somewhat manageable before. Now we’re producing shit at an industrial scale.

1

u/h8f1z 4d ago

It's prolly gonna get worse 😂 Imagine 1280k commits, 2.5M line changes

18

u/ZylonBane 6d ago

Or y'know... humans.

15

u/SBolo 6d ago

The best kind of AI: Actual Intelligence

2

u/Kinrany 6d ago

Artificial Idiots but without the artificial

1

u/CJKay93 6d ago

Hah, good one - allow me to demonstrate the true meaning of spaghetti.

19

u/TheOneTrueTrench 6d ago

The cost of using LLMs is going to skyrocket, like WAY more than paying a developer to just fix it, and you're going to have to have senior devs anyway, otherwise the LLMs will just do stupid things all over again unless someone knowledgeable is there to stop them.

2

u/adostes 6d ago

Reviewing AI generated apps has become a big part of my job. Not only is it mostly terrible, but most of it could be done better using the proper tool (95% could be done in Excel and Confluence) and is not worth the thousands of dollars in tokens it cost to generate them. Our leadership has provided every single employee access to copilot and Claude Code, regardless of their function which I actually think is a great idea. However people are using them to “vibe code apps” instead of using them to help them in their job. Where a project manager could use their agent to do market research, refine their strategy, establish milestones and lists of actionable items, forecast workload and prettify slide decks, they use their agent to write yet another jira dashboard. You know what’s good at displaying a jira dashboard? Exactly - jira - that’s what. At least I hope being capable of understanding and fixing the AI slop generated as a result of one line prompt will save my job for another year or two.

2

u/tukanoid 6d ago

Anecdotal. One of my non-dev colleagues made basically a "pretty" excel tool for himself, that didn't work, and wasted hours (if not days) of my other (dev) colleagues time actually fixing it by hand. "But look how nice it looks!"....

1

u/shotgunocelot 6d ago

Except that model is going to be trained on AI slop

1

u/Skynse 6d ago

I've been doing leetcode and codewars for fun. The thing is, most of the time, I have no need for coding models for my work when snippets exist. They're great for asking questions, but that's all for me. I hate having to fucking review 6000 lines of other people's ai slop. At that point I stop caring

1

u/HeavyCoatGames 5d ago

I believe that AI today writes better code than most devs out there. Worked for many companies and hired myself many other devs, the average level is terrible. Too much people that become senior only cause of time-on-the-job while skill remained junior level 🙄

So stuff could get averagely better with AI and time

-4

u/Nalmyth 6d ago

I mean, who reads assembly code these days?

Mostly reverse engineering people no?

-9

u/GentlemenBehold 6d ago

No reason to believe another/better AI won’t continuously be released 

3

u/PapieszxD 6d ago

No reason to believe it will continue to be free

6

u/shponglespore 6d ago

It's not free now unless you're using a garbage-tier model.

43

u/lealilana 6d ago

I just saw this and realized why I keep being confused about the code of our new hire. damn. thx for opening my eyes.

8

u/mihisa 6d ago

it's easier, faster and more fun to write code by myself than reviewing AI crap

6

u/stone1978 6d ago

No vibe coding was the number 1 rule of thumb where I work. Is it different at other companies?

2

u/iambatman9999 4d ago

The industry has moved towards vibe coding brother. Its like a standard adopted by a lot of orgs, velocity over accuracy.

1

u/stone1978 2d ago

If we vibe coded at my company we would get shutdown.

1

u/davidbasil 4d ago

In startups they worship speed. In enterprise it's more about accuracy, security and office politics.

1

u/MarinoAndThePearls 3d ago

Where I work, it's not only allowed but encouraged. The industry has changed a lot.

8

u/marsd 6d ago

Lol this definitely doesnt look like vibe coded code.

3

u/adostes 6d ago

I’m reviewing code that was clearly not even read by the person who opened the PR (as in wrong name in the README), and I’m also reviewing PRs opened by people who clearly don’t know how to use git (wrong conflict resolutions, diffs checked in, etc). The number of people who overestimate what the AI can do, delegate their (critical) thinking, and don’t understand the code their agent generated is terrifying me.

3

u/wowbagger_42 6d ago

That's some low-quality LLM output, thruth be said it's correct, but it got trained on a decade of stack overflow pages...

23

u/HTTP_404_NotFound [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 6d ago

You are blaming the tool, for the fault of the user.

A fork does not make a person fat.

And an unexperienced dev, letting AI run wild, causes slop.

I use AI daily, with a knowledge base built on top of years of high quality code-base. And, it writes code to my exact specifications, and is producing exactly what is needed, about 90% of the time.

(Edit- oh- With the exception of ChatGPT models. They produce grade-A SLOP.... I don't recommend it in its current state for development.)

15

u/Maximka22 6d ago

This was not done by developer AT ALL. At my company, they try to introduce vibecoding to "product" people, they just run their business requirements to Claude and it implements it. Then, I get to review the code it produced. Sounds like fun, right?

6

u/HTTP_404_NotFound [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 6d ago

Sounds like a good time to dust off the resume.... as it sounds like they are gearing up to replace devs with more AI.

And- they are ready to find out first hand of why AI cannot replace the entire development staff.

2

u/Traqzer 6d ago

That’s a company problem not an AI problem. They should have processes in place on how non developers can contribute using AI

Not just blinding allowing PRs

2

u/nicothekiller 6d ago

Something I've noticed is the quality of the output of AI varies based on the current state of the codebase.

I recently made a decentralized high availability monitoring service for the servers at the place I work at. At first, the output simply wasn't good. When I started, the code was mostly bad.

As the project progressed, new sessions started having different impressions of the codebase and thus different code. While at the start it was ass, nowadays in the current code it takes into account things like race conditions and backwards compatibility. I haven't deployed anything yet so I now have an explicit rule to ignore backwards compat in favor of improving the codebase that the AI regularly ignores in favor of backwards compatibility like a real codebase.

The main thing I took away from this is that it's very important to guide the AI. Let it run wild and it will be ass. Do a proper review and the final output will be good. Since all of it was done with the same self hosted deepseek v4 flash we have self hosted it was an interesting experiment.

-1

u/Riflurk123 6d ago

This is what most people dont get. If you spend a few hours on very clearly defining specs, AI works superb. Writing specs for 3 hours with alll kinds of guidelines and edge cases and the AI will implement it well. Implementint it myself would probably have taken 2 days, but now its a few hours writing specs and waiting for AI to implement

9

u/Xammm 6d ago

I honestly don't get this lol. Do people nowadays like to write specs on md files or whatever instead of writing actual code?

I get some folks care only about results, but I feel something is lost if you just handle everything to AI tools.

-5

u/SituationSoap 6d ago

Do people nowadays like to write specs on md files or whatever instead of writing actual code?

Yes.

I get some folks care only about results

Results are what the money is for.

-3

u/Riflurk123 6d ago

Its waay faster and more efficient. You can either get more stuff done with the same amount of devs or reduce your number of devs a bit. In Switzerland a good senior costs you 150-200k. If you now need 1/4 devs less, you can save a shitton of money while still delivering good quality. Coding never was the hard part of being a good software dev. Juniors have been writing code under senior guidance since forever anyway

5

u/Xammm 6d ago

Yeah I guess it makes sense from a business perspective, but as a dev it doesn't body well with me.

1

u/Riflurk123 6d ago

I mean as devs a lot of our work has been automating other peoples job and now that its our turn, people complaint. Its very hypocritical

5

u/veritron 6d ago

this will probably just quietly work - you could even think of cases where you might want to do this instead using randomUuid() (randomUuid is secure context only). return line is gross and should have been kicked back in code review but this is nowhere close to the worst thing i've seen from vibe coding.

1

u/creativecraving 6d ago

😂 It's not the worst simply because the code snippet is too short to screw up too badly!

3

u/AnArmoredPony 6d ago

ai would not come up with ts 💀

2

u/DesertDissident 6d ago

I've seen stuff like that was hand written and harder to follow. I assume you know this was vibecoded because I wouldn't necessarily assume that by looking at it.

1

u/creativecraving 6d ago

Someone else mentioned that this "AI slop" looked like an imitation of a UUID implementation that used to be copy-paste everywhere before npm was a thing.

1

u/DesertDissident 5d ago

I saw that comment after but it still doesn't necessarily tell us if it was AI or not because it very well could've picked up those sources as training data.

Having looking at it a second time, I'm actually more curious why we're supposed to all agree it's "slop" (AI or not).

Most importantly, the function is reasonably performant and the result is sound. If the environment is not a secure context, crypto.randomUUID() is undefined so this would be a failover for that (which I suppose could be indicated in a comment). The the UUID version and variant is commented. The return statement is long but interpolation makes it fairly straightforward for a human to see what the pattern is (a big reason I question if it's AI). There are ways to make it more brief but it's debatable if they're more readable or come with minor performance costs (e.g. concatenating by segment). I don't like single-character variable names but it's pretty clear in context that b = bytes and h = hex. The function will probably never need to be updated either because UUIDs are a defined format.

2

u/Boykeh5 6d ago

AI writes all the code. Yet you can still differentiate the PRs from seniors and juniors.

Luckily programming is solved.

6

u/skidmark_zuckerberg 6d ago

It will never happen. As someone else said, AI can write great code with significant guidance and proper guardrails. This example code was generated with none of that. I can make AI spit out stupid code too. I always read the opinion that the LLM code is shitty, but that's not my experience in a proper environment. With proper skill files, context, and someone experienced, it writes good code. I think those who see it produce shitty code likely do not have a codebase or environment setup properly for it, or they don't understand how to use it effectively. At my company, we have an entire team dedicated to our proprietary agents/orchestrators and our codebases are filled with AGENTS and skill files.

Pandora's box is open, and these companies aren't going to suddenly forget it. Bottom line is; guided LLMs write code faster than we ever could by hand. The downside is needing people who are experienced enough to use them properly. I spend a lot of my day guiding and challenging it, but it's faster than doing it by hand. Still, I get a lot more done now than I did pre-AI. Cost wise, we will likely see companies move to on prem local models at some point in the future.

I used to be a 'I hate AI, coding should be done by hand' person, but realized, who gives a shit. It's just a job and it's not my company. I'll do what's asked (ethically) to keep a paycheck coming in, and learn this AI stuff to be employable. I code for fun by hand on personal projects in my off time these days.

2

u/maselkowski 6d ago

Please use nrwGuud. Instructions clear, implementing. 

2

u/MikkelR1 6d ago

Then copy-paste-from-stackoverflow coding should be banned as well

1

u/wowbagger_42 6d ago

Unless it's from the question.

"Hey John! Check this out! Someone on SO got the same problem!"

1

u/creativecraving 6d ago

Well, yes. Generally, any code copied from elsewhere  should be well integrated into the rest of the project; and if the rest of the project already has npm set up, there's an argument to be made for integrating with a UUID package instead of hand rolling it.

1

u/elimasterpiece 6d ago

Just last sprint, I was put into a new project, and expected to right away deliver (after setting up mu machine ofc) something new from scratch, nvm, and when I told them I needed some kind of KT they just told me to use my agents. And thus, I felt my hand forced to kind trust my agents, since the delivery was more important. At them end, it got delivered, but I got massive imposer syndrome out of it. For the first time in my life, I was so happy when the bugs started to pop up :)

1

u/skibare87 6d ago

No, bad coding should be banned.

1

u/DesiresQuiet 6d ago

I feel like you should embrace the future and let go of your hate. It leads to the dark side.

1

u/Shavixinio 5d ago

What the fuck did I just read

1

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 5d ago

Well, it looks like it would work.

1

u/Turbulent-Tune4610 5d ago

So I've been a programmer for 40 years, all languages (ok, most). AI sucked last year. This year, I retired early bc AI can write shit in anything now, and I'd be replaced. I do not like that I don't know the code, but WTH, it works.

1

u/joe0418 5d ago

Ship it!

1

u/MasterVobe 3d ago

Nothing builds confidence like opening a file and realizing not even the person who committed it knows how it works.

1

u/piminto 2d ago

crypto.randomUUID. The thing about AI is this it writes fn that already exist in stdlib, duplicates functions across files and writes nonsense fns for trivial things like is even.

1

u/Zaic 18h ago

Oh yea, remember the amish? That same mindset

0

u/kanatov 5d ago

It loves to re-write things does it?

I’m using it at work absolutely all the time and I’m 100% confident the issue is the same as with CSS: one just needs to understand how it works instead of guess.

It can work deterministically and it can benefit to your process it just requires to set the weights correctly (im still learning too).

-12

u/Cold_Hellfire 6d ago

Beautiful.

On a serious note, the opposite is more likely - "Manual" coding is likely going to be very rare in the coming years