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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Code which every programmer must read before dying

67 点作者 r0h4n大约 14 年前
What open source codes/projects must every programmer read before his death?

24 条评论

jarek-foksa大约 14 年前
If you are fronted web developer then you should defenitely read jQuery sources. There is a lot of patterns that you could borrow and reuse in your own JS libraries.<p>A good place to start is this interactive code viewer: <a href="http://www.keyframesandcode.com/resources/javascript/deconstructed/jquery/" rel="nofollow">http://www.keyframesandcode.com/resources/javascript/deconst...</a> There is also a great presentation by Paul Irish ("10 Things I Learned from the jQuery Source"): <a href="http://www.youtube.com/watch?v=i_qE1iAmjFg" rel="nofollow">http://www.youtube.com/watch?v=i_qE1iAmjFg</a>
dsm大约 14 年前
I'd say the original lisp paper: <a href="http://www-formal.stanford.edu/jmc/recursive/recursive.html" rel="nofollow">http://www-formal.stanford.edu/jmc/recursive/recursive.html</a> by John McCarthy
thirsteh大约 14 年前
SQLite probably has some of the cleanest and most elegant C you will ever see: <a href="http://www.sqlite.org/sqlite-src-3070602.zip" rel="nofollow">http://www.sqlite.org/sqlite-src-3070602.zip</a>
评论 #2466284 未加载
madhouse大约 14 年前
There is no single code or project that I could name. Not because there are no open source codes or projects that weren't worth reading, because there are thousands of them. I couldn't name any, because people are different, and what one finds good and worthy code, the other finds rubbish - thus, there can be no single project that would make every reader happy.<p>On the other hand, if you look at the question in a different way, you could say that the code (be it open source or not) every programmer must read before his end, is his own. As one looks at his life in one's deathbed, so should a programmer look at his code.
Kafka大约 14 年前
The Sudoku solver by Peter Norvig <a href="http://norvig.com/sudoku.html" rel="nofollow">http://norvig.com/sudoku.html</a> and not only for the code but also for the excellent essay.
willvarfar大约 14 年前
Literate programming is the style of programming that's <i>intended</i> to be read: <a href="http://www.literateprogramming.com/" rel="nofollow">http://www.literateprogramming.com/</a><p>Quite the contrast with the Bourne Shell: "Nobody really knows what the Bourne shell's grammar is. Even examination of the source code is little help." – Tom Duff <a href="http://en.wikipedia.org/wiki/Bourne_shell#Quotes" rel="nofollow">http://en.wikipedia.org/wiki/Bourne_shell#Quotes</a>
评论 #2466481 未加载
评论 #2468156 未加载
homofaber大约 14 年前
If you have only few minutes before execution, and want to fix an old X programming mystery, I would suggest dwm.c: <a href="http://hg.suckless.org/dwm/file/e901e70f69e8/dwm.c" rel="nofollow">http://hg.suckless.org/dwm/file/e901e70f69e8/dwm.c</a><p>It is so easy to understand inner workings of window manager in X reading this code, and you do not need much time for it (&#62;2000 SLOC).
评论 #2469969 未加载
gavaletz大约 14 年前
The Linux kernel. If you look at it really closely it isn't so pretty, but its massive size and overall complexity for me (as an undergraduate) was like looking into the grand canyon. What's more impressive is the speed at which things change and that despite breaking all of the traditional rules for "good" software design practices...it works amazingly well.
评论 #2466384 未加载
sunkencity大约 14 年前
WordPress - because it's extremely crappy but at the same time insanely accessible. Lots of lessons to learn.<p>Passenger - code looks good even though it's C++<p>Rails 3. Beautifully structured application foundation that's not just a pretty piece of code, it's tested and works.<p>JScheme. Reading this clean implementation and re-implementing it yourself gives a good basis of understanding for lisp.
tsigo大约 14 年前
Based on a blog post that made the rounds a while ago -- <a href="http://tomayko.com/writings/unicorn-is-unix" rel="nofollow">http://tomayko.com/writings/unicorn-is-unix</a> -- Unicorn might be a good read for Ruby-related stuff.<p><a href="https://github.com/defunkt/unicorn" rel="nofollow">https://github.com/defunkt/unicorn</a>
noselasd大约 14 年前
Plan 9 source code (<a href="http://plan9.bell-labs.com/plan9/" rel="nofollow">http://plan9.bell-labs.com/plan9/</a>), mostly for its historical value - created by the same team that made C and Unix - and for an insight on how those people envisioned the evolution of Unix.
michaelcampbell大约 14 年前
Duff's device.
thirsteh大约 14 年前
I think a very good example of when OOP is genuinely useful and desirable is the Twisted Networking Engine: <a href="http://twistedmatrix.com/trac/browser/trunk/twisted" rel="nofollow">http://twistedmatrix.com/trac/browser/trunk/twisted</a>
评论 #2466351 未加载
评论 #2468451 未加载
wsxiaoys大约 14 年前
Finch is really a clean compiler implementation in C++, it's kind of weird to me when reading its code express nasty things in a clear way in <i>C++</i><p><a href="http://finch.stuffwithstuff.com/" rel="nofollow">http://finch.stuffwithstuff.com/</a>
zguy大约 14 年前
Probably the most funny source code I encountered was that of the linux kernel, just look for comments.<p>If you just want to die by reading code, you can try to understand how Xen works ;) (disclaimer, it is actually very elegant)
larsen大约 14 年前
One of my university professors some years ago said the source of Rogue was one of the C program he read. I've never been able to find it, and I am curious since then. Does anyone?
评论 #2466505 未加载
r0h4n大约 14 年前
So many great projects listed here, please keep posting more guys. I will compile a list of all later.
lylejohnson大约 14 年前
It's been awhile since I studied it, but I recall the Python (C) source code being very readable.
jacques_chester大约 14 年前
I was fairly impressed with the PostgreSQL sources when I was poking through them once.
kunjaan大约 14 年前
These two are the works of very very smart programmers:<p>1. The Racket source code<p>2. The Chromium source
seige大约 14 年前
Most of the code written by _whyfan is pretty awesome in my book.
vithlani大约 14 年前
How about the Lion's book?<p><a href="http://en.wikipedia.org/wiki/Lions_Commentary_on_UNIX_6th_Edition,_with_Source_Code" rel="nofollow">http://en.wikipedia.org/wiki/Lions_Commentary_on_UNIX_6th_Ed...</a><p>Get the source code from <a href="http://minnie.tuhs.org/cgi-bin/utree.pl" rel="nofollow">http://minnie.tuhs.org/cgi-bin/utree.pl</a>
bxr大约 14 年前
When I downloaded mongrel2 I wanted to take a quick peak at superpoll beyond what was in the blog post about it, an hour later I was still reading the source. It is some of the best-written C I've seen.
avstraliitski大约 14 年前
Hello world in machine code for any platform.