Live data from Hacker News

Trying to Understand Copilot's Type Spaghetti

rtpg.co

11–20 of 89 posts

Re: Trying to Understand Copilot's Type Spaghetti

#11

So unraveling AI generated code is the new programming?

What is typing. Lets say you have no hands, no eyes, and cannot speak or to speed this up- All you can do is communicate with foot taps (in great detail) to a human translator. Would we tell this person they are not programming?

Depends -- are the foot taps communicating a program or was the message for human consumption?

If self-modifying code executes in the forest but nobody is there to observe it, does it have an author?

Re: Trying to Understand Copilot's Type Spaghetti

#12
The future is going to be a horrible place for people taking over legacy code-bases. It was difficult enough with other people spaghetti code, but being able to generate vast amounts of hard to decipher spaghetti code it only going to make this horrible,

Sometimes you digress to simpler types not because you couldn't write more complex types, but because you realise that the next person who needs to make changes to this piece of code is going to have a bad time.

Re: Trying to Understand Copilot's Type Spaghetti

#13

The future is going to be a horrible place for people taking over legacy code-bases. It was difficult enough with other people spaghetti code, but being able to generate vast amounts of hard to decipher spaghetti code it only going to make this horrible, Sometimes you digress to simpler types not because you couldn't write more complex types, but because you realise that the next person who needs to make changes to t…

> It was difficult enough with other people spaghetti code, but being able to generate vast amounts of hard to decipher spaghetti code it only going to make this horrible

I've seen some legacy code and the kind of spaghetti humans are able to generate - especially with multiple layers of "I'll just throw in something to make feature X work/fix that bug" - is pretty bad already. I honestly doubt code generation will make things much worse.

Re: Trying to Understand Copilot's Type Spaghetti

#15
post #7

from the original tweet linked in the post "ceiling is being raised. cursor's copilot helped us write "superhuman code" for a critical feature. We can read this code, but VERY few engineers out there could write it from scratch." I don't really agree that code is superhuman if VERY few is able to understand it haha..! Code should complex but easy to follow to make it brilliant in my opinion

Even an average programmer can understand it if they bothered to read the TypeScript documentation. “Superhuman” in this case means “has read the manual”.

That's also how you become an extreme outlier at Bash. Actually read the manual.

Re: Trying to Understand Copilot's Type Spaghetti

#17
Hi, CopiotKit CEO here (I wrote the original viral tweet). This article is great! Thanks for posting.

I'd also written an analysis of the code - including announcing a $1000 prize for the best alternative code: https://ai88.substack.com/p/ceiling-has-been-raised-analyzin...

We were going to announce the winner this week but if we get a few more submissions we will definitely consider them.

Just submit a PR to https://github.com/CopilotKit/CopilotKit

Re: Trying to Understand Copilot's Type Spaghetti

#18

from the original tweet linked in the post "ceiling is being raised. cursor's copilot helped us write "superhuman code" for a critical feature. We can read this code, but VERY few engineers out there could write it from scratch." I don't really agree that code is superhuman if VERY few is able to understand it haha..! Code should complex but easy to follow to make it brilliant in my opinion

Seems like the tweet is another AI hype pr piece. Since Devin was making outlandish statements, CoPilot can't fall far behind.

Re: Trying to Understand Copilot's Type Spaghetti

#19

from the original tweet linked in the post "ceiling is being raised. cursor's copilot helped us write "superhuman code" for a critical feature. We can read this code, but VERY few engineers out there could write it from scratch." I don't really agree that code is superhuman if VERY few is able to understand it haha..! Code should complex but easy to follow to make it brilliant in my opinion

That’s not the claim. It’s well commented and formatted so actually quite readable. The claim is that very few could write it.

Though I would say that ‘very few’ is a larger group than they think - there are plenty of people doing metatype programming in TS; I’ve dabbled enough that given the problem I could probably tackle it and I know I learned from seeing others do it (because I am far from a typescript professional). So it’s not ‘superhuman’ if many of the humans who have found themselves wanting to work with the typescript type derivation model could have written it.

These capabilities - type ternaries and inferred type parameters - were put into TypeScript with a view that humans would use them.

The danger here is kidding yourself that this sort of code is beyond human.

Re: Trying to Understand Copilot's Type Spaghetti

#20
post #13

The future is going to be a horrible place for people taking over legacy code-bases. It was difficult enough with other people spaghetti code, but being able to generate vast amounts of hard to decipher spaghetti code it only going to make this horrible, Sometimes you digress to simpler types not because you couldn't write more complex types, but because you realise that the next person who needs to make changes to t…

> It was difficult enough with other people spaghetti code, but being able to generate vast amounts of hard to decipher spaghetti code it only going to make this horrible I've seen some legacy code and the kind of spaghetti humans are able to generate - especially with multiple layers of "I'll just throw in something to make feature X work/fix that bug" - is pretty bad already. I honestly doubt code generation will m…

I do think that people may let code be generated without really thoroughly checking every part of it and I see that as a problem.

That, in my opinion is a new "untrusted input" attack vector and it will abused (probably even more easily than how the recent xz backdoor happened), by either targeting the training data, using prompt injection or in other ways.

The scary part about it is that any contributer/commuter themselves is considered a "somewhat" trusted entry but if it is assumed that everyone uses code generation AI that entity cannot be trusted anymore.

At the same time, since all the AI generated code has to be thoroughly checked/reviewed, the assumed productivity gains are somewhat diminished.

I think how it will actually play out though is that security concerns will just be largely ignored as it often goes.

Post reply on HN