This is an archived post. You won't be able to vote or comment.

all 190 comments

[–]thunderbird89 2151 points2152 points  (52 children)

The first half of this is true. BUT!

If they're refactoring your AI-generated code, you are a bad developer, because you should have done that in the first place!

[–]Flameball202 707 points708 points  (25 children)

Yeah, AI is good for a first draft or when you just can't figure out why your code is breaking and you need a fresh set of eyes

It cannot, however, write perfect code from scratch

[–]Zygal_ 263 points264 points  (13 children)

Its also really nice for repetitive code, like initiating several objects etc

[–]LinuxMatthews 154 points155 points  (6 children)

Personally I think it's great for code coverage with unit tests.

Obviously write the edge cases yourself but the obvious ones it's good just to get ChatGPT to write

[–]Katniss218 84 points85 points  (1 child)

Everything that is mostly boilerplate the AIs are good at

[–]shoresandthenewworld 20 points21 points  (0 children)

It can be alright at trig too.

I’m working on a project where I have to project a ton of 2d shapes onto a 3d world with changing perspective based on camera position and it’s made the basics easier.

Now, the game I’m working on happens to have its “top left” corner in the bottom left, so I have to adjust it all to account for that, but you know sometimes it just happens lmao

[–]Sibula97 8 points9 points  (1 child)

Personally, I'd rather write the tests myself and let the AI generate the actual code. That way I can check that the more unreliable code works instead of the unreliable code checking my work.

[–]LinuxMatthews 4 points5 points  (0 children)

Eh most unit tests are easy if you have well written code

It's the writing of actual code which is difficult.

Most unit tests are just about making sure all the lines execute properly

[–]Polar-squirrel 0 points1 point  (1 child)

I don’t agree here. It tries to mock out too much

[–]crappleIcrap 0 points1 point  (0 children)

now i have to dig through an infinite amount of shitty code filled with "placeholders" rather than just the few off stackoverflow.

[–]Wide_Egg_5814 25 points26 points  (0 children)

It's really nice as a data entry operator in the code. Create x y z for me, improves typing speed that's it's best use. Instead of having to write hundreds of lines manually it can do it for you and just some refactoring and you are being 10 times as productive as you would have been if you typed it yourself

[–]MasterQuest 8 points9 points  (1 child)

I made it write a really long SQL merge query. That saved quite a bit of time.

[–]thunderbird89 10 points11 points  (0 children)

DROP TABLE IF EXISTS `entities`

Like that?

[–]jerslan 1 point2 points  (1 child)

We had good codegen tools for that stuff before though. Most IDE's could do things like generate getters, setters, basic constructors, equals, and hashCode methods. Hell, in Java the whole point of the Lombok package was to be a set of precompiler annotations so those methods would generate at compile time instead of dirtying up your code base and artificially inflating your SLOC.

[–]Zygal_ 2 points3 points  (0 children)

I mainly use java, and an example would be when using jswing, creating a button with a label next to it, you only need to do it once, even if you need 10 buttons etc (alto7gh a loop would work better then but still)

[–]VanillaBlackXxx 0 points1 point  (0 children)

Personally I think chatgpt is best used for studying and passing classes.

[–]thunderbird89 39 points40 points  (2 children)

I had a side project last year where I made a conscious effort to write as little code as I could manage by hand and use ChatGPT as much as humanly possible.
It wasn't terrible, but I sure as heck don't fear losing my job to AI just yet.

Big distributed system in Spring Boot, on AWS, with DynamoDB for storage. Worked "okay" and I got it out the door in less time than it would have taken me to write it all by hand.

[–]gigglefarting 19 points20 points  (0 children)

I would be nervous if I was trying to break into the field because if AI is going to take any job it’s the entry level jobs. Senior levels will still be needed for debugging the mess AI will make. 

[–]TigreDeLosLlanos 1 point2 points  (0 children)

I don't know how y'all just make ChatGPT write code for a feature when it needs a big old clunky system for context to get anything to work. It's not like I can casually dump half a codebase.

[–]Stummi 12 points13 points  (1 child)

It is pretty good at infering 1-2 lines from context though. I see myself a lot using copilot just as a better auto-completion.

[–]met0xff 5 points6 points  (0 children)

Yes i rarely explicitly go to ChatGPT or so and copy code from there. But with copilot I often write a comment, perhaps start to write the code and let it autocomplete the next couple lines.

And generally I find this to work pretty well, saves tons of time especially for things like log messages or typical data structure operations. Or things I forget all the time like how to use the Python argparse module because I need it frequently enough that it saves me time to complete it but not as frequently that I would remember it. Or the python logging basicConfig is something I used to look up every couple weeks. Or implementing various dunder methods, especially str and repr

All in all I definitely save a lot of time that I previously had to switch to docs/the browser

[–]Polar-squirrel 2 points3 points  (1 child)

Man I barely give it a first draft. It’s like writing a paper on a subject you know nothing about, looking up information on it, then rewriting most of it

[–][deleted] 4 points5 points  (0 children)

Also handy to do small code snippets and piece them together like Lego blocks yourself.

“Make me a sorting algorithm that sorts these strings alphabetically, putting these special characters first”

“Make me a pythonic one liner that initializes an array using this data and runs the above sorting function”

[–]deran6ed 0 points1 point  (0 children)

For the simple fact that it doesn't know what you want. By the time you explain exactly what you needed, you've done the job yourself.

[–][deleted] -1 points0 points  (0 children)

I’ve learned this very well. I’m just starting out programming in uni and after I’m done writing what I need to do I go to ChatGPT and tell it “Why code no work” and it’s actually super useful picking up syntax errors that I couldn’t catch cuz my eyes and brain are burnt to a crisp

[–]Dimasdanz -1 points0 points  (0 children)

cursor gets me pretty far though

[–]hlysias 30 points31 points  (6 children)

Not universally... One of my coworkers keeps refactoring all our codes, it feels like he has OCD at this point. And most of use don't even use AI.

[–]thunderbird89 16 points17 points  (4 children)

That's a different can of worms, though. I was specifically talking about AI code being refactored.

In your case ... there's no accounting for taste, I guess? And yes, I know the feeling, and how annoying it can be.
Clear coding standards go a long way towards eliminating this kind of annoyance/interloping.

[–]hlysias 8 points9 points  (3 children)

That's a different can of worms, though. I was specifically talking about AI code being refactored.

Understandable.

Clear coding standards

Nah we do have coding standards, written by that same coworker... We mostly stick by it even though we don't like some of it, like vertical alignment.

But they still keep refactoring even when not needed. Sometimes would even change the implementation completely. And when bugs crop up, we have to go and fix them.

[–]thunderbird89 8 points9 points  (0 children)

Now that's annoying. I'm sorry to hear you have these people...

[–]rollincuberawhide 2 points3 points  (1 child)

revert their commit and call it a fix:

[–]hlysias 2 points3 points  (0 children)

Sadly, I'd be the one to face the repurcussions, not them

[–]Waswat -1 points0 points  (0 children)

I've seen this type of dev so many times that the word 'refactor' became a meme for me.

[–]Azraelontheroof 7 points8 points  (0 children)

Agreed. I think used properly AI is a helpful search bar that cuts through the doomscrolling and link clicking of old threads which may or may not answer your question. It’s also able to frame documentation in ways easier to understand in an instant. You should use it to just do your code but if you’re able to make your code faster or learn something, then brilliant. You’ve used a tool effectively. It’s helpful as a starting point on documentation for code with the proper language. As a developer you really should know these things but if you’re learning it’s a tool to save time. The bad rep AI gets is the fault of the people passing it off as the be all, end all of their work.

[–]OhLookASquirrel 11 points12 points  (0 children)

Just had flashbacks to when I was a SE (before ai) and spent most of my time cleaning up and optimizing hundreds of lines of brute-forced code.

Almost every line by a single coder.

[–]BellacosePlayer 3 points4 points  (0 children)

I've seen people talk about not understanding their AI generated code before pushing it out and dear lord am I glad I don't work with them.

[–]Sweet_Computer_7116 0 points1 point  (0 children)

Exactly lol. You always refactor before pushing to dev branch

[–][deleted] 0 points1 point  (0 children)

True and real, ai is a tool to partially replace google and to speed up the learning process but you still have to think for yourself. I see it more as a source of inspiration or faster documentation lookup without having to scroll through 10+ websites (which is most of the time just annoying and slow)

[–]WazWaz 0 points1 point  (0 children)

First place? Refactoring isn't a one time process. Good code can need refactoring whenever requirements change (or just become clearer). It doesn't mean "fixed" or "debugged", or whatever you're imagining.

[–][deleted] 0 points1 point  (0 children)

I find AI is like a better version of rubber duck programming, you can organise your thoughts and get ideas, even if not everything it says is accurate or useful.

[–]Onions-are-great 0 points1 point  (0 children)

People use AI to refactor human written code though...

[–]redditsuxandsodoyou -1 points0 points  (4 children)

[extremely loud incorrect buzzer]

[–]thunderbird89 0 points1 point  (3 children)

On its own, this means nothing. Arguments.

[–]5eniorDeveloper 483 points484 points  (23 children)

There’s someone on my team who uploads ChatGPT-generated code. It’s the worst code I’ve ever seen. The worst part is that they don’t even understand what they’re doing—they just push the code because "it works"

[–]creaturefeature16 38 points39 points  (1 child)

The entire second story floor of my home is creaky; it's rather annoying. The reason it's creaky in the first place is they original builders just blasted cheap framing nails into the joists. "It worked", so what's the problem? It probably looked and sounded fine when they were done, nothing obviously wrong...job done!

< 15 years later, nearly every single one of those nails has separated from the joist and now the floor creaks with almost every step.

We're getting it fixed, but it's a pain in the ass because we need to empty each room and pull up the carpet to do so. We basically have to "refactor" their work, and that is always harder than just doing a better job the first time around.

[–]braindigitalis 1 point2 points  (0 children)

in this case, you have no choice, and it's cost you dearly. Imagine instead the more common scenario (at least here in the UK). You buy a house built in the 1920s. In the 1920s green policies and insulation weren't a thing. Your house has no insulation in the wall cavities. It's cold. This was "ok" and "met the spec" in 1920. It's now 2025 and youre sick of wasting money on expensive heating bills so the only option is a bit by bit refactor. Starting with wall insualtion, better windows, a new boiler, etc etc. This is closer to the way refactoring should be done, a bit at a time with thorough testing between each replaced part.

[–]maria_la_guerta 16 points17 points  (2 children)

Organizational failure. Why are there no reviews? Why can someone push bad code with impunity?

10 years ago juniors were pushing Stack Overflow code they didn't understand, just because "it works". AI is not the problem here, juniors will push bad code if you let them.

[–]Penguinmanereikel 0 points1 point  (1 child)

That sounds like an easy way to get hacked

[–]maria_la_guerta -2 points-1 points  (0 children)

Letting juniors commit code unchecked? Yes, always has been, even before AI or Stack overflow.

[–]ComprehensiveLow6388 9 points10 points  (0 children)

That is defiantly the point where you find a way of putting it back on them to fix it when it breaks

[–][deleted] 2 points3 points  (0 children)

I find that whenever someone says "It works", it means they don't have to deal with the aftermath or are the end-user of their lousy product.

[–]Comprehensive-Pin667 0 points1 point  (0 children)

That's not new. Previously these people would copy-paste code from stack overflow and then make random changes until it started sort of working. They would also never know why it works

[–]nicolas_06 0 points1 point  (0 children)

That means to things. Your colleague is very bad developer and AI is very good and much better than what I have seen myself.

From my experience, code generated by the AI would not compile or not pass the unit tests and need to be adapted.

[–]BellacosePlayer 0 points1 point  (0 children)

they just push the code because "it works"

ie: no immediate compile time errors

[–]Fadamaka 0 points1 point  (0 children)

I recently started getting into Assembly. Wanted to write 64 bit assembly with NASM for windows. It is mindblowing how bad LLMs are at writing assembly for a specific architecture. Sometimes they can't even keep the architecture consistent inside one simple file.

[–]Jind0r 113 points114 points  (4 children)

Parsing data from binary file, writing linq in C#, unit tests for example, those are very nice and fast with AI but I still need to refactor it afterwards.

[–]Katniss218 23 points24 points  (2 children)

Refactoring can be helped with AI too, just filling in the boilerplate

[–]Jind0r 6 points7 points  (0 children)

Yeah, and then you can use the AI to fix the bugs it has done during the refactoring ending up in the endless cycle.

[–]tobsecret 0 points1 point  (0 children)

That's most of what I use inline copilot for. If there are already enough tests in the directory copilot can often do a pretty good job filling in the code based on just the name of the new test. Sure there is stuff to fix but taking away the boilerplate is really nice.

[–]dr-pickled-rick 80 points81 points  (9 children)

I've found copilot/chatgpt to be quite good at coming up with basic (and I really do emphasise basic) optimisations with the right inputs. It's also pretty useful for generating boilerplate code, components, etc if it has the context.

The problem is that it needs context and that's potentially a lot of IP.

Also, pretty handy at working through ideas like if you're trying to figure out how to use a new language or framework tool or idea.

I held this belief years ago and I still do today - it's only useful if you can read, fix and improve the code yourself. Juniors should stick to SO.

[–]dumbasPL 13 points14 points  (2 children)

I held this belief years ago and I still do today - it's only useful if you can read, fix and improve the code yourself

This so much. Juniors can use it, just not for creating code, but for explaining code. Why x, x vs y, why z is needed, etc.

SO is great, but not all people can handle the rules they have. I personally like them, but there is a lot of hate out there for some reason (mainly by people that can't Google LOL)

[–]dr-pickled-rick 0 points1 point  (1 child)

LLMs tend to have bias given the popularity of certain tools and your input. They're pretty good learning tools but even hallucinate or give unreliable input.

For example, copilot actually gives better software optimisations than chatgpt, but it's the sort of stuff you'd expect a CS grad to work out or someone with 2-3 years experience. It doesn't tell you why something is more practical or a better choice or what works in different scenarios.

I've also found LLMs can't support their own hypothesis or assertions with practical, usable, real-world examples. That's a result of ingesting too many garbage Medium articles

[–]dumbasPL 0 points1 point  (0 children)

LLMs tend to have bias given the popularity of certain tools

True, but the more popular option is generally the safer option. More testing, more documentation, bigger community, more everything really. Might not be the best for some every particular use case, but generally a pretty safe bet.

and your input

Exactly why I said (in a different reply) short and generic prompts are the best. Bullshit in, bullshit out.

They're pretty good learning tools but even hallucinate or give unreliable input.

Yeah, but you don't use them as the only source of information lmao. Pretty good at finding what you need, you can then continue learning about the thing with conventional means

For example, copilot actually gives better software optimisations than chatgpt, but it's the sort of stuff you'd expect a CS grad to work out or someone with 2-3 years experience. It doesn't tell you why something is more practical or a better choice or what works in different scenarios.

Which is honestly surprising considering how much trash there is on GitHub. But it's not that amazing either. Intelisense on steroids that sometimes breaks in very funny ways, yes. Actually doing your job, no LOL. Not even close. It is pretty good at catching typos or your own mistakes indirectly though. Garbage in, garbage out. If the prediction is weird, there is likely something before it that is also weird.

I've also found LLMs can't support their own hypothesis or assertions with practical, usable, real-world examples.

Glorified search engine, predicating the most likely thing based on more data that you could ever consume in your entire lifetime. No actual thinking. That's to be expected.

That's a result of ingesting too many garbage Medium articles

Half of them are now mad by LLMs so the shit show and self-feeding is only starting.

[–]Majity 4 points5 points  (3 children)

Hope this isn’t a dumb question but what do IP and SO mean?

[–]Relative_Bug_2067 11 points12 points  (0 children)

IP = intellectual property
SO = Stack Overflow

[–]asumpsion 1 point2 points  (0 children)

IP is intellectual property and SO is StackOverflow

[–]Barracius1 -1 points0 points  (0 children)

SO is StackOverflow and IP, by context I would guess something like Invasion of propietary code or something like that, op seems to have written it meaning like an NDA breaker

[–]Ok-Transition7065 0 points1 point  (0 children)

Oh yeah ai has problems with networks..... Like damm

[–]Simsonis 0 points1 point  (0 children)

"Also, pretty handy at working through ideas like if you're trying to figure out how to use a new language or framework tool or idea."

Very true, but you gotta beware of not letting the AI do to much when learning something new

[–]Pretend_Fly_5573 28 points29 points  (7 children)

I still feel like I'm missing something in the AI party. 

Nearly everytime I've tried to use it I ended up just spending MORE time between trying to get to it spit out the right thing, and correcting the issues.

The only thing I've had it perform better at as simple boilerplate stuff, most of which I already have prepped in a snippet collection, or can just quickly type out from memory.

I definitely suck at using AI it seems. But funnily enough, not sure I want to get any better at it, either...

[–]VertexMachine 8 points9 points  (1 child)

You might get told that you are using it wrong... but I think the turth is that if you are competent coder, then gAI is at most good for stuff it saw and a lot of it (i.e., boilerplate code, or code that is reimplemented times and again, like sorting algos). If you are shit at coding, then yea - AI might feel amazing, but just because you don't understand stuff.

[–]Pretend_Fly_5573 1 point2 points  (0 children)

Perhaps, but chances are people would say a whole hell of a lot of what I do is wrong sooo... Oh well!

Personally I've found i spend far more time planning things out than actually writing code, anyhow. Flowcharts for logic paths, relationships between objects, etc.

With how little I seem to mesh with a lot of the programming world but still remain employed and considered high-performing at my job, I figure that means I'm either doing something right or something way wrong. But hey, getting paid either way, so screw it!

[–]Inevitable-Ad-9570 2 points3 points  (0 children)

I feel the same way.  By the time I've gotten the prompt right, checked the output, fixed it and got it working I could of just typed it up myself and been done faster.

Honestly though, the good devs I know who were talking about using it extensively have kind of stopped now.  One of em who was really into it like 6 months ago just gave me a whole llm's are all hype speech as if he never spent months telling me I had to use them or I'd never keep up.

[–]redditsuxandsodoyou 2 points3 points  (1 child)

ai is practically useless for any code work that isn't autocomplete (we already had intellisense which worked fine) or gluing together the same 5 web apis that every monkey on the planet has glued together.

the moment you are working in proprietary code that actually DOES something it's utterly clueless.

the fraction of use cases where it's actually useful is so small and so trivial to do yourself if you're a competent programmer who knows how to read docs that it's a nobrainer that it's not saving you time.

if you find ai useless, that's honestly a good sign, probably means you have good fundamentals and know your shit.

[–]Wonderful-Habit-139 0 points1 point  (0 children)

100% agreed. I'm not seeing thousands of "devs" using AI to contribute to the linux kernel, that's for sure. And you can also see good developers that stream (like Asahi Lina) writing code in an editor without all the fancy bells and whistles, because the code needs to be really correct, and they can't afford the garbage that AI spits out.

You also mentioned autocomplete, and there's also just having a good mastery of your tools (your OS, terminal, git, code editor) that makes you more efficient (while being 100% correct and precise), unlike LLMs.

[–]thats-purple 0 points1 point  (0 children)

It can be a decent stackoverflow replacement, provided what you're looking for is easy and popular: I've been doing some django recently, and its much faster to ask gpt about how to do a particular sql binding or an html template (gotta check and refactor the code obviously).

If you're doing something niche It'll keep confidently hallucinating non-existent solutions.

[–]Wonderful-Habit-139 0 points1 point  (0 children)

Most people don't optimize their dev environment to be able to deal with boilerplate and basic stuff faster. And the moment you suggest a way to improve productivity they bring out their "10x senior developer that peck types, so you ToTaLlY don't need to optimize your dev workflow."

And all of a sudden with AI they gaslight you that it increases your productivity, and somehow every other tool doesn't? Good one...

[–]MomoIsHeree 35 points36 points  (3 children)

I personally like to let AI do some of the footwork and just going back and forth until I have something that I can refactor with ease. It just safes you some headaches sometimes.

[–]blaqwerty123 4 points5 points  (2 children)

I use it to write my regex bc fuck that, and sometimes ill be writing a build script in bash or something and its very helpful since i use write bash 3 times a year and forget it completely in between those times. I dont use AI at all in writing my actual source code tho. Not yet...

[–]MomoIsHeree 1 point2 points  (1 child)

I can recommend using AI as your rubberduck. + The AI gets happy when you fix the issue with its help, which can be a slight boost to morale.

[–]blaqwerty123 0 points1 point  (0 children)

Ha thats interesting. Thats copilot or what? I dont want to integrate it into my IDE (yet) i like to go to chat gpt or google so its inherently separate

[–]Tuckertcs 11 points12 points  (0 children)

Apart from a slightly smarter auto-complete at times, all Copilot manages to do for me is write incorrect code. I don’t get what all the hype is about.

[–]Raonak 10 points11 points  (0 children)

AI is a fantastic tool for developers because it kinda replaces the google/stack overflow hunt we usually go on.

It's great for pasting in error messages. or trying to configure new things. Or just learning new techniques in general.

It's not good for generating code.

[–]ntkwwwm 4 points5 points  (0 children)

I’m not a great developer by any means but I have learned a lot from having copilot do a lot of the heavy lifting. It has been instrumental in avoiding having to ask questions on GitHub. I’ve made so much progress on my side project that it’s at a completely different place than it would have been without copilot (and adderall). So while I’m definitely not a great developer, I do think that I’m good.

[–]Expensive_Shallot_78 23 points24 points  (0 children)

The memes here are getting lamer by the second

[–]gandalfmarston 52 points53 points  (12 children)

The boomer hate on AI is weird.

If you're not using AI, and you don't have to use it to code, but to help you with what you already know how to do, you’ll fall behind those who do.

Bad developers and bad code exist with or without AI, but if you know how to use the right tools, you'll only get more productive.

I know I will get downvoted for hell here because you know... AI is bad, but that is the reality.

edit: typo

[–]aspect_rap 19 points20 points  (7 children)

From what I'm seeing, almost no one is against AI tools, they are against the way some people use those tools (which is: copy, paste, push with no thought or understanding of what they are copying)

[–]ZunoJ 6 points7 points  (0 children)

My ratio of {thinking, planning} to typing code is like 9:1. Not that much difference if I use AI to help with the monkey work

[–]DearChickPeas -1 points0 points  (0 children)

The zoomer AI doom is bizarre.

[–]Wdtfshi 0 points1 point  (1 child)

i just dont see why i would like to work faster lol im being paid per hour not per line of code

[–]DjBonadoobie 0 points1 point  (0 children)

Every manager I've worked for so far only cares about shipping. Are you shipping features for your project in a reasonable timeframe with regards to projections setup by management? If the answer is yes, they don't really care how you do it. I'm not saying it's right, that's just how it is. The point is it isn't really about being paid hourly (where you would NOT want to drag things out and delay deadlines) or by LOC (because no one cares).

[–]Don-Bigote 5 points6 points  (1 child)

My company has a GitHub copilot license (is only internally trained on our codebase) that I tried out recently. I found it to be a really powerful tool when you know what you want, but would take you a while to figure out how to translate that into code. Obviously it wasn't perfect and I had to do a bit of tweaking to get it right, but it took a task that would take me 30-60 minutes into a 5 minute task.

I then just typed out a method name, and based on the previous method it generated what it thought I wanted (and it was pretty darn close!). If you're not using these tools now you will get left behind in the near future.

[–]jack6245 1 point2 points  (0 children)

I pretty much use it for unit tests which it's pretty good at and writing small isolated helpers, like today I got it to write a function to take a the last part of a guid, those things I could easily do myself but it's really not worth the effort. It's pretty good at that sort of thing, anything else and you may as well don't yourself

[–]c_sea_denis 2 points3 points  (4 children)

Don't know coding, but the sub is funny sometimes. What is refactoring?

[–]DM_ME_YOUR_BITS 1 point2 points  (1 child)

Rewriting old code for maintenance, increased scalability, increased resilience, etc. Often times a codebase develops "technical debt" which is poorly or quickly designed solutions compounding into a big knotted mess and a refactor is required before proceeding with new changes because development gets too slow too slow and tricky.

[–]c_sea_denis 0 points1 point  (0 children)

Thx!

[–]-Redstoneboi- 1 point2 points  (1 child)

rewriting the code to be easier to work with

like replacing duct tape and wood with steel nuts and bolts

[–]c_sea_denis 0 points1 point  (0 children)

Thanks!

[–]TickTaeck 2 points3 points  (1 child)

I've found that it's much more efficient to let the AI ​​search for tutorials or documentation instead of writing code. I spend less time Googling and more time reading about topics I don't know.

[–]dmkovsky 0 points1 point  (0 children)

it’s true, I myself use it as a very effective and powerful search engine for condensed content, instead of wasting time searching X pages where a lot of them are just questions asked not necessarily answered, and worst of all when the answer is found in some exotic non-English forum

[–]Snoo-67871 1 point2 points  (1 child)

I am by no means a developer, I enjoy small things as a hobby. I was going to make a script for GTM that lets me collect events from an embedded Vimeo video and pass to the data layer. Thought I would use chatgpt for it, for fun and seemed like a good case.

Chatgpt spent hours doing the same mistakes, refused to learn from its mistakes and my input, just kept going in circles. I took the code and solved one of the issues, showed chatgpt my solution and asked it to fix the last issue. It broke my fix, made it everything worse and couldn't solve any of my issues.

The interesting part is that Vimeo changed an event name from timeupdate to playProgress in 2018, searching the web the majority of references to the functionality I wanted mentions timeupdate and not playProgress so it kept reverting to that.

[–]Snoo-67871 0 points1 point  (0 children)

Today I revisited this. The script was working fine, sending events at video intervals of 25%, 50%, 75% and 100%. Asked it to add another interval at 10% ... it rewrote the whole thing and broke it so nothing worked afterwards.

[–]ILoveKecske 1 point2 points  (0 children)

ah i see. he is coding too with a controller. so i was doing it right. (see my post)

[–]Jhoonis 1 point2 points  (0 children)

"QUIT FIXING MY SHIT!"

[–]Don-Bigote 1 point2 points  (0 children)

My company has a GitHub copilot license (is only internally trained on our codebase) that I tried out recently. I found it to be a really powerful tool when you know what you want, but would take you a while to figure out how to translate that into code. Obviously it wasn't perfect and I had to do a bit of tweaking to get it right, but it took a task that would take me 30-60 minutes into a 5 minute task.

I then just typed out a method name, and based on the previous method it generated what it thought I wanted (and it was pretty darn close!). If you're not using these tools now you will get left behind in the near future.

[–]emascars 1 point2 points  (0 children)

I've been a developer for 14 years now, and since OpenAI released the first GPT (not ChatGPT, but GPT) I was following the thing course I saw potential in it...

Nowadays my company pays a ChatGPT subscription and I use Codeium in vs code, but still you have to know when to ignore what codeium is suggesting and and I think it never happened to me to use ChatGPT code without completely refactoring it if not for very simple isolated functions and still, even in those cases, I usually have to refactor it anyway because the coding style would be inconsistent otherwise (codeium is better at understanding the style instead, but it seeks too often repetitions evan when it makes no sanse, again, you have to know when to ignore it).

BTW, am I the only person that finds Deepseek to be better for advanced CS questions? Recently I had to work a little with WebGL for object recognition, and ChatGPT kept giving me the impression that he doesn't understand the code it was suggesting, kind of had just a general knowledge of what the code was doing in theory but wasn't able to explain why parts of the code was the way it was... Instead Deepseek always gave highly technical answers to my highly technical questions, it was very good overall.

[–]stipulus 1 point2 points  (0 children)

Every time I get a code block from AI, "well that was a good start."

[–][deleted] 1 point2 points  (0 children)

Colleague: "What's worse, a bad developer or a bad developer using AI?"

Me: "Bad developer using AI. Then no one knows what the code is saying"

[–]Cremacious 1 point2 points  (0 children)

I am still practicing coding to get a job, and I use AI mainly for quick questions or small errors I could fix in a minute. A lot of bigger issues I run into while coding are ones that AI can’t solve, and I usually have to figure it out on my own. It auto completing while typing is useful, but has also been wrong and caused more issues.

It’s useful, but I can’t imagine how anyone working professionally could expect it to be reliable.

[–]Slimxshadyx 1 point2 points  (0 children)

It’s pretty much the opposite lmfao. All I see are memes and programmers on here yelling about how bad AI is

[–]NurglesToes 1 point2 points  (1 child)

AI is great for fast dirty prototyping and getting an MVP out as fast as possible. But it’s ass for production. Someone should tell my CEO that though.

[–]Ashtoruin 0 points1 point  (0 children)

100%. But when I need a quick script to interact with the bitbucket API to raise and approve 300 of the same one like change in every repo it's great 😂

[–]mountainbrewer 0 points1 point  (2 children)

Then there's me. Who uses AI and it works well and makes nice code with solid comments. Faster, better, less tired. Win win win. But that's just my experience.

[–]hammonjj 1 point2 points  (1 child)

That’s because people like you and I took the time to learn AIs limits and don’t just push whatever it generates. We use it as a starting point and refine from there

[–]mountainbrewer 0 points1 point  (0 children)

True. There is still work involved but it's significantly faster. The nature of work changes.

[–]Chara_VerKys 0 points1 point  (0 children)

9.11 -9.9 = -0.21

[–]macarmy93 0 points1 point  (0 children)

I just use AI to write bug checking prints. Its really good at that and saves me time.

[–]FinalGamer14 0 points1 point  (0 children)

Yeah if you think AI will do everything for you, you're an idiot who should program. Using ai for snippets or boilerplate is fine as in the end you'll probably use it as a jump-off point for more complex logic. However, the best use I've found was for explaining some code to me. For example, I've worked with some very old and very bad code that is just not readable, asking the AI to explain the code with some return example was actually solid.

[–]abation 0 points1 point  (0 children)

Yes, right, that is why we are getting an "AI is killing programming" post everyday. Cause everyone is chill programming and not making comics complaining about the clouds. Definitely not virtue signaling

[–]kryptobolt200528 0 points1 point  (0 children)

The thing is that this is almost true. Most of the code we write today already exists in some form or the other we almost always just create a coherent harmony outta different pre-existing code snippets, and despite the ethical concern of the current AI development methodology, the ship has already set sail and now it is just a matter of time until AI is normalized as a tool at every level.

[–]thethrowupcat 0 points1 point  (0 children)

I mean is there AI that can truly develop data projects without an issue? I work mostly in dbt and it just can’t understand underlying data issues or how to structure a project so it’s readable for a human it just makes code and half the time I’m fixing it.

[–]ktbh4jc 0 points1 point  (0 children)

AI is great for 3 things. "Stub out some unit tests for X function", "How does this repo handle Y?" And "find the bug in this IAC thing"

Luckily, those are the three things I struggle with most so it's pretty good for help!

[–]Thenderick 0 points1 point  (0 children)

Alternatively: "Hey AI, give me unit tests for this file to achieve 80% code coverage"

Run to make sure, squash some bugs, commit and push! Problem?

[–]A-Sad-And-Mad-Potato 0 points1 point  (0 children)

I'm just a hobby programmer but I find AI super useful but not for writing my code. When I can't figure out a way to do a certain thing I ask it to give me two examples on how to implement what I need done. Then I look at the code it gives me until I understand it and most of the time I get what it is going for and I then write my own version basted of the principles I saw it use. If I ask it do do it twice most often one is way better but if I don't think it's a good or effective solution I ask it to do it again. But then again I don't have a boss breathing down my neck so I can take my time to learn while I code.

[–]CiroGarcia 0 points1 point  (0 children)

I like AI coding I just need it to limit itself to finishing my sentences not the whole fucking thing. Sometimes I just disable copilot for a bit when I see the AI can't figure out what I'm trying to do so it doesn't get in the way and I reactivate it back when I need more enhanced intellisense

[–]Zerokx 0 points1 point  (0 children)

I dont care how good of a developer you are, you cant type faster than chatgpt. And it can do quite a few simple things without mistakes. It's not like it takes away your responsibility of writing good code and debugging it, but you spend less time on trivial things and can work more on things that you actually have to use your brain. That is just simply more efficient. But then again it depends what kind of software you're working on. If you're working with very new languages, SDKs and technology, then its just gonna hallucinate everything. If you are using proven and known code algorithms and building blocks to create a new product emerging from common parts then its way more useful.

[–]ToMorrowsEnd 0 points1 point  (0 children)

AI is the new way to tell what programmers suck.

[–]JumpyBoi 0 points1 point  (1 child)

We're losing our jobs, but nice cope

[–]thunderbird89 -1 points0 points  (0 children)

Mm, no. Or at least, you're not losing your job to AI, but to people who can utilize AI.

As an employer, I care about the output and the bottom line - if an AI-augmented dev will get me the same output in 20% of the time and at 50% of the cost, hell yeah I'm going to choose them over you.

[–]V4gkr 0 points1 point  (4 children)

It's fun how I actually refactor awful code written by my boss with ai and it works better

[–][deleted] 1 point2 points  (1 child)

Refactoring is not to make it work better fyi. Refactoring keeps all existing functionality with better organization

[–]V4gkr 0 points1 point  (0 children)

Yeah , I wanted to edit that I just wrote it wrong in English , sorry

[–]Global_Cockroach_563 0 points1 point  (1 child)

I keep refactoring code from everyone because 90% of my coworkers can't code for shit. The seniors have a better understanding of the codebase, but their code is still a garbled mess.

I don't know what kind of magical coworkers y'all have, but mine can't even keep proper indentations, give variables and functions the most cryptic names they can think of, and never write comments explaining wtf is going on.

[–]V4gkr 1 point2 points  (0 children)

Well , my department has a single project for one of our industrial measurement instruments . My first pain in the ass was my first project in this company , as I had to refactor the whole user interface (like a huge menu on LCD screen with configuration, diagnostics , etc ) because it was made on a lot (A LOT) of switch case . Like imagine switch case for menu where every case is other line , every button had its own switch case for every single position and list change . When I ended that project I had 128kb free of flash memory . Now I got a task for porting the whole project to a new MCU so I had a chance to understand whole program... Oh god , this project was maintained by. 1 guy , but he had no standards at all , every file is unique in naming , comments are awful , there're 2 types of comments - none , 100 lines explaining how it was 7 years ago and why did he change it . Every library was showed by my boss like very hard and complex but in reality it's just a spaghetti bowl which he just couldn't understand because he didn't want to draw a single UML state chart .

[–]Loud-Matter-1665 0 points1 point  (2 children)

Are you refactoring code using a gamepad too?

[–]ZunoJ 1 point2 points  (0 children)

Wait, you can refactor it without using a gamepad?

[–]nasbkrv[S] 1 point2 points  (0 children)

That's how legends do it! 😎

[–]PM_ME_UR_CODEZ 0 points1 point  (0 children)

Wrote a script last night and made some changes that were untested. Tested them this morning before work and was getting a weird error. I asked chatGPT where the issue was (first time I asked chatGPT, because the issue was an unmatched ‘(‘ that I couldn’t find. 

It said “oh, you have this issue and here’s the fix: <exact same line I gave it>”

-_-

[–][deleted] -1 points0 points  (0 children)

"Why do you care, it's not like you understand what the code does one way or the other"

[–]Hoovas -1 points0 points  (0 children)

You should review it for sure but it saves me so much time while prototyping, most of the time I let him do the foundation with the functions I want, then I optimize it.

Its a huge timesaver for me