TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

392 点作者 0mbre将近 6 年前
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

79 条评论

tschwimmer将近 6 年前
Perhaps I&#x27;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).<p>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&#x27;re aiming to solve are less concretly scoped. Even something as simple as &quot;Take the data from this form and send it to the project manager&quot; 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.
评论 #20559769 未加载
评论 #20558570 未加载
评论 #20558422 未加载
评论 #20558798 未加载
评论 #20561133 未加载
评论 #20560559 未加载
评论 #20571628 未加载
评论 #20560248 未加载
评论 #20560315 未加载
评论 #20561537 未加载
评论 #20561097 未加载
hugofirth将近 6 年前
For a C codebase, Postgres[1] wins for me hands down. It&#x27;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.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;postgres&#x2F;postgres" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;postgres&#x2F;postgres</a>
评论 #20557523 未加载
评论 #20559660 未加载
评论 #20571948 未加载
ekidd将近 6 年前
Anything by burntsushi, but especially xsv and ripgrep:<p>xsv: <a href="https:&#x2F;&#x2F;github.com&#x2F;BurntSushi&#x2F;xsv" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BurntSushi&#x2F;xsv</a><p>ripgrep: <a href="https:&#x2F;&#x2F;github.com&#x2F;BurntSushi&#x2F;ripgrep" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BurntSushi&#x2F;ripgrep</a><p>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.<p>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 <i>reason</i>, if only I thought about it long enough.
评论 #20562760 未加载
评论 #20559582 未加载
bitwize将近 6 年前
NetBSD, hands down. Beautiful, simple to understand, consistent. The documentation is also top notch -- I wrote a trivial character-device kernel driver using <i>only the man pages</i> as a reference. And you can too.<p>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 <i>fucking Unity</i>. And the Switch version chugs, despite the original running well on 486-class hardware.
评论 #20560182 未加载
评论 #20559739 未加载
评论 #20561003 未加载
评论 #20558764 未加载
jihadjihad将近 6 年前
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&#x27;s going on.<p>For Python, I really like how SQLAlchemy is written and designed.<p>For Rust, ripgrep stands out as a sterling example of how to write a powerful low-level utility like that.
评论 #20582414 未加载
评论 #20560713 未加载
rsweeney21将近 6 年前
The Windows operating system.<p>Windows is quite an engineering achievement. We didn&#x27;t prioritize readability or &quot;clean code&quot;. 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 &quot;piddles&quot; and short for &quot;pointer to an id list&quot;) used for file operations.<p>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 &quot;If application = Corel Draw, don&#x27;t actually free the memory for this window handle because Corel uses it after sending a WM_DESTROY message.&quot;<p>The fact that thousands of people worked on the code base was mind boggling.
评论 #20562842 未加载
评论 #20561122 未加载
评论 #20559528 未加载
评论 #20559704 未加载
评论 #20559415 未加载
sea6ear将近 6 年前
I really liked the Go standard library (or at least from around 1.4-ish, it might have gotten more complicated now).<p>I liked that it was actually possible to read it and understand what was going on.<p>In a similar vein, P. J. Plauger&#x27;s version of the <i>The Standard C Library</i> 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.<p><i>Software Tools</i> 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.<p>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.<p>So even over 4 decades and various operating systems removed, there are still concepts in there that are useful.<p><i>Jonesforth</i> is also a great and mind blowing code base although I&#x27;m not sure where the canonical repository is currently.
评论 #20569834 未加载
quadcore将近 6 年前
<i>it seems that in real life, a really high-quality codebase is hard to come by</i><p>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&#x27;s reassuring. You have in front of you a code that gives you trust.<p>When in fact, that code can be complete garbage.<p>The look of the code doesn&#x27;t matter, what matters is the program. In the abstract meaning of the term. You don&#x27;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&#x27;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&#x27;s simply not true, the effort is definitely not in reading but in running the code in your head. Basically what I&#x27;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&#x27;t be mistaken, the real important and difficult part is whether or not it runs well in the head.<p>A poor quality program may look good, but don&#x27;t run well in the head. It&#x27;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&#x27;s supposed to do. On the other hand good quality code is code that surprises you by the way it runs. It&#x27;s beautiful in terms of simplicity, it delivers a lot, it&#x27;s small so that it fits well in the coder&#x27;s head. And it may look like garbage which is not so important.<p>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&#x27;s constructed in this language, try instead to contemplate it in an abstract manner. Be critic, and <i>critic your critics</i>.
评论 #20561176 未加载
评论 #20560148 未加载
评论 #20562968 未加载
评论 #20561844 未加载
评论 #20560098 未加载
omarhaneef将近 6 年前
I wish there was a way to read the codebase where there is a tag that tells you what the folder does.<p>In github, rather than see what has changed, it would be interesting if there was a comment that told you what the folder contained.<p>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.
评论 #20557990 未加载
评论 #20558062 未加载
评论 #20557810 未加载
cryptica将近 6 年前
Unfortunately, I&#x27;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.<p>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.<p>I think the problem is partly caused by a lack of diversity in experience; if a developer hasn&#x27;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&#x27;t have clear values or philosophy to draw from to make such judgements. If you can&#x27;t even separate what is important from what is not important, then you are not qualified to judge code quality.<p>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.<p>I think that the best metric for code&#x2F;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&#x2F;reliability of the code and also test quality (e.g. the tests make sense and they help newcomers to quickly adapt to the project).<p>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&#x27;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.<p>It&#x27;s the same with developers; most developers (especially junior and mid-level) are incapable of telling who is actually a good developer until they&#x27;ve worked with them for about 6 months to a year.<p>If you are not a good developer, you will not be able to accurately judge&#x2F;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&#x27;ve left the company to fully realize just how good they were.
评论 #20562911 未加载
评论 #20587841 未加载
评论 #20560832 未加载
oaxacaoaxaca将近 6 年前
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&#x27;t), you could fully grasp their APIs and how to use their libraries by just reading through some of the code.
评论 #20560682 未加载
评论 #20561125 未加载
评论 #20560524 未加载
bijection将近 6 年前
The Codemirror codebase [0] is simply written and richly commented, and using Codemirror itself in a project is a pleasure.<p>Tellingly, Marijn Haverbeke, Codemirror&#x27;s creator, is also the author of the excellent &#x27;Eloquent Javascript&#x27; [1].<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;codemirror&#x2F;codemirror" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;codemirror&#x2F;codemirror</a><p>[1] <a href="http:&#x2F;&#x2F;eloquentjavascript.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;eloquentjavascript.net&#x2F;</a>
评论 #20557359 未加载
luminati将近 6 年前
See also<p>[1] Interesting Codebases: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15371597" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15371597</a><p>[2] Show HN: Awesome-code-reading - A curated list of high-quality codebases to read <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18293159" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18293159</a>
评论 #20563044 未加载
hartator将近 6 年前
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&#x27;s not. It’s never easy.
kostarelo将近 6 年前
I&#x27;ve been enjoying reading Spectrum&#x27;s codebase[0]. It&#x27;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.<p>Small summary of the features I liked:<p>- Simple documentation<p>- Intuitive structure<p>- Lots of JS best practices, but still simple<p>- Event-driven architecture<p>- A simple API gateway that will just fire events to workers<p>- Properly divided workers (kind of microservices but with lots of shared code)<p>- Monorepo<p>It recently been bought by GitHub(1) and was discussed here(2).<p>The author has talked in his blog about some decisions he took wrong. Super interesting post(2).<p>0. <a href="https:&#x2F;&#x2F;github.com&#x2F;withspectrum&#x2F;spectrum" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;withspectrum&#x2F;spectrum</a><p>1.<a href="https:&#x2F;&#x2F;spectrum.chat&#x2F;spectrum&#x2F;general&#x2F;spectrum-is-joining-github~1d3eb8ee-4c99-46c0-8daf-ca35a96be6ce" rel="nofollow">https:&#x2F;&#x2F;spectrum.chat&#x2F;spectrum&#x2F;general&#x2F;spectrum-is-joining-g...</a><p>2. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18570598" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18570598</a><p>3. <a href="https:&#x2F;&#x2F;mxstbr.com&#x2F;thoughts&#x2F;tech-choice-regrets-at-spectrum&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mxstbr.com&#x2F;thoughts&#x2F;tech-choice-regrets-at-spectrum&#x2F;</a>
GoMonad将近 6 年前
Anything by John Carmack. (DOOM&#x27;s open source release, for example)
评论 #20559390 未加载
Congeec将近 6 年前
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.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;tornadoweb&#x2F;tornado&#x2F;blob&#x2F;master&#x2F;tornado&#x2F;ioloop.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tornadoweb&#x2F;tornado&#x2F;blob&#x2F;master&#x2F;tornado&#x2F;io...</a>
评论 #20560783 未加载
vecplane将近 6 年前
I&#x27;ve always been impressed by the quality of Three.js - <a href="https:&#x2F;&#x2F;github.com&#x2F;mrdoob&#x2F;three.js&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mrdoob&#x2F;three.js&#x2F;</a>
SkyMarshal将近 6 年前
Peter Norvig&#x27;s sudoku solver (Python) is excellent. Solves every possible variant of sudoku.<p><a href="https:&#x2F;&#x2F;norvig.com&#x2F;sudoku.html" rel="nofollow">https:&#x2F;&#x2F;norvig.com&#x2F;sudoku.html</a>
评论 #20561143 未加载
jamierumbelow将近 6 年前
For something a little different, the Clojure codebase – particularly `clojure.core` – is extraordinary in its elegance and simplicity.
vbezhenar将近 6 年前
Whenever I have to dig into Spring sources, they always look awesome. This is the best Java project I&#x27;ve ever seen. Clean concise code, versatile architecture using proper design patterns, lots of documentation.
vimanuelt将近 6 年前
Plan 9 codebase has been the best that I have encountered.<p><a href="http:&#x2F;&#x2F;9p.io&#x2F;sources&#x2F;plan9&#x2F;sys&#x2F;src&#x2F;" rel="nofollow">http:&#x2F;&#x2F;9p.io&#x2F;sources&#x2F;plan9&#x2F;sys&#x2F;src&#x2F;</a>
myth_buster将近 6 年前
Kubernetes for Golang. This has been brought up as an example of fine documentation: <a href="https:&#x2F;&#x2F;github.com&#x2F;kubernetes&#x2F;kubernetes&#x2F;blob&#x2F;ec2e767e59395376fa191d7c56a74f53936b7653&#x2F;pkg&#x2F;controller&#x2F;volume&#x2F;persistentvolume&#x2F;pv_controller.go#L54" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kubernetes&#x2F;kubernetes&#x2F;blob&#x2F;ec2e767e593953...</a><p>Requests for Python <a href="https:&#x2F;&#x2F;github.com&#x2F;psf&#x2F;requests" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;psf&#x2F;requests</a>
评论 #20559134 未加载
评论 #20557394 未加载
dfan将近 6 年前
The Stockfish chess engine [1] is very nice, especially so since chess engines tend to be very kludgy.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;official-stockfish&#x2F;Stockfish" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;official-stockfish&#x2F;Stockfish</a>
ixtli将近 6 年前
Weirdly I find the v8 source and jQuery (at least several years ago) to be the best. They&#x27;re examples of real-world, multi-distributed-collaborator, mature projects. Harder, I think, than writing &quot;clean&quot; code is maintaining a large code base&#x27;s organization, distribution, etc and these are really good examples of that.<p>(d3 and three.js are also very interesting to read, but they&#x27;re not quite in the same class as the former.)
wvlia5将近 6 年前
The compiler for the B language, by Arthur Withney <a href="http:&#x2F;&#x2F;kparc.com&#x2F;b&#x2F;" rel="nofollow">http:&#x2F;&#x2F;kparc.com&#x2F;b&#x2F;</a>
评论 #20568750 未加载
评论 #20560339 未加载
jacquesc将近 6 年前
My personal favorite is Sequel. <a href="https:&#x2F;&#x2F;github.com&#x2F;jeremyevans&#x2F;sequel" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jeremyevans&#x2F;sequel</a><p>Beautiful codebase, rock solid, and way better option than ActiveRecord IMHO
评论 #20561373 未加载
ts4z将近 6 年前
In 2010, the nginx source was quite startling. It&#x27;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将近 6 年前
The Lua source code is very easy to read, especially for an interpreter. It&#x27;s a hand written recursive descent parser and incredibly tiny. <a href="http:&#x2F;&#x2F;www.lua.org" rel="nofollow">http:&#x2F;&#x2F;www.lua.org</a>
carapace将近 6 年前
It&#x27;s a toy, but I remember being very impressed with the implementation of Turing Drawings: <a href="http:&#x2F;&#x2F;maximecb.github.io&#x2F;Turing-Drawings&#x2F;" rel="nofollow">http:&#x2F;&#x2F;maximecb.github.io&#x2F;Turing-Drawings&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;maximecb&#x2F;Turing-Drawings" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;maximecb&#x2F;Turing-Drawings</a>
PCChris23将近 6 年前
What do you like about Laravel and dislike about React?<p>I like the Linux kernel codebase: <a href="https:&#x2F;&#x2F;git.kernel.org&#x2F;pub&#x2F;scm&#x2F;linux&#x2F;kernel&#x2F;git&#x2F;torvalds&#x2F;linux.git&#x2F;tree&#x2F;" rel="nofollow">https:&#x2F;&#x2F;git.kernel.org&#x2F;pub&#x2F;scm&#x2F;linux&#x2F;kernel&#x2F;git&#x2F;torvalds&#x2F;lin...</a>
评论 #20557248 未加载
评论 #20557038 未加载
cbzehner将近 6 年前
Although it&#x27;s not a &quot;codebase&quot; per se, Architecture of OpenSource Applications is a great way to see how lots of major applications are structured. <a href="http:&#x2F;&#x2F;aosabook.org&#x2F;en&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;aosabook.org&#x2F;en&#x2F;index.html</a>
SMFloris将近 6 年前
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将近 6 年前
I think Faust looks like exemplary modern Python.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;robinhood&#x2F;faust" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;robinhood&#x2F;faust</a><p>Also voted for Postgres, Redis, and NetBSD.
c-smile将近 6 年前
I was impressed by code of Konstantin Knzhnik ( <a href="http:&#x2F;&#x2F;www.garret.ru&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.garret.ru&#x2F;</a> ). All his database engines in particular.
n0n0n4t0r将近 6 年前
Well, Symfony&#x27;s codebase is really great: It is very readable, It&#x27;s behavior is logical, The documentation is great, It uses common patterns (solid), so you are never loss
flukus将近 6 年前
Suckless tools (<a href="https:&#x2F;&#x2F;suckless.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;suckless.org&#x2F;</a>), clean, efficient, small (easy to know the whole codebase) and very hackable, hackable to the point where even configuration is in code: <a href="https:&#x2F;&#x2F;git.suckless.org&#x2F;dwm&#x2F;file&#x2F;config.def.h.html" rel="nofollow">https:&#x2F;&#x2F;git.suckless.org&#x2F;dwm&#x2F;file&#x2F;config.def.h.html</a>
评论 #20565027 未加载
billconan将近 6 年前
Qt&#x27;s codebase is very clean
评论 #20557545 未加载
评论 #20557580 未加载
farah7将近 6 年前
I would say the Mattermost (&quot;open Source slack&quot;) codebase: Go server: <a href="https:&#x2F;&#x2F;github.com&#x2F;mattermost&#x2F;mattermost-server" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mattermost&#x2F;mattermost-server</a><p>React frontend app: <a href="https:&#x2F;&#x2F;github.com&#x2F;mattermost&#x2F;mattermost-webapp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mattermost&#x2F;mattermost-webapp</a>
spinlock将近 6 年前
Not your question but I think the bash source code is the worst I&#x27;ve ever seen.
emmanueloga_将近 6 年前
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.<p><a href="https:&#x2F;&#x2F;algs4.cs.princeton.edu&#x2F;code&#x2F;" rel="nofollow">https:&#x2F;&#x2F;algs4.cs.princeton.edu&#x2F;code&#x2F;</a>
ahmedfromtunis将近 6 年前
I enjoy reading Django&#x27;s source code so much. I also love writing Django apps. Its elegance forces me to write a much cleaner code.
ngngngng将近 6 年前
<a href="https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go</a>
agentultra将近 6 年前
I think Brogue is quite nice to work with and well structured: <a href="https:&#x2F;&#x2F;github.com&#x2F;tsadok&#x2F;brogue" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tsadok&#x2F;brogue</a><p>Kudos also to Postgres, SQLite, Lean (theorem prover), and the containers library for Haskell.
halleonard将近 6 年前
The Gatsby codebase is dreamy <a href="https:&#x2F;&#x2F;github.com&#x2F;gatsbyjs&#x2F;gatsby&#x2F;tree&#x2F;master&#x2F;packages&#x2F;gatsby" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gatsbyjs&#x2F;gatsby&#x2F;tree&#x2F;master&#x2F;packages&#x2F;gats...</a>
e9将近 6 年前
ffmpeg <a href="https:&#x2F;&#x2F;github.com&#x2F;FFmpeg&#x2F;FFmpeg" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;FFmpeg&#x2F;FFmpeg</a>
评论 #20561224 未加载
评论 #20556996 未加载
wrmsr将近 6 年前
prestodb is the best java codebase I&#x27;ve ever worked in, llvm is the best c++ codebase I&#x27;ve ever worked in.
the_arun将近 6 年前
For Java, below are my favorites:<p>1. Jersey - <a href="https:&#x2F;&#x2F;github.com&#x2F;eclipse-ee4j&#x2F;jersey" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;eclipse-ee4j&#x2F;jersey</a> 2. Jetty - <a href="https:&#x2F;&#x2F;github.com&#x2F;eclipse&#x2F;jetty.project" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;eclipse&#x2F;jetty.project</a> 3. Guava - <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;guava" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;guava</a><p>Common theme is - Easy to follow, clean documentation &amp; use of consistent patterns.
alexanderscott将近 6 年前
I found the Akka source code to be very clean and readable: <a href="https:&#x2F;&#x2F;github.com&#x2F;akka&#x2F;akka" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;akka&#x2F;akka</a>
aamederen将近 6 年前
I work at Citus (now Microsoft) so my opinion is biased but I think Citus [1] codebase is a really good example.<p>It borrows all the best practices from PostgreSQL the naming of variables and functions are more self-explaining in general.<p>I also believe that the practices around PRs and code reviews are also good examples.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;citusdata&#x2F;citus" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;citusdata&#x2F;citus</a>
projectileboy将近 6 年前
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将近 6 年前
many mature frameworks have good standards. For php you can look at any code base that adbides by PSR standards and get good code.<p>Not only that but laravel is in a mature space where the problems are already solved. Its basically reinventing the wheel.<p>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.<p>Im an engineer not an artisan.
评论 #20557641 未加载
评论 #20558938 未加载
thrownaway954将近 6 年前
Anything by Tobias Lütke ( <a href="https:&#x2F;&#x2F;github.com&#x2F;tobi" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tobi</a> )
th0ma5将近 6 年前
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将近 6 年前
<a href="https:&#x2F;&#x2F;github.com&#x2F;achael&#x2F;eht-imaging" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;achael&#x2F;eht-imaging</a><p>This python code is responsible for the fairly recent imaging of the black-hole (i.e. imaging, analysis, and simulation software for radio interferometry).<p>It&#x27;s extremely easy to digest despite the complexity involved.
enkiv2将近 6 年前
The cleanest real&#x2F;nontrivial code I&#x27;ve seen is the plan9 implementation of the standard unix command line tools.
typedef_struct将近 6 年前
With some healthy spoonfuls of caveats, Quake 3 (<a href="https:&#x2F;&#x2F;github.com&#x2F;id-Software&#x2F;Quake-III-Arena" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;id-Software&#x2F;Quake-III-Arena</a>). Skipped a lot of classes back in the day ripping that one apart and piecing it back together again.
inlined将近 6 年前
I liked some Objective-C codebases that adhered to the muffin-man principle:<p>- (BOOL) doYouKnowTheMuffinMan:(TheMuffinMan *)theMuffinMan;<p>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将近 6 年前
Well there was a post few year back with title &quot;Best-architected open-source business applications worth studying?&quot; : <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14836013" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14836013</a>
elijahlrc将近 6 年前
Unreal 4 is far from perfect but considering the size of the project I would say its pretty impressive.
jatsek将近 6 年前
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: <a href="https:&#x2F;&#x2F;github.com&#x2F;kickstarter&#x2F;ios-oss" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kickstarter&#x2F;ios-oss</a>
评论 #20559659 未加载
manifoldQAQ将近 6 年前
ZeroMQ[1] for sure. It has a clean interface wrapped over low-level IO details and a well-designed unified polling mechanism. It&#x27;s a piece of art.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;zeromq&#x2F;libzmq" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zeromq&#x2F;libzmq</a>
pwpwp将近 6 年前
MacPaint and QuickDraw Source Code <a href="https:&#x2F;&#x2F;www.computerhistory.org&#x2F;atchm&#x2F;macpaint-and-quickdraw-source-code&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.computerhistory.org&#x2F;atchm&#x2F;macpaint-and-quickdraw...</a>
artpar将近 6 年前
Here are a couple of codebases<p><a href="https:&#x2F;&#x2F;medium.com&#x2F;@012parth&#x2F;what-source-code-is-worth-studying-8755f88f8de5" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@012parth&#x2F;what-source-code-is-worth-study...</a>
m463将近 6 年前
sel4 microkernel is pretty cool.<p>&quot;The world&#x27;s first operating-system kernel with an end-to-end proof of implementation correctness and security enforcement is available as open source.&quot;<p>for instance, look at strnlen:<p><pre><code> word_t strnlen(const char *s, word_t maxlen) { word_t len; for (len = 0; len &lt; maxlen &amp;&amp; s[len]; len++); return len; } </code></pre> <a href="http:&#x2F;&#x2F;sel4.systems&#x2F;" rel="nofollow">http:&#x2F;&#x2F;sel4.systems&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;seL4&#x2F;seL4" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;seL4&#x2F;seL4</a>
heathenaspragus将近 6 年前
I&#x27;ve had the pleasure of working on this: <a href="https:&#x2F;&#x2F;github.com&#x2F;cloudify-cosmo" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cloudify-cosmo</a> was the cleanest I&#x27;ve seen
dajohnson89将近 6 年前
Someone mentioned joda-time. Does anyone know of other exemplary java repos?
jMyles将近 6 年前
I think that the Twisted codebase has the best combination of sound and comprehensive metaphor, straightforward functionality, and fun.<p>I also enjoy diving into it when I hit a breakpoint that calls one of its methods.
whalesalad将近 6 年前
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将近 6 年前
Any good to study Kotlin codebases? Or even Java (8+)?
willfr将近 6 年前
I really like AllenNLP.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;allenai&#x2F;allennlp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;allenai&#x2F;allennlp</a>
sidcool将近 6 年前
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将近 6 年前
minitest. The testimonials speak volumes.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;seattlerb&#x2F;minitest" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;seattlerb&#x2F;minitest</a><p>Apparently, some people think my toy channel implementation called Normandy is somehow good:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;lloeki&#x2F;normandy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lloeki&#x2F;normandy</a>
flavio81将近 6 年前
The easiest to read codebases I&#x27;ve found were all written in Common Lisp, like the clsql lib for example.
miguendes将近 6 年前
Java: joda-time<p>C: redis<p>Python: scikit-learn<p>_______<p>Edit: formatting
musicale将近 6 年前
For C, I thought Tcl had code that was easy to read and understand.
coleifer将近 6 年前
I know it&#x27;s a cliche but the sqlite code is the easiest to read C I&#x27;ve encountered. Followed closely by the code for Redis.
评论 #20558608 未加载
评论 #20557284 未加载
lugg将近 6 年前
I&#x27;m really curious how you see laravel as a shining example of clean code?<p>That thing is the epitome of a framework for frameworks sake.<p>Pretty sure Most of Martin&#x27;s talks begin by complaining about this sort of thing?
评论 #20557274 未加载
评论 #20557151 未加载
norswap将近 6 年前
Because of ego, I&#x27;m going to plug my own (a Java parsing tool): <a href="https:&#x2F;&#x2F;github.com&#x2F;norswap&#x2F;autumn4" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;norswap&#x2F;autumn4</a><p>And hopefully I can some constructive criticism :)<p>For something not from me but still in Java, the Proguard source code is very clean: <a href="https:&#x2F;&#x2F;sourceforge.net&#x2F;p&#x2F;proguard&#x2F;code&#x2F;ci&#x2F;default&#x2F;tree&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sourceforge.net&#x2F;p&#x2F;proguard&#x2F;code&#x2F;ci&#x2F;default&#x2F;tree&#x2F;</a>
评论 #20558016 未加载