Live data from Hacker News

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

news.ycombinator.com

261–270 of 294 posts

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

#261

Julia. Julia / Julialang is so pedantically tested and the names are pretty meticulously chosen. The algorithms in Base are almost all generic and handle a very wide variety of inputs without catering to them. If you want to learn Julia, along with good software engineering, looking at the Base library is quite recommended.

Did not look to much into it but at least a packager from Alpine Linux does not think Julia's compiler ecosystem is clean/easy to work with: http://lists.alpinelinux.org/alpine-devel/6248.html

But as said, I did not really checked this claim for validness myself...

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

#262
post #230

Earlier quoted context omitted.

JVM and Python use timsort, which is O(N) on mostly sorted data of all kinds.

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 it has about runs. As an alternative, powersort was proposed, which seems to outperform Timsort both on randomly ordered inputs as well as inputs with long runs: https://arxiv.org/pdf/1805.04154.pdf

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

#263

LLVM and associated projects such as clang. Bazel is good too. OkHttp and Retrofit by Square.

The coding standard for variables in LLVM drives me nuts. Both class names and variables names must be upper camel case so if you're lucky the code looks like this:

Analyzer TheAnalyzer;

but more commonly:

Analyzer A;

with A being utterly unhelpful to read many lines later.

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

#265
post #260

Going to throw Elixir Lang into the mix. - The tooling is excellent. - The code is well-documented and readable. - The core team committed to never needing to introduce breaking changes. The Elixir community tends to produce work that is actually considered "Done". An elixir package is not stale when it hasn't seen a commit in a few months. Instead, the feeling is: "It's feature complete and only needs maintenance fr…

> The core team committed to never needing to introduce breaking changes. Is this why Elixir seems to have many different ways of doing the same thing though?

I think that's one reason. The other is that classic erlang (Elixir is built on top of the erlang beam vm) sometimes does things one way but elixir has a more elegant way of doing the same thing, however, in elixir you can still call into erlang libraries to achieve the same thing if that's more familiar to you.

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

#267

I think musl libc [1] has good quality code. If anything their build system is great. It makes the code much easier to navigate. [1] https://www.musl-libc.org

https://git.musl-libc.org/cgit/musl/tree/src/string/strcspn.... https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprintf.... ah yes, good quality code

I still think musl overall is quite readable, but my goodness, that switch statement in your second example. What a monster. I didn't think it was possible to be this confusing without the preprocessor.

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

#268
post #38

I hold the source code of Go standard library & base distribution (i.e. compiler, etc.) in very high regard. Especially the standard library is, in my opinion, stunningly easy to read, explore and understand, while at the same time being well thought through, easy to use (great and astonishingly well documented APIs), of very good performance, and with huge amounts of (also well readable!) tests. The compiler (includ…

I'd agree, but only as far as aesthetics go. When you have to understand the time complexity and runtime characteristics of the standard library sorting algorithms, I think Go does a very bad job - the standard `sort.Sort(data sort.Interface)` will run poorly if the data is already mostly sorted. I expect these kinds of things to be documented properly.

Golang's `sort.Sort(data sort.Interface)` will sort mostly-sorted data in nearly its fastest possible time, because it basically uses median-of-three quicksort, falling back to insertion sort for small partitions. Median-of-three on sorted or nearly-sorted data picks the optimal or nearly optimal partitioning element for quicksort. The code is simple, readable, and well-commented. Moreover, its average and worst-case complexity is documented in the godoc.

In short, your comment is wrong from beginning to end. What led you to believe that anything in it was true?

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

#269
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.

[deleted]
Post reply on HN