
Ask HN: What open source project, in your opinion, has the highest code quality? - thetermsheet
I&#x27;m planning to study a number of these codebases to gain insight and inspiration. Maybe even write an article about their commonalities...
======
binalpatel
Prior discussion:
[https://news.ycombinator.com/item?id=18037613](https://news.ycombinator.com/item?id=18037613)

------
jonawesomegreen
The test suite for SQLite is very impressive.

> The reliability and robustness of SQLite is achieved in part by thorough and
> careful testing. 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.

Plus they have a whole page on their site about testing [1]. Which is more
then you can say about a lot of open source projects.

[1] [https://www.sqlite.org/testing.html](https://www.sqlite.org/testing.html)

------
singletoon
Laravel is incredibly well crafted and documented, one of the highest quality
OSS projects ever, IMHO.

~~~
busterarm
The sad part about this truth is that because it is PHP, the vast majority of
people will dismiss it out of hand.

------
busterarm
While I wouldn't suggest that his code is meant to be read for
beauty/inspiration, djb's code is of incredibly high quality.

I would suggest starting with qmail and looking at the (very mainstream)
patches that people are running on top of it.

tinydns is also worth a look.

------
towaway1138
There are a lot of ways to judge this, but obvious candidates would be GNU
Emacs, the GNU coreutils packages, etc., and the Linux kernel itself.
(Probably also the BSDs, though I don't know these.)

------
stayaada
If I've said it once, I've said it a thousand times: Redis and SQLite (in my
opinion) have some of the highest code qualities.

------
grumpydba
PostgreSQL. It's awesome, welcoming and well documented.

------
sns989
requests, the python package for HTTP/S

~~~
busterarm
One of the most dumbfounding things I've encountered throughout my career is
the python community's dogged persistence at avoiding using libcurl.

~~~
posix_compliant
Getting a resource in requests:

    
    
        import requests
        body = requests.get('http://pycurl.io/')
    

Getting a resource with libcurl:

    
    
        import pycurl
        from io import BytesIO
        
        buffer = BytesIO()
        c = pycurl.Curl()
        c.setopt(c.URL, 'http://pycurl.io/')
        c.setopt(c.WRITEDATA, buffer)
        c.perform()
        c.close()
        
        body = buffer.getvalue()

~~~
detaro
Doesn't answer the question why nobody has build an interface like the first
example over the low-level libcurl bindings, or if someone has done so, why it
hasn't been more popular.

I'd guess: because distributing packages with native dependencies is sort of a
a pain, and was way worse in the past, especially cross-platform, and thus
python-only packages are preferred. Leaves open why libcurl bindings weren't
choosen for stdlib.

------
uloweb
SQLite++

