
Ask HN: What are the “best” codebases that you've encountered? - 0mbre
I am rather fond of the concepts described in &quot;Clean Code&quot; by Robert Martin but it seems that in real life, a really high-quality codebase is hard to come by.<p>While I am asking myself this question, the only one that popups to my mind would be Laravel: https:&#x2F;&#x2F;github.com&#x2F;laravel&#x2F;laravel (PHP)<p>One could think that a codebase as popular as React (https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;react) would be a perfect example of &quot;clean code&quot; but with a glance, I personally don&#x27;t find it very expressive.<p>This may all be very subjective but I would love to see examples of codebases that member of this community have enjoyed working with
======
tschwimmer
Perhaps I'm jaded, but I notice that all the examples given here are developer
tools or otherwise things with well scoped functional inputs and outputs (e.g.
ffmpeg).

Anyone have an example of a consumer application that has a good codebase?
Chromium, GitLab, OpenOffice, etc? I feel like such applications inherently
have more spaghetti because the human problems they're aiming to solve are
less concretly scoped. Even something as simple as "Take the data from this
form and send it to the project manager" ends up being insanely complex and
nitpicky. In what format should the data be sent? How do we know who the
project manager is? Via what format should the data be sent? How should we
notify the project manager? When should we send the report? Some of these
decisions are inherently inelegant, so I feel like you get inelegant code.

~~~
slondr
NetHack's source code is absolutely beautiful. It's probably the most well-
kept, well-designed, well-structured and well-implemented K&R C program in
history. Although they are switching to ANSI syntax soon. It's even more
amazing because NetHack is (1) a video game, where generally speaking code
quality is sacrificed for efficiency, and (2) it has been developed by a
constantly changing team of volunteers over the course of over thirty years,
and there still isn't any spaghetti.

~~~
philsnow
Nethack suffers somewhat because the era in which it was birthed required a
lot of portability, so there is a ton of #ifdef-ery which can be difficult to
reason about.

#ifdefs are themselves spaghetti; windows.c [0a] and files.c [0b] have tons of
platform-related ifdefs (but, mercifully, not too much nesting), hacklib.c [1]
has some deep-ish ifdef nesting (though, again mercifully, well commented)

Ok on re-reading some of this, I guess it was worse in my mind than it
actually is. Nethack was the first large codebase I ever made any changes to
and tried to understand, so maybe the relative enormity at the time made a
negative impression.

Check out the source for Brogue [2] for what I consider to be pretty readable
game code.

[0a]
[https://github.com/NetHack/NetHack/blob/NetHack-3.6/src/wind...](https://github.com/NetHack/NetHack/blob/NetHack-3.6/src/windows.c)
[0b]
[https://github.com/NetHack/NetHack/blob/NetHack-3.6/src/file...](https://github.com/NetHack/NetHack/blob/NetHack-3.6/src/files.c)
[1]
[https://github.com/NetHack/NetHack/blob/NetHack-3.6/src/hack...](https://github.com/NetHack/NetHack/blob/NetHack-3.6/src/hacklib.c#L865-L895)
[2]
[https://sites.google.com/site/broguegame/](https://sites.google.com/site/broguegame/)

------
hugofirth
For a C codebase, Postgres[1] wins for me hands down. It's clean and
suuuuuuper well commente, such that with a little context you can dive into
something very complex and still get a feel for what is going on.

[1]:
[https://github.com/postgres/postgres](https://github.com/postgres/postgres)

~~~
jakewins
Second this; Postgres codebase is what got me out of the "good code is self
documenting" nonsense. For those of us in the database space it is an
incredible resource - and overall a great example of good code.

sqlite is much less complex, but similarly approachable.

In more recent examples, I think you see a lot of this same reader-centric
pragmatic ethos in many Go projects. The Kubernetes codebase comes to mind as
a very large tome that remains approachable. And the Go stdlib, of course.

Java generally falls on the opposite side, but there are counterexamples. A
lot of Martin Thompsons code eschews Java "best practices" in favor of good
code. Seeing competent people in the Java space "break the rules" helps..
though of course Java is forever hampered by having internalized illegible
patterns as best practices in the first place.

It's a shame because at least the OpenJDK implementation of the standard
library in Java is generally quite good, especially around the concurrency
parts. Clean, easy to follow, reasonable comments. But of course that's Java
written by C developers, mostly.

~~~
dwild
> Postgres codebase is what got me out of the "good code is self documenting"
> nonsense.

I'm a fervent believer in "good code is self-documenting", so I was curious to
be proven wrong, clicked randomly until I found code and I saw this.

    
    
        /*
         * Round off to MAX_TIMESTAMP_PRECISION decimal places.
         * Note: this is also used for rounding off intervals.
         */
        #define TS_PREC_INV 1000000.0
        #define TSROUND(j) (rint(((double) (j)) * TS_PREC_INV) / TS_PREC_INV)
    

Usage of acronyms is one of the worst offenders in bad code. The context makes
it clear that TS means timestamp, so that's not too bad (still bad though),
but I'm still not sure what INV means, luckily I presume it's the only place
it's used.

If it was named TIMESTAMP_ROUND, I wouldn't need to know "Round off to
MAX_TIMESTAMP_PRECISION decimal places." Now that I've copy/paste that, it
seems like the comment is wrong too, it's rounded off based on TS_PREC_INV, so
if I was to believe the comment, I wouldn't get the right behaviour.

I'm not saying Postgres codebase isn't good code, just that "good code is
self-documenting" is still true. That code was pretty much self-documenting
except for the acronyms, but considering it was all used together, it's was
fine and I was able to understand what they meant.

For me, comments should only be needed when something isn't clear. Defining
what isn't clear is hard to determine for sure, but that's one thing for which
code review helps quite a bit.

~~~
jakewins
I mostly agree with this. Though as I wrote that sentence I realized Go has
somewhat softened my position on abbreviations. I think the "note" portion is
useful; ultimately a test would stop you breaking that secondary use, but the
comment stops you spending time in that direction in the first place. But
either way, overall I think you're right this would be fine without a comment.

I'm thinking more of examples like this:
[https://github.com/postgres/postgres/blob/master/src/backend...](https://github.com/postgres/postgres/blob/master/src/backend/storage/page/bufpage.c#L105)

I just picked this at random from the storage subsystem, but I think it
highlights what I mean. The comments are mostly about context. The comment for
the routine is about when and who calls it, so that someone that reads the
routine has that in mind. The specific line I'm linking to highlights in
English prose that the correctness checking on the page headers is just a
minimum guard and should not be fully trusted.

Back in the day I would have argued "oh, well, but you could break that into a
function called "provisional_page_header_check(..)", or something. But.. there
is nothing in the compiler that checks that function names stay in sync with
their implementation any more than there is for comments. Writing it as a
comment lets you use regular English sentences, breaking out a function takes
that away and adds no compiler protection.

It's also.. friendly, somehow, to me. Working in this codebase is like
participating in an ongoing and very slow conversation, which feels very
pleasant.

~~~
dwild
That comment is exactly what I mean by when needed.

That does confirm that they are making pretty amazing code. I would have much
prefered to get that file instead of the other one :P.

They do have a redundant comment at someplace but it's clearly a tiny minority
and they aren't losing any one time.

~~~
jakewins
Yep, I think we're in agreement :)

------
ekidd
Anything by burntsushi, but especially xsv and ripgrep:

xsv: [https://github.com/BurntSushi/xsv](https://github.com/BurntSushi/xsv)

ripgrep:
[https://github.com/BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep)

His code typically has extensive tests, helpful comments, and logical
structure. It was fun trying to imitate his style when writing a PR for xsv.

The Quake 2 engine was also pretty interesting: It was almost totally
undocumented, and it had plenty of weird things going on. But I could count on
the weird things being there for a _reason_ , if only I thought about it long
enough.

~~~
mehrdadn
Note: this assumes you speak Rust...

~~~
CDSlice
Don't all the comments assume you speak the language the codebase is written
in? I mean I can't tell if a given PHP/C/Perl/other language I don't know well
codebase is good or not. I guess there could be people that can somehow do
that...

~~~
mehrdadn
Yes, but other comments actually mention the language, and the original post
was using web languages as an example, so I thought I'd save someone the
trouble of clicking expecting and realizing it's not what they expected.

------
bitwize
NetBSD, hands down. Beautiful, simple to understand, consistent. The
documentation is also top notch -- I wrote a trivial character-device kernel
driver using _only the man pages_ as a reference. And you can too.

Also -- the source code to Doom. Read it, marvel at its clarity and efficiency
-- and then laugh when you realize that the recent console ports were
completely rewritten in _fucking Unity_. And the Switch version chugs, despite
the original running well on 486-class hardware.

~~~
cameronbrown
Unity sucks but as a hobbyist game developer it is a godsend. The only other
way I can support all the platforms I want to (Android, web, PC) is through
Web APIs directly, and nobody likes more Electron.

~~~
bitwize
SDL be like "am I a joke to you?"

~~~
JacobiX
SDL is fine for cross platform development. Personally, I have used it for
some commercial games in the past, but I think it's not comparable to Unity or
unreal engine. SDL is not a game engine, it provides only lower level features
(audio, opengl context initialization, joystick support, etc). Even for things
like in-game menus and text rasterisation you are on your own.

------
jihadjihad
For canonical C code, without a doubt I would say Redis and Postgres. Redis is
written and annotated in a way that even someone with a cursory knowledge of C
can understand what's going on.

For Python, I really like how SQLAlchemy is written and designed.

For Rust, ripgrep stands out as a sterling example of how to write a powerful
low-level utility like that.

~~~
mehrdadn
I just opened up server.c in Redis (not familiar with Redis and never seen it
before) and at first glance it seems... alright, but I'm not sure what's
particularly outstanding about it, and it could definitely be better. Some of
the logic seems questionable (exit() in a signal handler? [9] also what about
thread safety?), and more superficially (but annoyingly) I see: names like
"sdscatprintf" [1] which are a little cryptic, lack of attention to spacing
(too little [2] or too much [3] or inconsistent [4] [8]), lack of braces for
single-line blocks (which at least I consider bad) [5], irritatingly
inconsistent line breaks [6], etc.

Overall it's still definitely on the more readable side compared to other C
code I've seen, I like the thorough comments, and it's generally decent, but
I'm not particularly coming away from it in awe like everyone else seems to
have.

[1]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L4184)

[2]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L4499)

[3]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L4217)

[4]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L4505)

[5]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L4421)

[6]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L1839)

[7]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L1783)

[8]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L4384)

[9]
[https://github.com/antirez/redis/blob/unstable/src/server.c#...](https://github.com/antirez/redis/blob/unstable/src/server.c#L4535)

~~~
antirez
Redis code quality could be improved significantly, but you picked the wrong
file to evaluate it: the first file created, and the one that for the nature
of system software will be the less "overall designed", because it is the
place where we call almost everything else sequentially. Still, if I had more
time, I could improve it and other parts a lot. However to see how modern
Redis was coded check the following:

* hyperloglog.c

* rax.c

* acl.c (unstable branch, the Github default)

* even cluster.c

Everything you'll pick will likely be a lot better than server.c

Other things you mentioned are a matter of taste. For instance things like:

    
    
        if (foo) bar();
    

Is my personal taste and I enforce it everywhere I can inside the Redis code,
even modifying PRs received.

The line breaks are to stay under 80 cols. And so forth. A lot of the things
you mentioned about the "style" are actually intentional. The weakness of
server.c is in the overall design because it is the part of Redis that evolved
by "summing" stuff into it in the course of 10 years, without ever getting a
refactoring for some reason (it is one of the places where you usually don't
have bugs or alike).

~~~
mehrdadn
Ah I see. I didn't realize it was old, I just picked server.c since it just
sounded like it'd have a decent mix of stuff. I think the only 'taste' things
I mentioned is the lack of braces and possibly the function name, which I'm
happy to ignore. But the rest were just inconsistencies, regardless of which
way anyone's tastes lean -- the spaces after commas are entirely inconsistent
(although I would argue if you took the stance that there shouldn't be a space
at all, that's bordering on just being wrong, not merely a matter of taste!),
and some lines are far longer than 80 columns [1] and some are broken at
really inconvenient points just to fit them into 80 columns, which gets you
the worst of both worlds.

Thankfully, like you said, the other files do seem better. :) However, they
_do_ have the same problems I just pointed out above: spaces are inconsistent
everywhere (after commas, after 'while', after casts, etc.) and lacking in
awful places (honestly, how am I supposed to read a function call with eight
identifiers and zero spaces? [2]) and some lines are broken and others longer
than 80 [3][4].

A couple other immediate issues I have on syntactic things (semantic analysis
would take me a long time so it's hard to give me feedback on that):

\- One comment I have that some others would vehemently disagree with me on
is: I would cut down on the early returns. Personally, I really hate them, for
multiple reasons -- the most practical one of which is that they prevent you
from inserting a single breakpoint in a debugger (or printf(), or whatever you
feel like doing) and being able to see what the function returns easily.
Instead, you have to hunt through the entire function and place a dozen
breakpoints to make sure you didn't miss any return path. And it becomes the
most confusing thing in the world when you inevitably miss one. To me that's
bad enough, but some people still insist on them. But if you're going to do
that, I would at least make it easier for people to debug them. On my first
reading, for example, I completely missed the return on line [5] -- because
it's right _after_ the if condition and visually blends in. That also makes it
hard if not impossible to put a breakpoint on it, which wouldn't be an issue
if it were on a separate line. (Maybe you don't do that because you don't want
to forget braces, but you know my opinion on that too. :P) That makes it even
more painful to debug this function.

\- I'm not a fan of the liberal macro usage. I'm not saying you should _never_
use macros -- I know that sometimes it's outright impossible not to
(especially in C), and sometimes they're _the perfect_ tool (code
deduplication) -- but you shouldn't be using them to use them to define
constants and perform normal function calls. [6] [7] Not only is it often
possible to break them because of their textual nature, and not only do they
lack type information that would be extremely useful, but they also make it
harder to debug, since you can't just type them into a debugger at runtime and
get their values. And you can't step through them like normal code either.

Hope some of this is helpful. All of it said though, they're pretty minor
things overall, and the code does seem good quality, at least as far as I can
tell in in this timespan. The fact that it's in C does always leave me with
this nagging feeling that there's always going to be some resource leak
somewhere (especially with early returns!), which I wouldn't have in most
other languages, but that's not really an indictment of the code but of the
language. And I love, love, love the comments. I don't leave comments nearly
that good myself, and I will almost certainly refer back to them later.

[1]
[https://github.com/antirez/redis/blob/583933e2d6b4c2721554ab...](https://github.com/antirez/redis/blob/583933e2d6b4c2721554ab77c33a9c0bc7672fa6/src/server.c#L1841)

[2]
[https://github.com/antirez/redis/blob/unstable/src/rax.c#L10...](https://github.com/antirez/redis/blob/unstable/src/rax.c#L1002)

[3]
[https://github.com/antirez/redis/blob/unstable/src/rax.c#L50...](https://github.com/antirez/redis/blob/unstable/src/rax.c#L507)

[4]
[https://github.com/antirez/redis/blob/unstable/src/rax.c#L45...](https://github.com/antirez/redis/blob/unstable/src/rax.c#L457)

[5]
[https://github.com/antirez/redis/blob/unstable/src/rax.c#L13...](https://github.com/antirez/redis/blob/unstable/src/rax.c#L1391)

[6]
[https://github.com/antirez/redis/blob/unstable/src/hyperlogl...](https://github.com/antirez/redis/blob/unstable/src/hyperloglog.c#L191)

[7]
[https://github.com/antirez/redis/blob/unstable/src/quicklist...](https://github.com/antirez/redis/blob/unstable/src/quicklist.c#L342)

------
rsweeney21
The Windows operating system.

Windows is quite an engineering achievement. We didn't prioritize readability
or "clean code". All the variables used hungarian notation, so you had
horrible names like lpszFileName (lpsz = long pointer to a zero terminated
string) or hwndSaveButton (window handle). You also had super long
if(SUCCEEDED(hr)) chains that looked like your code was spilling down a
staircase. Oh yeah, and pidls (pronounced "piddles" and short for "pointer to
an id list") used for file operations.

What made the code base beautiful was the extreme lengths we went to to be
fast and keep 3rd party software working. WndProcs seem clunky, but they are
elegant in their own way and blazingly fast. All throughout the code base you
would find stuff like "If application = Corel Draw, don't actually free the
memory for this window handle because Corel uses it after sending a WM_DESTROY
message."

The fact that thousands of people worked on the code base was mind boggling.

~~~
tempguy9999
I'm mega curious about this

> ...like lpszFileName (lpsz = long pointer to a zero terminated string)

I remember those.

AIUI hungarian gives you some kind of typing. The typing is done by humans
using the names. The humans have to get it right; they are the typecheckers.

The first thing I'd do is offload the typechecking onto an automatic framework
- the idea of letting people do a computer's job is madness. It would not have
been too hard to do (relatively very cheap for a large codebase like an OS), I
think, and would have allowed the hungarian prefixes to be dropped because
they'd become redundant, and strengthened and speeded up typechecking. So
where is the flaw in my thinking?

(aside: one of my first contract jobs was working in pascal (delphi actually).
The company I worked for had coding standards cos you need standards, don't
you. It was to prefix every integer with i_, every float with f_, every int
array with ai_, et cetera. As pascal was strongly typed this was totally
pointless).

~~~
MagnumOpus
> So where is the flaw in my thinking

The codebase has 34 years worth of code written already, 100 million LOC or
more if you count Office, VS etc. The cost of typechecking is trivial but the
cost of rewriting this much code to be consistent with any new convention is
in the hundreds of millions of dollars. This legacy cost then of course
becomes higher every year...

~~~
tempguy9999
Oh hell. Where did I say anything about it having to be rewritten? I did not.
I said "allowed the hungarian prefixes to be dropped", not required. And all I
meant was "in subsequent work", of course changing existing code would be
idiotic.

And this absolutely misses the vital point that typechecking can be offloaded
from the human to an automated typechecker, so why wasn't it?

"The cost of typechecking is trivial" \- not if it's done by humans.

------
sea6ear
I really liked the Go standard library (or at least from around 1.4-ish, it
might have gotten more complicated now).

I liked that it was actually possible to read it and understand what was going
on.

In a similar vein, P. J. Plauger's version of the _The Standard C Library_ is
nice because even if it might not be especially optimized(?), you can actually
read the code and understand the concepts that the standard library is based
on.

 _Software Tools_ by Kernighan and Plauger would also be great except that you
have to translate from the RatFor dialect of Fortran or Pascal to use the code
examples.

Even so, I used its implementation of Ed, to create a partial clone in
PowerShell that let me do remote file editing on Windows via Powershell when
that was the only access that was available.

So even over 4 decades and various operating systems removed, there are still
concepts in there that are useful.

 _Jonesforth_ is also a great and mind blowing code base although I'm not sure
where the canonical repository is currently.

~~~
rwmj
I supposed it's this one, but it's public domain and over the years has been
forked many many times (far more than I ever expected).

[http://git.annexia.org/?p=jonesforth.git;a=summary](http://git.annexia.org/?p=jonesforth.git;a=summary)

------
quadcore
_it seems that in real life, a really high-quality codebase is hard to come
by_

I think a common misconception amongst mid-experienced programmers is that
they confuse look with quality. Reading clean written code gives you a feeling
of control and also the feeling that someone must have thought about that
program. It's reassuring. You have in front of you a code that gives you
trust.

When in fact, that code can be complete garbage.

The look of the code doesn't matter, what matters is the program. In the
abstract meaning of the term. You don't judge a code by reading it, but by
running it in your head. Granted you have to understand it in order to do
that. Once you understand the code, you run it in your head and that's when
quality enter the scene because running it in your head is what you do all day
when you code. Some says that you spend most of your time reading code. That's
simply not true, the effort is definitely not in reading but in running the
code in your head. Basically what I'm describing is a 2 by 2 matrix where
there is one column for look bad, one for look good, one row for runs badly in
the head and one for run smoothly in the head. Granted, the best may be when
both the code looks right and runs right, but don't be mistaken, the real
important and difficult part is whether or not it runs well in the head.

A poor quality program may look good, but don't run well in the head. It's too
complex or too confusing (in terms of logic, not in terms of presentation) or
convoluted or simply wrong in terms of what it's supposed to do. On the other
hand good quality code is code that surprises you by the way it runs. It's
beautiful in terms of simplicity, it delivers a lot, it's small so that it
fits well in the coder's head. And it may look like garbage which is not so
important.

You may wonder how to know very quickly the quality of a code base. Run part
of it in your head. Contemplate the machinery. Try not to think to much about
the language and how it's constructed in this language, try instead to
contemplate it in an abstract manner. Be critic, and _critic your critics_.

~~~
Izkata
> by running it in your head.

I have encountered far too many people who don't even realize this is a thing.
I figure they must be doing it in some limited form and just aren't
recognizing it as a skill that can be trained up, otherwise I'm not sure how
they can do any development, but...

~~~
ThisIs_MyName
Running non-trivial code in your head is far too tedious for daily use. I'd
much rather add debug checks for invariants when I want to confirm that the
code works the way I expect it to.

~~~
AtlasBarfed
The human brain has, what, about 7 registers in medium term memory?

~~~
Izkata
5±3, if I remember right, but of indeterminate size. You can expand it to a
couple dozen by moving up and down abstraction levels.

An exercise: I have 36 letters for you to memorize, in order and without
mistakes: "The quick brown fox jumped over the lazy dog"

The sentence as a whole only uses 1 of those memory slots. As necessary, you
can jump down one abstraction level to get 9 words, or again on a word-by-word
basis to get the full 36 letters.

Code is the same. For example, use multiple slots to understand loop
conditions, then file it away in a single slot as the whole conceptual loop.
Use multiple slots to understand the loop body, in the context of one element;
file it away as well. Combine them into a one-slot conceptual understanding of
the whole loop. So on and so forth.

As you work with the conceptual models, you'll also end up with them in long-
term memory and not have to do this reconstruction each time.

This pattern can continue indefinitely, with conceptual models of whole
packages and systems. Most will do it unconsciously at that level as they
become familiar with a codebase, but it works at every level, and is the basis
of "running code in your head".

------
omarhaneef
I wish there was a way to read the codebase where there is a tag that tells
you what the folder does.

In github, rather than see what has changed, it would be interesting if there
was a comment that told you what the folder contained.

edit: Relevant here because the best codebase for me is one where I can
understand the folder structure, but that is a sort of 0th order effect that
should be equalized with some tool.

~~~
PhilippGille
In Go, a folder is a package and as soon as you write a comment before the
`package foo` declaration, it's package documentation. And thus GoDoc
automatically generates a nice webpage out of it.

See for example this package comment:
[https://github.com/golang/go/blob/master/src/net/http/doc.go...](https://github.com/golang/go/blob/master/src/net/http/doc.go#L6-L104)

Turns into this documentation (the beginning only):
[https://godoc.org/net/http](https://godoc.org/net/http)

Out of the box.

~~~
heyoni
What's the point of all these empty comments throughout the code?

    
    
        // ...

~~~
hazz99
It's likely the Go libter requiring every public method / variable to be
documented.

~~~
inlined
Yup. I saw a lot of codebases with things like:

// EnqueueEvent ...

func (q *Queue)EnqueueEvent(event Event)

------
cryptica
Unfortunately, I've found that almost all developers are incapable of
objectively judging the quality of code until they actually have to start
working with it and then after a few months they can start to appreciate or
despise the code.

It takes a lot of investment from a developer before they can appreciate the
beauty of the code... To make matters more confusing, a lot of developers tend
to become extremely attached to even horrible code if they spend enough time
working with it; it must be some kind of Stockholm syndrome.

I think the problem is partly caused by a lack of diversity in experience; if
a developer hasn't worked on enough different kinds of companies and projects,
their understanding of coding is limited to a very narrow spectrum. They
cannot judge if code is good or bad because they don't have clear values or
philosophy to draw from to make such judgements. If you can't even separate
what is important from what is not important, then you are not qualified to
judge code quality.

If you think that the quality of a project is determined mostly by the use of
static vs dynamic types, the kind of programming paradigm (e.g. FP vs OOP),
the amount of unit test coverage and code linting, then you are not qualified
to judge code quality.

I think that the best metric for code/project quality is simply how much time
and effort it takes for a newcomer to be able to start making quality
contributions to the project. This metric also tends to correlate with
robustness/reliability of the code and also test quality (e.g. the tests make
sense and they help newcomers to quickly adapt to the project).

As developers, we are familiar with very few projects. If a developer says
that they like React or VueJS or Angular, etc... they usually have such
limited view of the whole ecosystem that their opinion is essentially
worthless; and that's why no one ever seems to agree about anything. We are
all constantly dumbing down everything to the lowest common denominator and
regurgitating hype. Hype defies all reason.

It's the same with developers; most developers (especially junior and mid-
level) are incapable of telling who is actually a good developer until they've
worked with them for about 6 months to a year.

If you are not a good developer, you will not be able to accurately judge/rank
someone who is better than you at coding until several months or years of
working with them. Sometimes it can take several years after you've left the
company to fully realize just how good they were.

~~~
inlined
> Unfortunately, I've found that almost all developers are incapable of
> objectively judging the quality of code until they actually have to start
> working with it and then after a few months they can start to appreciate or
> despise the code.

While I agree when evaluating a codebase by the broad architecture (which I
often judge by cohesion and coupling), I feel evaluating details first
requires learning to read code as well as prose. Then “bad” or “ugly” code is
code that reads arcanely like olde English.

------
oaxacaoaxaca
Django! And django rest framework. To me, both codebases are so readable and
so well put together that even if their documentation was bad (which it
isn't), you could fully grasp their APIs and how to use their libraries by
just reading through some of the code.

~~~
pandler
Also agree! I learned a lot about how Python works from digging through the
inner guts of the Django ORM. I’ve been pleasantly surprised, getting back
into Django after about 5 years, that the codebase is just as comprehensible
as I remember it to be, and the documentation equally as comprehensive.

------
bijection
The Codemirror codebase [0] is simply written and richly commented, and using
Codemirror itself in a project is a pleasure.

Tellingly, Marijn Haverbeke, Codemirror's creator, is also the author of the
excellent 'Eloquent Javascript' [1].

[0]
[https://github.com/codemirror/codemirror](https://github.com/codemirror/codemirror)

[1] [http://eloquentjavascript.net/](http://eloquentjavascript.net/)

~~~
lol768
It's unfortunate that the author doesn't appear to understand the value of a
strict Content-Security-Policy.

~~~
lol768
For context, see this GitHub issue:
[https://github.com/codemirror/CodeMirror/issues/4937](https://github.com/codemirror/CodeMirror/issues/4937)

Author is unwilling to change a handful lines of code to make the package
compatible with a strict style-src.

Why does this matter? You can exfiltrate data such as CSRF tokens using inline
styles from a HTML injection vulnerability:
[https://medium.com/bugbountywriteup/exfiltration-via-css-
inj...](https://medium.com/bugbountywriteup/exfiltration-via-css-
injection-4e999f63097d)

------
luminati
See also

[1] Interesting Codebases:
[https://news.ycombinator.com/item?id=15371597](https://news.ycombinator.com/item?id=15371597)

[2] Show HN: Awesome-code-reading - A curated list of high-quality codebases
to read
[https://news.ycombinator.com/item?id=18293159](https://news.ycombinator.com/item?id=18293159)

~~~
0mbre
Thanks for the links!

------
hartator
I think the best codebases are the ones you immediately think “Oh, that’s
easy. I can reimplement that in a couple of hours.”. When it's not. It’s never
easy.

------
kostarelo
I've been enjoying reading Spectrum's codebase[0]. It's very simple, with
little documentation you can understand pretty much what is going on and in
the architecture level, is as simple as it needs. The first time I tried to
open a PR, I was up and running my feature in a few minutes.

Small summary of the features I liked:

\- Simple documentation

\- Intuitive structure

\- Lots of JS best practices, but still simple

\- Event-driven architecture

\- A simple API gateway that will just fire events to workers

\- Properly divided workers (kind of microservices but with lots of shared
code)

\- Monorepo

It recently been bought by GitHub(1) and was discussed here(2).

The author has talked in his blog about some decisions he took wrong. Super
interesting post(2).

0\.
[https://github.com/withspectrum/spectrum](https://github.com/withspectrum/spectrum)

1.[https://spectrum.chat/spectrum/general/spectrum-is-
joining-g...](https://spectrum.chat/spectrum/general/spectrum-is-joining-
github~1d3eb8ee-4c99-46c0-8daf-ca35a96be6ce)

2\.
[https://news.ycombinator.com/item?id=18570598](https://news.ycombinator.com/item?id=18570598)

3\. [https://mxstbr.com/thoughts/tech-choice-regrets-at-
spectrum/](https://mxstbr.com/thoughts/tech-choice-regrets-at-spectrum/)

------
GoMonad
Anything by John Carmack. (DOOM's open source release, for example)

~~~
dongecko
I'd second that. Some years ago I had a look at the quake 3 bots code, which I
think were also written by John Carmack. The code was amazingly intuitive.

~~~
chimpburger
The Q3 bot AI was written by this man
[https://doomwiki.org/wiki/J.M.P_van_Waveren_(MrElusive)](https://doomwiki.org/wiki/J.M.P_van_Waveren_\(MrElusive\))

Carmack said that he was "the best developer I ever worked with"

------
Congeec
Tornado, a python web framework. I doubt it is still popular today. But
reading the source code is a pleasure. Its naming conveys clearly; its
encapsulation allows extensibility; its documentation teaches me how to write
an industry-level library.

[https://github.com/tornadoweb/tornado/blob/master/tornado/io...](https://github.com/tornadoweb/tornado/blob/master/tornado/ioloop.py)

~~~
jbarham
I used Tornado to build the the WebSocket back end for this page:
[https://www.slickdns.com/live/](https://www.slickdns.com/live/). It's less
than 100 lines of code and very clean.

For most web apps my default choice is Django, but for special purpose web
servers Tornado or Flask are still useful.

------
vecplane
I've always been impressed by the quality of Three.js -
[https://github.com/mrdoob/three.js/](https://github.com/mrdoob/three.js/)

------
SkyMarshal
Peter Norvig's sudoku solver (Python) is excellent. Solves every possible
variant of sudoku.

[https://norvig.com/sudoku.html](https://norvig.com/sudoku.html)

~~~
nXqd
oh yeah, this one is so good. And his spell checker is really understandable,
readable too [https://norvig.com/spell-correct.html](https://norvig.com/spell-
correct.html)

------
jamierumbelow
For something a little different, the Clojure codebase – particularly
`clojure.core` – is extraordinary in its elegance and simplicity.

------
vbezhenar
Whenever I have to dig into Spring sources, they always look awesome. This is
the best Java project I've ever seen. Clean concise code, versatile
architecture using proper design patterns, lots of documentation.

------
vimanuelt
Plan 9 codebase has been the best that I have encountered.

[http://9p.io/sources/plan9/sys/src/](http://9p.io/sources/plan9/sys/src/)

------
myth_buster
Kubernetes for Golang. This has been brought up as an example of fine
documentation:
[https://github.com/kubernetes/kubernetes/blob/ec2e767e593953...](https://github.com/kubernetes/kubernetes/blob/ec2e767e59395376fa191d7c56a74f53936b7653/pkg/controller/volume/persistentvolume/pv_controller.go#L54)

Requests for Python
[https://github.com/psf/requests](https://github.com/psf/requests)

~~~
otterley
K8S was transpiled from Java, and it shows. Much of the code isn't idiomatic
Go at all. So I wouldn't cite K8S as a shining example.

Comments like the one cited are fantastic, but we're interested in examplars
of good (i.e., elegant and readable) code, not ancillary matter.

~~~
luminati
Very interesting! I never knew that! Did a bit of googling to verify it. [1]

[1]
[https://fosdem.org/2019/schedule/event/kubernetesclusterfuck...](https://fosdem.org/2019/schedule/event/kubernetesclusterfuck/)

------
dfan
The Stockfish chess engine [1] is very nice, especially so since chess engines
tend to be very kludgy.

[1] [https://github.com/official-
stockfish/Stockfish](https://github.com/official-stockfish/Stockfish)

------
ixtli
Weirdly I find the v8 source and jQuery (at least several years ago) to be the
best. They're examples of real-world, multi-distributed-collaborator, mature
projects. Harder, I think, than writing "clean" code is maintaining a large
code base's organization, distribution, etc and these are really good examples
of that.

(d3 and three.js are also very interesting to read, but they're not quite in
the same class as the former.)

------
wvlia5
The compiler for the B language, by Arthur Withney
[http://kparc.com/b/](http://kparc.com/b/)

~~~
avmich
I'd add to this family the J system, ver. 7 -
[https://github.com/jsoftware/jsource](https://github.com/jsoftware/jsource) .

A good example of creating a DSL and then efficiently using that. "Never had a
memory leak from day 1 (Roger Hui)" (written in C).

------
jacquesc
My personal favorite is Sequel.
[https://github.com/jeremyevans/sequel](https://github.com/jeremyevans/sequel)

Beautiful codebase, rock solid, and way better option than ActiveRecord IMHO

~~~
oogway8020
Not only it is a high quality codebase, support from Jeremy is a top notch,
there are no outstanding issues, everything gets fixed promptly. It's been a
great joy using both sequel and roda all these years

------
ts4z
In 2010, the nginx source was quite startling. It's very readable C, but also
somewhat difficult in that it did not mechanize a lot of bookkeeping. If it
wanted to construct a string of 8 components, there were 8 components in
getting the length right, then 8 adds to the string. This was toil, and error-
prone. But it was always done with such precision, and so consistent, that it
was still quite beautiful.

------
chadcmulligan
The Lua source code is very easy to read, especially for an interpreter. It's
a hand written recursive descent parser and incredibly tiny.
[http://www.lua.org](http://www.lua.org)

------
carapace
It's a toy, but I remember being very impressed with the implementation of
Turing Drawings: [http://maximecb.github.io/Turing-
Drawings/](http://maximecb.github.io/Turing-Drawings/)

[https://github.com/maximecb/Turing-
Drawings](https://github.com/maximecb/Turing-Drawings)

------
PCChris23
What do you like about Laravel and dislike about React?

I like the Linux kernel codebase:
[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/)

~~~
0mbre
At some point in Martins book, he mentioned a forgotten codebase from one of
his friend that was solely composed of tiny functions but yet achieve a fairly
complex effect. That's the kind of feeling I had working at Laravel
(admittedly it's been a few years). React codebase, on the other hand, seem
less human-friendly, it seems to require some prior knowledge of the code to
be able to dive into.

------
cbzehner
Although it's not a "codebase" per se, Architecture of OpenSource Applications
is a great way to see how lots of major applications are structured.
[http://aosabook.org/en/index.html](http://aosabook.org/en/index.html)

------
SMFloris
Octave is amazingly written, in my opinion. I remember delving into its source
expecting a mess made by mathematicians and instead found a very well
organised and clean code base. Kudos to that team!

------
rch
I think Faust looks like exemplary modern Python.

[https://github.com/robinhood/faust](https://github.com/robinhood/faust)

Also voted for Postgres, Redis, and NetBSD.

------
c-smile
I was impressed by code of Konstantin Knzhnik (
[http://www.garret.ru/](http://www.garret.ru/) ). All his database engines in
particular.

------
n0n0n4t0r
Well, Symfony's codebase is really great: It is very readable, It's behavior
is logical, The documentation is great, It uses common patterns (solid), so
you are never loss

------
flukus
Suckless tools ([https://suckless.org/](https://suckless.org/)), clean,
efficient, small (easy to know the whole codebase) and very hackable, hackable
to the point where even configuration is in code:
[https://git.suckless.org/dwm/file/config.def.h.html](https://git.suckless.org/dwm/file/config.def.h.html)

~~~
Sir_Cmpwn
I would especially recommend reading through sbase and ubase:

[https://git.suckless.org/sbase/](https://git.suckless.org/sbase/)

[https://git.suckless.org/ubase/](https://git.suckless.org/ubase/)

------
billconan
Qt's codebase is very clean

~~~
phkahler
I thought QT was a collection of libraries, even with different licenses. As
such, it seems strange to apply a word like "clean" to the whole thing.

~~~
johannes1234321
Qt core and most libraries are written by the same group of people in the same
development process.

Splitting it up into libraries is good engineering practice as it ensures
boundaries. (Whether it is packaged into their own dll/so/a/dynlib is a
deployment question, you can compile all parts statically together)

The licensing is a political/business question independent from code being
nice, good and clean. (Except one has to be careful during refactorings, as
code might change license, but since afaik the Qt Company has CLAs ensuring
copyright ownership they are able to do that)

------
farah7
I would say the Mattermost ("open Source slack") codebase: Go server:
[https://github.com/mattermost/mattermost-
server](https://github.com/mattermost/mattermost-server)

React frontend app: [https://github.com/mattermost/mattermost-
webapp](https://github.com/mattermost/mattermost-webapp)

------
spinlock
Not your question but I think the bash source code is the worst I've ever
seen.

------
emmanueloga_
Sedgewick and Wayne algorithm implementations. Although, those are literally
textbook implementations :-) I’m not quite sure what it would take to turn
them into a production ready standard library (generics?), but they look like
a good foundation for that purpose.

[https://algs4.cs.princeton.edu/code/](https://algs4.cs.princeton.edu/code/)

------
ahmedfromtunis
I enjoy reading Django's source code so much. I also love writing Django apps.
Its elegance forces me to write a much cleaner code.

------
ngngngng
[https://github.com/golang/go](https://github.com/golang/go)

------
agentultra
I think Brogue is quite nice to work with and well structured:
[https://github.com/tsadok/brogue](https://github.com/tsadok/brogue)

Kudos also to Postgres, SQLite, Lean (theorem prover), and the containers
library for Haskell.

------
halleonard
The Gatsby codebase is dreamy
[https://github.com/gatsbyjs/gatsby/tree/master/packages/gats...](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby)

------
e9
ffmpeg [https://github.com/FFmpeg/FFmpeg](https://github.com/FFmpeg/FFmpeg)

~~~
astrange
The build system and assembly system (x86asm) are very underrated. Open source
went from autotools, which are awful, to cmake, which also seems to be awful.
ffmpeg's configure/make system has the same interface as autotools but is
actually good.

libavformat is rather difficult to use and difficult to fix bugs in - you'll
never find the bugs. Same with the ffmpeg frontend, which makes it easy to ask
for something it's near impossible to get right, like copying an mkv file to
an avi, it'll just corrupt your data silently.

Everything about the video decoders is great, but encoding never worked as
well, which is why nobody uses ffmpeg2/4/etc and x264 is a separate project.

~~~
_Gyan_
_libavformat is rather difficult to use and difficult to fix bugs in - you 'll
never find the bugs._

Some examples?

 _encoding never worked as well, which is why nobody uses ffmpeg2 /4/etc and
x264 is a separate project._

Most users use x264 _via_ ffmpeg since they may need to filter the video
and/or filter/process/mux audio and other streams.

~~~
astrange
> Some examples?

Just try copying video between different containers (mkv, ts, avi for one)
without reencoding.

> Most users use x264 _via_ ffmpeg since they may need to filter the video
> and/or filter/process/mux audio and other streams.

They don't have to do that; you can handle each track separately and mux them
back afterward.

I'm talking about ffmpeg's builtin MPEG2/4/MP3 encoders, which nobody used
when they were competitive because it leaves all the options at "go fast"
instead of providing tunings.

They're also unmaintained and the code is hard to figure out - that's why x264
was a separate project instead of just another part of libavcodec.

~~~
_Gyan_
_Just try copying video between different containers (mkv, ts, avi for one)
without reencoding._

I do, all the time. AVI is an old container and it has issues with B-frames
and also VFR but those are container limitations, not a libavformat issue. All
transmuxing between common modern containers with present-day common codecs
work fine. There are always edge cases, but that's what they are, edge cases.

 _you can handle each track separately and mux them back afterward._

Why do that? What's the benefit?

 _I 'm talking about ffmpeg's builtin MPEG2/4/MP3 encoders_

You seem to be talking about the state more than a decade back. How's that
relevant to 2019? BTW, there is no native MP3 encoder.

------
wrmsr
prestodb is the best java codebase I've ever worked in, llvm is the best c++
codebase I've ever worked in.

------
the_arun
For Java, below are my favorites:

1\. Jersey - [https://github.com/eclipse-
ee4j/jersey](https://github.com/eclipse-ee4j/jersey) 2\. Jetty -
[https://github.com/eclipse/jetty.project](https://github.com/eclipse/jetty.project)
3\. Guava - [https://github.com/google/guava](https://github.com/google/guava)

Common theme is - Easy to follow, clean documentation & use of consistent
patterns.

------
alexanderscott
I found the Akka source code to be very clean and readable:
[https://github.com/akka/akka](https://github.com/akka/akka)

------
aamederen
I work at Citus (now Microsoft) so my opinion is biased but I think Citus [1]
codebase is a really good example.

It borrows all the best practices from PostgreSQL the naming of variables and
functions are more self-explaining in general.

I also believe that the practices around PRs and code reviews are also good
examples.

[1] [https://github.com/citusdata/citus](https://github.com/citusdata/citus)

------
projectileboy
arc.arc, core of the Arc language. Lots of lessons in there on how to write
good Lisp code. I’d say the same thing about the core.clj of Clojure.

------
freetobesmart
many mature frameworks have good standards. For php you can look at any code
base that adbides by PSR standards and get good code.

Not only that but laravel is in a mature space where the problems are already
solved. Its basically reinventing the wheel.

Im not surprised that Laravel is written cleanly but I hate its API. It
reminds me of the bloat of Zend but with an obnoxious artsy style added to it.

Im an engineer not an artisan.

~~~
SahAssar
> look at any code base that adbides by PSR standards and get good code.

No. PSR does not at all ensure good code, only standardized code style and
some of the interfaces.

~~~
johannes1234321
It does one thing: It indicates the author is willing to use "established
patterns" instead of reinventing the wheel. (While sometimes it's good to
reinvent the wheel - today's vehicles won't work with wodden wheels)

------
thrownaway954
Anything by Tobias Lütke ( [https://github.com/tobi](https://github.com/tobi)
)

------
th0ma5
Maybe I have a low-ish bar, but the Kodi Add-Ons in the official code base is
a nice system of continuous integration with established acceptance and review
procedures. I wrote a small add-on for a woodworking show and as soon as all
the checks were passed and there was a final sign off, it was immediately
available for installation on all platforms.

------
canada_dry
[https://github.com/achael/eht-imaging](https://github.com/achael/eht-imaging)

This python code is responsible for the fairly recent imaging of the black-
hole (i.e. imaging, analysis, and simulation software for radio
interferometry).

It's extremely easy to digest despite the complexity involved.

------
enkiv2
The cleanest real/nontrivial code I've seen is the plan9 implementation of the
standard unix command line tools.

------
typedef_struct
With some healthy spoonfuls of caveats, Quake 3 ([https://github.com/id-
Software/Quake-III-Arena](https://github.com/id-Software/Quake-III-Arena)).
Skipped a lot of classes back in the day ripping that one apart and piecing it
back together again.

------
inlined
I liked some Objective-C codebases that adhered to the muffin-man principle:

\- (BOOL) doYouKnowTheMuffinMan:(TheMuffinMan *)theMuffinMan;

Also, lots of the Objective-C runtime code was clear enough to explain
concepts like ARC hacks well enough that I could learn about and give a talk
on the Objective-C runtime with a month’s notice.

------
vs4vijay
Well there was a post few year back with title "Best-architected open-source
business applications worth studying?" :
[https://news.ycombinator.com/item?id=14836013](https://news.ycombinator.com/item?id=14836013)

------
elijahlrc
Unreal 4 is far from perfect but considering the size of the project I would
say its pretty impressive.

------
jatsek
I’m only learning Swift and iOS dev but a fair amount of people recommended me
to take a deeper look into Kickstarter for iOS app:
[https://github.com/kickstarter/ios-oss](https://github.com/kickstarter/ios-
oss)

~~~
sixstringtheory
Came here to post this.

It's got some interesting usage of custom Swift operators to create almost
diagrammatic code, like here: [https://github.com/kickstarter/ios-
oss/blob/master/Kickstart...](https://github.com/kickstarter/ios-
oss/blob/master/Kickstarter-
iOS/Views/Controllers/AddNewCardViewController.swift#L112-L115)

    
    
      _ = self.cardholderNameTextField
          |> formFieldStyle
          |> cardholderNameTextFieldStyle
          |> \.accessibilityLabel .~ self.cardholderNameLabel.text
    

And it's the first iOS codebase I've seen that puts test files right next to
the files that define the things being tested. It's all there together.

Tons of other goodies to find.

~~~
akaralar
2 of the guys that worked on that app are doing video series about functional
programming now where they talk a lot about the ideas in the app,
[https://www.pointfree.co](https://www.pointfree.co)

~~~
sixstringtheory
Nice rec! They're the ones that wrote the tagged [0] repo I use, had no idea
they were connected. Very cool.

[0]: [https://github.com/pointfreeco/swift-
tagged](https://github.com/pointfreeco/swift-tagged)

------
manifoldQAQ
ZeroMQ[1] for sure. It has a clean interface wrapped over low-level IO details
and a well-designed unified polling mechanism. It's a piece of art.

[1] [https://github.com/zeromq/libzmq](https://github.com/zeromq/libzmq)

------
pwpwp
MacPaint and QuickDraw Source Code
[https://www.computerhistory.org/atchm/macpaint-and-
quickdraw...](https://www.computerhistory.org/atchm/macpaint-and-quickdraw-
source-code/)

------
artpar
Here are a couple of codebases

[https://medium.com/@012parth/what-source-code-is-worth-
study...](https://medium.com/@012parth/what-source-code-is-worth-
studying-8755f88f8de5)

------
m463
sel4 microkernel is pretty cool.

"The world's first operating-system kernel with an end-to-end proof of
implementation correctness and security enforcement is available as open
source."

for instance, look at strnlen:

    
    
      word_t strnlen(const char *s, word_t maxlen)
      {
          word_t len;
          for (len = 0; len < maxlen && s[len]; len++);
          return len;
      }
    

[http://sel4.systems/](http://sel4.systems/)

[https://github.com/seL4/seL4](https://github.com/seL4/seL4)

------
heathenaspragus
I've had the pleasure of working on this: [https://github.com/cloudify-
cosmo](https://github.com/cloudify-cosmo) was the cleanest I've seen

------
dajohnson89
Someone mentioned joda-time. Does anyone know of other exemplary java repos?

------
jMyles
I think that the Twisted codebase has the best combination of sound and
comprehensive metaphor, straightforward functionality, and fun.

I also enjoy diving into it when I hit a breakpoint that calls one of its
methods.

------
whalesalad
Whatever you do ... do not read the guts of PonyORM (python db orm). Also I
would strongly urge anyone who has ever considered it to run, not walk, in the
opposite direction.

------
sidcool
Any good to study Kotlin codebases? Or even Java (8+)?

------
willfr
I really like AllenNLP.

[https://github.com/allenai/allennlp](https://github.com/allenai/allennlp)

------
sidcool
A side question. What is a good way to start understanding such code bases as
mentioned on here, so that the learning is optimal and effective?

------
lloeki
minitest. The testimonials speak volumes.

[https://github.com/seattlerb/minitest](https://github.com/seattlerb/minitest)

Apparently, some people think my toy channel implementation called Normandy is
somehow good:

[https://github.com/lloeki/normandy](https://github.com/lloeki/normandy)

------
flavio81
The easiest to read codebases I've found were all written in Common Lisp, like
the clsql lib for example.

------
miguendes
Java: joda-time

C: redis

Python: scikit-learn

_______

Edit: formatting

------
musicale
For C, I thought Tcl had code that was easy to read and understand.

------
coleifer
I know it's a cliche but the sqlite code is the easiest to read C I've
encountered. Followed closely by the code for Redis.

~~~
sea6ear
I also like the C source for Tcl/Tk which I _think_ also follows similar
engineering/style standards.

~~~
noir_lord
The author of Tcl/Tk wrote a fantastic book recently called "A Philosophy of
Software Design" and it's brilliant, hands down my favourite programming book
of the last decade.

------
lugg
I'm really curious how you see laravel as a shining example of clean code?

That thing is the epitome of a framework for frameworks sake.

Pretty sure Most of Martin's talks begin by complaining about this sort of
thing?

~~~
0mbre
A software's usefulness is not correlated to how well it was architected. What
I like about Laravel is that its fairly complex code base that is mostly
composed of tiny and expressive functions

~~~
lugg
I'm not sure I follow.

We're not talking usefulness here we are talking about clean code.

Architecture is not only correlated but causal in this situation.

It's over architecture is the problem. It's nano functions are a positive side
effect but don't change the indirection problems you face.

------
norswap
Because of ego, I'm going to plug my own (a Java parsing tool):
[https://github.com/norswap/autumn4](https://github.com/norswap/autumn4)

And hopefully I can some constructive criticism :)

For something not from me but still in Java, the Proguard source code is very
clean:
[https://sourceforge.net/p/proguard/code/ci/default/tree/](https://sourceforge.net/p/proguard/code/ci/default/tree/)

~~~
cunac
it reads like C , not like regular java all idioms are C like

