Tom Lachecki

(Tomalak Geret'kal)

Tomalak's Tuesday Tip #13: When Is A Scoped Lock Not A Scoped Lock?

A piece of supposedly well-written multi-threaded code was giving me a headache the other day. I briefly explore a common(?) pitfall in the use of RAII-driven locking mechanisms.

Tomalak's Tuesday Tip #12: Data Resilience For Dummies

Like any half-assed amateur system administrator worth his Sainsbury's Basics table salt, I've been searching for a decent backup/restore solution for a while now. Then, just recently, I found it.

Tomalak's Tuesday Tip #11: Sleep Your Way To Success

Tempted to count the passage of CPU time with the clock() POSIX call? Be careful.

Tomalak's Tuesday Tip #10: How to Iterate-Erase Over Maps

Keeping it low-key this week, let's re-iterate (lol) the conventional map-erase idiom in C++.

Tomalak's Tuesday Tip #9: Befriending Your Parser

In an unprecedented feat of miraculousness, Freenode's ##C++ discussion channel saw — in the space of no more than twenty minutes — the same question asked twice of one of C++'s more subtle features. Just how do you declare a friend from the global namespace? I find out.

Tomalak's Tuesday Tip #8: Outsmarting Static Initialization

Right or wrong, it's still trendy in some C++ circles to use the singleton pattern for defining a type that can only be instantiated at most once in an execution run. However, this can cause problems when you bring more static data into the mix.

Tomalak's Tuesday Tip #7: Improving Windows 7

This week I explore how, after struggling with my Windows 7 grinding to a halt over the last few months, I finally managed to get it up to speed again.

Tomalak's Tuesday Tip #6: An Inclusion Pitfall

One of the evilnesses of the C++ Standard Library is that implementations — be they GCC's libstdc++ or the Dimkumware implementation used by MSVC — are free to have their headers include other standard headers as much as they like. This can lead to confusion.

Tomalak's Tuesday Tip #5: Synchronous Is Simply Superior

One of the most well-known "web 2.0" buzzwords is AJAX ("Asynchronous Javascript And XML") which, properly known as XMLHttpRequest is a mechanism to provoke the retrieval of data from a webserver at times other than the initial loading of a webpage. You see it when your Gmail inbox refreshes, or when you turn the page in a Facebook photo album. Unfortunately, AJAX is somewhat misunderstood.

Tomalak's Tuesday Tip #4: Conventional Thinking

I'm occasionally asked why C++ programmers conventionally use .cpp and .hpp files, what they use them for and what happens if they don't. On the spot I'll usually come out with the template answer that conventions exist for a reason, but I thought I might as well take a moment to explain more fully the reasoning behind this one.

Next Page »