Factories are a very useful pattern in object oriented programming. They however require including and indexing all these classes at one place, requiring modification when a new creatable subclass is added. This trick allows to avoid this annoyance.
It often happens that a program needs to run a lot of short functions periodically, with various periods. An easy way to do it is to create a thread for each that performs the function and sleeps the rest of the time. This approach, however, doesn’t scale well. Here is an efficient and relatively simple solution to the problem in C++.
How to use a single command to perform an action asynchronously
The ingenuity and wisdom of ancient nations has more surprises than we ever expected.
An ironic article how not to write code
A C++ library for saving objects into files usable with as little code as possible