Live data from Hacker News

Satya Nadella says as much as 30% of Microsoft code is written by software

cnbc.com

21–30 of 55 posts

Re: Satya Nadella says as much as 30% of Microsoft code is written by software

#21
Very often the code looks like:

fn actualLogic(param, param, param) ...

switch (some Condition) { case a: actualLogic(Foo, bar) ; case b: actualLogic(bar, Foo) ; ... }

It might be expressed with if statements, pattern matching, function calls etc., but most of the code is boilerplate.

From my experience in a C# codebase most of the code which completes correctly is this boilerplate.

O3/Sonnet/Gemini are able to write actual logic in chat/agent mode sometimes but then the problem is that they rewrite too much, which would count as AI generated code.

These two factors probably play a huge role in the 30% if it's counted in any accurate way.

Re: Satya Nadella says as much as 30% of Microsoft code is written by software

#23
I recently rewrote a 40K lines application to 2K lines. Mostly by using newer tech and better design patterns. (Java to TS, Terraform to CDK, lambda soup to single app, etc.). It was a POC at work to show how things could be different. You'd think this would have made some devs rethink their approach, but no they're using AI to write even more code faster in the old approach.

Re: Satya Nadella says as much as 30% of Microsoft code is written by software

#24

1. Has the total amount of code risen, such that the amount of human code is unchanged? 2. What's the bug rate like from AI code? is MS investing the time to check this code, or assuming it is correct? 3. Who writes the test cases? 4. 30% in what terms? number of lines of code? number of commits? what code is in play here? bulk test code, which is huge and per-line very low value, or is this serious, difficult, compl…

7. If the code causes damage, who will be held responsible?

Re: Satya Nadella says as much as 30% of Microsoft code is written by software

#25
post #17

Sorry if this is unrelated. I still remember as a 25yr old programmer in England, attending a job in what was basically a porta-cabin in the countryside around Birmingham. Inside all the walls were covered in 1980s "Hang in there" motivational posters, only they were originals and it was unironic ( it was like a time capsule ). After shocking the boss by agreeing to a cup of water offered by the secretary which cause…

Sounds like a great sitcom idea

Re: Satya Nadella says as much as 30% of Microsoft code is written by software

#26
No, he doesn't say that. He said that "maybe 20%, 30% of the code that is inside of our repos today and some of our projects are probably all written by software". A guy like Nadella doesn't accidentally say software instead of AI. He knows exactly what he is saying.

Considering that most of their software has been developed for decades and AI assistants have only started becoming useful in the last ~4 years it would be very surprising if 30% of their code is AI written. I doubt they even touched 30% of their code in the last 4 years. But what is perfectly plausible is that 30% of their code is written by code generators. Microsoft has a lot of interface code. All the windows DLLs that are just thin syscall interfaces, the COM and OLE interfaces in their office suite and everywhere else, whatever Office uses nowadays for interoperability to allow you to embed content of one product in another, whatever APIs their online products use, etc. In the leaked Windows XP source code it can be difficult to find the actual source code in between the boilerplate files containing repeated definitions, and in the decades since then the world has only leaned more into code generation.

Re: Satya Nadella says as much as 30% of Microsoft code is written by software

#30

1. Has the total amount of code risen, such that the amount of human code is unchanged? 2. What's the bug rate like from AI code? is MS investing the time to check this code, or assuming it is correct? 3. Who writes the test cases? 4. 30% in what terms? number of lines of code? number of commits? what code is in play here? bulk test code, which is huge and per-line very low value, or is this serious, difficult, compl…

7. If the code causes damage, who will be held responsible?

8. How much of that "software-written" code is stuff like Intellisense completing method names?
Post reply on HN