The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Beautifully written C++ programs.

I was wondering, does anyone on JOS know of open source C++ programs that in their opinion are well (or even *beautifully*..) written? What programs in your opinion can a novice read to pick-up common language idioms and techniques for ensuring correctness and reliability? I know of the standard must-read books (Effective C++/STL, TC++PL, D&E, Code complete, Design patterns, Refactoring etc.), but I'm specifically interested in reading code.

Suggestions in other languages are also welcome!
Monday, February 13, 2006
You're way ahead of most C++ programmers with 10 years of experience: Reading Code is what advances your skills more than anything.

FLTK [ ] is beautifully designed and written. It's not "textbook clean", and it goes against many so-called "axioms of good design", such as "global variables should be avoided at all cost". It's a GUI toolkit that's easier to use than _any_ other I've tried, with little compromise on functionality and a huge advantage on speed. Download it, compile the demos, run them and _read_ them. After you get an idea of how simple a GUI toolkit could be, read the actual implementation.

Python is plain C, but is also a very good read. It has lots of #ifdefs, which are a little unpleasant, but apparently that's needed for the tens of platforms (including Nokia cellphones and IBM Mainframes) it supports.

GSL (Gnu Scientifitc Library) is plain C and _very_ educating, if math is your cup of tea. SQLite is plain C and is a very readable, functional DB engine.

It's hard to find readable C++ as these projects tend to evolve into monsters the first time someone who's obsessed with templates and metaprogramming touches the source; And there are way too many of those.
Ori Berger Send private email
Tuesday, February 14, 2006
I tracked down this out-of-print free-on-the-web book, just so that I can have my own copy.  I don't about what other think but it has a lot of interesting thing to say about C++.

You can also get their C++ Windows GUI framework  ( ), while it took me a week to get it set up properly.
Tuesday, February 14, 2006
The Relisoft stuff is Good Stuff(tm).
J Send private email
Thursday, February 16, 2006
For starters I honestly have to second the opinion of Ori Berger in full of his entire post.  Another source library that I believe considers honorable mention in relation to this thread is PTypes that, although documented well, has source implementation that is actually easier to grok when you use the library.  I would compare it to FLTK of useful functionality that is not included with Standard C++.
C Johnson Send private email
Thursday, February 16, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz