We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered w开发者_运维技巧ith facts and citations.
Closed 6 years ago.
Improve this questionI have had a course on C++ and have done some minor projects on implementing data structures in C++. Can I find a not-so-difficult good open source C++ project that follows good programming styles. I want to have an understanding of a real project.
Search on Google Code Project Hosting or SourceForge, or even better still, do a search for C++ projects on Ohloh. Unfortunately you cannot do searches on code quality, but at least you can see a report on the projects page to find some with good quality metrics and relatively small codebases.
Some projects that I've come across with good code quality and in c++:
- Relatively small codebase:
- Code::Blocks
- InkScape
- Mona OS
- VLC
- Not that easy to get into:
- Blender
- Chromium
- SpiderMonkey
- Never really looked at but could be interesting:
- CodeLite
- eMule
- ScummVM
More importantly, just look around and see if a software you like and use often is developed in C++. You'll have a greater incentive to contribute and to see your changes in real-life and used by others.
You may also want to refer yourself to these other SO questions:
- C++ projects for beginners,
- Open-source project for C++ developer.
If you are looking for small but powerful project I recomend you DGLE - minimalistic, cross-platform, multi-render(OpenGL, DirectX) graphic engine with plugin based architectire wrtitten in modern C++. Unlike similar projects it only takes about 20-30 files. Also developers regularly updates sources to accomodate C++11/14/17...
I would recommend source code produced by fsf teams such as Ubuntu (for example), as far as i know they are quite strict on the source code provided.
Coding Style will be different from one project to other as usually they've set of guidelines and design principle for the project. I suggest you to go some sites, like codeproject.com and see the small open source projects out there. If you still need high quality code, I'd suggest you to go for some famous code like
- Filezilla
- Notepad++
- Google Chrome
- Mozilla Firefox.
You can see truly high quality code in http://sourceforge.net/ Go for popular apps.
But you've to notice one thing that, most of the people who works for open source project will surely write highly optimized code. It might be a bit difficult to understand that.
Though I suggested Firefox and Chrome, those are really huge to understand in single shot. I'd suggest you to read the articles from some good programming websites. At the same time, I'd suggest you to read following books - Code Complete 2 - Effective C++ - C++ FAQs
Dungeon Crawl Stone Soup has an excellent, large, Open Source code base with a large community of code contributors. Everything is well named and well factored into classes, methods and files. It even covers language translations. It has excellent instructions for how to contribute. And it's a great game!
If there's one flaw there is no API documentation, but quite honestly it is so well named and factored you can figure it all out quite easily.
精彩评论