3 ms·
On tip #1, how big does the chunk of other people's code need to be to teach you about the things he's talking about? I've really enjoyed reading algorithms bu
by xiaoma 14y ago
On tip #1, how big does the chunk of other people's code need to be to teach you about the things he's talking about? I've really enjoyed reading algorithms but struggled when looking at source code for large projects on github. I often feel lost and don't really know how to dig in.
Any suggestions?
- 3minus1 14y agoI feel the same. I always hear people say to read others code. Really? Like what?
- alinajaf 14y agoIt depends what you're interested in learning about. I'm a ruby/rails developer by trade so rails is a really good place to start for me. The open source libraries around it like devise, cancan, haml+sass etc are required reading if you're going to be using them regularly. I'm currently interested in C and lower level systems stuff and I've found redis to be a really readable codebase. It's not an introduction to C but provides a good example of how to manage a larger C project.
- dougk7 14y agoI first familiarise myself with what the project does and read the docs, especially if there's an overview of the architecture documented somewhere. Then clone the project locally and open it in an IDE like Eclipse that will allow you to quickly jump between modules and see the structure of the project. Starting from an entry point (e.g the main() function), work your way into the parts you're interested in. If there's any dependency you also want to look into, just clone it and open it as well. I also prefer reading through projects I use either as a dependency or as part of a system I'm building. For that the Apache foundation's projects is an excellent place to start. They have very good documentations and the forums are filled with discussions. e.g Apache Nutch (before the v2.0 release) - there are many talks and slides you can find on its architecture and the source code isn't hard to read. http://nutch.apache.org/ http://nutch.apache.org/ Twitter's github projects are also very good - especially when I started learning scala. One project that I read for fun, it was hard to go through but the exercise was worth it is Chromium. http://www.chromium.org/developers http://www.chromium.org/developers