HNBK.plan – a substitute schedule app for the Heinz-Nixdorf-Berufskolleg

May I introduce to you? HNBK.plan – a substitute schedule app for the HNBK (Heinz-Nixdorf-Berufskolleg) in Essen, NRW. Since the online representation of the plan unfortunately is very awkward to reach and the operation via smartphone resembles a true odyssey, I thought it was time for an app. So I took time to learn the Android app development basics. To put it in a nutshell – I created my first native Android app, which can be downloaded by you from now on.
Screenshots and handling
hnbk.plan-1.0.7_screenshot (1)  hnbk.plan-1.0.7_screenshot (2)  hnbk.plan-1.0.7_screenshot (3)  hnbk.plan-1.0.7_screenshot (4)
(Click on the screenshots to maximize them)

After the initial start you have to select the class whose representation plan you want to […]

How to use gzip on WordPress

gzipSo far I never worried about the page load speed of this blog. But so far I even thought WordPress would use gzip compression on it’s own. Like I said, so far. Today I realized that WordPress is not just doing exactly that.
For those who are lost in gzip, I’ll give a short explanation at first. Gzip is a compression method in order to minimize the size of a file. Today it is mostly used on Unix systems. In the website context, it is used to reduce the size of data which is transferred from the server to the user’s web browser. This not only reduces the traffic and, by implication, the overheads too, but also it brings a reduction of the […]

C# Random.Next(int, int) – how to define the bounds correctly

The devil is in the detail. Recently I wanted to create random numbers between 0 and 1 in C#. The Visual Studio tells us that we have to use Random.Next (int, int) method, whereby the first integer defines the lower limit and the second integer defines the upper limit. No more and no less. So based on Visual Studio’s description the following function should work:

Random rnd = new Random();
int random = rnd.Next(0,1);

Wrong! So you’ll get only one thing – in fact zeros. So I had to dip into the MSDN library to find a solution. There is explained, on the contrary to IntelliSense from Visual Studio, that the lower bound is inclusive and the upper bound is exclusive.

Parameters

minValue
Type: System.Int32
The inclusive lower bound of the random number returned.

maxValue
Type: System.Int32
The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.

In plain language this means, to […]

PHP: rand() vs. mt_rand() – what is more accurate, what is faster?

After I was pointed out, that it would be better to use the PHP function mt_rand() instead of rand() for generating random numbers (because mt_rand() should be more accurate), I decided to investigate on that statement. But at first, where is the difference between rand() and mt_rand()?
By use of mt_rand() you can generate random numbers just like with the rand() function. The function call also looks equal on both functions. Though the PHP documentation says mt_rand() is up to 4-times faster and would be create more random/arbitrary numbers. By implication this would mean, that the rand() function creates inaccurate random numbers.
I was not aware of this problem, but after some googleing I discovered that there are a lot of people who think that mt_rand() is the better function. However I had to notice that most of the contributions which complain that rand() is not clean are a “little older”.
Often cited […]

How to build a low cost Bluetooth relay

Bluetooth iconMeanwhile there are lots of solutions for home automation in the market. However the most of them share one flaw – their price. But blessedly there is Youtube where you can find a video for each topic…
On Youtube I came across a clever tinkerer named Lou, who shows how you can build a low cost Bluetooth relay. I think this is really cool, because there are a many application areas. You could open your garage door, switch lights on and off or unlock an electric lock. To build up one of these Bluetooth relays you must not even be a technical genius, because the use of a soldering iron is sufficient. Knowledge in programming or microcontroller-technology isn’t necessary.
For the Bluetooth relay you need only one transistor and a Bluetooth […]