4 ms·
See: How come an internet browser is millions of code lines? https://www.quora.com/How-come-an-internet-browser-is-millions-of-code-lines/answer/Lam-Luu-1 http
by mwattsun 5y ago
See: How come an internet browser is millions of code lines?
https://www.quora.com/How-come-an-internet-browser-is-millions-of-code-lines/answer/Lam-Luu-1 https://www.quora.com/How-come-an-internet-browser-is-millio...
- travisporter 5y agoQuoted from Lam Luu above (in case you don't have quora login): Let’s do some accounting. A (quasi) modern browser must: Parse 4 different languages: HTTP, HTML, javascript, and CSS Encrypt and decrypt SSL (multiple versions of SSL, in fact). Deal with network. Act as first and most important defender of user’s security. Deal with graphics (e.g. win32, Xorg, etc.) Layout HTML and CSS. Interpret Javascript. Deal with local storage. The above list is just the bare minimum. A regular modern browser also: Has plug-in systems (more difficult to design than most people think). Stores history and favorites. Syncs them across different devices, too. Supports multiple tabs at the same time. “Incognito” mode. Stores passwords. Provides GPS, webcam, and microphone support (HTML5). Stores and recovers session in case of crashing. Checks for upgrade and installs itself as needed. Do all of the above fast fast fast. I mean, any of the above items (in both list) would require at least tens of thousands of line of code to do right. Yes, even network programming. Effective and fault-tolerant handling of network is very very hard. And this is just the bird-eye level of looking. Each item can be split into smaller items, each of which is major in their own right. For example, HTTP has multiple versions, and a web browser has to deal with as many as possible. Javascript is, well, no comment. HTML is a *** mess, to put it mildly. SSL has multiple versions, each of which has its own bugs to contend with.
- vidanay 5y agoAs a developer, I will never work on two things: Life critical software (medical devices, etc) and a web browser.
- ska 5y agomedical devices, at least, can be really rewarding work.
- Tade0 5y agoThey're definitely more fun than the regular stuff, because you're dealing with the messy reality of how the human body works.
- GuB-42 5y agoIf medical devices are like avionics, life critical software is actually pretty boring. And it is probably a good thing. I definitely didn't have the feeling that "if I get that wrong, someone will die". Yes, it is definitely true that people may die, but responsibility is so diluted that if feels so foreign. You are given specifications that are extremely detailed, you implement them, all the fancy stuff is banned. You freeze the version, then someone reads the specs, write the tests, pass the tests, weeks later, they discover a problem in the specs, update the specs, update the code, update the tests, freeze, more testing, etc... Refactoring? Don't even think about it. Continuous integration? Sure, but that won't update your documentation signed by 15 different people that is necessary for certification. The process is so mind numbing and tedious that the fact that there are lives on the line is the only motivation. And even with that, many people simply don't give a fuck (and it is as scary as is sounds). When the software is finally in production, if there is a problem, it passed through so many hands that no one and everyone is responsible at the same time.
- faeyanpiraat 5y agoI did not need a quora login to read that. What could be the difference? Location?
- nsgi 5y agoPossibly A/B tests or referrer
- diogenesjunior 5y agoQuora blocks you after you view X amount of questions, unless you signup/login. I just block cookies on Quora and it works.
- deleted 5y ago[deleted]
- sebazzz 5y agoA browser is an operating system in its own right.
- floxy 5y agoI wonder how many lines of code were in the QNX 1.44MB demo disk, which was a bootable floppy that included a javascript enabled browser, hardware drivers for video, networking, windowed graphics, etc. http://toastytech.com/guis/qnxdemo.html http://toastytech.com/guis/qnxdemo.html
- Yoric 5y agoAs a side-note, the web has grown several orders of magnitude more complicated since then. I'm willing to be that every single codec is more complicated than the JS VM they used to ship. JavaScript JITs are scary beasts, too, themselves several orders of magnitude larger than a simple JS interpreter, etc. Even support for Unicode is so complicated it's scary.
- notriddle 5y agoAlso, web browsers from that era were very insecure. The “You Are an Idiot” Trojan was from that era. Web browsers with the same featureset, but developed to modern security standards, would be nigh impregnable. Unfortunately, the market has a certain level of tolerance for holes, and that tolerance level isn’t zero, so the extra “budget” gained by sandboxing, fuzzing, ASLR, and safe C++ practices, gets invested into new features instead of left on the table.
- Yoric 5y agoI like your phrasing on security holes "budget". I'll reuse it :)