It’s not the best, far from it, but it was fascinating to me so I will share. I used to work for a large newspaper. Engineering wasn’t the focus of the business, it was only a means to an end, it was just something they needed to have a competitive website. As a result, the churn rate was very high. But more interesting there was also a very high return rate. Engineers would come and go and return and leave again all…
The book "A Deepness in the Sky" features people living on an ship whose operating system is thousands of years old. One of the main characters is considered a software archaeologist of sorts - he's an engineer, but in a sense also a historical researcher. I can't emphasize enough that this notion is only a side point in the story and not a main aspect of the plot, sadly, so I wouldn't go reading it in hopes of heari…
Ask HN: What's the best source code you've read?
51–60 of 271 posts
Re: Ask HN: What's the best source code you've read?
#52One of the most surprisingly clear code bases is LLVM. It’s an old complex beast, yet it’s organized beautifully. I mean, it has a lot of essential complexity but little accidental complexity. That’s usually what I strive for when coding. Complexity is sometimes unavoidable, that’s fine, that’s why it’s essential. However, avoidable complexity should be… well… avoided.
Re: Ask HN: What's the best source code you've read?
#53Angular code is pretty complex but well organized. I still have yet to understand most of it.
It's not too bad, you just need to know TypeScript.. And not like "I know TypeScript." on a resume, I mean "I know TypeScript™."
Re: Ask HN: What's the best source code you've read?
#54Re: Ask HN: What's the best source code you've read?
#55The early Go standard library (before it was hyper-optimized.)
That's a fascinating observation. Do you think code inherently gets "worse" as it becomes more "optimised"?
On the other hand, as the compiler improved, some parts of it became more readable (e.g not manually unrolling loops, avoiding manual inlining, introducing bit-manipulation functions into the library instead of repeating them everywhere).
Unfortunately, it's unavoidable — faster code is usually longer and more complicated.
Re: Ask HN: What's the best source code you've read?
#56Against all that, Knuth wrote code that could be ported to other systems (I first used TeX on an IBM mainframe running VM/CMS, then later on a VAX minicomputer running VMS, then on a PC with DOS, PC with OS/2, PC with Windows and now a Mac with OS X/MacOS. His presentation of code and internal documentation intermingled is something which I could see still being useful now, although sadly, literate programming seems all but dead now. I still go back to Knuth’s code to understand how to solve some problems on occasion even though it’s about 30 years since I last wrote a line of Pascal.
Re: Ask HN: What's the best source code you've read?
#57My own - hell is other people’s code.
The 7th circle of hell is my own from 3 months ago. I can't even blame someone else for the tragedy.
I have a differing framework to an SPA, to an API, and to personal utility scripts. Amplified by adding in co-workers and contributors.
The Golden Question becomes how to communicate philosophy to a broad and diverse audience, be it co-workers or open-source.
Re: Ask HN: What's the best source code you've read?
#58My own - hell is other people’s code.
I have the exact same sentiment. My code looks like a poem, others looks like chicken scratch.
There is good code from other - but I feel many lack discipline in their initial approach and long term maintenance. In things as banal as variables. Not as a nit-pick but as a way of life.
It seems… concerning.
Re: Ask HN: What's the best source code you've read?
#59Peter Norvig's spell checker: https://norvig.com/spell-correct.html