News for hackers. Stuff that matters.
Re:What was it like working on the original iPhone project? by grecy on Wednesday December 28, 2016 @12:45AM (#13268703)
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-origin...

Re:What was it like working on the original iPhone project? by jandrewrogers on Wednesday December 28, 2016 @01:42AM (#13268883)
Much 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.

Re:What was it like working on the original iPhone project? by grecy on Wednesday December 28, 2016 @06:49AM (#13269931)
Thanks.

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.

Re:What was it like working on the original iPhone project? by mattip on Wednesday December 28, 2016 @06:56AM (#13269957)
Assuming 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.
Re:What was it like working on the original iPhone project? by icebraining on Wednesday December 28, 2016 @09:50AM (#13270773)
Re:What was it like working on the original iPhone project? by dhimes on Wednesday December 28, 2016 @04:43PM (#13273945)
Yeah but if you start a project like that it's difficult to make progress :)
Re:What was it like working on the original iPhone project? by hokkos on Wednesday December 28, 2016 @07:53AM (#13270154)
It 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=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-li...

The guy is probably talking about changed lines (added, removed, changed) and might be liking to fiddle with its code style a lot.

Re:What was it like working on the original iPhone project? by billforsternz on Wednesday December 28, 2016 @02:48PM (#13273101)
Note that he is talking about OSX not iOS.
Re:What was it like working on the original iPhone project? by simscitizen on Wednesday December 28, 2016 @07:25AM (#13270053)
Your 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.).
Re:What was it like working on the original iPhone project? by epberry on Wednesday December 28, 2016 @06:19AM (#13269842)
Yeah he averaged about 500 LOC a day for 8 years. Which seems insane. That is a wildly productive programmer.
Re:What was it like working on the original iPhone project? by nilkn on Wednesday December 28, 2016 @12:35PM (#13272067)
Not 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.
Re:What was it like working on the original iPhone project? by cel1ne on Wednesday December 28, 2016 @06:30AM (#13269874)
How is LOC a measure of productivity?
Re:What was it like working on the original iPhone project? by ux-app on Wednesday December 28, 2016 @07:01AM (#13269976)
it's not the measure, but surely it's a measure?
Re:What was it like working on the original iPhone project? by blueprint on Wednesday December 28, 2016 @09:07AM (#13270502)
It'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?
Re:What was it like working on the original iPhone project? by taneq on Wednesday December 28, 2016 @07:16AM (#13270022)
It's a terrible measure, but all the rest are worse in some way.
Re:What was it like working on the original iPhone project? by gohrt on Wednesday December 28, 2016 @03:02PM (#13273186)
LOC is a worse measure than "% of the product", where the product has a global impact?
Re:What was it like working on the original iPhone project? by taneq on Wednesday December 28, 2016 @08:02PM (#13274990)
How do you measure "% of the product"?
Re:What was it like working on the original iPhone project? by Vampires123432 on Wednesday December 28, 2016 @02:53PM (#13273128)
boilerplate
Re:What was it like working on the original iPhone project? by user837387 on Wednesday December 28, 2016 @02:19PM (#13272857)
Now add the number of hours or days for testing and debugging those 500 lines of code and you get the true amount of time that it took to write 500 LOC. Otherwise I can also write a huge amount of lines of code in a day but pretty much none of it will work correctly, or even run, on the first try .