Live data from Hacker News

Ask HN: What source code is worth studying?

news.ycombinator.com

91–100 of 117 posts

Re: Ask HN: What source code is worth studying?

#93
post #25
post #2

SQLite's source listing is great. I learned a lot about good C practices and documentation reading it.

You will enjoy "C Interfaces and Implementations", along with the full, literate source-code for LCC. This is also good, Standard Function Library: http://legacy.imatix.com/html/sfl/

Where can one find the full literate source code for LCC? I haven't been able to find it anwyhere, and god knows I searched.

Re: Ask HN: What source code is worth studying?

#94
post #93
post #25

Earlier quoted context omitted.

You will enjoy "C Interfaces and Implementations", along with the full, literate source-code for LCC. This is also good, Standard Function Library: http://legacy.imatix.com/html/sfl/

Where can one find the full literate source code for LCC? I haven't been able to find it anwyhere, and god knows I searched.

I'm guessing here: http://www.cs.princeton.edu/software/lcc/

Re: Ask HN: What source code is worth studying?

#95
post #54

I'm going to get downvoted for picking a non-open source option but... The NT kernel is the most beautiful piece of code I've seen. Dave Cutler and team wrote some very, very elegant code that anyone (even if you're not a kernel hacker) can understand. If I need 'code inspiration', I spend some time looking through their code. Now, the NT kernel itself doesn't have source out there but for folks who are students, you…

I spent several years writing drivers for NT and I don't know which part of the NT kernel you were looking at. The parts I saw were an utter mess lacking any sort of elegance whatsoever. If there were two ways to implement something, one simple and the other one contrived, you can bet your MCSD certificate NT will be using the latter. The overall impression was that it was hacked together in the worst sense of the wo…

I'm not sure you can actually see the kernel outside the base OS team at Microsoft, or under a unique license. it is not included in MSDN or the DDK.

Having worked on that team and having seen it for myself, it is truly elegant, concise, and very well written. I myself never touched it, and that is for the best. I probably wrote some of the crappy drivers for which you hold so much contempt.

Re: Ask HN: What source code is worth studying?

#96
post #47

Any good event-driven JavaScript (jQuery/Prototype is also fine) projects out there?

Event driven JS tends to go spaghetti really quickly unless you're using a good events framework. The yui3 and sproutcore frameworks are pretty close to opposite ends of the spectrum in terms of philosophy, but both have very well defined processes for dealing with events. The two frameworks you mention are fine for adding "ajax" to a more or less working server based app but they aren't so hot for building a complete app. FWIW, MochiKit's Signal framework is also nice (though the codebase is now fallow) and Dojo's system has a sort of nifty aop feel, but dojo is kind of hairy in that there are a lot more chefs in the kitchen there.

Re: Ask HN: What source code is worth studying?

#99
post #94
post #93

Earlier quoted context omitted.

Where can one find the full literate source code for LCC? I haven't been able to find it anwyhere, and god knows I searched.

I'm guessing here: http://www.cs.princeton.edu/software/lcc/

There's no literate source linked to on that page. Just plain, normal, barely-commented C.

Re: Ask HN: What source code is worth studying?

#100
post #99
post #94

Earlier quoted context omitted.

I'm guessing here: http://www.cs.princeton.edu/software/lcc/

There's no literate source linked to on that page. Just plain, normal, barely-commented C.

"There's no literate source linked to on that page. Just plain, normal, barely-commented C."

The book by David Hanson is the literate program.

Post reply on HN