Live data from Hacker News

I won't deliberately use AI for programming

mahdikarimi.com

41–50 of 67 posts

Re: I won't deliberately use AI for programming

#41

I do so many things manually that have been successfully automated for a long time. Washing dishes, splitting firewood, grinding coffee, owning manual transmission cars, I could go on. Some things are subjectively better like splitting firewood; It's more work but quieter. Some things are objectively better; washing dished by hand are cleaner. I don't think about it too much. I guess I'll just add programming to that…

Dishwashers are better than hand in literally every sense.

More water efficient, chemical efficient, cleaner since the water gets MUCH hotter.

Re: I won't deliberately use AI for programming

#42
post #3

I strongly disagree with this perspective. I have found GPT4 in particular to be very helpful in learning new programming languages and improving my overall coding. I still solve problems myself and I still read books, but GPT4 is the TA that I can have a conversation with about a piece of code. It's all about how you use it. If you just ask it to tell you complete answers or generate code on a blank page then you're…

It's a really bad TA that has no self awareness of its limitations. You are well aware that it hallucinates, right? You probably have observed it yourself in domains you're familiar with. But how would you recognise a hallucination in something that you have no familiarity with? "Learning something new" from LLMs is like trying to learn something new from a con artist. Sure, they might actually tell you the truth, bu…

When it comes to programming, when an LLM hallucinates something in an area I'm not familiar with, it's usually very obvious that it is not correct because it just does not work at all. For me, programming hallucinations have never fallen into the case where it appears like everything is working but actually isn't doing the correct thing.

So then I just forward that back to the model, or in the very worst case use my own brain to fix the problem the LLM generated.

In either case, I'm still better off than had the LLM not existed, because even an incorrect solution is closer to the correct solution than nothing at all.

I now have something that's close to solving my problem that I wouldn't have been able to come up with solely on my own. It just needs a little tweaking to be correct, which I can muster my way through with a little help from the LLM or Google.

Re: I won't deliberately use AI for programming

#43
I used Copilot for several months and there were times when I was “wow”ed and others where it’s just got in the way.

I recently decided to make my editor much more minimal and even went so far as to disable autocomplete entirely. So far I haven’t noticed a reduction in my productivity and actually find it much easier to think about what I’m writing since I’m not having to correct autocomplete and Copilot all the time. All the extra things popping up on the screen were really distracting and I find that for me, a minimal approach gives me more space to think deeply.

Re: I won't deliberately use AI for programming

#44

I used Copilot for several months and there were times when I was “wow”ed and others where it’s just got in the way. I recently decided to make my editor much more minimal and even went so far as to disable autocomplete entirely. So far I haven’t noticed a reduction in my productivity and actually find it much easier to think about what I’m writing since I’m not having to correct autocomplete and Copilot all the time…

The main thing I find copilot good for is things that are easy to validate, but tedious (not hard!) to write. Stuff like colors for different statuses, or error messages.

I actually love it for writing error messages. Keeps me in flow better not having to switch to writing Human English every five lines when something fails validation.

Re: I won't deliberately use AI for programming

#45
post #3

I strongly disagree with this perspective. I have found GPT4 in particular to be very helpful in learning new programming languages and improving my overall coding. I still solve problems myself and I still read books, but GPT4 is the TA that I can have a conversation with about a piece of code. It's all about how you use it. If you just ask it to tell you complete answers or generate code on a blank page then you're…

It's basically a form of rubber duck debugging.

I also use for quickly writing tiny programs to isolate and test a specific piece of functionality.

Re: I won't deliberately use AI for programming

#46
post #3

I strongly disagree with this perspective. I have found GPT4 in particular to be very helpful in learning new programming languages and improving my overall coding. I still solve problems myself and I still read books, but GPT4 is the TA that I can have a conversation with about a piece of code. It's all about how you use it. If you just ask it to tell you complete answers or generate code on a blank page then you're…

It's a really bad TA that has no self awareness of its limitations. You are well aware that it hallucinates, right? You probably have observed it yourself in domains you're familiar with. But how would you recognise a hallucination in something that you have no familiarity with? "Learning something new" from LLMs is like trying to learn something new from a con artist. Sure, they might actually tell you the truth, bu…

No, it's more like getting bad advice from Stack Overflow or Reddit.

Usually you notice it's broken because it doesn't work.

There may be some advice that seems to work, but has subtle issues. (For example, race conditions.) Having more experience can help in spotting these problems.

Either way, copying code blindly isn't a good idea. In a professional situation, better testing and code review can help.

Re: I won't deliberately use AI for programming

#47

Earlier quoted context omitted.

My experience has been that the hallucinations in GPT4 are actually pretty rare. But in any case, if I choose to use code it suggests I ask it for explanations and then I verify those myself by other means, e.g. tests. I think it's too strong to call it a really bad TA. I'd say it's an imperfect TA and you need to check it's work, but it's work still has great value.

It's not just things that can be caught with tests. You wouldn't know if you got recommended an obsolete API, a dated pattern, or a charged foot gun, and if you're looking up docs for every suggestion I doubt that'd save you much time compared to reading docs through to begin with.

I can definitely see those things being problems, but they are much more likely to occur when asking an LLM to generate code for you. That's not the best coding use case for LLMs IMO, it's much better to provide it code already written and ask it for explanations, bug fixes, refactoring etc. Then it rarely introduces new API calls etc

Re: I won't deliberately use AI for programming

#48

I think that for some types of programmers, AI-assisted programming feels no different from what they already do. Those types feel that the end goal of 'working code' is all that matters. Their definition of 'working' meaning that the functional requirements of the feature are met. That mindset is an extreme. A developer's job is to solve a problem for someone, not to code, but copy/pasting code without understanding…

As a front-end lead and long time game programmer, I've been using copilot at work and home since it was invite-only. This assessment isn't accurate, at least in my case. Copilot mostly:

- Writes the same code (often verbatim) I was about to write, often multiple lines of it. "Ok, next I'll loop over the rigidbodies and apply the force to the ones in range- oh look the loop is already there"

- Gives me some API calls I didn't know about, much easier than finding a stackoverflow post. There's generally not much enlightenment to be had diving deep into the formatting of java.date or some such - if I just want to format a date and move on, it's awesome being able to type a comment "//format the date as.." and get the code. The IDE will yell at me right away if it gave me something deprecated, and I'll hover over the unfamiliar bits it put there anyway to make sure everything is sensible.

- Solves the small problem I'm looking at in a way I didn't think of, or even alerts me to an error in my thinking frequently enough - "Why is it doing that? Oh yeah, I really should've done that.."

My codebases haven't suffered, and I'm still diligent to keep them maintainable, well-tested, and fundamentally sound.

Overall, it speeds things up a lot and frees mental space for me to think about the big picture more. I generally understand the code being put out just as well as any other code I've written - be honest, you don't read a book on every API call you copy from Stack Overflow. The beauty of a good abstraction is that we generally don't have to.

If anything I think it's helped me become a better programmer over the past year, elevating the mental level of abstraction I work at somewhat.

I can see what you said being a problem for somebody just starting out though. And as the author said (and I found trying to learn Rust with Copilot on) it can even be an annoying distraction in that case.

As an aside, copilot and gpt have certainly degraded lately with hallucinations way up (copilot chat has been extra disappointing lately), maybe to save server costs. Could be why we're seeing more negative sentiment.

Re: I won't deliberately use AI for programming

#49

Earlier quoted context omitted.

It's a really bad TA that has no self awareness of its limitations. You are well aware that it hallucinates, right? You probably have observed it yourself in domains you're familiar with. But how would you recognise a hallucination in something that you have no familiarity with? "Learning something new" from LLMs is like trying to learn something new from a con artist. Sure, they might actually tell you the truth, bu…

When it comes to programming, when an LLM hallucinates something in an area I'm not familiar with, it's usually very obvious that it is not correct because it just does not work at all. For me, programming hallucinations have never fallen into the case where it appears like everything is working but actually isn't doing the correct thing. So then I just forward that back to the model, or in the very worst case use my…

You are talking about most obvious hallucinations such as inventing a non-existent API.

However, those are indeed trivial. What's not trivial is not using APIs that exist for your particular problem; using obsolete patterns; not recognising that a particular approach is a dead end; not recognising potential future problems. All those problems fall in the same bucket of not knowing what you don't know, yet having a (seemingly fine) solution, which is worse than not having a solution, because that would force you to go and figure things out yourself (presumably reading recent documentation, etc).

I recognise that some people approached programming in the same way before LLMs, copying stuff from SO and adjusting till it works without ever understanding what they're doing. I guess LLMs can be seen as a neat extension of that "learning style" (which btw is precisely what OP warns against), but it does seem somewhat dysfunctional.

Re: I won't deliberately use AI for programming

#50

Earlier quoted context omitted.

It's a really bad TA that has no self awareness of its limitations. You are well aware that it hallucinates, right? You probably have observed it yourself in domains you're familiar with. But how would you recognise a hallucination in something that you have no familiarity with? "Learning something new" from LLMs is like trying to learn something new from a con artist. Sure, they might actually tell you the truth, bu…

No, it's more like getting bad advice from Stack Overflow or Reddit. Usually you notice it's broken because it doesn't work. There may be some advice that seems to work, but has subtle issues. (For example, race conditions.) Having more experience can help in spotting these problems. Either way, copying code blindly isn't a good idea. In a professional situation, better testing and code review can help.

Yes, but collectively we understand that SO or Reddit are unreliable, plus it's usually one-way and we don't see people posting bad advice defending it just for us. LLMs, on the other hand, are extremely convincing, while being even less trustworthy than SO/Reddit.

Just make a mental experiment and imagine that every comment here praising LLM coding skills is actually about copypasting stuff from SO. Does it not seem alarming to you?

Post reply on HN