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.
In the era of music services, it’s surprisingly difficult to find a good traditional music player for iOS. While there are many options, most were designed with only one use case in mind.
Drop Dead is yet another zombie shooter with a plot that doesn’t even try to take itself seriously. Its main focus is the gameplay that is great with two hands and 6DoF and doesn’t become boring.
There’s been a lot of Space Invaders clones, but this is the first one in the style of VR shooters. It follows the style of old games that had to be replayed over and over until the player became skilled enough to complete it. Space Pirate Trainer does this very well.
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
Storing data in a non-human-readable binary format can be useful, because it takes much less space and parsing is easier and faster. It feels much more practical to access such a file like a vector rather than a file stream.
The ingenuity and wisdom of ancient nations has more surprises than we ever expected.
Many news sites have come up with articles with big titles about the wonderful Russian time machine. The contents tend to be more accurate, telling what their device actually could do – reversing the state of a quantum system a very short period of time back in the time axis, but who cares about the contents, titles are what people read.
An ironic article how not to write code