[HN Gopher] /* You Are Not Expected to Understand This */
       ___________________________________________________________________
        
       /* You Are Not Expected to Understand This */
        
       Author : todsacerdoti
       Score  : 46 points
       Date   : 2020-10-21 12:12 UTC (10 hours ago)
        
 (HTM) web link (community.cadence.com)
 (TXT) w3m dump (community.cadence.com)
        
       | brundolf wrote:
       | > Linux is 15+M lines of code....But at only 9,000 lines, Unix v6
       | was tractable, people continued to study it (and maybe still do),
       | and the famous comment lived on.
       | 
       | > Reading real programs is a part of learning computer science
       | that should be emphasized more. As an undergraduate, we mostly
       | programmed in BCPL, a local Cambridge language that is the fore-
       | runner of C and C++. We had access to the full source code of the
       | compiler and reading it was as valuable as the more theoretical
       | aspects we learned in our compiler-writing course. Today, with
       | open source, it is easy to read the source code for many systems
       | actually in use (Linux, the Apache web server, Hadoop,
       | TensorFlow, and thousands more) but these are hundreds of
       | thousands, if not millions, of lines of code. As I said above,
       | Linux is somewhere between 15M and 20M lines of code, depending
       | on just what you include.
       | 
       | This is an interesting problem. Modern software is so huge and
       | complicated that it's not feasible to go read it just as a
       | learning exercise. Linux devs can probably spend years
       | contributing to the project without having even visited all of
       | its dark corners, much less understanding them.
       | 
       | Not sure what can be done. Though I am tempted to go see what a
       | 9,000 line OS looks like.
        
         | throwaways885 wrote:
         | > > [...] at only 9,000 lines, Unix v6 was tractable, people
         | continued to study it (and maybe still do), and the famous
         | comment lived on.
         | 
         | Wow, Unix is a work of art. I have hobby projects at 2x SLoC
         | which are literally just small web services :(
        
         | qsort wrote:
         | >Modern software is so huge and complicated (...) Not sure what
         | can be done.
         | 
         | Nothing. Any sufficiently complex system or body of knowledge
         | is too large for any one person to understand. Does any
         | physicist know ALL physics that was ever done? Does any one
         | engineer know how to build a Ferrari? Let's be honest, we take
         | for granted _a lot_ of stuff that we don 't fully understand,
         | Linux is a major piece of infrastructure, it's natural nobody
         | can fully wrap their head around it.
         | 
         | > Reading real programs is a part of learning computer science
         | that should be emphasized more.
         | 
         | I had never thought of this in an educational sense, but I
         | definitely agree. I sure wish I was taught more of that, toy
         | problems get boring quickly.
        
         | person_of_color wrote:
         | There is so much driver and feature spam in the Linux codebase.
         | I really wish a beautiful, minimal microkernel approach would
         | have won out.
         | 
         | Why can't distros be a package of microkernel + drivers?
        
           | galangalalgol wrote:
           | Because a monolith is easier to get working on a quick
           | timeline and it will generally outperform code that makes
           | compromises for the sake of its' developers sanity. At least
           | as long as you can keep the insane developers from eating
           | each others eyes.
        
           | qayxc wrote:
           | > Why can't distros be a package of microkernel + drivers?
           | 
           | Performance. Basically, the required amount of context
           | switches (since all drivers run in user mode) impacts
           | performance and cache use in a negative way compared to
           | monolithic kernels. Whether this is still a significant issue
           | with modern designs, I don't know, but that was the argument
           | back in day (i.e. the early 90s when Linux came about).
        
           | someguydave wrote:
           | because nobody is willing to pay alot extra for software of
           | high quality
        
           | gnulinux wrote:
           | Why does it matter? If you want to read scheduling code of
           | linux, no one forces you to read 5M+ lines of driver code. If
           | linux was just a microkernel, and distros shipped drivers,
           | you'd still have to read roughly the same number of lines to
           | understand linux scheduling. If you want to read the entire
           | linux code, you can still do it, just ignore the driver code
           | if you're not interested in them; otherwise in your scenario
           | you'd be reading driver code in distros as well.
        
       | dang wrote:
       | If curious see also
       | 
       | related from 2008 https://news.ycombinator.com/item?id=203437
       | 
       | dmr's comments are at
       | https://web.archive.org/web/19990501224738/http://cm.bell-la...,
       | followed by _Comments I do feel guilty about_.
        
       | daly wrote:
       | I have my photocopied version... but I also bought the book.
        
       | sam_bristow wrote:
       | I'm sure I read somewhere that the original comment was intended
       | more along the lines of "this bit isn't going to be on the exam"
       | rather than "this bit is to complex for your feeble brain".
        
         | JoeAltmaier wrote:
         | But there are absolutely hard places in some code, that mere
         | mortals should change at their peril. Most complex code has
         | some place where it all meets, 6 or 7 constraints and issues in
         | a few lines. Most people aren't in a place to (want to)
         | understand all the issues, and its reasonable and fair to say
         | "Here there be dragons".
        
       ___________________________________________________________________
       (page generated 2020-10-21 23:00 UTC)