Live data from Hacker News

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

wired.com

181–190 of 347 posts

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

#181
post #81

I'm a google software engineer and it's nice to see this public article about our software control system. I think it has plusses and minuses, but one thing I'll say is that when you're in the coding flow, working on a single code base with thousands of engineers can be an intensely awesome experience. Part of my job- although it's not listed as a responsibility- is updating a few key scientific python packages. When…

Could you tell something about the level of documentation? For instance, do you have to write a paragraph of documentation for every function that you add to the system? How about adding preconditions and postconditions, and other invariants? Also, is the code that you add to the repository always inspected by other people? Is that done systematically?

[deleted]

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

#182
post #95
post #90

Earlier quoted context omitted.

Being able to make sweeping changes to a shared piece of code, and ensure that everyone's up to date (Hi, Rosie!) and not broken by your change (yay TAP train!) is phenomenal as well.

How is this a side effect of it being in the same repository/

It's a form of efficiency due to vertical integration. I agree as others mentioned that it would be possible to do this without a single code base but it would be very unwieldly.

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

#183

Is this article saying that all developer employees have access to the "holy" search algorithm internals? I can hardly believe that to be true, given the fact that SEO is a complete industry.

It is not saying that.

FTA:

> There are limitations this system. Potvin says certain highly sensitive code—stuff akin to the Google’s PageRank search algorithm—resides in separate repositories only available to specific employees.

The vast majority of code is visible to everyone, though.

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

#184

Is this article saying that all developer employees have access to the "holy" search algorithm internals? I can hardly believe that to be true, given the fact that SEO is a complete industry.

No, it specifically says the opposite:

"Potvin says certain highly sensitive code—stuff akin to the Google’s PageRank search algorithm—resides in separate repositories only available to specific employees."

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

#185
post #180

Earlier quoted context omitted.

Could you tell something about the level of documentation? For instance, do you have to write a paragraph of documentation for every function that you add to the system? How about adding preconditions and postconditions, and other invariants? Also, is the code that you add to the repository always inspected by other people? Is that done systematically?

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? :)

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

#187
post #144
post #137

Earlier quoted context omitted.

>Windows is fast, stays fast, and that's pretty much all I care about. are you in CO?

what?

I suspect he was trying to imply that you're high, since cannabis is legal in Colorado ("CO").

Hence why his post is being downvoted.

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

#189
post #67

Really? This article sounds very over simplified, but I haven't worked at google so I wouldn't know. I'm assuming if you want to change some much depended on library, there's a way to up the version number so you don't hose all your downstream users. That's the way it worked at Amazon at least. Also, I wonder why the people in the story think Google's codebase is larger than that of other tech giants, not that it rea…

Google mostly works at HEAD. Very little is versioned, and branches are almost unheard of.

In general you change the much depended on library and all of its consumers (probably over time in multiple changes, but you can do it in one go if it really needs to be a single giant change).

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

#190
post #78
post #70

One humorous side-effect of having all that code viewable (and searchable!) by everyone was that the codebase will contain whatever typo, error, or mistake you can think of (and convert into a regular expression). I remember seeing an internal page with dozens of links for humorous searches like "interger", "funciton", or "([A-Z][a-z]+){7,} lang:java"...

> "([A-Z][a-z]+){7,} lang:java Yeah this one was my favorite of the code search examples, there are some really good ones in there.

Can you explain this? It looks to me like a regexp that searches Java source for words 7+ characters that start with a capital letter?
Post reply on HN