Live data from Hacker News

Did GitHub Copilot increase my productivity?

trace.yshui.dev

291–300 of 326 posts

Re: Did GitHub Copilot increase my productivity?

#291

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…

Object-Relational Mappers purport to mitigate the impedance mismatch between object-oriented and relational data structures.

For your analogy to hold, what is the impedance mismatch between programming and Copilot?

Re: Did GitHub Copilot increase my productivity?

#292

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…

Pardon me for the tangent (just a general comment not directed to OP). What I have learned over the years is that the only way to properly use ORM is as a fancy query tool. Build the query, fetch/update data, MOVE THE DATA to separate business objects. Don't leave ORM entities shared across the sea of objects! Phew, thanks, I got that off my chest.

> use ORM is as a fancy query tool

As an alternative to query-by-example (QBE)?

https://en.wikipedia.org/wiki/Query_by_Example

Re: Did GitHub Copilot increase my productivity?

#293

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…

Lazy loading was a mistake in EF. A lot of apps had awful performance due to lazy loading properties in a foreach loop creating N+1 queries to the database. It would be fine in dev with 50-100 rows and a localhost SQL and blow up in prod with 1000s of rows and a separate Azure SQL. Also if you relied on lazy loading properties after the DbContext had been disposed (after the using() block) you were out of luck. With…

I switched to Dapper a long time ago, with explicit SQL queries and really haven't looked back.

Re: Did GitHub Copilot increase my productivity?

#294

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…

I've found Github Copilot to be pretty great for boilerplate code... It's a tossup for anything much more complex.

Re: Did GitHub Copilot increase my productivity?

#295
post #72
post #70

Earlier quoted context omitted.

They mean they have 20 years experience in programming, which helps them ask good questions.

Yeah, that's what I meant. With LLMs having deep domain knowledge in a field helps enormously in terms of prompting them as productively as possible.

So, to maximize the usefulness of LLMs, requires expert level domain knowledge in a field? Sounds like a useful tool for highly trained experts. For the average Joe Developer, perhaps not.

Re: Did GitHub Copilot increase my productivity?

#296
post #276

Earlier quoted context omitted.

Or like GPS? While GPS gets me where I want to go, I find that using a map or no map at all gives me a better sense of place, so I need less time to get to the point where I don't need a GPS to get around.

100%. Retain the things that you need, don’t memorize wikipedia. See your landscape.

100% to both. I have a hoard of PDFs. I use Dash as an offline doc browser. I save interesting links in a bookmark app and I still can find libraries documentation and source codes on web search (duckduckgo). So I just freshen up as I go (or on my free time). Memorize what I need/like and capture what I found interesting. I was doing Advent of Code in Common Lisp and the loop keyword page was always open (It's a mini language on its own). Later challenges became easier, as I learned new ways to iteratively express the solution. I could be faster with generated code, but having a bird view of the map will lead you to more interesting routes (more often speed is not the issue, correctness and maintainability is)

Re: Did GitHub Copilot increase my productivity?

#297

Earlier quoted context omitted.

Whatever you want. It's your life. Traditionally, though, SQL generation was known as query building. The query was executed via database engine or database driver, depending on the particulars. ORM, as the name originally implied, was the step that converted the relations into structured objects (and vice versa). So, yes, technically if you maintain your data as tuples end to end you are not utilizing ORM. Lastly, t…

I agree with you, but I do think there's a little fuzziness between full-blown ORM and a tuple-populating query builder in some cases. For example Ecto, which can have understanding of the table schema and populate a struct with the data. It's just a struct though, not an object. There's no functions or methods on it, it's basically just a tuple with a little more organization.

> It's just a struct though, not an object. There's no functions or methods on it

Object-relational mapping was originally coined in the Smalltalk world, so objects were in front of mind, but it was really about type conversion. I am not sure that functions or methods are significant. It may be reasonable to say that a struct is an object, for all intents and purposes.

A pendant might say that what flimsy definition Kay did give for object-oriented programming was just a laundry list of Smalltalk features, meaning that Smalltalk is (probably) the only object-oriented language out there, and therefore ORM can only exist within the Smalltalk ecosystem. But I'm not sure tradition ever latched onto that, perhaps in large part because Kay didn't do a good job of articulating himself.

Re: Did GitHub Copilot increase my productivity?

#298

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 Thing is, reading code is way faster than writing code

Huh, for me its always vice versa.

When I'm not sure in the someones code I have to double or triple check it be sure that I understand it correctly and to verify that there no somehow hidden missed steps or side effects.

Re: Did GitHub Copilot increase my productivity?

#299

Earlier quoted context omitted.

With VSCode at least you can say @workspace to Copilot and it'll take it into account. No idea if it feeds all of the code to the LLM or just parts, but it's pretty good at interpreting what the code does

It guaranteed can't have all of your code in the LLM context, or even all of your file (in case of longer, through not even quite long files). Through it could do stuff like go through your repository(ies) and generate embedding for sections of it and then have a vector database + retrieval argumented generation (RAG) system.

A lead from one of the GH Copilot-adjacent companies was interviewed recently, and that’s precisely what they are doing. They generate embedding of “local” code based on AST (up the stack and sideways, if you know what I mean), and take into account runtime and library versions when doing inference. Sounded like a very interesting challenge.

Re: Did GitHub Copilot increase my productivity?

#300
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.

> These are the basic problems ORMs solve splendidly.

Depends on the ORM.

I have noticed that typically, 'unit of work' type ORMs (EFCore and Hibernate/NHibernate as examples) prevent being 'true to the ORM' but 'efficient'.

i.e. Hibernate and EFCore (pre 7 or 8.0ish) cannot do a 'single pass update'. You have to first pull the entities in, and it does a per-entity-id update statement.

> I just fail to see what else would you do, besides implementing a bug-ridden, half-ORM yourself.

Eh, you can do 'basic' active-record style builders on top of dapper as an afternoon kata, if you keep feature set simple, shouldn't have bugs.

That said, I prefer micro-ORMs that at most provide a DSL for the SQL layer. less surprises and more concise code.

Post reply on HN