Ask HN: What are the “best” codebases that you've encountered?
61–70 of 278 posts
Re: Ask HN: What are the “best” codebases that you've encountered?
#62Earlier quoted context omitted.
/* don't even try to load if not enabled */ if (!jit_enabled) return false; I still think comments like these are super redundant and annoying.
It tells you the intent. The actual code does exactly that, because the intent matches the code, but sometimes the two aren't aligned and therefore the "redundant" comment can help you determine if the bug is the code or the intent. Understanding the "Why?" of code is often the most valuable thing about comments. The code remains forever, but the "Why?" is often lost to time.
Re: Ask HN: What are the “best” codebases that you've encountered?
#63https://github.com/robinhood/faust
Also voted for Postgres, Redis, and NetBSD.
Re: Ask HN: What are the “best” codebases that you've encountered?
#64Perhaps 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…
But yeah, Postgres also gets my vote. I guess there’s a bit of a bias there because devs are likely to read the code of the tools they use; either to track downs bug or just to understand how it works.
Re: Ask HN: What are the “best” codebases that you've encountered?
#65Re: Ask HN: What are the “best” codebases that you've encountered?
#66Earlier quoted context omitted.
It tells you the intent. The actual code does exactly that, because the intent matches the code, but sometimes the two aren't aligned and therefore the "redundant" comment can help you determine if the bug is the code or the intent. Understanding the "Why?" of code is often the most valuable thing about comments. The code remains forever, but the "Why?" is often lost to time.
Except that it does not. The 'why' would be explaining why the jit needs to be enabled to be able to load. As it stands it explains the 'what' and therefore is a bad comment.
I still believe "redundant" comments can be of value though. This just may not be the best example.
Re: Ask HN: What are the “best” codebases that you've encountered?
#67Re: Ask HN: What are the “best” codebases that you've encountered?
#68(d3 and three.js are also very interesting to read, but they're not quite in the same class as the former.)
Re: Ask HN: What are the “best” codebases that you've encountered?
#69Re: Ask HN: What are the “best” codebases that you've encountered?
#70Perhaps 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…
Also curious about some good, not too hugely sized, game code (preferably something not written in C/C++, maybe like an indie game from the past decade or so). Anyone know something?