Live data from Hacker News

Did GitHub Copilot increase my productivity?

trace.yshui.dev

151–160 of 326 posts

Re: Did GitHub Copilot increase my productivity?

#151

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…

> [0] Entity Framework has moved on a lot since then, and apparently now can be trusted to lazily load data

To some degree. If you're using it for anything serious you're still going to help it along a lot. It's rather easy to do so, however, and I certainly wouldn't consider writing your own code as fast or easy as simply telling EF how you want it to do certain things.

I'm not an overall fan of EF. I especially dislike how it's model builder does not share interoperability with other .Net libraries which also use it. I also don't really like the magic .Net does behind the scenes. EF as a whole has been one of the better ORMs for any language since .net core. I'd still personally much prefer something like Rust's diesel, but whenever I have to work with C# I tend to also use EF.

Re: Did GitHub Copilot increase my productivity?

#152
post #141

Earlier quoted context omitted.

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?

We are currently on the latest.

We had an issue last week where we had an obect like

    public class Foo
    {
        public List Bars { get; set; }
    }
We'd query for some Foos, like:

    await _dbContext.Foos.ToListAsync();
and some amount of them would have Bars be an empty list where it should definitely be populated from the db. And it wasn't even consistent, sometimes it would populate thousands, sometimes it would populate a handful and then just stop populating Bars.

No errors, no exceptions, just empty lists where we'd expect data.

And so often we have to debug and see what SQL its actually generating, then spend time trying to get it to generate reasonable sql, when if we were using sprocs we could just write the damn sql quicker.

Another issue we have is the _EFMIgratoinsHistory table.

Sometimes we will deploy and get a load of migration errors, as it tries to run migrations its already ran... SO they all fail and then the API doesn't come back up... The fix ? TUrn it off and on again and it stops trying to re-run migrations its already ran!

Re: Did GitHub Copilot increase my productivity?

#153
post #119

Earlier quoted context omitted.

I've said it before and I'll say it again: The fact that you didn't think to include an example is telling. If you think AI 'art' is good, show me, and tell me why you think it's good.

Not OP. Conflating "art" (the "snobbish" definition if you will) with realistic depictions of imagined worlds, stories and settings is not helpful here. There are so many talented, imaginative people out there that have previously had Zero ability to manifest their thoughts into a visual form. AI has enabled that on so many levels and we should be grateful for it.

Then why not show me? Why is getting AI 'art' advocates to actually post something they think is good and explain why so hard? Where are these talented imaginative people and what are they doing?

Re: Did GitHub Copilot increase my productivity?

#154

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…

For me the biggest reason is automated database initialization and migration. After defining or updating the ORM model, I don't have to worry about manually CREATing and ALTERing tables as the model evolves. This is compatible with the OC suggestion of using ORMs as a "fancy query builder" and nothing more, which I strongly support.

You always have to worry about your model changes if you run at any sort of scale. Some ORMs will get it right most of the time, but the few times they don’t will really bite you in the ass down the line. Especially with the more “magical” ORMs like EF where you might not necessarily know how it build your tables unless you specifically designed them yourself.

This is where migrations also become sort of annoying. Because if you use them. Then it is harder to fix the mistakes since you can’t just change your DB without using the ORM or you’ll typically break your migration stream or at least run into a lot of troubles with it.

And what is the plus side of having a code-first DB really? You can fairly easily store those “alter table” changes as you go along and have full availability of history in a very readable way that anyone, including people not using C#, Java, Python.

Which is the other issue with ORMs. If you have multiple consumers of your data. Then an ORM most likely won’t consider that as it alters your “models”.

For a lot of projects this is a non-issue, especially at first. Then 10 years down the line, it becomes a full blown nightmare and you eventually stop using the ORM. After spending a lot of resources cleaning up your technical debt.

Re: Did GitHub Copilot increase my productivity?

#155
post #74

Earlier quoted context omitted.

So rails scaffold from 20 years ago but with a chance of hallucinations?

It's very easy to find multiple solutions to one problem. The power of LLM is that it's one solution to many problems.

What about the problem of needless pollution?

Re: Did GitHub Copilot increase my productivity?

#156

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 "standard…

Assuming you work on a team with pull requests and code review, how much do you also put blame on that process?

Re: Did GitHub Copilot increase my productivity?

#157
post #119

Earlier quoted context omitted.

Not OP. Conflating "art" (the "snobbish" definition if you will) with realistic depictions of imagined worlds, stories and settings is not helpful here. There are so many talented, imaginative people out there that have previously had Zero ability to manifest their thoughts into a visual form. AI has enabled that on so many levels and we should be grateful for it.

Then why not show me? Why is getting AI 'art' advocates to actually post something they think is good and explain why so hard? Where are these talented imaginative people and what are they doing?

Air Head by shy kids

https://www.youtube.com/watch?v=G4wJ4WeJrz4

You also don't see the everyday people using it to generate pictures about their own experiences and lives, using it to populate their DnD worlds, their personal unpublishable fanfics, etc.

Re: Did GitHub Copilot increase my productivity?

#158
post #152

Earlier quoted context omitted.

Which version?

We are currently on the latest. We had an issue last week where we had an obect like public class Foo { public List Bars { get; set; } } We'd query for some Foos, like: await _dbContext.Foos.ToListAsync(); and some amount of them would have Bars be an empty list where it should definitely be populated from the db. And it wasn't even consistent, sometimes it would populate thousands, sometimes it would populate a hand…

EF Core 8? Inconsistent behavior is not expected.

Assuming you haven't missed to add an .Include[0], please consider submitting an issue(s) to https://github.com/dotnet/efcore

[0] https://learn.microsoft.com/en-us/ef/core/querying/related-d...

Re: Did GitHub Copilot increase my productivity?

#159

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…

People are either misusing this meme or it makes no sense.

It's likely an ironic usage.

Re: Did GitHub Copilot increase my productivity?

#160
post #131

> For reasons you can probably guess, I do not use Copilot for my day job. Maybe I'm dumb but these reasons aren't obvious to me. Why doesn't the author use copilot at his day job?

Probably because the employer doesn't allow sending proprietary source code to random internet services on an employee's whim.

Silly. Many big corporations trust Microsoft touching their code. There are enterprise policy controls for Copilot, which includes data privacy.

If you want to make this argument, then the realistic reason would be that Copilot hasn't yet completed the SOC 2 compliance process. That would be a valid reason to wait, for corporations that are listed on Nasdaq or work with very sensitive data. But that's far off from the comment I'm replying to.

Post reply on HN