InsaneProgramming

Ramblings of a Java developer and OSS fanatic

On Polyphasic Sleeping

Some time ago, I tried a new way of sleeping. It’s called polyphasic sleeping and basically consists of trading core sleep for intermediate naps. The big advantage is that you need overall less sleep than you would need if you’d take a single main period of sleep (called a core sleep). A normal person on average needs about 8 hours of core sleep a day when using a monophasic rhythm. There are 3 main variants of polyphasic sleeping: the siesta, the everyman and the uberman. Every variant is more extreme.

On IT and Elections

Yesterday we had another big election day in Belgium. We had to vote for 3 levels of government (regional, federal and European). When it comes to voting, we’re still a bit old-fashioned. A lot of voting bureaus still work with (huge sheets of) paper and a red pencil. However, electronic voting is also present in more and more cities throughout the country for more than 10 years now I think.

You would think that they would have streamlined the system by now. Clearly, they didn’t.

SQL, NoSQL, I Don’t Care. It’s About Events!

The NoSQL/SQL debate has entered a new chapter, as articles seem to be popping up all over the place where NoSQL is being talking down in favor of a renewed trust in SQL (or more correctly ACID compliant) system. For example, Google is looking to its F1 database in favor of standard NoSQL solutions.

But is this discussion actually important? Sure, it’s data, but that’s all it is. Frankly, I don’t care whether data is stored in a SQL or NoSQL database. It could be stored on punch cards for all I matter, just as long as the system is reactive.

Two-factor Security With TOTP

As a follow-up on my last article I looked into how easy it would be to incorporate Google Authenticator into your application. As it turns out, it’s dead simple.

Google Authenticator adheres to the HOTP standard, which is an actual standard described in RFC 6238. The algoritms uses he HMAC SHA1 algorithm to calculate a 6 digit code for a secret in combination with a time interval (the time interval replaces the counter from the standard HOTP algorith). Java has out-of-the-box support for HMAC SHA1 in it’s cryptography algorithms (HmacSHA1), so implementing this is extremely easy.

The examples use Groovy, but all major languages and frameworks like PHP, Ruby or Node.JS support the HMAC SHA1 hashing algorithm.

Passwords Are Evil

Recently one of my good friends @Ayame__ pointed me to a article on Medium. In short, it’s about what developers should stop doing when creating application for the internet.What I wanted to discuss is the second item on the list: asking people to create complex passwords.