Live data from Hacker News

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

news.ycombinator.com

121–130 of 294 posts

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

#121

Just wanted to mention some bias in successful open source projects: they are often structured as a number of similar plug-in pieces, like youtube-dl for different video publishers. This is great for open source, because you can easily discover and navigate to the part you want, and change it. You might need to understand the plugin interface - or you might not. This flat architecture makes it easy for people to cont…

the only thing more important than understanding is shipping on time. but how are you going to ship on time if you can't understand it?

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

#122
post #89
post #40

SQLite. and for this reason alone! https://www.sqlite.org/testing.html As of version 3.23.0 (2018-04-02), the SQLite library consists of approximately 128.9 KSLOC of C code. (KSLOC means thousands of "Source Lines Of Code" or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 711 times as much test code and test scripts - 91772.0 KSLOC.

So you measure good code by the number of test lines?

No but it could be a good proxy.

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

#124

Python core libraries have great code. You can open pretty much any module and be able to understand the source without much context.

Agreed with the rest, I've ended up reading pypy's implementation of some functions sometimes to see how it works after trying CPython first. From the few I've read I'd say pypy looks nice by the way (I'm talking about standard library).

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

#126

Earlier quoted context omitted.

How is performance related to code quality. That makes no sense. If anything, if you had to inline ASM for example, the code would suffer from readability.

Shouldn’t good performance be one of the goals of good code?

Depends on the design goals. If you want secure code, you'll make it readable. Here's true(1):

  :
A single "noop" in a 755 file.

A C true would be: https://cvsweb.openbsd.org/src/usr.bin/true/true.c?rev=1.1&c...

Here's a much faster true(1) if you need it: https://github.com/coreutils/coreutils/blob/master/src/true....

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

#127

Python core libraries have great code. You can open pretty much any module and be able to understand the source without much context.

Though core has some bad API due to maintaining backwards compatibility a lot of the third party libraries like requests, Flask have great focus on API design and code quality. The authors have good quality repos : https://github.com/kennethreitz https://github.com/mitsuhiko

I agree with Flask, much more readable code than Django for example. I would also add Django Rest Framework (and Tom Christie) to the list.

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

#128

I'm surprised no one has mentioned the Linux Kernel! https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... It is quite clean when you consider the task that it accomplishes. Being able to compile across multiple architectures/endian-ness,32/64-bit/scale up/down from server/desktop/router/phone while accepting contributions from thousands of people..

It's not clean at all. Thousands of different styles, no single convention on function-naming, etc.

Want a clean kernel, go look at the BSDs.

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

#129

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

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

#130

Python: I really like requests, scikit-learn, the Path module from the stardard library, Keras, Django. C: Redis, SQLite, LUA. Java: Joda Time, Guava

Joda Time is one of my all time favourite libraries.

After struggling with JVM stdlib time nonsense, JodaTime was a breath of fresh air and actually made programming with time fun.

Post reply on HN