Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's Go. 25% of the code is just basic error checking and returning nil.



In Java, 25% of the code is import statements and curly braces


You generally don’t write those by hand though.

I’m pretty sure around 50% of the code I write is already auto-complete, without any AI.


Exactly, you write them with AI


IDEs have been auto completing braces, inserting imports and generating framework boilerplate for decades.

We don’t need AI for this and it’s 10x the compute to do it slower with AI.

LLMs are useful but they aren’t a silver bullet. We don’t need to replace everything with it just because.


Yeah, but the management achievement is to call 'autocomplete' AI.

AI doesn't mean LLM after all. AI means 'a computer thing'.


I’ve been calling if-statements AI since before I graduated college


Simply strech your definition of AI and voilá, you are writing it with AI.


The most important thing is to put out a press release about how half your code is written by AI.


In lisp about 50% of the code is just closing parentheses.


Heh, but it can't be that, no reason to think llms can count brackets needing a close any more than they can count words.


LLMs can count words (and letters) just fine if you train them to do so.

Consider the fact that GPT-4 can generate valid XML (meaning balanced tags, quotes etc) in base64-encoded form. Without CoT, just direct output.


That's GPT-4, which you wouldn't use for in-line suggestions because it's too slow.

I don't know what model Copilot uses these days, but it constantly makes bracket mistakes in Python.


You don't need a GPT-4-sized model to count brackets. You just need to make sure that your training data includes enough cases like that for NN to learn it. My point is that GPT-4 can do much more complicated things than that, so there's nothing specific about LMs that preclude them from doing this kind of stuff right.


Logically, it couldn't be 50% since that would imply that the other 50% would be open brackets and that would leave 0% room for macros.


That's just a rounding error ;)


Over 3 imports from the same package - use an asterisk.


Does auto-code generation count as AI?


Another 60% is auto-generated protobuf/grpc code. Maybe protoc counts as "AI".


Google does not check in protoc-generated code. It's all generated on demand by Blaze/Bazel.


Oh thanks for the info.

On the other hand, that doesn't mean it doesn't count for the purpose of this press release/advertisement...


new headline: Protoc Generates Many Times More Code Than Humans Or AI

(because it's like 50k lines regenerated for every build, everywhere, all the time)


Go is a very small fraction of the code at Google.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: