Beyond the C++ Standard Library: An Introduction to Boost

I just finished reading Beyond the C++ Standard Library: An Introduction to Boost. A really interesting read. Some of the more interesting things that I picked up:

  • boost::shared_ptr – like auto_ptr on steroids, a very nice reference-counted smart pointer. Not only can it clean up memory allocated with new, but you can pass in a custom deleter and thus use it to clean up anything, such as close a file or database connection, etc. The book also covers shared_array, intrusive_ptr, weak_ptr, scoped_ptr, and scoped_array
  • boost::numeric_cast can warn you when you’re casting a number to a smaller number type that will truncate.
  • boost::lexical_cast can convert back and forth between strings and numbers, thereby accomplishing in one concise line, conversions that I normally do with a few lines of stringstream code.
  • boost::regex can do all kinds of interesting things with regular expressions.
  • boost::any is an interesting variant type that allows storing several types of values, but is type-safe in the sense that it makes the caller specify the correct type in order to gain access.
  • boost::tuple is a logical extension of std::pair and allows a nice way to get multiple return values from a function:
    boost::tuple gcd_lcm(int val1, int val2);
    ...
    boost::tie(gcd, lcm) = gcd_lcm(15, 20);
    
  • boost::signal is an interesting “signals and slots” (or “publish and subscribe” or callbacks) implementation.

Just finished “Software Development for Small Teams: A RUP-Centric Approach”

I just finished this book a couple of nights ago.

It’s a unique book. Whereas most technical books tell you the nuts and bolts of how to use a particular language, library, etc., this book is the story of how a group of folks got together to do a software project in their spare time and what their experiences were. Their project was to develop a Java-based tool that helps programmers do the bookkeeping required for Personal Software Process (PSP), the software development process created by Watts Humphrey of Carnegie Mellon’s Software Engineering Institute (same guy and group who came up with the Capability Maturity Model (CMM)) .

Each of the team members had a full-time job so this was something they were doing part-time out of their own interest and presumably, because they deemed it would make an interesting story for a book. They knew each other in the past, mostly from working together at Rational, although one guy left the company during the course of the project, so they had to make adjustments in the way that they communicated and interacted.

Being that I’m not a software development process geek (i.e.: I’m into the more practical, nuts and bolts of software development rather than processes like PSP, RUP, XP, Scrum, etc…), a lot of this was a bit dry for me, because a lot of this is about “phases” and “artifacts” like UML diagrams. Also, the toolset that they were using was very different from what I work with on a daily basis (my job is all about UNIX but these guys were using Java on Windows with a few Rational tools like Rational XDE and Rational RequisitePro. They also used a collaborative application called Groove, which sounded somewhat interesting, but it’s Windows-only). But there was enough interesting little tidbits in there that I didn’t give up and I managed to finish the book.

All in all, not a super useful book to me, but if you’re interested in processes like RUP and PSP, then you may really enjoy this.

Amazon deals

OK, let’s see what happens if try being blatantly commercial 🙂

Amazon just sent me an email with their latest deals. I picked out the ones that might be of interest to peoplo who read my blog:

Got my BoxWave gear for my Treo

Just received a bunch of great accessories from BoxWave and I am happy with all of them:

  • ClearTouch screen protectors – I love these things – they are SO much better than the crappy screen protectors that you can buy at Office Depot and the like. The ClearTouch do not have an adhesive, so you can you can take them off and reapply them if necessary. They don’t seem to trap air bubbles and they are very clear and don’t make the screen look grainy or dim – you don’t notice them at all. You can even take them off and wash them and dry them and reapply them. Awesome. I can protect my substantial investment without feeling like I made a compromise on aesthetics.
  • miniSync – an ingenious, little retractable cable that can charge and sync your PDA from a USB port at the same time! At $18.95, this is a much better deal than the accessories PalmOne will sell you. If you pair this with a VersaCharger, then you have a portable solution for charging from an AC outlet, car cigarette lighter socket, and airplane outlet. Cheaper and more portable than the combination of accessories that you would have to buy to have all of this flexibility. There’s also a battery adapter available, although I don’t own one of these.
  • Two Styra ballpoint pen stylii – Stylus, pen, and reset tool in one. I figure it’s nice to have a pen for quickly jotting things down on an index card (faster than entering into a PDA), signing sign-up sheets, etc.

BoxWave also sells cases, ear buds with retractable cables, and other things that appeal to geeks, but I haven’t tried any of these other things.

Disclaimer: I am a member of BoxWave’s affiliate program, but I also own several of their products (for both my Tungsten T2 and my Treo 650).

My mouse has a LASER

I recently picked up a Logitech MX-1000 wireless laser mouse and I am impressed with it:

Logitech MX1000 Laser Cordless Mouse (931175-0403)

I’m using this at work and it’s fantastic. Not having a wire is great because it doesn’t catch on the little ridge in my keyboard tray. And my one big concern about it going in, battery life, is no longer a concern. Even when I forgot to put the mouse in its dock one night, I still got a full day’s use of it the next day.

The only minor snafu was that when I installed Logitech’s software, my back and forward buttons weren’t working in Firefox, but after a quick search on the Web I discovered how to go into the Logitech control panel and unmap those buttons (mapping to Alt-Left and Alt-Right works too) so that Firefox sees regular old mouse events that it knows how to deal with.