Live data from Hacker News

Google Is 2B Lines of Code, All in One Place

wired.com

271–280 of 347 posts

Re: Google Is 2B Lines of Code, All in One Place

#271
post #114
post #109

Just because people are talking about it: I work at MSFT, and the numbers Wired quotes for the lines of code in Windows are not even close to being correct. Not even in the same order of magnitude. Their source claims that Windows XP has ~45 million lines of code. But that was 14 years ago. The last time Windows was even in the same order of magnitude as 50 million LOC was in the Windows Vista timeframe. EDIT: And, r…

So, how many lines of code does it have?

It's a pretty hard number to come up with. Most employees only have access to a small fraction of the codebase. Even if you had access to all of it, it's hard to say what actually counts as Windows and what doesn't.

Re: Google Is 2B Lines of Code, All in One Place

#272

Earlier quoted context omitted.

> The solution to the excessive API change problem is to force > whoever changes the API to fix all the consumers himself > before the change is accepted. This doesn't seem scalable. Let's consider the case of one api endpoint being changed by one developer, to add a new param to a function call. Further assume that this impacts hundreds of projects. Does it really make sense to make one developer update those hundre…

It maybe isn't scalable, but that's part of the benefit. If you want to make a change to a widely-used API, it's going to be a lot of work, and it's not going to be a lot of work for the users of the API, it's going to be a lot of work for _you_ because _you_ are required to do it yourself. This prevents a lot of API churn unless the benefit is clear and sufficiently large. If it was any other way you'd rapidly reach…

That's one extreme. Another extreme is that you have the API versioning from hell, where you can never get rid of technical debt because any and all API changes will break someone, somewhere, who has no reason to migrate, so you're left keeping ancient code on life support indefinitely.

Re: Google Is 2B Lines of Code, All in One Place

#274

What I'd like to know and no one seems to mention: What's the experience like for teams not running a Google service and instead interacting with external users and contributors, e.g. the Go compiler or Chrome.

Many larger external projects are hosted in other repositories (Chrome and Android are well-known examples). Smaller stuff (like, say, tcmalloc or protocol buffers) is usually hosted in Piper and then mirrored (sometimes bidirectionally) to an external repository (usually GitHub these days).

Thanks, but I guess I was asking more about how this affects the other development characteristics described. You still have to deal with the massive repository and infrastructure, but if you're Go, for example, and you want to change an API 1) you can't see the consumers because many or most won't be Google-internal, and 2) even if you could see them, you can't change them. Even the build/test/deploy systems are somewhat compromised because you can't rely on all builders of your components being Google employees and having access to those resources.

So in these scenarios, what does Google's infrastructure buy you, if anything? And if it doesn't buy you anything, how does that influence Google culture? Are teams less willing to do real open development due to infrastructure blockage?

Re: Google Is 2B Lines of Code, All in One Place

#275
post #208

Earlier quoted context omitted.

I can't say I'm surprised to see people eager to point out how Windows sucks. And sure, maybe it does. However, the fundamental point you're missing is that I don't think that Windows was ever positioned as this OS that was designed for every single type of workload out there (not withstanding marketing noise). Windows is a very general purpose OS meant for general purpose 'mainstream' things. Things that hundreds of…

At least you don't ever really need to defragment ext4, unlike NTFS.

Can you solve all the problems in ext4 that NTFS claims to solve? No you cant. I am not saying either of the systems is perfect nor either of them is horrible. They are perfect for the use cases they are designed for. If somebody had a file system structure that was unusual(say lots of small files) to NTFS, I think it was his mistake in treating it as a black box.

Re: Google Is 2B Lines of Code, All in One Place

#276
post #174
post #92

Earlier quoted context omitted.

Can you (or somebody) explain how that works in practice? Here I am ready to deploy some new feature to gmail. In the meantime, I'm getting a steady stream of API changes. Can I build and release gmail to a specific revision number, and only incorporate the changes when I am ready, or are all release essentially off of the tip of the tree. I don't need specifics, just the general idea. Where we work basically every p…

Every feature has a flag that you can turn on/off to your heart content. Releases are cut at head. No need to use the version control hammer to screw all the zippers.

Would that be analogous to, every feature is it's own git branch? and you choose which branches to merge when building?

How are conflicts managed?

Re: Google Is 2B Lines of Code, All in One Place

#277
post #176

Assuming these numbers are right... (15 million lines of code changed a week) / (25,000 engineers) = 600 LOC per engineer per week Is ~120 LOC per engineer per workday normal at other companies?

Elsewhere in this thread it's mentioned that Google makes use of large-scale, automated refactoring tools: http://research.google.com/pubs/pub41342.html

Would be interesting to know what percentage of the total LoC touched are typically from that kind of automated refactor. Depending on the codebase, you can touch a ton of lines of code in a very small amount of time with those tools.

Re: Google Is 2B Lines of Code, All in One Place

#278
post #136

Earlier quoted context omitted.

I doubt it is, and I don't think I'd get in trouble for sharing it. But, it's not my job to decide whether or not that information should be shared, because it's not my job to speak for the company. I'm having a hard time understanding why people think this is not a reasonable position.

Well, you're the one here teasing everyone about it. Seems like it gives you a hard-on knowing something secret-ish. Pretty typical, I suppose. But please stop acting like you're the shit because you may know a number.

> Seems like it gives you a hard-on [...] please stop acting like you're the shit

This comment breaks the HN guidelines. We ban accounts that do this repeatedly. Please post civilly and substantively, or not at all.

https://news.ycombinator.com/newsguidelines.html

https://news.ycombinator.com/newswelcome.html

Re: Google Is 2B Lines of Code, All in One Place

#279
For those interested, the source analyzer Steve Yegge was working on called GROK has been renamed Kythe. I don't know how useful it turned out to be for those 2B LOC. http://www.kythe.io/docs/kythe-overview.html

Steve Yegge, from Google, talks about the GROK Project - Large-Scale, Cross-Language source analysis. [2012] https://www.youtube.com/watch?v=KTJs-0EInW8

Re: Google Is 2B Lines of Code, All in One Place

#280
post #252

Earlier quoted context omitted.

> single-digit _multiple_ of the entire Netflix movie catalog Strange unit of comparison, although I may start using it.

Uh, how much is it actually? (Simple searching didn't seem to get me the answer.) We should have a list of these things.

I did the same thing. I suspect that it's just "A LOT".
Post reply on HN