May 2009 Archives

Threading with Boost - Part I: Creating Threads

| 13 Comments

Boost is an incredibly powerful collection of portable class libraries for C++. There are classes for such tasks as date/time manipulation, filesystem interfaces, networking, numerical programming, interprocess communication and much more.

The Boost documentation is substantial, but can still be daunting to new users. So this article is the first of a series on using Boost, starting with basic threading. It aims to provide an accessible introduction, with complete working examples.

Paying twice?

When you buy a car, you get a warranty, these days typically for 3 years on a decent model. Provided you keep up the fluid levels and do a bit of scheduled preventative maintenance, you're covered. So if the car fails, something breaks, or generally doesn't work the way it should, the supplier will fix it - for free. After all, you've paid for the car, you have a reasonable expectation of performance, safety and reliability. And ensuring that happens is good customer service and good business. So why isn't the same applied to computers and software? (This is an old rant I never quite finished, and decided to publish now just for fun - and see if it sparks any reaction.)

Use your brain!

| No Comments

When I was in high school, I got a new calculator - my first scientific calculator. It wasn't one of those fancy graphing calculators, nor was it programmable. But it did have lots of buttons and functions, and it was shiny. Excited by my new toy, I would use it for all sorts of things. I could evaluate complex equations in a flash! It was great! So, I started using it for everything, even for simple calculations that I used to "waste time" doing in my head. No more would I leave an answer in its boring 3π/2 form - I would evaluate it to 9 decimal places!