Live data from Hacker News

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

wired.com

201–210 of 347 posts

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

#201
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?

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

It varies a lot by project and by how widely used the code is.

There are few (if any) strictly enforced rules for documentation or invariant checking. You basically have to convince at least one other engineer that what you have is sufficient.

The documentation is _generally_ pretty decent for core libraries, but sometimes you just have to read the code.

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

#202

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…

Although I agree that line counting is a silly exercise much of the time, the talk did cover change activity as well as total size.

With regard to copy/pasted duplicate code and massive comments, we do have ways of knowing that as both of those are easily computable. Duplicate code can be matched using hashes and comments are delimited, making their measurement easy.

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

#203
post #117
post #95

Earlier quoted context omitted.

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

Say I make a change to a commonly used library (let's say deprecating a function, and replacing it with another): * I can see literally _every use_ of the old function. * I can run the tests for everyone who uses that function. * * this is automated; the build/test tooling can figure out the transitive set of build/test targets that are affected by such a change. * I can (relatively) easily update _every use_ of the…

Technically, you can't see every use of a function because dynamic dispatch mechanisms aren't available at source code time. That's why you would normally run tests of all your library's dependents (having this dependency graph is one of the most important parts of the piper/blaze system).

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

#205

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.

I wonder if this system could be used for 'burns'.

Such as: "Hacker News has an Ask dot com userbase of number of good posters" (This obviously does not include me ;))

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

#206

Earlier quoted context omitted.

IIRC, it was built on a hacked up Ambient Orb http://ambientdevices.myshopify.com/products/stock-orb

Wow, $150? Shocked there isn't a cheaper USB version that is more easily hackable. I mean, is it really more than color-changing LEDs in a plastic sphere?

It's also a perpetual? subscription to a

   nationwide wireless network
to obtain e.g. the latest stock prices.

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

#207
post #22

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. The Linux kernel generally uses this policy for internal APIs for example.

> 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…

If all your RPCs take a single parameter, this isn't a problem provided you use universal defaults.

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

#208

Earlier quoted context omitted.

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 fixi…

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 millions of people might want to do. Specialty workloads are simply not what Microsoft is ever going to invest any significant amount of time in - unless they see some money there. In that sense, Windows would probably be a far better OS if users could modify it to suit their needs, but thems the breaks. Linux seems to fill that void for some.

The disadvantage of NTFS which you point out, isn't because of a fuckup. It's not designed for your use case. You might even find Microsoft telling you that themselves here :- https://technet.microsoft.com/en-us/library/Cc938932.aspx

As to your point about productivity, I can't comment without knowing specifics. As a primarily C++ programmer, I haven't run into any Windows showstoppers that prevented me from shipping. I have run into showstoppers with their dev tools, but I see them as separate from the OS.

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

#209
post #144

Earlier quoted context omitted.

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.

Yeah, I thought they were hinting at that, but its legal here in WA too.

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

#210
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…

Would you rather work on the linux kernel instead of windows?

What's the relation to the post to which you're replying?
Post reply on HN