The Hardest Thing in Programming redux
A while back, on my old Wordpress blog, I wrote a post entitled "The Hardest Thing In Programming." http://blog.adambard.com/2008/09/17/the-hardest-thing-in-programming/
The synopsis of the post was that for whatever you're trying to do, there's probably a library out there that's already done it.
I just spent the morning implementing a ring-buffer-based asynchronous read/write routine using CVI's LabWindows, only to discover a little utility called the "Thread-safe Queue" that replaced about 200 lines of code with 3, and works waaaaay better than what I wrote.
I forget what inspired that old post, but I hope I learned something this time around.