Live data from Hacker News

Copilot regurgitating Quake code, including sweary comments

twitter.com

311–320 of 672 posts

Re: Copilot regurgitating Quake code, including sweary comments

#313
post #30

They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…

> The ruby one isn't outright terrible, but shows a very Americanized way to do street addresses that would probably become a problem later. As someone who has been coding up address storage and validation for the past week in my current job, that one really made me laugh. Mostly because it tries to simplify all the stuff I have been analyzing and mulling over for a week into a single auto-complete. Spoiler: The Gith…

> I spend most of my time thinking about the problem, how to solve it...

A few years ago, I got a small but painful cut on my fingertip. I thought I would have a hard time on the job as a dev. To my surprise, I realized I spend 90-95% of my time thinking, and only 5-10% of the time typing. It turned out to be almost a non-issue.

Re: Copilot regurgitating Quake code, including sweary comments

#314
post #5

This is utterly damning. I have already instructed my team that Copilot can never be used for our projects. Compromising the product because of unknowable license demands isn't acceptable in the professional world of software engineering. But if we put the licensing to one side for a moment... 1/ Everything I've seen it generate so far is 'imperative hell'. It is practically a 'boilerplate generator'. That might be u…

Great points. Really makes me question why so many developers were excited / worried about programming jobs being automated away by this technology. I really doubt that many jobs are going to be displaced by what is at best an improvement to autocomplete/intellisense and at worst an unreliable, copyright infringing boilerplate generator. Also agree with point #3 - I could see Copilot steering devs away from new code patterns toward whatever was most commonly seen in the existing codebases it was trained on. Doesn't seem good for innovation in that sense.

Re: Copilot regurgitating Quake code, including sweary comments

#315

Earlier quoted context omitted.

> The python example is using floats for currency. Dumb question, but what is the proper way to handle currency? Custom number objects? Strings for any number of decimal places?

For Python, I prefer decimal.Decimal[1]. When you serialize, you can either convert it to a string (and then have your deserializer know the field type and automatically encode it back into a decimal) OR just agree all numeric values can only be ints or decimals. You can pass parse_float=decimal.Decimal to json.loads[2] to make this easier. My most obnoxious and spicy programming take is that ints an decimals should…

> My most obnoxious and spicy programming take is that ints an decimals should be built-in and floats should require imports

I don't care about making inexact numbers require imports, but the most natural literal formats should produce exact integers, decimals, and/or rationals.

Re: Copilot regurgitating Quake code, including sweary comments

#316
post #30

They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…

- The Go one (averaging) is non-idiomatic, and has a nasty bug in it: https://news.ycombinator.com/item?id=27698287

- The JavaScript one (memoization) is a bad implementation, it doesn't handle some argument types you'd expect it to handle: https://news.ycombinator.com/item?id=27698125

You can tell a lot about what to expect, if there are so many bugs in the very examples used to market this product.

Re: Copilot regurgitating Quake code, including sweary comments

#317

Earlier quoted context omitted.

I don't think they work out past trivial applications. Any non trivial app requires an understanding of a much larger part of the codebase than a tool like Copilot is looking at at any one time. Copilot does not understand the code in toto and is therefore really useless for debugging (70% of all coding) and probably useless for anything other than very simple parts of an app.

Any non trivial app requires an understanding of a much larger part of the codebase than a tool like Copilot is looking at at any one time. I don't think that's important. Copilot, at least as it's been demo'd so far judging by the examples, is to help you write small, standalone functions. It shouldn't need to know about the rest of the application. Just as the functions that you write yourself shouldn't need to kno…

The reality of code is that stuff breaks when connected to other stuff, as it eventually must be for real work to happen. There's no getting around that.

Since that's where the work of programming is, debugging connected applications (not writing fresh, unencumbered code, a rare luxury), a tool that offers no help for that is, well, not much help.

Re: Copilot regurgitating Quake code, including sweary comments

#318
post #164
post #91

Earlier quoted context omitted.

>If Copilot generates the sort of code that you would write, and it does for a lot of people, then it's definitely no worse (or better) than copying something from SO. Disagree. Most SO copy-paste must be integrated into your project -- maybe it expects different inputs, maybe it expects or works with different variables -- whatever, it must be partially modified to work with the existing code-base that you're workin…

I'm not firmly for or against the concept of Copilot, but it's fascinating to me that it will introduce an entirely new class of bugs. Rather than specific mistakes in certain blocks of code and edge case errors in handling certain inputs, now we're going to have lazy/overworked/junior developers getting complacent and committing code they haven't reviewed that isn't even close to their intent. Like you could have a…

To me, the most interesting aspect is the new class of supply chain security vulnerabilities it will create. How people will act to exploit or protect¹ against those will be very interesting.

1 - I don't expect "not using a tool that generates bad code" to be the top option.

Re: Copilot regurgitating Quake code, including sweary comments

#319
post #30

They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…

> The ruby one isn't outright terrible, but shows a very Americanized way to do street addresses that would probably become a problem later. As someone who has been coding up address storage and validation for the past week in my current job, that one really made me laugh. Mostly because it tries to simplify all the stuff I have been analyzing and mulling over for a week into a single auto-complete. Spoiler: The Gith…

>Because from my experience, typing code is the fastest part of my job. I don't really have a problem typing. I spend most of my time thinking about the problem, how to solve it, and considering ramifications of my decisions before ever putting code in the ID

So very true.

[1] Understanding the problem > [2] thinking about all possible solutions > [3] working out which solution fits best > [4] working out which implementations are possible > [5] working out the most suitable implementation

... and finally, [6] implementing via code.

Re: Copilot regurgitating Quake code, including sweary comments

#320
post #30

They have 4 hand picked examples on their homepage: https://copilot.github.com/ One has the issue with form encoding: https://news.ycombinator.com/item?id=27697884 The python example is using floats for currency, in an expense tracking context. The golang one uses a word ("value") for a field name that's been a reserved word since SQL-1999. It will work in popular open source SQL databases, but I believe it would bom…

Copilot appears to be “give more efficiency leverage to the worst kind of coder.”

This is my thought as well. I get the "make productive engineers even more productive" angle, but productive engineers' bottleneck isn't coding. Sure, coding up a boilerplate Go web server is tedious, but I have done it so many times that it takes me two seconds now.

On the flip side, coding can be the bottleneck for the worst kind of coder. When I first started coding, coding was hard simply because I had very little reps and was just learning to understand how to code common solutions, data structures, libraries, etc. Fast forward a few years and, if I were still struggling to understand these concepts, Copilot is a lifeline.

Post reply on HN