Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this questionI have always wanted to participate in an Open Source project but once I got the source code, I don't know where to start.
Sinatra framework (Ruby-based) and Apache Maven 3 are in mind but I don't know where to start.
How usually starting reading/viewing open source code?
Thanks开发者_JS百科 for help and time.
As you start to read more source code, you'll get better at this; you'll find what works for you.
In the meantime, there are a few strategies:
- Pick a feature you like, and try to find the source that implements it
- Find the beginning point in the source and step through it, try to understand how it sets itself up
- Start poking around aimlessly until you find something that makes you curious (i.e. that's an interesting technique, why have they done that? etc)
One thing that helps me is to put myself in the author's shoes. Why did they do things this way? Was it good/bad? For me, reading source code is about learning new strategies for solving problems. I usually look at a project and think how I would have done it, then I see how they do it and compare.
Specifically for Sinatra, if it were me, I'd setup the most basic Sinatra web app, and then try to figure out how the "get" method sets up a listener. Trace it back to it's Rack roots (Rack is the webserver it uses). You might end up learning a little bit about Rack applications.
You don't have to understand everything you see, but like in the above example, you'll want to get some kind of bearing of what's going on. Then ask more questions and try to find the answers.
- Pick a project you like to use.
- Look up the bug tracker.
- See if you can find the code related to a bug that looks interesting.
You don't necessarily have to be out to fix the bug; just find out how the piece of the project involving the bug is done and what code makes it go. If you happen to spot the issue with the code, maybe you can fix it, and then you'll have stepped into being an actual contributor as well, in which case congratulations are in order. If not, you still start to get a feel for how the project is put together.
Hop on irc and talk to some of the devs for a given project and look at the bug tracking system for that project. Easiest way to get involved is to start fixing simple bugs that the main devs are too busy to fix and submit your patches. Good luck
精彩评论