Add Some Entropy to Your JVM

Being able to generate true random numbers depends on the entropy in your system. Some claim, that this can be guaranteed by fair dice roll. Others think that replacing the OpenJDK's java.math.Random.nextInt() method with this body will help: public int nextInt() { return 14; } Source: http://www.redcode.nl/blog/2013/10/openjdk-and-xkcd-random-number/. But that's absurd. We all know that the best … Continue reading Add Some Entropy to Your JVM

Funky String Function Simulation in SQLite

SQLite is so light, it doesn't have any useful string functions. It doesn't have ASCII(), LPAD(), RPAD(), REPEAT(), POSITION(), you name it. It does, however, have a wonderful RANDOMBLOB() function. So if you really need a good random number generator, use a SQLite database and generate a 1GB blob. That should give you a couple … Continue reading Funky String Function Simulation in SQLite