开发者_JS百科
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this questionWhat small open source projects in C are interesting for learning good design?
The project should be:
- Not too large (like the linux kernel)
- Well documented
- Perhaps still under active development
I've just started learning C, and while the language itself is not too difficult, i'm struggling how to design larger applications, so i thought checking out other open source projects would be a good starting point.
Thanks!
Redis (nosql db) is:
- under active development
- a manageable size
- portable and robust
- has no external dependancies
- very well written, understandable code
In my opinion, good examples of moderately sized projects written in C are:
- GNU Scientific Library (besides the source code, don't miss their design document)
- Kazlib
- Git
Posix threads are a perfect example of good C design
I like gnucash: http://www.gnucash.org/
No too large like Linux kernel, but still big I think.
You can start learning from small and well structured applications like http://abygaelle.guillaume-fr.net/trac/gemmes
It all depends what kind of projects you are interested in. And what aspect of it (specific algorithms, UI, networking, etc, etc...)
Head over to freshmeat, sourceforge or ohloh and browse the projects for your area of interest.
Alternatively if you want to look at projects that were chosen for a particular reason google summer of code might be interesting for you - even though these rarely include full projects.
EDIT: Also alternatively, you might take something like linux kernel, but instead of trying to understand everything try to
- get the big picture
- then concentrate on one tiny piece of it and inspect how the code changed over time (and for what reasons - it should be quite well documented)
精彩评论