Live data from Hacker News

Ask HN: What open source project, in your opinion, has the highest code quality?

news.ycombinator.com

271–280 of 294 posts

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#272

Its older than some HN posters, but the GPLed DOOM source code was one I liked. The performance reached by the game was considered impossible until Carmack did show us otherwise. So I expected lots of ASM and weird hacks, especially as compiler optimization wasnt as good as it is today. Surprise, surprise, the thing was easy to read, easy to get going, easy to port, reasonablye documented . It has shown me what a goo…

FYI, "Surprise, surprise" is generally meant sarcastically. I think you mean "Surprisingly". https://www.merriam-webster.com/dictionary/surprise,%20surpr...

Actually, Hypeman is using this correctly in my opinion. We all knew the code would be good, it was only him that doubted it. So its not surprising to us, the reader, that the code is good.

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#273
Does 'Physically Based Rendering' count? It's a book... which is also source. It was written as only the 2nd work of true 'Literate Programming' that I know of. I believe Knuth wrote a book about TeX which was the first example. But basically it is prose interleaved with source, readable as a book.

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#274
post #210
post #175

Earlier quoted context omitted.

Ever heard of Timsort?

People were still finding bugs in common implementations of timsort as of 3 years ago. It's not unreasonable to stick with a somewhat more conservative choice for a core library function until there's more reason to have confidence in the implementations of timsort.

If I recall correctly, the bug only applied for arrays/lists of length greater than 2 to the more-than-astronomical. Not something that anyone ever encountered in the wild, because current hardware doesn't have enough memory.

Edit: The article linked in the other comment says the Java dev team didn't even bother to implement the "proper" fix, but merely adjusted how much space is allocated.

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#275
post #230

Earlier quoted context omitted.

timsort is full of win, and such a clever approach.

I'm sorry, but Timsort is a bit of a hack. It's a "this seems to work well" algorithm, and it shows. It took 13 years until its claimed running time was finally proven in 2015. The four (originally three) rules for merging sequences from the stack are rather arbitrary. Multiple issues were found well after it was already widely deployed. Recently, it was also shown that Timsort doesn't optimally use the information i…

> a bit of a hack

Isn't that most of computing?

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#277
Typescript

Even though it’s a fairly complex transpiler, the authors did a good job modularizing and leaving lots of contextual comments on what each part does.

Also typescript baseline tests are a simple but very effective way to get lots of coverage on the compiler.

I’ve read source code for Babel, typescript, coffeescript and flow. Typescript architecture stands out.

Typescript not only does fascinating things like magical code completion abilities and great tooling for IDEs but their codebase has been an inspiration for me to build better front end code.

I may be a bit biased since I’ve worked at Microsoft before.

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#278
Redis. I have to say antirez not only is an amazing engineer but from the way the code is written, you can see he is a very clear thinker.

I hold Redis codebase as an example of what good C code should be. On the other hand opencv codebase as an example of what C could should not be. Opencv codebase is really inconsistent with quite a bit of unreadable spaghetti sauce.

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#279
post #198

Earlier quoted context omitted.

Correct. The key word is "inspired". Multiple companies have run a DO-178B cert on SQLite, I am told, but the core developers did not get to participate, and I think the result was level-C or -D. While all that was happening 10+ years ago, I learned about DO-178B. I have a copy of the DO-178B spec within arms reach. And I found that, unlike most other "quality" standards I have encountered, DO-178B is actually useful…

I just bought a copy of DO-178C after reading these posts here and the Wikipedia article on it. $290, but if it's good, it should be worth it, right?

I haven't seen -C only DO-178B, though I'm told there isn't much difference. It is not a page-turner. It took me about a year to really understand it.

Re: Ask HN: What open source project, in your opinion, has the highest code quality?

#280
post #277

Typescript Even though it’s a fairly complex transpiler, the authors did a good job modularizing and leaving lots of contextual comments on what each part does. Also typescript baseline tests are a simple but very effective way to get lots of coverage on the compiler. I’ve read source code for Babel, typescript, coffeescript and flow. Typescript architecture stands out. Typescript not only does fascinating things lik…

I found the TypeScript type checker pretty hard to read through, though it may be my lack of, well, almost any knowledge about type theory. I didn't dig much into the other parts of the codebase however. What parts of it do you enjoy reading?
Post reply on HN