For example you expect: x[i]
But copilot suggests: x[i+1]
…and you think, and you think, and then one of two things happens. Either you satisfy yourself that the answer is indeed x[i], or you accept x[i+1] and sheepishly thank Copilot for catching a bug today.
You could have copilot on in the background and never accept a suggestion, and it’s still a productivity enhancement.
Also in the situation where it suggests x[i+1] and it's wrong, doesn't that annoy you?
In both cases I'm sure this is just temporary while LLMs get better. But my experience was they were _just_ a little too annoying last time I used them.
yes
However, it introduced a very subtle bug where it used a loop counter `i` where it should have been indexing into an array like `arr[i]`, but it still typechecked and happened not to cause insane errors. Took a lot of time to track down later, and it's a bug I never would have written in myself.
I'm in the same boat but I must admit the temptation is increasing.
It's just another tool. So I guess the good old "will never stop using emacs" kind of attitude applies here too?
Relying on code-completion for coding or relying on google maps for navigation dims your ability to do these things. Given that copilot is a remote service that I do not control, I will not voluntarily tie my ability to write software to it.
Coilot is a conditional, unreliable, untrustworthy, ability-as-a-service. No thank you.
How can you be sure of that?
I know scientists who use ChatGPT to rewrite their text to be clearer. They've also used it to pose novel interesting questions about a situation.
On my side, I've found ChatGPT very helpful to explore/compare which library to use to solve my problem and show examples how that library is used.
It's also been very helpful lining up Haskell types and translating GHC error messages into English. Sure, those are non-creative tasks, but it's surprisingly good at them.
It can’t really reason - it’s just very good at guessing the right answer if there are a lot of examples.
It also lies somewhat frequently.
If we have to double check its output, it kind of defeats the purpose - at least part of it - as the “cognitive burden” is still on us.
P.S. Not sure what you mean by “lining up” Haskell types … but don’t LSPs already give us clear information about the inferred types and do so with nigh zero chance of errors.
Yes of course.
Libraries: I look at the libraries it suggests, see if they have documentation or GitHub activity.
Lining up types: say you have a `List (Maybe a)` and require a `Maybe (List a)`. This is a simple example, of course real life is much more complicated. ChatGPT tells you. Can you trust it? Well did it make the compile error go away?
(Sure, I can think of three ways to turn a `List (Maybe a)` into `Maybe (List a)`. Only one will be what I want, but it's easy to tell whether ChatGPT gave me the one I wanted.)
Although might as well just use Google directly which will send you either to Stack Overflow or Reddit where there are comments discussing the issue with back and forth fleshing it out or to a bunch of tutorial sites where you can source opinions from each site.
edit: nevermind the attempt at your puzzle, my solution doesn't work.
You wouldn’t actually have an intern do this because the delegation takes more time than doing it yourself. With GenerativeAI, it’s snappy.
I don't mean type inference but turning the present type a into the required type b. LSP don't do that.
So don't use it there :) But I'm curious what kind of coding you do that you never have to do any scaffolding, refactoring, or come across any element of repetitiveness.
That is where it shines imo. I find during those boring tasks it quite often just gets my intent, and I can say "yes actually that's exactly what I wanted".
Which allows me to get back to the business of "thinking, designing and abstracting novel ideas" quicker.
Perhaps it's because I've always been a lone wolf engineer, but I'd rather do it myself than giving quite an important task to someone less experienced than me, whether I'm writing something new (where I need to be at my best) or refactoring (where I still need to be sharp to understand why it was done a certain way to know how to improve)
AI would help with extracting code into a function, or writing yet another algorithm implementation, or wiring bog standard libraries (say, cURL), but that's like foreplay and lower effort work I enjoy doing as a break from the hard stuff.
And to clarify my comment about AI being an engineer with less experience than me, I'd rather be paired with an actual junior engineer, so at least I can mentor them and help them grow, than just having a machine do something that in some cases might be utterly inane, so I still have to waste time double checking its work, but totally powerless to teach and improve it.
If I start "enum { North", I will gladly accept the ", East, South, West }" autocomplete from Copilot, and this kind of thing, in aggregate, saves hours of your time.
It sounds like you’ve been at this for a while, are set in your ways, and are trying to justify it. We all get set in our ways, but stop trying to pass this off as something it’s not.
I’d respect using Copilot and deciding that it didn’t provide value, but all this umming and ahhing is not that.
You have almost 20 years of professional experience on your resume and likely were coding before that; it is difficult for me to believe sometimes, but most programmers have nowhere near that level of experience as the field is constantly increasing in size and scope: when I was in college, Computer Science was one small major people could enter that had only momentarily become popular due to the Internet... now it makes up a third of all students at major institutions that I would have assumed should be doing more interesting research work :(.
Regardless, you (and I) look at this AI as an engineer that is much less experienced than we are, and which is mostly able to code in repetitive ways with a ton of boilerplate that it sometimes gets wrong anyway; but, I think, for a remarkable number of people--even ones on this forum, where I often want to assume everyone should be an expert but in fact a lot of people just got into doing this work last week--that AI actually already has more experience than they do (and, now that they are using it so heavily to do their job, maybe ever will) and thereby makes fewer mistakes.
I don't know what that feels like, but it is certainly a very different experience than we are having. Maybe in another year or two, we'll have that experience also: if the AI gets good enough to become your peer, maybe we will find it interesting to use (or maybe we will become so demoralized, having not been in the position of having to work in a team of people better than us for so long--and these AIs wouldn't even be people!!--that we give up on the art entirely). I mean, imagine for a moment what it would be like if you found yourself in awe of the AI and were learning from it... I think it explains a lot of the confusing excitement about this technology.
I recently had a ticket that required refactoring some code that used net::http from Ruby’s stdlib over to using the HTTP gem. The rewrite was pretty easy to do by hand, but we had a bunch of test cases and rewriting them proved to be a bit painful because the mocks required were quite different.
So I spent half an hour rewriting the first test case with the new shape of mocks. Then I commented out the remaining tests and the AI recognized what I was doing and rewrote the remaining test cases with the new mock structure in seconds.
I treat AI like a junior programmer. I don’t trust it to do the hard stuff, but it’s great for scenarios where I have already established the pattern and I just need someone with basic coding proficiency to apply that pattern to a large chunk of code. It’s amazing at doing the grunt work.
If you can’t find your drive to look at new things enough to even see if they’re worth digging more into, which you seemingly haven’t, then I think this speaks poorly of you as a developer.
It is possible to disagree without being rude and insulting.
Personal insults are particularly destructive to civilized discourse.
The actual act of writing code "faster" baffles me. Without tools like intellisense, etc.[0], I am perfectly able to write code as fast as I can type.
There's absolutely zero need for me to write faster.
[0]Intellisense, etc. tend to get in my way, so I turn it off.
You are not alone.
I have not yet grown curious enough about Copilot to try it out; it seems to solve a problem I don't really have, since my productivity is never limited by typing speed. As you say, thinking and designing is the hard part.
I look forward on the future of AI assisted coding tools, it could make us more productive on generating part of codes that we don't care much about, while leaving us time to deal with code that we do, manually.
Because it seems over the past couple years on HN everybody is making great use of Copilot and constantly talking about it, while honestly scaffolding boilerplate is the least of my problems, while thinking, designing and abstracting novel ideas into code is the hard part where AI would fall short and just waste my time.
I still do not get if I'm behind the times or just experienced enough (I've been programming for two decades) that I don't feel the need to use Copilot. It's a bit disconcerting because I feel I need to get out of pure programming work ASAP as everybody else is competing with me with Copilot and GPT and I am feeling an existential risk to my craft and livelihood.