Live data from Hacker News

Did GitHub Copilot increase my productivity?

trace.yshui.dev

141–150 of 326 posts

Re: Did GitHub Copilot increase my productivity?

#141

Years ago, over a decade ago now, I was a .Net developer. Microsoft introduced Entity Framework, their new way of handling data in .Net applications. Promises made, promises believed, we all used it. I was especially glad of Lazy Loading, where I didn't have to load data from the database into my memory structures; the system would do that automatically. I could write my code as if all my memory structures were popul…

Well, this month we had to debug an issue where EF was NOT populating fields on classes from the db, that it definitely should have been!

So it still seems flakey. I've never worked a single job that chose EF that didn't end up regretting it. Either from it being unreliable, migration hell or awful performance.

"It allows you to treat your database like an in-memory enumerable"

Then devs go and do exactly that and wonder why performance is so terrible...

I hate EF.

Re: Did GitHub Copilot increase my productivity?

#142
post #86
post #83

Earlier quoted context omitted.

I am so confused. When I write code, I think "Okay I want to write a for loop that does xyz." How is it hard to know if copilot did or didn't do what you wanted?

This is how I've used it: "I want to write a function that reduces a map of customer data to a list of their phone numbers from their primary addresses only or contact address if there is no primary address" and then you look at the resulting flatmap, filter, reduce blob of AI generated code and figure out if what it does is correct for about a minute.

This was an illuminating comment because I think I finally understand why people have wildly varying experiences with CoPilot.

I think if you regularly use CoPilot to write entire functions or use its prompt mode, you will spend more time verifying its output is accurate than it would save writing the code manually. If instead, you use it iteratively via autocomplete to write small fragments of code, a line or two at a time, its trivial to verify its correctness, and it will save you a good 20-30 seconds at a time, adding up to large savings over time.

I exclusively do the latter, so I find it incredibly useful. The few times I've tried using the prompt mode, or comment-driven code generation, it's been very average or awful.

Re: Did GitHub Copilot increase my productivity?

#143

Years ago, over a decade ago now, I was a .Net developer. Microsoft introduced Entity Framework, their new way of handling data in .Net applications. Promises made, promises believed, we all used it. I was especially glad of Lazy Loading, where I didn't have to load data from the database into my memory structures; the system would do that automatically. I could write my code as if all my memory structures were popul…

>>It gets things wrong enough that I have to manually check everything it does and correct it, to the point where I might as well just do it myself in the first place.

I have had personal experience with this. And seen others telling me as well. These AI things often suggest wrong code, or even with bugs. If you begin your work by assuming AI is suggesting the correct code you can go hours, to even days debugging things in the wrong place. Secondly when you do arrive at a place where you find the bug in the AI generated code, it can't seem to fix or even modify it, because it misses context in which the which itself generated at the first place. Thirdly the AI itself can interpret your questions in a way you didn't mean.

As of now AI generated code is not for serious work of any kind.

My guess a whole new paradigm of programming is needed, where you will more or less talk to AI in a programming language itself, some what like lisp. I mean a proper programming language at a very abstract level, which can be interpreted in only one possible meaning, and hence not subject to interpretation.

Re: Did GitHub Copilot increase my productivity?

#144
post #8

Local maxima go BRRRRRRR AI will get there eventually, but this current paradigm seems increasingly only useful for spam and shitty clip art. Even so, everyone is throwing absurd amounts of investment capital at it in the hopes that something useful will happen. It's a pretty clear depiction of the investor class being so detached from the technical reality of what they're investing in that they just sit around light…

I've been finding this stuff genuinely useful for two years now, across Copilot and ChatGPT and Claude 3 Opus and similar tools. Either I'm a dimwit, easily conned by hype and shiny tools to the point that I can imagine benefits for two years that simply aren't there... or there's something to them.

No I'm with you. I don't use copilot though for undirected autocomplete, I use tools that allow me to give instructions and diff the results, Cursor and Aider are my current defaults, both with Claude 3 now[0]. Always looking for alternatives though.

I think it's always going to be a YMMV experience with LLMs. I'm an extreme generalist with 23 years of experience so it compliments my strengths and weaknesses. I know how to program across 20 odd languages but most of them I need to look stuff up if I'm not using it frequently enough. Now though, don't really need to look stuff up.

For me there are two groups, those that want to use LLMs and are pushing it forward and those that are would prefer that LLMs not exist and want it to be hype that goes away.

Having followed the hype cycles of VR/AR and crypto I can feel a difference. Both of those felt like a solution in search of a problem. The true believers wanting it to be something like Ready Player One with VR (fun story, Oculus/Facebook actually handed out copies of the novel at Oculus Connect 2 in 2015).

The hype around LLMs seems different; like applying a new solution to all the existing problems to see where it helps, and that's just with the current iteration.

[0]: I'd prefer to be using local/open equivalents but the capabilities are still lacking.

Re: Did GitHub Copilot increase my productivity?

#145
post #52

Earlier quoted context omitted.

Especially when renaming variables that are “immune” to normal refactoring. Copilot handles that pretty well and I don’t have to spend all that focus on such a menial task.

Sidebar, but what does "“immune” to normal refactoring" mean?

I would guess they mean stuff which isn’t just “rename symbol” or whatever, like changing code from one pattern to another slightly different one. For example, I’ve used LLMs to “change this if statement to a switch”, which I don’t think VS Code can do as an automatic refactor using the native tools.

Re: Did GitHub Copilot increase my productivity?

#146
post #141

Years ago, over a decade ago now, I was a .Net developer. Microsoft introduced Entity Framework, their new way of handling data in .Net applications. Promises made, promises believed, we all used it. I was especially glad of Lazy Loading, where I didn't have to load data from the database into my memory structures; the system would do that automatically. I could write my code as if all my memory structures were popul…

Well, this month we had to debug an issue where EF was NOT populating fields on classes from the db, that it definitely should have been! So it still seems flakey. I've never worked a single job that chose EF that didn't end up regretting it. Either from it being unreliable, migration hell or awful performance. "It allows you to treat your database like an in-memory enumerable" Then devs go and do exactly that and wo…

Which version?

Re: Did GitHub Copilot increase my productivity?

#147
post #124

Earlier quoted context omitted.

adding an off the shelf ORM layer creates so much more opacity and tech debt than writing queries I don't understand why anyone would willingly put one into their stack. Sure, they're neat although I don't even know if they save time. There's something very satisfying about well-crafted queries. And is it ever really well crafted if you can't tweak them to improve their their execution plan? I've never had a client o…

How do you map rows to objects? How do you insert into/update rows in your databases? These are the basic problems ORMs solve splendidly. They are for OLTP workloads, and have deliberate escape hatches to SQL (or some abstraction over it, like JPQL in java-land). I just fail to see what else would you do, besides implementing a bug-ridden, half-ORM yourself.

Rows are tuples, not objects, and treated as such throughout the code. Only the needed data is selected in the form most appropriate to the task at hand, constructed in a hand-written sql query, maybe even taylored to the DB/task specifics. Inserts/updates are also specific to the task, appropriately grouped, and also performed using plain sql. Data pipelines are directly visible in the code, all DB accesses are explicit.

Re: Did GitHub Copilot increase my productivity?

#148
I find GitHub Copilot close to useless for production code. The worst, most obscure bugs I've had to debug in the last year were all in Copilot-written code. It _looks_ plausible, but it makes extremely subtle mistakes. Occasionally, you have repetitive sections of code where it can copy&adapt lines from the context, but that's about it.

It's a different story for test code. Test code is often formulaic and "standardized" (given/when/then). For instance, I find myself writing the first test case and Copilot can come up with additional test cases. Or I might write the method name ( FeatureUnderTest_Scenario_ExpectedOutcome) and Copilot provides the implementation.

I have not found any value in Copilot chat.

Re: Did GitHub Copilot increase my productivity?

#149

Earlier quoted context omitted.

Sidebar, but what does "“immune” to normal refactoring" mean?

I would guess they mean stuff which isn’t just “rename symbol” or whatever, like changing code from one pattern to another slightly different one. For example, I’ve used LLMs to “change this if statement to a switch”, which I don’t think VS Code can do as an automatic refactor using the native tools.

That’s not variables, though. But maybe it’s something similar, like some variables being used in strings?

> which I don’t think VS Code can do as an automatic refactor using the native tools.

Yet another point for using an IDE over a texteditor with some bolted on IDE features, because the Jetbrains tools even suggest such refactorings ;)

Re: Did GitHub Copilot increase my productivity?

#150
post #36

Local maxima go BRRRRRRR AI will get there eventually, but this current paradigm seems increasingly only useful for spam and shitty clip art. Even so, everyone is throwing absurd amounts of investment capital at it in the hopes that something useful will happen. It's a pretty clear depiction of the investor class being so detached from the technical reality of what they're investing in that they just sit around light…

Yeah; its concerning how depressingly similar Sam's recent language is to, say, SBF's in his prime. Waxing poetically with faux-intellectualism about the sheer addressable market his business will capture (all of humanity) (and funded by the government) [1]. You can just listen to key players in the space, how their language has changed over the past year, and recognize that we're probably very near a local maxima /…

I always mix SBF and Altman in my mind, and have to spend few seconds thinking which was which..

But IMO the current AI hype has some almost religious elements to it

Post reply on HN