Things I'm still learning, 2010 edition

2010 has come and gone. I’ve shipped a few projects, each a number of times. I’ve registered dozens of domain names and dropped a few of the older ones. I’ve started (but not finished) a dozen spare time projects. I’ve had hundreds of new ideas, and a few of them were even interesting. I’ve learned a lot, but not enough (it’s never enough). I’ve expanded my horizons and gotten stuck in ruts. I’ve gained weight and I’ve lost weight. ...

December 11, 2010 · Bruce Alderson

HOWTO: Directory recursion in Boost (and other tips)

Boost’s Filesystem library is an incredible resource: it abstracts paths, directories, and stat results. It simplifies coding shell problems in C++, it’s portable, and is maintained by a large community of contributors. The one downside of Boost is that some of its newer libraries are poorly documented.1 Until I have time to get involved in the Boost project, I’m going to post examples here. Traversing a directory tree This is the coolest feature I’ve found in boost::filesystem so far. It treats directory elements like iterators, and has a convenience iterator that flattens the problem of iterating through a directory tree recursively. The only examples I found for it were in their extensive test sources, (See convenience tests and operations tests for more examples.) which are a bit light on comments. ...

April 23, 2008 · Bruce Alderson