Hacker News Comments on
Code Reading: The Open Source Perspective
·
9
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this book.Start by reading Redis code, slowly take notes on paper, try to make your version changing small bits at a time.https://github.com/redis/redis/tree/unstable/src
Entry point here at line 6816: https://github.com/redis/redis/blob/unstable/src/server.c
Also "Code Reading" will be useful. - https://www.amazon.com/Code-Reading-Open-Source-Perspective/...
"Code Reading" tends to be criticized, but I think mostly unfairly.
⬐ _osorin_Thanks a lot for the recommendation.
I started reading this book, but lost interest pretty quickly. Maybe you'll like it if you give it a shot: https://www.amazon.com/Code-Reading-Open-Source-Perspective/...Effective Java by Joshua Bloch has code snippets that are very well-written, as are the examples in The Go Programming Language by Donovan et. al. I read practically all the code in Effective Java, and a lot of the examples in The Go Programming Language (I keep dipping into this book every now and then as I have to learn some aspect of Go, which I use at work; I think I may actually sit down and read this book cover-to-cover and perhaps play with most of the examples).
If you know C, you may want to give the examples in The C Programming Language by Kernighan et. al a go. The examples are written in a bit of an archaic dialect but still very clear.
Another book of note that is funny and engaging (but of course not something that has professional value) is If Hemingway Wrote Code by Angus Croll: https://nostarch.com/hemingway. I think I have read all of the code in this book.
⬐ pamelafoxI like “Effective Python” similarly, though its more about micro codebase decisions than macro (architecture) decisions.
I just skimmed the article, but a more comprehensive text on acquiring the skill to read code is the book Code Reading, from Diomedis Spinelli [1].[1]: https://www.amazon.com/Code-Reading-Open-Source-Perspective/...
In the vein of working effectively with legacy code, "Reading Code" by Spinelli taught me a lot when I was a younger engineer https://www.amazon.com/Code-Reading-Open-Source-Perspective/...(Amazon says I bought it 14 years ago!)
You may want to look at the book 'Code Reading' ; it's been a while, and I gave away my copy, but it was usefulhttp://www.amazon.com/Code-Reading-Open-Source-Perspective/d...
Not a specific codebase, but I went through "Code Reading"[0] many years ago, I found it interesting. Most reviews are not very positive though, so maybe it was just at the right point for me.[0] http://www.amazon.com/Code-Reading-Open-Source-Perspective/d...
Hmm, tough question to google but: I was going to blog about but: didn't get around toit. Look at static code analysis and runtime tools (debuggers) there's SO tags for that, python+code-analysis.http://stackoverflow.com/questions/3883484/using-python-code...
Python has a very rich toolset, including inspect module,
http://stackoverflow.com/questions/1568544/given-a-python-cl...
http://code.activestate.com/recipes/213898-drawing-inheritan...
Also (this thread)[http://stackoverflow.com/questions/334009/how-to-read-source...] mentions ctags, doxygen, tools like that. Reading test suites (and running code coverage) is where a lot of people start with new to them codebases. And python specific emacs and vim plugins, and python-specific IDE's, komodo and pycharm, at the tools they provide for folding code, showing module dependencies/call graphs, stuff like that
---------
My python's a little rusty, but could generate stacktraces, or use an IDE's stepper/debugger to show where you are at some point in execution of django code
-----------
Finally [a book](http://www.amazon.com/Code-Reading-Open-Source-Perspective/d...)
Maybe try this book? http://www.amazon.com/Code-Reading-Open-Source-Perspective/d... I'm not sure how good it is.
You need this book, it's excellent: http://www.amazon.com/dp/0201799405 .
⬐ r11tThanks for sharing the link. The content of the book sounds useful to learn the art of reading code.⬐ GeneralMaximus+1 for this book. It starts with diving into simple UNIX tools (echo, wc) and then moves to more complex programs such as Apache. It does not tell you the way to read code, but it has several nifty techniques that any developer diving into a huge codebase might like to know.