Jump to content

Apparently Facebook runs on 60+ Million lines of Code

Social networks (note that when I'm talking about these I actually mean any kind of service provided by a distributed system) also have to deal with reliability: if a server fails you have to use complex voting algorithms to correctly return some result, especially if you're dealing with byzantine fault tolerance (as opposed to silent fault toleration; (anyone who doesn't know what this is) google it to learn more!) or to elect the new primary server depending on who has the most recent copies of the data, etc. Who needs more reliability: a web service (social network or file collaboration system) or a space station (big machine floating in outer space with people inside)?! I'd also say the space station, but we could all be mistaken.

 

I know that a single line of code in Java represents a whole bunch of Assembly instructions (especially considering that it's the java bytecode that needs to be emulated; java to bytecode expands the original code and then each bytecode takes several instructions to execute). It was a rhetorical question about the graph, I don't know if they counted it as being the same or not.

 

I was also talking about developer testing. Everything from code coverage models or domain testing to method-, class-, inheritance-, integration-, regression-testing (and more).

And I just remembered something else: most software for critical systems (even railroads or subways) is developed using formal methods of development. That means starting with the formal requirements definition, writing an abstract specification specifying the entities and the invariants that must hold throughout execution by using logic and maths fundamentals such as set theory and then progressively refining that specification until a code generator can produce the final compilable code. All steps must be verifiable and provable, thus the set theory involved. Such development techniques usually result in smaller code (and mathematically provable). Which would make reliability issues easier to deal with since you are investing time and money in developing it correctly from the beginning. You can search "formal methods" and "b-method" to learn more. (I had a whole semester with a class dedicated to software quality but most of it is fuzzy!! And the files are only available to students so I can't share here...)

 

On the UI thing... I'm still not sold! All those stats are gathered by sensors and processed by the system but the UI only needs to display the number on a 7 segment display or somewhere on an LCD. Yes, some data (such as attitude) is usually displayed using graphs and there are a lot of buttons and (probably) menus, but I still think it is a very small percentage of the total code and smaller than what is needed for a website (considering all the scripts included for ads or API's such as JQuerry or Node.js).

 

Neither Facebook, Google and the like nor the department of defense or whoever is responsible for keeping those stats about military equipment!

 

For reliability, I believe one has to ask what it means for the system to fail. What is more important, peoples' lives or their privacy/ability to socialize? I would choose the former, so that's why I believe mission-critical software should be more robust and reliable than social networks.

 

Sorry, I could not detect a rhetorical question. It's kind of like sarcasm on the Internet for me sometimes.

 

I don't know too much about formal methods, but I do not think it is the only method to develop mission-critical software because it could prove to be too costly and time-consuming. I imagine that the firmware, drivers, and BIOS of custom hardware would be developed in that manner, but the OS could be imported from a third-party and modified to suit the needs in an iterative fashion.

 

For the UI, I wasn't arguing about the amount of code for it. I was arguing more on you said about the "mostly command line" because I find that extremely hard to believe and a UI that is too simplistic for such applications could prove to be detrimental.

 

Huh? Military equipment? I was talking about the graph information in OP's link... don't know where you picked up "military equipment"...

Link to comment
Share on other sites

Link to post
Share on other sites

For reliability, I believe one has to ask what it means for the system to fail. What is more important, peoples' lives or their privacy/ability to socialize? I would choose the former, so that's why I believe mission-critical software should be more robust and reliable than social networks.

 

Sorry, I could not detect a rhetorical question. It's kind of like sarcasm on the Internet for me sometimes.

 

I don't know too much about formal methods, but I do not think it is the only method to develop mission-critical software because it could prove to be too costly and time-consuming. I imagine that the firmware, drivers, and BIOS of custom hardware would be developed in that manner, but the OS could be imported from a third-party and modified to suit the needs in an iterative fashion.

 

For the UI, I wasn't arguing about the amount of code for it. I was arguing more on you said about the "mostly command line" because I find that extremely hard to believe and a UI that is too simplistic for such applications could prove to be detrimental.

 

Huh? Military equipment? I was talking about the graph information in OP's link... don't know where you picked up "military equipment"...

 

It's not the only method but would you trust on someone else's code for a space shuttle or would you rather spend more money and resources developing something mathematically proven yourself?

 

When I said command line what I meant was it's not some super futuristic heads-up display like in the movies or videogames! It's also not as simple (or literal) as command line! Imagine having to type "dbus-send --print-reply=literal --system --reply-timeout=500 --dest=org.iss.transport.Soyuz /org/iss/transport org.sovietspaceprogram.Soyuz.DBus.Actions.CloseHatch int16:1 > /dev/null" (completely made up stuff right there!) into a shell just to close a hatch!!

 

Well, there is information about fighter jets and military drones there, that's why I said that.

Link to comment
Share on other sites

Link to post
Share on other sites

It's not the only method but would you trust on someone else's code for a space shuttle or would you rather spend more money and resources developing something mathematically proven yourself?

 

When I said command line what I meant was it's not some super futuristic heads-up display like in the movies or videogames! It's also not as simple (or literal) as command line! Imagine having to type "dbus-send --print-reply=literal --system --reply-timeout=500 --dest=org.iss.transport.Soyuz /org/iss/transport org.sovietspaceprogram.Soyuz.DBus.Actions.CloseHatch int16:1 > /dev/null" (completely made up stuff right there!) into a shell just to close a hatch!!

 

Well, there is information about fighter jets and military drones there, that's why I said that.

 

Well a lot of the times, the budget you're given isn't big enough to make everything yourself from scratch. It's not a matter of trust, but practicality. And even if I would use other code or software, I would first ask for documentation and test results, and also do testing myself.

 

Also, the only definition of command line I know is the line of input/output through command prompt. I don't think there are any other definitions for it, but I could be wrong though.

Link to comment
Share on other sites

Link to post
Share on other sites

I wouldn't be surprised, all those advertisements probably take up a nice chunk of code

...

Or they pull out a random one from a DB. FB isn't hard coding ads lmao.

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

I think we all forgot the absurd amount of data they have are capturing for the government. That takes a good chunk. Ad selection and placement takes another large chunk. Special rules for what version of your timeline they think you should see, well that's a chunk. Don't forget the extra lines they contributed to Linux distro and mysql to optimize it for their hardware. I could see it getting up their in terms of lines of code

Link to comment
Share on other sites

Link to post
Share on other sites

Probs just a "template" for the profiles and pages, just with some variables that are defined by the user e.g. your name and birth date.

 CPU Intel Core i7-4790K  | Motherboard Asus Sabertooth z97 Mark 1 | RAM Corsair Dominator Platinum 16gb 1866mhz | GPU EVGA GeForce GTX 980 w/ ACX 2.0 | Case Fractal Design Define R4 w/Window | Storage Western Digital BLACK SERIES 3TB 3.5" 7200RPM + Samsung 840 EVO 250GB |  PSU Corsiar RM750 | Display(s) Some Acer Things | Cooling Corsair H100i + 5x Noctua NF-F12 industrial 120mm fans(they are freaking load) | Keyboard Corsair Vengeance K95 |  Mouse Logitech G502 | Sound Audio-Technica AD900x + 02+ODAC +AT2020 | OS Microsoft Windows 8.1 Pro 

Link to comment
Share on other sites

Link to post
Share on other sites

Was that before or after they discovered for-loops?

I cannot be held responsible for any bad advice given.

I've no idea why the world is afraid of 3D-printed guns when clearly 3D-printed crossbows would be more practical for now.

My rig: The StealthRay. Plans for a newer, better version of its mufflers are already being made.

Link to comment
Share on other sites

Link to post
Share on other sites

I'd believe it. 

 

Web applications, especially those focused on storing, mining and analyzing user data can get very heavy. Secondly, if they literally have developed two different PHP implementations: Hiphop VM/Hack, and Hiphop C/PHP, just imagine what else they write behind closed doors. They've developed one binary communication protocol (Thrift) that is used by a lot of companies and an entire database system (Cassandra). The wrote their own C preprocessor. They've had to or want to reinvent large parts of the wheel so I have no problem believing this number.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×