8 ms·
In the Quora post [1] Terry says: >I wrote about 6% of the Mac OS X kernel, by lines of code, over a period of 8 years. That’s about 100,000 lines of code a ye
by grecy 10y ago
In the Quora post [1] Terry says:
>I wrote about 6% of the Mac OS X kernel, by lines of code, over a period of 8 years. That’s about 100,000 lines of code a year.
Does that mean he wrote 800,000 LOC in 8 years, or am I reading that wrong?
If he did write 800k LOC, I'm curious why the Kernel is so many LOC? Given OSX is based on BSD, I always assumed Apple's kernel would be small in size (LOC) and mostly just glue between BSD code that has existed for decades.
[1] https://www.quora.com/What-was-it-like-working-on-the-original-iPhone-project-codenamed-Project-Purple https://www.quora.com/What-was-it-like-working-on-the-origin...
- jandrewrogers 10y agoMuch of that code will be reimplementation, so the net LOC won't change as much the LOC written. While OSX uses some parts of BSD, which gives it that BSD flavor, it is also substantially a new kernel based on Mach and with many other things under the hood implemented entirely by Apple. As for the code output, that is on the high-end of what you would expect to see but within the normal range of some highly skilled individual contributors operating within their domain expertise. Of course, this assumes they are largely left alone to do their work and aren't spending half their time in meetings, making powerpoints, etc. Back when I was plying my trade as an individual contributor, I was good for about 8,000 quality LOC per month if I was minimally interrupted, which is only a little less than the engineer in question.
- grecy 10y agoThanks. So to extend on that, if his 800 kLOC is only 6% of the Kernal, does that mean Apple's kernel is around 13 million lines? wow, I had no idea.
- mattip 10y agoAssuming no lines are removed. I often write tens if lines, commit to trigger a test, then rip out hundreds including the ones I wrote. Netcontribution - negative. I consider that a good day's work.
- icebraining 10y agohttp://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt http://www.folklore.org/StoryView.py?story=Negative_2000_Lin...
- dhimes 10y agoYeah but if you start a project like that it's difficult to make progress :)
- hokkos 10y agoIt seems in 2006 the Darwin XNU package was 1MLOC and the Kext another 1MLOC, so I have hard time believing that 11 others MLOC where needed for the iPhone KERNEL. https://books.google.fr/books?id=K8vUkpOXhN4C&lpg=PA49&ots=OLphYU_rYx&dq=mac%20os%20kernel%20line%20of%20code&hl=fr&pg=PA49#v=onepage&q=mac%20os%20kernel%20line%20of%20code&f=false https://books.google.fr/books?id=K8vUkpOXhN4C&lpg=PA49&ots=O... Linux 3.13 is 7 MLOC in drivers, 2 MLOC in arch, and only 139 KLOC in kernel, so it's probably the drivers that inflate a kernet size but I doubt the iphone needed so much drivers. http://unix.stackexchange.com/questions/223746/why-is-the-linux-kernel-15-million-lines-of-code http://unix.stackexchange.com/questions/223746/why-is-the-li... The guy is probably talking about changed lines (added, removed, changed) and might be liking to fiddle with its code style a lot.
- billforsternz 10y agoNote that he is talking about OSX not iOS.
- deleted 10y ago[deleted]
- epberry 10y agoYeah he averaged about 500 LOC a day for 8 years. Which seems insane. That is a wildly productive programmer.
- cel1ne 10y agoHow is LOC a measure of productivity?
- ux-app 10y agoit's not the measure, but surely it's a measure?
- blueprint 10y agoIt's a measure of something. The question is whether it's a measure of productivity, which begs the question, what is the definition of productivity?
- taneq 10y agoIt's a terrible measure, but all the rest are worse in some way.
- deleted 10y ago[deleted]
- nilkn 10y agoNot just a productive programmer, but one who's working on the sorts of problems that involve just writing code nonstop. I've worked on projects where just deciding what lines to write would take half a day, so that sort of raw code output would've been outright impossible.
- simscitizen 10y agoYour first misconception is that xnu (the OS X kernel) derives mainly from BSD. In actuality, it's based much more upon Mach than BSD. The BSD subsystem is largely implemented on top of Mach subsystem in the kernel (e.g. a BSD process is implemented on top of a Mach task), and xnu supports both Mach and BSD system calls. There is very little you could port from BSD into xnu without significant work, although obviously there has been a lot of cross-pollination between xnu and BSD (launchd, GCD, mandatory access control, etc.).