Live data from Hacker News

Did GitHub Copilot increase my productivity?

trace.yshui.dev

231–240 of 326 posts

Re: Did GitHub Copilot increase my productivity?

#231

Earlier quoted context omitted.

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.

I wouldn't have believed you until I moved from ActiveRecord (Rails's ORM) to Ecto (Elixir/Phoenix's data mapping library which is decidedly not an ORM.) It's a million times better and I'm never going back.

[dead]

Re: Did GitHub Copilot increase my productivity?

#232
post #164

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 think automated tests are the one area that LLMs will truly improve productivity (and overall code quality). It’ll likely also lead to a lot of tests that actually tests nothing, but as a whole, it’ll hopefully be capable of both generating and updating tests if you give it some good inputs to do it on. Documentation is another area where I have high hopes. In the ideal world people update it as they change things.…

Yes, I just used ChatGPT to write me some code to iterate through a CSV and add each row to a system via its API.

It wrote a python app. It hard coded the API key and the CSV file. And then it told me to pass the file name as an argument. lol.

I just asked it to fix that and tested with a two line csv. Worked like a charm and saved me quite a bit of time trying to figure a few new things out.

But a proper programmer would have been slowed down by this, for sure.

Re: Did GitHub Copilot increase my productivity?

#233

Earlier quoted context omitted.

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.

...and explain why you think it's good. This part is important since I'm still yet to see evidence that the AI artist is capable of thinking more deeply than "(full_body:1.2) , best quality, (8k, RAW photo, best quality, masterpiece:1.2) , (realistic, photo-realistic:1.4) , ultra-detailed, (Kpop idol) , perfect detail, looking at the viewer, makeup, pretty South Korean lady wearing a bathing suit, wet skin, light ref…

You've gotten me confused about what you're going for. I figure the goal is "this is what this would look like, if there were a person with a balloon for a head and we captured him with a video camera".

The linked video isn't there yet, but it seems obvious what would or wouldn't make it good, and the list of traits you describe is really all I want in an image generator. I don't care what the girl is thinking about; that doesn't show up in the image anyway.

I do want to be able to say "no, make the hair shorter", or "turn her to face more toward the left of the frame" or "have her pointing at the door in the background". If that command takes the form of a comma-delimited list of traits, so what?

Re: Did GitHub Copilot increase my productivity?

#234

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…

Yes, I would not put it just anywhere. But I have few rules about ORMs: - Proper DB design first. You should be able to remove the ORM and DB should still function as intended. This means application-side cascade operations or application-side inheritance is banned. - No entities with magical collections pointing to each other. In other words, no n to n relations handled by ORM layer. Create in-between table, for god…

> No entities with magical collections pointing to each other. In other words, no n to n relations handled by ORM layer. Create in-between table, for gods sake. Otherwise it becomes incredibly confusing and barely maintainable.

So, I have a database that looks like this. My method was to lay out the database myself, by hand, and then use EF's facility to generate EF code from an existing database. The bridge table was recognized as being nothing but the embodiment of a many-to-many relation and the EF code autogenerated the collections you don't like.

Is this a problem? If you do things the other way around, the ORM creates the same table and it's still there in the database. It isn't possible not to create the bridge table. Why is that case different?

Re: Did GitHub Copilot increase my productivity?

#235

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…

> this is where I think AI for coding is now. It gets things wrong enough that I have to manually check everything

This might be dependant on the programming language, some languages are way more popular and have way more questions on StackOverflow and Reddit and repos on github, so the answers will be better.

When I use copilot for JS it's right 90% of the time.

And where it's 'wrong' it's usually just stuff it skipped over because it didnt have proper context.

Re: Did GitHub Copilot increase my productivity?

#236
I've felt pretty productive using ChatGPT to generate snippets for either an API/SDK/language I'm not too familiar with, or moderately simple things that I'm too lazy to do myself. Sometimes that can be a huge time saver especially if the documentation is poorly written, other times it might actually be slower as I wrestle with getting a good prompt (but with lower cognitive load than were I to do it myself). I still don't do it frequently enough to say it has changed the way I work though.

I'm still not sure if this is a transformative way to code or not. I think in the future it might be able to do to programming languages what programming languages did to assembly... but it probably won't look like a chat UI or an autocomplete plugin.

Re: Did GitHub Copilot increase my productivity?

#237

The answer is yes for most people. You can type in pseudocode for simple things and out pops something that basically works for a significant number of languages. Its absolutely terrible for really complex problems but most code is not solving complex problems.

> but most code is not solving complex problems

I see this claim a lot, and I have no idea whether or not it's true. I just struggle to imagine that there are millions of people employed, well compensated for doing pretty easy jobs.

In my professional work and my various unrelated personal projects and open source contributions, if you want to do anything useful or interesting, you get into the weeds very very quickly. The territory where LLMs are nearly useless. I'd say maybe 5% of my time is spent writing "easy" code without major complexities.

Re: Did GitHub Copilot increase my productivity?

#238

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 think the nomenclature of calling generative AI an "AI" is just hype and that leads to disappointment. After all, it's much more exciting for investors than calling it the world's most expensive textual/audio/visual autocomplete. But that's really what this generatoon currently is. And it can feel like magic, because we're pattern-seeking and pattern-matching creatures, so something that seems to intuit the pattern…

> The corporate hype machine works overtime to hype it as a solution, but that's just what they do.

the CoPilot product has billed hundreds of millions of dollars, and is billing right now. Secondly they copied all the GPL code and put it into a mixer, like a bitcoin mixer in a legal way.

Sage words about "what they do" ring hollow while the only measure that counts is money. This situation needs legal action.

Re: Did GitHub Copilot increase my productivity?

#239

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…

Test code is code. It's as much of a burden as every other piece of code you are troubled with, so you must make it count. If you're finding it repetitive and formulaic, take that opportunity to identify the next refactoring. Just churning out more near copies is not a good answer.

> If you're finding it repetitive and formulaic, take that opportunity to identify the next refactoring.

It doesn't really matter how many helper functions you extract from your test code, in the end you have to string them together and then make assertions, and that part will always be repetitive and formulaic. If you've extracted a lot of shared code, then it might look something like "do this high-level business thing and then check that this other high-level business thing is true". But that is still going to need to be written a dozen times to cover all the test cases, and you're still going to want test names that match the test content.

There's a certain amount of repetition and formulaism that will never go away and that copilot is very good at.

Re: Did GitHub Copilot increase my productivity?

#240

Copilot certainly increased my productivity. At least in a very specific context - C programming and working on some small subset of llvm internals. I am not very experienced C or C++ programmer, nor I know anything about LLVM API. Plus - copilot is very good at autocompletions. Yes, the code it generates come out often incorrect, but even my low level expertise allows me to spot issues. And even if the code is incor…

> At least in a very specific context - C programming and working on some small subset of llvm internals. I am not very experienced C or C++ programmer, nor I know anything about LLVM API.

I'm not sure what you're working on, but as someone dependent on LLVM-based tools, reading this is kind of terrifying. I'm sure your intentions are good, but I hope you're at least making it clear that you're heavily reliant on the output of Copilot when making contributions to something. C and C++ in particular are not the kind of language where someone inexperienced can be trusted to review.

> Yes, the code it generates come out often incorrect, but even my low level expertise allows me to spot issues.

Can you give an example of some issues? C and C++ are compiled, so there will be obvious compilation errors, but there are also a lot of "foot guns" that are not obvious and will bite you at runtime.

Post reply on HN