Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
AustinB

Apparently Facebook runs on 60+ Million lines of Code

Recommended Posts

Posted · Original PosterOP

Well apparently facebook runs on 60,100,000 lines of code according to here: http://www.informationisbeautiful.net/visualizations/million-lines-of-code/

 

I have my reasons to believe that this is false as it has more lines than a F-35 Fighter Jet, so yea.

 

Just though I would share this fairly useless bit of info.


Looking for a Programming Project take a look here!

http://linustechtips.com/main/topic/407332-looking-for-a-project-idea-start-here/

Link to post
Share on other sites

And Minecraft has over 5 billion.

Minecraft > Facebook

lol jk


My sound system costs more than my PC.        Check out my S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Intel i7 4790k | ASUS GTX770 | ASUS Sabertooth Z97 Mark S | Corsair Vengeance Pro 32GB | NZXT S340 | Seasonic Platinum 760 | modded H100i | Ducky ONE White TKL RGB | Logitech MX Master 2S | 2x Samsung 850 Pro 512GB | WD Red 4TB Samsung 58" 4k TV | 2x Behringer NEKKST K8 | BIC Acoustech H-100II | Scarlett 2i4 | 2x AT2020

 

Link to post
Share on other sites

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

 

I didn't even think about that. I wonder what else that they're taking into account other than Facebook's own code.

Link to post
Share on other sites
Posted · Original PosterOP

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

 

 

I didn't even think about that. I wonder what else that they're taking into account other than Facebook's own code.

 

You guys saying the just counted the useless shit?


Looking for a Programming Project take a look here!

http://linustechtips.com/main/topic/407332-looking-for-a-project-idea-start-here/

Link to post
Share on other sites

I didn't even think about that. I wonder what else that they're taking into account other than Facebook's own code.

I was making a stupid joke, but that is a valid argument.

 

They may have taken all of the games on FB into account, random code that doesn't belong, etc.


How to Post Topics, the Right Way / The Ultimate Build Parts List

 

"4 words. DON'T BE A DUMBASS" ~@Swndlr

Link to post
Share on other sites
Posted · Original PosterOP

if you look at the graph, it does say it's including backend code whatever the hell that is

That's what runs the site (The only thing they should be counting).

They're probably counting all of the users timelines and profile pages(HTML) - Which shouldn't be counted


Looking for a Programming Project take a look here!

http://linustechtips.com/main/topic/407332-looking-for-a-project-idea-start-here/

Link to post
Share on other sites

Well, surprisingly, Vista has more code than 7. Why?


"If it has tits or tires, at some point you will have problems with it." -@vinyldash303

this is probably the only place i'll hang out anymore: http://linustechtips.com/main/topic/274320-the-long-awaited-car-thread/

 

Current Rig: Intel Core 2 Quad Q6600, Abit IN9-32MAX nForce 680i board, Galaxy GT610 1GB DDR3 gpu, Cooler Master Mystique 632S Full ATX case, 1 2TB Seagate Barracuda SATA and 1x200gb Maxtor SATA drives, 1 LG SATA DVD drive, Windows 10. All currently runs like shit :D 

Link to post
Share on other sites

I think it might be true, putting in the mix of the games that they have, the pages, pictures..... it could be true but! More than a F-35 is hard to believe.


The time you enjoy wasting, is not wasted time. 

Link to post
Share on other sites

I don't understand why you all think an F-35 or even a space shuttle should have more lines of code than facebook or any other website.

 

In an aircraft or any other mission critical equipment where lives may be in danger (e.g. medical devices) you want a real-time system with extremely efficient code and no clutter. Just the bare minimum to perform the required tasks with extremely high precision. And you need to mathematically prove the correctness of most, if not all, algorithms if you want to send a space shuttle to outer space without it exploding mid-air because some value was losing precision throughout the calculations. The less code you have the less bugs you have to deal with.

 

In facebook you are expecting the backend to manage your selfies and an array of other media types across several servers spread throughout the world in a secure fashion and to have a nice frontend to post your thoughts and upload your pictures and whatnot. Not to mention mobile apps, the code that goes into linking several platforms (you could upload pictures by sending them in an email to a specific facebook address not long ago, I believe), security, reliability, load-balancing algorithms for your data, advertisement, games (API's that enable these) and a slew of other "details" that need to be managed.

And that's not counting each user's html page, otherwise the figure would be much higher (several orders of magnitude; besides, pages load dynamically, they are not static) but they should be counting (and probably are) the frontend (HTML templates, CSS, javascript, ...) that is needed to render those pages.

Link to post
Share on other sites

I don't understand why you all think an F-35 or even a space shuttle should have more lines of code than facebook or any other website.

 

In an aircraft or any other mission critical equipment where lives may be in danger (e.g. medical devices) you want a real-time system with extremely efficient code and no clutter. Just the bare minimum to perform the required tasks with extremely high precision. And you need to mathematically prove the correctness of most, if not all, algorithms if you want to send a space shuttle to outer space without it exploding mid-air because some value was losing precision throughout the calculations. The less code you have the less bugs you have to deal with.

 

In facebook you are expecting the backend to manage your selfies and an array of other media types across several servers spread throughout the world in a secure fashion and to have a nice frontend to post your thoughts and upload your pictures and whatnot. Not to mention mobile apps, the code that goes into linking several platforms (you could upload pictures by sending them in an email to a specific facebook address not long ago, I believe), security, reliability, load-balancing algorithms for your data, advertisement, games (API's that enable these) and a slew of other "details" that need to be managed.

And that's not counting each user's html page, otherwise the figure would be much higher (several orders of magnitude; besides, pages load dynamically, they are not static) but they should be counting (and probably are) the frontend (HTML templates, CSS, javascript, ...) that is needed to render those pages.

 

So, you want software for mission-critical equipment to do ONLY "just the bare minimum to perform the required tasks with extremely high precision"? That makes no sense to me. Yes, you want fast and memory-efficient algorithms, but that's the case with ALL software and you yourself are not considering factors such as security, reliability, debugging, automated testing, and UI, all of which are pretty damn important for mission-critical software and require more code to do so. Hell, even comments inside the source code could be pretty important as well and the data presented neither said it counted or ignored comments...

 

I do agree with you that more code equals more bugs, but that is not something that can be easily avoided and sometimes, you have write much code to perform some task.

 

In short, yes, I do understand how and why software for a space shuttle COULD have more lines of code than Facebook (not necessarily should though).

Link to post
Share on other sites

Well, surprisingly, Vista has more code than 7. Why?

Well if you think about it logically... Windows 7 runs faster than Vista... 

So Vista has more lines of code to process everytime it does something - well thats my thinking behind it!

 


Computer Programming Nerd Guy + Computer Support @ Red Tree IT

Link to post
Share on other sites

Well if you think about it logically... Windows 7 runs faster than Vista... 

So Vista has more lines of code to process everytime it does something - well thats my thinking behind it!

 

No, I think Vista runs faster than 7.


"If it has tits or tires, at some point you will have problems with it." -@vinyldash303

this is probably the only place i'll hang out anymore: http://linustechtips.com/main/topic/274320-the-long-awaited-car-thread/

 

Current Rig: Intel Core 2 Quad Q6600, Abit IN9-32MAX nForce 680i board, Galaxy GT610 1GB DDR3 gpu, Cooler Master Mystique 632S Full ATX case, 1 2TB Seagate Barracuda SATA and 1x200gb Maxtor SATA drives, 1 LG SATA DVD drive, Windows 10. All currently runs like shit :D 

Link to post
Share on other sites

No, I think Vista runs faster than 7.

Your down to your own opinion.

Ive used both on the same hardware and 7 was hands down faster.

at the time it was a core 2 duo 2.8ghz with 3gb ram.

 


Computer Programming Nerd Guy + Computer Support @ Red Tree IT

Link to post
Share on other sites

So that's why it's a bloated piece of shit that slows everything down and doesn't work properly...

After having Facebook open for an hour or so in Chrome, when I look at Chrome's task manager it shows the facebook tab as using up around 1GB of RAM... I've seen nearly 2GB before. It's totally ridiculous.

Link to post
Share on other sites

if you look at the graph, it does say it's including backend code whatever the hell that is

 

Backend code is all the code that runs on the server side and generates the page content to be sent to the client... as opposed to frontend code which is the JavaScript.

Link to post
Share on other sites

So, you want software for mission-critical equipment to do ONLY "just the bare minimum to perform the required tasks with extremely high precision"? That makes no sense to me. Yes, you want fast and memory-efficient algorithms, but that's the case with ALL software and you yourself are not considering factors such as security, reliability, debugging, automated testing, and UI, all of which are pretty damn important for mission-critical software and require more code to do so. Hell, even comments inside the source code could be pretty important as well and the data presented neither said it counted or ignored comments...

 

I do agree with you that more code equals more bugs, but that is not something that can be easily avoided and sometimes, you have write much code to perform some task.

 

In short, yes, I do understand how and why software for a space shuttle COULD have more lines of code than Facebook (not necessarily should though).

 

What I meant was you don't need to upload pictures to facebook from a fighter jet. It's not mission critical.

Yes, I am considering those factors. You don't need the same amount of security code in a fighter than on facebook (things like two-step authentication or privacy settings). It's not like a fighter is connected to the local cafe's wireless and you need to cipher you login info. Besides, most of those things will be implemented in specialized hardware (since most security algorithms are proprietary and secret and such operations need to be extremely fast).

Which leads me to another question: is a line of assembly code the same as a line of C or Java code? Whereas I find it hard to believe a social network needs any assembly code to function I would bet a fighter, plane or spacecraft uses it extensively.

As for the UI it's mostly all "command line" stuff. You don't need a beautiful HTML page with lots of CSS and javascript to launch a missile! Again, less code is better code.

And I was not considering automated testing because it is not included in the normal operation of the system. The code for testing could be as large (or even larger) than the code for the actual system, but you only run it during maintenance operations. Again, you can run diagnostics on Facebook whenever you feel something is wrong but it'd not be a good idea to do the same on a fighter mid-flight.

 

Anyways, that graphic is highly debatable. It is missing lots of important information and we don't even know if that is really true (there is a note that reads "some guess work, rumors & estimates").

If you keep adding modules, experiments and systems to the International Space Station it could potentially have more lines of Assembly code than some social network has Java lines of code.

Link to post
Share on other sites

What I meant was you don't need to upload pictures to facebook from a fighter jet. It's not mission critical.

Yes, I am considering those factors. You don't need the same amount of security code in a fighter than on facebook (things like two-step authentication or privacy settings). It's not like a fighter is connected to the local cafe's wireless and you need to cipher you login info. Besides, most of those things will be implemented in specialized hardware (since most security algorithms are proprietary and secret and such operations need to be extremely fast).

Which leads me to another question: is a line of assembly code the same as a line of C or Java code? Whereas I find it hard to believe a social network needs any assembly code to function I would bet a fighter, plane or spacecraft uses it extensively.

As for the UI it's mostly all "command line" stuff. You don't need a beautiful HTML page with lots of CSS and javascript to launch a missile! Again, less code is better code.

And I was not considering automated testing because it is not included in the normal operation of the system. The code for testing could be as large (or even larger) than the code for the actual system, but you only run it during maintenance operations. Again, you can run diagnostics on Facebook whenever you feel something is wrong but it'd not be a good idea to do the same on a fighter mid-flight.

 

Anyways, that graphic is highly debatable. It is missing lots of important information and we don't even know if that is really true (there is a note that reads "some guess work, rumors & estimates").

If you keep adding modules, experiments and systems to the International Space Station it could potentially have more lines of Assembly code than some social network has Java lines of code.

 

Well, I agree that the security depends on Internet connection and how much the plane or the spacecraft uses, but I'm confident that reliability is top priority for those machines and applications and that requires lots of code in order to cover everything that can go wrong.

 

As for your question, for Java, hell no. For C, no, but it's pretty close. Also, technically speaking, ALL high-level code is compiled into assembly and then turned to machine-code by the assembler, but I think what you meant how much of Facebook is written in assembly, for which I have no idea.

 

For the UI, you are gravely mistaken. It may not be HTML or javascript, but it's a lot more than just "command line". For example, a plane pilot will need to know the altitude, air pressure, current fuel, etc. Command line is or can be part of the interface, but it is certainly not the majority.

 

For testing, I meant testing by the developers, not the users. Running user diagnostics was not what I meant and even that needs to be tested as well because it is a tool.

 

I agree that the information is debatable because I don't think Facebook, Microsoft, Google, etc. would be willing to share that information directly.

Link to post
Share on other sites

So that's why it's a bloated piece of shit that slows everything down and doesn't work properly...

After having Facebook open for an hour or so in Chrome, when I look at Chrome's task manager it shows the facebook tab as using up around 1GB of RAM... I've seen nearly 2GB before. It's totally ridiculous.

Well, LTT does the same for me, so it's no bother.


"If it has tits or tires, at some point you will have problems with it." -@vinyldash303

this is probably the only place i'll hang out anymore: http://linustechtips.com/main/topic/274320-the-long-awaited-car-thread/

 

Current Rig: Intel Core 2 Quad Q6600, Abit IN9-32MAX nForce 680i board, Galaxy GT610 1GB DDR3 gpu, Cooler Master Mystique 632S Full ATX case, 1 2TB Seagate Barracuda SATA and 1x200gb Maxtor SATA drives, 1 LG SATA DVD drive, Windows 10. All currently runs like shit :D 

Link to post
Share on other sites

Well, I agree that the security depends on Internet connection and how much the plane or the spacecraft uses, but I'm confident that reliability is top priority for those machines and applications and that requires lots of code in order to cover everything that can go wrong.

 

As for your question, for Java, hell no. For C, no, but it's pretty close. Also, technically speaking, ALL high-level code is compiled into assembly and then turned to machine-code by the assembler, but I think what you meant how much of Facebook is written in assembly, for which I have no idea.

 

For the UI, you are gravely mistaken. It may not be HTML or javascript, but it's a lot more than just "command line". For example, a plane pilot will need to know the altitude, air pressure, current fuel, etc. Command line is or can be part of the interface, but it is certainly not the majority.

 

For testing, I meant testing by the developers, not the users. Running user diagnostics was not what I meant and even that needs to be tested as well because it is a tool.

 

I agree that the information is debatable because I don't think Facebook, Microsoft, Google, etc. would be willing to share that information directly.

 

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!

Link to post
Share on other sites

I wonder how much of that code is dedicated to forgetting my privacy settings periodically...


"PSU brands are meaningless, look up the OEM."

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


×