| As a web/game developer, you forgot to include the OS and the drivers in the lines of code involved in executing the stuff you are writing. The Linux kernel was 15M lines in 2013 [1], more than half of that was drivers. Windows XP was apparently 45M lines, the 2009 Debian distribution 300M lines [2]. So you're into millions of lines just to execute "Hello world" on a PC. Simple control systems generally don't use an OS. E.g. Arduino is as simple as it gets, here [3] is a 30-LOC example snippet for a HTTP client. But if you dig down into the included libraries (most of it is on GitHub) you'll find that there's (quick estimate) 10-20k lines of code involved in executing those 30 lines. And you haven't actually _done_ anything yet, that's just the infrastructure to allow C code to interact with the hardware with a few standard libraries for math and IO. Modern cars are complex enough to have OSes [4], with the corresponding code complexities. In short, web developers vastly underestimate the code complexity of interacting with hardware in a low-level language because it's not something they deal with. The umpteen million lines of OS kernel and device drives are done by someone else, and for people who just _use_ a PC it (mostly) "just works", to the extent that even advanced users aren't aware of the complexity behind it. [1] https://en.wikipedia.org/wiki/Linux_kernel#Codebase [2] https://unix.stackexchange.com/questions/111281/exploding-am... [3] https://www.arduino.cc/en/Tutorial/HttpClient [4] https://www.quora.com/What-operating-systems-are-used-in-car... |
How many I/O devices/drivers does a pacemaker talk to? How many of those are written by/customized by the pacemaker's developers?
If you include the underlying stack, then also my <body>Hello world</body> runs on tens of millions of lines of code (Browser+OS).