4 ms·
> "There are so many projects on GitHub – pick one you like and see how they did it." But most successful projects are quite large; where do you start from? I'
by ainzzorl 5y ago
> "There are so many projects on GitHub – pick one you like and see how they did it." But most successful projects are quite large; where do you start from?
I'm working on a slightly similar project motivated by this problem: how do you learn from established open-source projects - most interesting ones are too big, too complex, to hard to get started with.
So I'm compiling a collection of interesting code examples from open-source projects and explaining/annotating them. I'm trying to pick examples that are:
- Taken from popular, established open-source projects.
- Somewhat self-contained. They can be understood with little knowledge of the surrounding context.
- Small-ish. The can be understood in one sitting.
- Non-trivial.
- Instructive. They solve somewhat general problems, similar to what some other coders on some other projects could be facing.
- Good code, at least in my opinion.
I'm planning to share it in a few weeks.
- moharoune 5y agoThat sounds great, would please notify me whenever it's up ? here's my email: mohammedi.haroun@gmail.com
- TheFreim 5y agoThis is very interesting to me. Do you have a blog or some other way of keeping track of this?
- ainzzorl 5y agoI started a repository for it: https://github.com/ainzzorl/goodcode https://github.com/ainzzorl/goodcode. Please follow! It's empty for now, but I included a few examples [1] of what I'm going to annotate and add there. [1] https://github.com/ainzzorl/goodcode#examples https://github.com/ainzzorl/goodcode#examples
- chestervonwinch 5y agoThis sounds related: http://aosabook.org/en/index.html http://aosabook.org/en/index.html
- genericlemon24 5y agoI cover The Architecture of Open Source Applications as well, here: https://death.andgravity.com/aosa https://death.andgravity.com/aosa :D
- ainzzorl 5y agoYou blog about interesting things, subscribed :-D
- genericlemon24 5y agoThank you!
- jimpudar 5y agoA project you may want to look into adding is Tern [0]. I've had a good time reading through the code over the past couple of weeks, and have found it to be at least not "bad" code, and pretty easy to understand. Specifically how they are untarring each container layer and creating a chroot jail to run commands inside is fairly self-contained and interesting. [0] https://github.com/tern-tools/tern https://github.com/tern-tools/tern
- mttpgn 5y ago> > where do you start from? My answer for this has been to scroll all the way through the git history of a repo structurally similar to something I want to do and read each of the first month-or-so of commits.
- andi999 5y agoWhy smallish? Small only teaches you tactics and not strategy. (in the sense architecture is most important for largish projects)
- cammikebrown 5y agoGotta start somewhere.
- ainzzorl 5y agoYes. I was thinking to start with smaller examples showing how they write code at <big project> without necessarily understanding the big picture, but bigger examples would be great too eventually. Something like http://aosabook.org/en/index.html http://aosabook.org/en/index.html already mentioned here.