8 ms·
Early 2023, when everyone started using chat GPT for coding, I thought it would be a big boost because it enabled us to quickly employ a large number of people
by sasaf5 2y ago
Early 2023, when everyone started using chat GPT for coding, I thought it would be a big boost because it enabled us to quickly employ a large number of people in a project regardless of language or framework.
An year into the project I am forced to revise my opinion. When browsing my code-base I often stumble in abstruse niche solutions for problems that should not have existed. It was clearly the work of someone inexperienced walking through walls in an AI-fuelled coding frenzy.
Having an oracle that knows all answers is useless if you don't know what to ask.
- greenie_beans 2y agoi started to not like coding once ai became involved
- forgetfreeman 2y agoCoding just keeps getting grosser and weirder decade over decade as new layers of abstraction and complexity get piled on. Just about everyone who does this shit for a living eventually hits a break point where the headassery du jour becomes too much to turn a blind eye to.
- ramones13 2y agoI’ve had a project I’ve been doing for ~6 months learning python through Copilot+ChatGPT. It feels like any other project that accrues technical debt, but that debt is just a lot weirder. It was rough at first, but refactoring has gotten a lot better recently with bigger context sizes.
- gtirloni 2y agoIf you need Copilot to code in Python, have you really learned Python?
- antupis 2y agoIf you need Google to code in Python, have you really learned Python?
- raincole 2y agoDoes it really matter though? It sounds awfully like when a school teacher said you're not going to have an calculator in your pocket.
- elicksaur 2y agoAI is not replacing the same function as a calculator does when solving a math problem. Using AI to “help” learn to program is replacing the person’s effort thinking through the problems fully and is ultimately going to stunt their learning.
- Uehreka 2y agoThis feels kind of like saying “why do I need to learn how to budget? The calculator will just do it for me.”
- swatcoder 2y agoFor a senior-level professional? Yes, it does matter. I wouldn't be comfortable with an accountant who couldn't do practical arithmetic in their head, or a surveyor who didn't have a fluent grasp of trigonometry and the ratios or function values for common angles. Of course -- I don't care about the people working for them as a bookkeeper or assistent. They can be button monkeys as much as their boss lets them, but I also wouldn't expect those folk to reach very high in their career. Not everyone's going to, and a disinterest in and lack of technical fluency is a darn good predictor. Your teacher was giving good advice about building skills and internalizing knowledge, because those are what contribute to mastery of a craft; maybe you were just being too pedantic or cynical to hear it?
- wruza 2y agoI think this advice is backwards, as is the problem. I’d trust an accountant’s mind or a builder’s eye if I knew that they are acting from experience. But you don’t wanna trust someone who believes in-their-head is superior or reliable and makes you good. The core idea is no, calculating in your head doesn’t turn you into a pro. Being a pro makes calculating in your head safe enough to rely on until you get to your desk and double-check. That said, I was an integrator half my life and seen some accountants, big and small. Everyone used a calculator, it’s right next to their mouse and there’s another one elsewhere. And no one ever tried to talk about numbers afk, except for ballparks. Most of the times they suggest to go and query a db together. I find it very professional.
- ramones13 2y agoI don’t need 90% of my IDE features. For me personally, it’s a fantastic way to learn. I could definitely see people just using it and not actually learning, but to each their own.
- SoftTalker 2y agoIf you need Copilot to code in Python do your really know how to program?
- Kostchei 2y agoThis is my new capability- I am not a coder or a programmer and I can get things built, in my own time, at my own speed, solo. Would it be better code if someone with 3 years of university and 5 years of coding practice did it? Yes, very probably, but the gap seems to be narrowing. Humorously I don't know enough about good code to tell you whether what I build with llms is good code. Sometime I build a function that feels magical, other times it seems like a fragile mess. But I don't know. Do I know "javascript" or "python" or the theory of good coding practice? No, not currently. But I am building things. Things that I have personal, very specific requirements for. Where I don't have to liaise or berate someone else. Where I don't have to pay someone else. Where I don't share the recognition (if there is any ever) of the thing, I and only I have produced- (with chatGPT, Gemini and most recently llama3). Folks have been feeling superior for 70 years and earning a good living because they spoke the intermediary language of compute engines. What makes them actually special NOW is computer science, the theory- the languages, we have very cheap (and in the case of open source local models free) translators for those now. And they can teach you some computer science as well, but that is still time and practice. I'm the muggle. The blunt. And I'm loving this glowy lantern, this psi-rig.
- solarengineer 2y agoOne of the lessons that one learns as a programmer is to be able to write code that one can later read back and understand. This includes code written by others as well as code written by oneself. When it comes to production quality code that should capture complex and/or business-critical functionality, you do want an experienced person to have architected the solution and to have written the code and for that code to have been tested and reviewed. The risk right now is of many IT companies trying to win bids by throwing inexperienced devs at complex problems and committing to lower prices and timelines by procuring a USD 20 per month Github Co-Pilot subscription. You individually may enjoy being able to put together solutions as a non-programmer. Good for you. I myself recently used ChatGPT to understand how to write a web-app using Rust and I was able to get things working with some trial and error so I understand your feeling of liberation and of accomplishment. Many of us on this discussion thread work in teams and on projects where the code is written for professional reasons and for business outcomes. The discussion is therefore focused on the reliability of and the readability of AI-assisted coding.
- anonzzzies 2y agoGood one, however, like Google making memory worse, copilot seems to erode knowledge of programming quite quickly. Last week I was with a colleague at my house; when I hired him during covid he knew these things just fine, but after not having to type in a list comprehension for around 2 years now, when my Starlink was down for a bit, he couldn’t for the life of him create one; he asked Claude opus on his phone instead.
- Aerbil313 2y agoFor real. I have the same experience. I'm 19, freelance developer writing Python among other things. Except I never learned Python syntax, and maybe never will.
- antfarm 2y agoLearning to be a good programmer is as much about learning how to avoid technical dept as it is about learning to use a programming language. It may take a while until an AI assistant will be able to help with that.
- crazygringo 2y agoHow do you know it was "AI-fuelled"? And what makes it a "frenzy"? People have been committing terrible code to projects for decades now, long before AI. The solution is a code review process that works, and accountability if experienced employees are approving commits without properly reviewing them. AI shouldn't have anything to do with it. Bad code shouldn't be passing review period, no matter if it was AI-assisted or not. And if your org doesn't do code review, then that's the actual problem.
- Incipient 2y ago"give me a function to return the top 10 users" - copy paste "give me another to email a template to a list of users" - copy paste AI makes it much easier to push out bad code, fast...in a "frenzied" way one could say.
- eastbound 2y ago> and accountability if experienced employees are approving commits without properly reviewing them. You’re putting the entire responsibility on senior employees. So we need much more of them. In fact, we don’t need juniors, because we can generate all possible code combinations. After all, it’s the responsibility of the seniors to select which one is correct. It’s like how hiring was made crap by the “One-click apply” on LinkedIn and all other platforms. Sure it’s easy for thousands of people to apply. Fact is, we offer quite a good job with high salary, and were looking for 5 people. We’ve spent a full year selecting them, because we’ve receive hundreds of irrelevant applications, probably some AI-generated. It’s no use to flood a filter with crap, hoping that the filter will do better work because it has a lot of input.
- xanderlewis 2y agoThis is almost a special case of the very similar (and common) argument that ‘AI-generated misinformation isn’t bad; we’ve always had misinformation’. The answer is also the same. Volume. AI makes it trivially easy to generate vast amounts of it that don’t betray their lack of coherence easily. As with much AI content, it creates arbitrary amounts of work for humans to have to sift through in order to know it’s right. And it gives confidence to those who don’t know very much to then start polluting the informationsphere with endless amounts of codswallop.
- osigurdson 2y agoAgree. I use AI less now for coding than I did a year ago. I still use it a lot but it is a better teacher than a doer.
- teeray 2y agoIt’s also just not as good at the task anymore. It frequently gets lazy and gives you an outline with a bunch of vague pseudocode. Compare to when GPT-4 was slower at producing output, but all of that output was solid, detailed work. Some of the magic that made you say “wow” feels like it’s been enshittified out of it.
- no-mana 2y agoI noticed that like since a week ago? Output faster, but not impressive. Now I just skip to stack overflow or docs. The output is also giving error a lot more, as if the libraries on which the example is based off was old. Sometimes it's really trivial task just to save time, and it's just not of any help. Still helpful when you want to start something new, it just doesn't scale that well.
- throwaway14356 2y agooh, i didn't think of that. stack overflow was great early on but then the answers aged poorly
- pwdisswordfishc 2y agoNo, they were always rather poor. It’s you who’s matured enough to notice.
- 6510 2y agoYes, rather poor but people can always post new answers and votes sort the answers. It might not work all that well but there is a mechanism for improvement and to keep things up to date. Language models can copy the top answers from SO, ingest docs and specs etc. And then the information is never updated? Or are they going to train it from scratch? On what? Outdated github saved games?
- beeboobaa3 2y agoI sometimes try the free chatgpt when I run into a problem and it's just hilarious how terrible it is. Loves to go around in circles with the same made up solution that has no basis in reality, using functions in libraries that would be great if they actually existed.
- raincole 2y ago> Having an oracle that knows all answers is useless if you don't know what to ask. You just need to ask it what to ask. /s
- jrockway 2y agoRemembering more than 4096 tokens is my superpower.
- ein0p 2y agoHow ‘bout remembering a million tokens? I’m not feeling too confident about that. Basically my only moat, if there is one, is that I’m able to rely on higher level cognition which LLMs don’t yet have, rather than just on associative memory alone.
- iwontberude 2y agoExcept these models with high token counts tend to forget the tokens at the beginning of the prompt anyways.
- ein0p 2y agoSo do I, and worse. Look, all I’m saying is I’m thankful for this crutch that helps me deal with the limitations of my associative memory, so as long as it can’t think and can’t replace me entirely
- yonaguska 2y agobacopa and lions mane was night and day for my limited memory. But, the obvious, writing simpler code, keeping a notebook while working, etc, and really spending time breaking down problems into much smaller scopes, while simultaneously keeping copious notes on where I am in a given process helped immensely with dealing with peanut brained memory. sure, it's not quick, but my work is usually very readable and understandable for the future reader. I'm not convinced that a tool to help me overcome that memory barrier would actually help me write better code, maybe just write worse code faster. Of course, that's probably the corporate goal though.
- ein0p 2y agoLions mane didn't seem to do much for me. My memory is actually not that bad, though certainly I have seen people with _much_ better memory than mine. I still maintain contact with some of them I met in college, and then later in the various companies. It's just that I deal with so much information and so many streams of it, even writing it down would be a massive chore. I would pay for a pre-packaged system which could _locally_ and _privately_ make sense of all the emails, PDFs, slack messages, web pages I saw, other documents shared with me, code, etc etc, and make it all easily queryable with natural language, with references back to the sources. Sooner or later someone will make something like that.
- AlwaysRock 2y ago> It was clearly the work of someone inexperienced walking through walls in an AI-fuelled coding frenzy. Isnt this what code reviews are for? I catch a decent amount of code that looks AI generated. Typically, some very foreign pattern or syntax that this engineers never used nor is common in the codebase. Or something weirdly obtuse that could be refactored and shows a lack of understanding. Normally I ask something like, "Interesting approach! Is there a reason to do it this way over (mention a similar pattern in our codebase)?" or if it's egregious, I might ask, "Can you explain this to me?". This feel similar to early career engineers copy pasting stack overflow code. Now its just faster and easier for them to do. It's still fairly easy to spot though.
- adastra22 2y agoNot all organizations can afford code reviews.
- AlexandrB 2y agoIf you're trying to do things efficiently you can't afford not doing code reviews. Only well-funded organizations can afford to write the same code twice after the first attempt has to be thrown out.
- rixed 2y agoI don't understand. Is code review supposed to avoid writing coffee twice?
- aaronbrethorst 2y agoI recommend drinking coffee before requesting a code review or posting on an online forum.
- nox101 2y agoI work at a FANMG company and see the value of code reviews for th code we're working on. But, I shipped 20 commercial products before that with no code review, just play testing (games). Our velocity without code review was easily 2x what it is with. For those projects I think that would still be true whereas I'd never suggest getting rid of code review at my current job. The point being I think it depends on the project, it's size, audience, lifetime, etc whether or not code review is a win. my gut says it usually is a win but not always
- stouset 2y ago> A year into the project I am forced to revise my opinion. When browsing my code-base I often stumble in abstruse niche solutions for problems that should not have existed. This is a widespread problem regardless of AI. Hence the myriad Stack Overflow users who are frustrated after asking insane questions and getting pushback, who then dig their heels in after being told the entire approach they’re using to solve a problem is bonkers and they’re going to run into endless problems continuing down the path their on. Not that people aren’t on too fine a hair trigger for that kind of response. But the sensitivity of that reaction is a learned defense mechanism for the sheer volume of it.
- nottorp 2y ago> Hence the myriad Stack Overflow users who are frustrated after asking insane questions and getting pushback, who then dig their heels in after being told the entire approach they’re using to solve a problem is bonkers and they’re going to run into endless problems continuing down the path their on. The problem is, SO can't tell someone who asks an insane question from someone who asks the same question but has constraints that make it sane. * So in time, sane people during unusual stuff stop asking questions and you're left with homework. * For example, "we can't afford to refactor the whole codebase because some architecture astronaut on SO says so" is a constraint. Or another nice one is "this is not and will never be a project that will handle google-like volumes of data".
- andybak 2y ago> The problem is, SO can't tell someone who asks an insane question from someone who asks the same question but has constraints that make it sane. Stack Overflow is not there to help you solve your use-case. It's there to create a body of knowledge that everyone can refer to. You need to spell out your specific reasons so that the question and answers become useful to others. A lot of the friction on Stack Overflow comes from people thinking it's a free help website rather than an attempt to create a collaborative knowledgebase.
- nottorp 2y ago
- 1-6 2y agoI think humans are excellent at finding fault. It’s easier to deconstruct a problem than it is to reconstruct one from scratch. Having an oracle that knows how to put a framework of events together (even wit errors) is much better than asking a human to do it from scratch.
- debarshri 2y agoI recently was stumbled upon a code change done by a colleague who just followed the suggestion as is from Copilot, where it recommend `func (string, string) (error, struct)` whereas everywhere in the code we use `func (string, string) (struct, error)` When I asked him what prompted him to do that, he said copilot suggest it so I just followed. I wonder if you could hijack copilot's results and inject malicious code as many end users does not understand lot of the niche code it generates sometimes, you could manipulate them to add the malicious code to the org's codebase.
- vintermann 2y agoThe insidious thing is that quite possibly, it "feels" there should be a couple of bugs like that because all the codebases it was trained on had a few. It might even take the context of the typos in your code comments, and conclude "yeah, this easy to miss subtle error feels right about here".
- throwthrowuknow 2y agoThat is a problem but thankfully there is a lot of attention on training with highly curated high quality data right now because it is a known problem. Buggy code is still valuable training data if you use it as part of a question and evaluate the response against a corrected version of the code when training the model to perform a task like bug fixing.
- ben_w 2y agoIt's definitely possible to inject malicious code that humans don't spot, there was a whole competition dedicated to humans doing this in C well before LLMs: https://en.wikipedia.org/wiki/Underhanded_C_Contest https://en.wikipedia.org/wiki/Underhanded_C_Contest Now I'm wondering, can you put in a comment which the LLM will pay attention to such that it generates subtle back-doors? And can this comment be such that humans looking at the code don't realise this behaviour will be due to the comment?
- golergka 2y ago
- romeros 2y agoIt is difficult to get a man to understand something when his salary depends on his not understanding it. ~ U. Sinclair A significant problem is the subconscious defense mechanism or bias that compels us to conclude that AI has various shortcomings, asserting the ongoing need for status quo. The capabilities of GPT-3.x in early 2023 pale in comparison to today's AI, and it will continue to evolve and improve.
- signatoremo 2y agoI’m surprised to see this comment was downvoted heavily. The quote is very popular around here, to the point where there is an Ask HN if it’s the most quoted quote: https://news.ycombinator.com/item?id=27771186 https://news.ycombinator.com/item?id=27771186 Yet people don’t like it in this thread. Does it touch a nerve?
- codegladiator 2y ago"genie granting 3 wishes gone wrong" is making a come back
- jongjong 2y ago>> Having an oracle that knows all answers is useless if you don't know what to ask. That is a great point. The issue of not asking the right questions has been around as far as I can remember but I guess it wasn't seen as the bottleneck because people were so focused on solving problems by any means possible that they never had to think about solving problems in a simple way. We're still very far from that though and in some ways we have taken steps back. I hope AI will help to shift human focus towards code architecture because that's something that has been severely neglected. Most complex projects I've seen are severely over-engineered... They are complex but they should not have grown to hundreds of thousands of lines of code; had people asked the right questions, focused on the right problems and chosen the right trade-offs, they would have been under 10K lines and way more efficient, interoperable and reliable. I should note though, that my experience with coding with AI is that it often makes mistakes for complex algorithms, or it implements them in an inefficient way and I almost always have to change them. I get a lot of benefit from asking questions about APIs and to verify my assumptions or if I need a suggestion about possible approaches to do something.
- taneq 2y ago> Having an oracle that knows all answers is useless if you don't know what to ask. Honestly I find this to be the biggest advantage to using a coding LLM. It's like a more interactive debugging duck. By the time I've described my problem in sufficient detail for the LLM to generate a useful answer, I've solved it.
- joshstrange 2y agoLLMs are no excuse for bad code reviews or developers who don’t know what it’s spitting out. In my code reviews the person who wrote the code needs to explain to me what they changed and why. If they can’t then we are going to have a problem. If you don’t understand the code that an LLM spits out you don’t use it, it’s that simple. If you use it and can’t explain it, well… we are going to have to have some discussions and if it keeps happening you’re going to need to find other employment. The exact same thing has been happening for pretty much the entire time we’ve had internet. Stack Overflow being the primary example now but there were plenty of other resources before SO. People have always been able to copy/paste code they don’t understand and shove it into a codebase. LLMs make that easier, no doubt, but the core issue has always been there and we, as an industry, have had decades to come up with defenses to this. Code review being the best tool in our toolbox IMHO.
- chx 2y ago> Having an oracle that knows all answers is useless if you don't know what to ask. But that's not what these LLM systems are. https://hachyderm.io/@inthehands/112006855076082650 https://hachyderm.io/@inthehands/112006855076082650 > You might be surprised to learn that I actually think LLMs have the potential to be not only fun but genuinely useful. “Show me some bullshit that would be typical in this context” can be a genuinely helpful question to have answered, in code and in natural language — for brainstorming, for seeing common conventions in an unfamiliar context, for having something crappy to react to. > Alas, that does not remotely resemble how people are pitching this technology. It is exactly what happened to you: it wrote bullshit. Plausible bullshit but bullshit nonetheless.
- loceng 2y agoYou need to pay 80% of the efficiency improvement for a higher-tiered curated set of code output from only senior-experienced developers. /s
- shufflerofrocks 2y ago>Having an oracle that knows all answers is useless if you don't know what to ask. This sentence summarizes the issue with the current AI debacle, along with the whole "just copy/pase code from stackoverflow and earn top bucks" meme that was going around in 2010s. You're not gonna be a valuable dev if you're just write wrong code faster. Not only does chatgpt/copilot give haphazard code half of the time, it approaches seemingly random syntax and format. Even if LLMs are polished, you're gonna need stand software engineering knowledge to know what's right and wrong.