Live data from Hacker News

Ask HN: What are the “best” codebases that you've encountered?

news.ycombinator.com

181–190 of 278 posts

Re: Ask HN: What are the “best” codebases that you've encountered?

#182

My personal favorite is Sequel. https://github.com/jeremyevans/sequel Beautiful codebase, rock solid, and way better option than ActiveRecord IMHO

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

Re: Ask HN: What are the “best” codebases that you've encountered?

#183

Qt's codebase is very clean

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.

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)

Re: Ask HN: What are the “best” codebases that you've encountered?

#184

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…

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

PSR is an abomination. You end-up with more blank lines than code and about 5 lines of doc comments to every line of code. Factor-in PHP's pseudo-Java verbosity and the actual business logic is drowning in a sea of boilerplate.

Re: Ask HN: What are the “best” codebases that you've encountered?

#185

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…

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

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)

Re: Ask HN: What are the “best” codebases that you've encountered?

#186
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 
http://sel4.systems/

https://github.com/seL4/seL4

Re: Ask HN: What are the “best” codebases that you've encountered?

#187

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…

Check out https://github.com/mymonero/mymonero-app-ios

Re: Ask HN: What are the “best” codebases that you've encountered?

#189

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

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…

The best java is C.

Re: Ask HN: What are the “best” codebases that you've encountered?

#190

Earlier quoted context omitted.

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

Any PHP framework is a case of inner-platform: https://en.wikipedia.org/wiki/Inner-platform_effect PHP already is the "framework" and every time you load a page it's executing the script from scratch. You're wasting a lot of time loading a framework to handle control flow for your program which doesn't have any control flow in the first place.

I'm not a PHP dev, but I've dabbled. And I'm not sure I follow. How is it a framework for frameworks sake? I take that to mean it's pointless/not useful. Whereas I'd say Laravel and it's ecosystem are far more productive and time saving than simply using just PHP. It's the opposite of wasting time. From their github repo[0] Laravel has:

- Simple, fast routing engine.

- Powerful dependency injection container.

- Multiple back-ends for session and cache storage.

- Expressive, intuitive database ORM.

- Database agnostic schema migrations.

- Robust background job processing.

- Real-time event broadcasting.

Not only is it a robust, pleasant, framework with batteries included but there's also an entire ecosystem/platform of related products that are pretty big time savers:

spark[1], forge[2], envoyer[3], and horizon[4].

And, as an aside, the documentation is good and there are some pretty great tutorials too[5]

What am I missing?

[0] https://github.com/laravel/laravel

[1] https://forge.laravel.com/

[2] https://spark.laravel.com/

[3] https://envoyer.io/

[4] https://horizon.laravel.com

[5] https://laracasts.com/

Post reply on HN