Live data from Hacker News

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

wired.com

191–200 of 347 posts

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

#191
Xoogler here. There were tons of benefits to Google's approach, but they were only viable with crazy amounts of tooling (code search, our own version control system, the aforementioned CitC, distributed builds that reused intermediate build objects, our own BUILD language, specialized code review tools, etc).

I'd say the major downside was that this approach basically required a 'work only in HEAD' model, since the tooling around branches was pretty subpar (more like the Perforce model, where branches are second-class citizens). You could deploy from a branch but they were basically just cut from HEAD immediately prior to a release.

This approach works pretty well for backend services that can be pushed frequently and often, but is a bit of a mismatch for mobile apps, where you want to have more carefully controlled, manually tested releases given the turnaround time if you screw something up (especially since UI is really inefficient to write useful automated tests around). It's also hard to collaborate on long-term features within a shipping codebase, which hurts exploration and prototyping.

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

#194

Earlier quoted context omitted.

I'd have to disagree with this. First the baseline: windows is very slow. Second I found later versions slower. Third (and most maddening) every version of windows I've ever used has gotten slower over time (including not installing new s/w and defragmenting).

Windows is slow? Compared to what? In what task? Running a game? Boot time? Opening Firefox? I have problems with Windows, but it's the fastest desktop os I think, mostly because it's graphics stack is way the best of all. Running a number crunching C code is exactly the same on Windows or Linux. (See all the benchmarks on the Internet.)

It's really not that fast. The filesystem is a total dog (MFT contention) to the point that manipulating lots of small file is up to two orders of magnitude slower than ext4. This is made bearable thanks to SSDs being on the market. Also the amount of friction getting stuff built and running and maintaining it is detrimental to general productivity meaning you piss execution time out of the window regularly just fixing stuff.

Note: windows programmer for 19 years now. Only because of the cash.

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

#195

Some questions that immediately come to my mind: - What is the disk size of a shallow clone of a repo (without history)? - Can each developer actually clone the whole thing, or you do partial checkout? - Does the VCS support a checkout of a subfolder (AFAIK mercurial, same as git, does not support it)? - How long does it take to clone the repo / update the repo in the morning? Since people are talking about huge acro…

In practice: none of these operations take long enough to tempt you into alt-tabbing to cat videos.

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

#196
post #180

Earlier quoted context omitted.

It is mandatory that each code change is inspected for correctness, language style and approved by a code owner (all 3 may be the same person, or require multiple, depending on the situation).

But I guess the original programmer can never be the same person as those other 3 roles? :)

Depends if his co-workers lock their screens ;)

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

#197
post #180

Earlier quoted context omitted.

It is mandatory that each code change is inspected for correctness, language style and approved by a code owner (all 3 may be the same person, or require multiple, depending on the situation).

But I guess the original programmer can never be the same person as those other 3 roles? :)

You always need to get at least _one_ other engineer to review your code.

OWNER and readability approvals may require additional reviewers but not always.

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

#198

Earlier quoted context omitted.

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

Facebook gets a Flickr worth of photos every few days.

As someone who subscribes to ArchiveTeam's philosophy, it's going to be a dark day when the time comes to scrape Facebook before it goes under with that much data behind the scenes.

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

#199
I really wish there was a tendency to track all change/activity and not just total size; maybe like the graphs on GitHub. Removing things is key for maintenance and frankly if they haven't removed a few million lines in the process of adding millions more, they have a problem.

Having a massive code base isn't a badge of honor. Unfortunately in many organizations, people are so sidetracked on the next thing that they almost never receive license to trim some fat from the repository (and this applies to all things: code, tests, documentation and more).

It also means almost nothing as a measurement. Even if you believe for a moment that a "line" is reasonably accurate (and it's tricky to come up with other measures), we have no way of knowing if they're measuring lots of copy/pasted duplicate code, massive comments, poorly-designed algorithms or other bloat.

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

#200
post #146
post #132

Earlier quoted context omitted.

Well, you just said what it doesn't have, so I guess you speak for the company after all. Anyway, let me guess. Judging by how the size of all binaries shipped with Windows varied between releases, I'd be inclined to think Windows 10 does not have significantly more lines of code than Windows Vista. So I'd guess at most 100 million lines of code?

You are of course free to consult your employer and draw your line however you like. For me, I'm comfortable saying that I don't speak for the company and leaving the numbers within an order of magnitude. When it becomes my job to decide which numbers are and aren't fit to talk about publicly, I'm happy to update you.

I wish you'd use standard numbers... like "Libraries of Congress".
Post reply on HN