10 ms·
Programs to Read
- sneak 8y ago+ nginx
- codezero 8y ago+ redis Agree on nginx - I wanted to make a crazy change and found it extremely easy to understand how I could have done it and why doing it would be stupid :)
- beefhash 8y agoOn the topic of C, I'd also strongly recommend mandoc[1]. It solves a number of hard problems (indexing and searching of man pages, rendering and parsing markup and translating said markup to HTML, PDF and tty output. The code remains fairly accessible. Definitely one of the codebases I regularly refer to for style and practices. [1] https://mandoc.bsd.lv/cgi-bin/cvsweb/ https://mandoc.bsd.lv/cgi-bin/cvsweb/
- kristapsdz 8y agoThanks! :)
- jolmg 8y agoSo, is wiki.c2.com something that people keep writing on or is it really readonly nowadays? Is there a way to become a member? I just mistakenly signed up to hypothes.is from the right side-bar thinking it was c2.com.
- becca_smth81 8y agoSeems like it hasn't been updated in a while. Each page has an "last updated" timestamp. The homepage says: "Last edit December 19, 2014". There's also a Github project but hasn't been updated in 2 years: https://github.com/WardCunningham/remodeling https://github.com/WardCunningham/remodeling
- fao_ 8y agoHi, for some reason you're shadowbanned? As a new account I find this really unusual. It's likely you might need to verify your email or something. I've vouched for this comment, which is why it appears. On Topic: there was a discussion a year ago about what the progress block is: https://github.com/WardCunningham/remodeling/issues/24 https://github.com/WardCunningham/remodeling/issues/24 It seems that he's stuck with some files that are mixed-encoding and can't repair them, it's likely the wiki will be read-only until that problem is solved, unfortunately.
- becca_smth81 8y agoThank you very much. This is a new account, but I don't know why I'd be banned :/ And why would you be able to see it and not me? :( On Topic again: c2.com is great, I'd love if someone would take ownership and keep maintaining it.
- hobs 8y agoIf you are a registered user, in the FAQ >In my profile, what does showdead do? >If you turn it on, you'll see all the stories and comments that have been killed by software, moderators, or user flags. This is what people refer to when they say shadow/hellbanned.
- mkl 8y agoIt's probably because your first comment contains a link, and automated account creation for spamming purposes is unfortunately a thing. The site relies on users with high enough karma clicking a button to vouch for legitimate users to unban accounts (or draw the mods' attention), like what happened to you here. Hacker News uses shadow-banning, so the person banned for problematic behaviour can't tell and doesn't just switch to a new account.
- tabtab 8y agoWard Cunningham decided to close c2 to new material in part because he got tired of battling a determined vandal who was all bent out of shape over grammer and spailing, and second to try out his new "Federated Wiki" concept. So far, Federated Wiki is a flop in my opinion. C2 was interesting in that software developers and IT professionals tried to categorize debates and disagreements over software engineering issues. Almost nothing was ever settled, but you got different perspectives. For example, is the "best" software about maximizing economics & psychology (human grokking), or symbolic parsimony? Is it better to hire 5 geniuses or 10 ordinary engineers?
- amyjess 8y ago> Ward Cunningham decided to close c2 to new material in part because he got tired of battling a determined vandal who was all bent out of shape over grammer and spailing It's honestly pretty upsetting that one vandal is enough to ruin one of the oldest and most significant institutions on the web for everybody.
- tabtab 8y agoAnyone is welcome to restart it. I'm sure he'd give you the raw data files & source code if you asked. (There might already be a copy on github.)
- lozenge 8y agoI think it has value as a snapshot archive as well. The article on extreme programming would look quite different today.
- tabtab 8y agoThe reworked version doesn't show the original indentation of discussion trees, making it harder to read. All bullet points have been flattened to one level, compared to the the original, which showed many levels.
- oraraonaro 8y agoIs there a resource with the best snippets of the code sources listed here? Can't be bothered to trawl through for the good stuff.
- pentagonpapers 8y agothis page literally does not need javascript, but doesnt work without it.
- hangonhn 8y agoI went through the list and the comment about Apache Lucene really piqued my interest. I found the Lucene code in GitHub but some of the sources have more boilerplate Java comments than code! Anyways, I remembered Java Docs are often excellent so here's the Lucene Java Docs: https://lucene.apache.org/core/7_5_0/core/index.html https://lucene.apache.org/core/7_5_0/core/index.html From my experience, studying the API Docs for Java and using it as a guide to the code makes understanding the code much easier. The code is here: https://github.com/apache/lucene-solr https://github.com/apache/lucene-solr
- riffraff 8y agoMany years ago I enjoyed Code Reading[0] which is a whole book which basically just discusses snippets from open source codebases. It might be a bit old (I honestly don't remember the specifics) but most of the code was already "mature" at the time so I think it would still be valid. [0] https://en.wikipedia.org/wiki/Code_Reading https://en.wikipedia.org/wiki/Code_Reading
- kornish 8y agoAnother list of reads worth mentioning is the Architecture of Open Source Applications book [1]. Each application is small (< 500LOC) and contains design rationale in an approachable literate programming style. [1]: http://aosabook.org/en/index.html http://aosabook.org/en/index.html
- lucaslee 8y agoI saw the Linux kernel was recommended many times here, but how many people actually read it? Where do you even start? The Linux kernel has around 60,000 files and 25 million lines of code... I think smaller projects are better for learning purposes. If you are interested in reading some smaller projects, check out my project here https://github.com/CodeReaderMe/awesome-code-reading https://github.com/CodeReaderMe/awesome-code-reading.
- ken 8y agoNobody ever wrote a 25MLOC program from start to finish, so I don't think it makes much sense to read it that way. I'd read it the way it was written: from the beginning. What's Linux 0.01 look like? What's the next changeset after that release look like? What was necessary to add the driver for your favorite device? What changes were made for your particular CPU? Programs are not static works (except maybe TeX and Metafont). They exist in the form they do in order to be amenable to changes. So look at the changes that drove it.
- deleted 8y ago[deleted]
- lucaslee 8y agoRead the early versions, that's exactly what I am doing too! I read Bitcoin 0.1.5 [1], which only has 15,000LOC and is the first tagged version on Github. Compared with the current Bitcoin codebase with 320,000LOC, it's much less daunting! [1]: https://github.com/CodeReaderMe/awesome-code-reading/issues/2 https://github.com/CodeReaderMe/awesome-code-reading/issues/...
- afarrell 8y agoHave you actually done this? What was your experience?
- ken 8y agoNot for Linux, but it's how I approach new programs I have to work on. I can't decipher this 1000-line function, but it came from somewhere. What did it start out as? That's what the author originally intended it to be. What caused it to grow? That's what features someone else thought it needed.
- potta_coffee 8y agoI often recommend the Flask source code, if you're into Python. Very clean and well structured, great example code.
- tomxor 8y ago> Some are GreatProgramsToRead and some are not Indeed! It took me a while a appreciate (because it can be painful). Reading bad programs can be very educational, especially when you try to infer the decisions or processes that caused it to be bad in a particular way.
- ryanmccullagh 8y agoQuestion, where does one start, when planning to read the Linux kernel? There is so much code. I have read it, but randomly. I have read contents of net/ kernel. I have read the main method where it attempts to launch pid1 of /bin/bash, etc. Is there a really good place to start reading? For example how does Linux talk to the hard drive? What's the first thing that happens in the kernel?
- seotut2 8y agoWell, some famliarity with the hardware doesn't hurt. Years ago when I studied the Linux kernel myself, I started with qemu, and the gdb stub, and walked line-by-line through the boot process. But as others suggest, taking an older version, or even simpler unices(xv6,netbsd) might be easier.
- varjag 8y agoStart skimming through the included documentation files. You don't have to do a thorough read, but the Documentation folder is structured in a way mirroring the organization of the kernel. They will help you to understand the structure, and you can get deeper understanding of the essential parts that way. Once you have mental map of major areas of the kernel it will be easier to relate to the sourcetree. There used to be a number of great books on fairly esoteric issues of the kernel (like, comprehensive explanations of network stack). However most of them seem to be stuck at 2.6 and are no longer very up to date.
- wwweston 8y agoKnuth vs McIlroy's solutions for a Word Frequency programming challenge: http://www.leancrew.com/all-this/2011/12/more-shell-less-egg/ http://www.leancrew.com/all-this/2011/12/more-shell-less-egg... Knuth's solution has its own elegance and interest including various efficiencies and from-scratch facilities. McIlroy's will make you wonder how much you're wasting in time and complexity.
- deleted 8y ago[deleted]
- YZF 8y agoAnywhere I can see Knuth's solution online? Can't seem to find the link in there.
- wwweston 8y agoHere's the paper: https://www.cs.tufts.edu/~nr/cs257/archive/don-knuth/pearls-2.pdf https://www.cs.tufts.edu/~nr/cs257/archive/don-knuth/pearls-... (ACM ref, too: https://dl.acm.org/citation.cfm?id=315654 https://dl.acm.org/citation.cfm?id=315654 ) Also, I found a blog post which links to a C version of the exercise in the spirit of Knuth's approach, and a Haskell version in the spirit of McIlroy's: https://franklinchen.com/blog/2011/12/08/revisiting-knuth-and-mcilroys-word-count-programs/ https://franklinchen.com/blog/2011/12/08/revisiting-knuth-an...
- akkartik 8y agoOne claim that caught my eye: Tex being unbuggy because it's written in the Literate Programming style. I like LP but that's a big claim. Occam's razor suggests a more likely answer: it was written by Knuth! A great programmer, and also one who grew up programming non-interactively: http://ed-thelen.org/comp-hist/B5000-AlgolRWaychoff.html#7 http://ed-thelen.org/comp-hist/B5000-AlgolRWaychoff.html#7
- deathanatos 8y agoOn the one hand, I see your point. But on the other hand, if a master of some skill says "This is how I achieve the results I achieve." — perhaps imitating that might just be valuable. Does a dancer not get better by learning to imitate (at least at first) a master? (Though perhaps eventually, a deeper understanding of the artform might take hold, at which point experimentation and improvisation allow the dancer to explore undiscovered variations of the artform.) And I don't think it is just that Knuth does it that catches my attention either. Ideally, I think (if I understand the premise of literate programming), literate programming would force the programmer to take the time to explain the code being written, and ideally, the rationale behind why that code solves the problem at hand. And to do that, the programmer must first understand the code being written, and I think upon attempting to do that, they'll find they have not sufficiently thought the problem through. I fear too many of the coders I know would not honestly attempt it; they are in too much of a hurry to get the code written. Now, I don't think literate programming is the only way to accomplish that; simply writing good docstrings and comments might suffice to a good degree (and good ones: I too often review code where the docstring is a basic repetition of the function name and arguments, or where the comments explain what is being done, but not why). But far too often I see no comments, no docstrings, no tests, just miles and miles of code, and so it is no wonder that Knuth is what he is.
- akkartik 8y agoNo disagreement there! Though you may violently agree or disagree with this thing I wrote a couple of years ago: http://akkartik.name/post/literate-programming http://akkartik.name/post/literate-programming I also just looked at your profile, and it resonates a lot. Tell me what you think of mine: http://akkartik.name/post/about http://akkartik.name/post/about
- e12e 8y agoSeems like this thread needs a link to: http://aosabook.org/en/index.html http://aosabook.org/en/index.html
- qwerty456127 8y agoSuch a small list, such a humble selection of programming languages :-(
- dfrunza 8y agoPrograms to read ... first entry 'JavaUnit'.. SKIP!
- kureikain 8y agoIf you like this kind of reading code list, I run a newsletter at https://betterdev.link/ https://betterdev.link/ where we have a small section that include one or two interesting Github repo per languages per issue.
- injb 8y agoThe Subversion api should be on this list too. I had occasion to do some development with it before and it's beatifully written.