Archive for the ‘Technology’ Category

The Google StreetView incident

October 27th, 2010 makii Comments off

As almost everybody knows by now, Google has recorded data from unprotected WIFI networks everywhere (Frankfurter Rundschau, Reuters). They wanted to record some stuff to get additional accuracy when determining the location of mobile devices in cities. This is pretty useful in large cities where only a few GPS satellites are visible to the device. They claim to have recorded some data by accident, due to a software error. This data includes emails, passwords and lots of other personal data. This is a bad thing, I suppose.

The press writes a lot about this topic, and especially here in germany this release quite a storm of outrage about the evil internet company which wants to know everything about us. Even the german minister of consumer protection, Ilse Aigner (german), got involved. She already has a colorful history with Mark Zuckerberg about privacy issues concerning where she threatened the world she will delete here profile there if nothing happens.

My opinion to all this stuff is: If you leave your network visible, or don’t use encryption, it’s your own fault! EVERYBODY could walk down the street with a laptop and record traffic of unencrypted networks. So why harass Google about it if people are simply too lazy to even care about their information? Sure, a scan for SSIDs in the vicinity should have been enough, but so what. Same goes for the insurgence about photographs of the houses for Street View itself. If you don’t want your house to be seen from the street, build a wall around it, or grow a hedge. I might come by with my 12 megapixel camera and take a photo. Hell, I might even put that photo on the internet!!

Categories: Technology, Web Tags: ,

How to make ice cream in 30 seconds – The geek way

August 9th, 2010 makii Comments off

Making ice cream is so easy, if you know how…

Just use a common stirring gear, add your ingredients, mix it and add a small portion of liquid nitrogen – Let the Nitrogen boil out and ready is the ice cream!

Categories: Cooking, Science, Technology Tags:

Howto implement MySQL’s OLD_PASSWORD() in Java

July 23rd, 2010 makii Comments off

Like most Software Engineers I don’t have the luxury to start with an greenfield strategy. Most times we know a good and viable solution to a problem, but cannot implement it due to restrictions which come with legacy systems and stuff out of our control.

Recently I had to migrate Newsletter subscribers to a newly created subscription system which uses an Oracle Database (I would have preferred PostgreSQL) rather than a MySQL, as the old system does.

Programmers are lazy, and as expected the developers of the old system used the OLD_PASSWORD(str) function from the database available to hash the password entered by the user. This is a very convenient way to protect the users’ login credentials, but rather bad when migrating to another system which has different or none implementations of this functionality. So what do we do? The options are:

  • Send every user a new password. Bad, we don’t want to harass them with our technical issues.
  • Force them to set a new password when they log in the next time. See above
  • Try to find a solution to validate the password against the old password hash.

As MySQL is widely used and a lot of data migration happens to and from, someone must have been run in this issue already, and most likely there is a solution to this problem in the net. And there is. I found a reimplementation of the OLD_PASSWORD() function in C# at (attention, german) and together with my coworker Maurice we ported it to Java, resulting in this piece of code:

public static String mysqlOldPassword(byte[] password) {
        int[] result = new int[2];
        int nr = 1345345333;
        int add = 7;
        int nr2 = 0x12345671;
        int tmp;

        int i;
        for (i = 0; i < password.length; i++) {
            if (password[i] == ' ' || password[i] == '\t')

            tmp = (int) password[i];
            nr ^= (((nr & 63) + add) * tmp) + (nr << 8);
            nr2 += (nr2 << 8) ^ nr;
            add += tmp;

        result[0] = nr & ((1 << 31) - 1);
        int val = ((1 << 31) - 1);
        result[1] = nr2 & val;
        String hash = String.format("%08x%08x",result[0],result[1]);
        return hash.toLowerCase();

I give no guarantee this will work in all cases. My IDE complains all over the place about possible integer overflows. The usage of Integer.toHexString()did not work either, as the resulting String is not padded up with zeroes.

Finally, some Unit Tests for the interested user:

    public void testOldPassword() throws Exception {
        final String expected = "0414ac6137ee1adc";
        byte[] bytes = "fooo".getBytes("UTF8");
        String foo = mysqlOldPassword(bytes);
        assertEquals(expected, foo);

    public void testOldPassword2() throws Exception {
        final String expected = "3fa0dce62ba931b5";
        byte[] bytes = "hastewas".getBytes("UTF8");
        String foo = mysqlOldPassword(bytes);
        assertEquals(expected, foo);

Have fun with it!

Categories: Java, Technology, Web Tags: , , , ,

Java – The Movie

June 27th, 2010 makii Comments off

For all you out there who code java like me :-)

And everyone else…

via @pommesbude

Update:Youtube seemingly has killed the video, but the original version is still available here.

Update to the Snow Leopard

June 6th, 2010 makii Comments off

After a long time and struggle I finally decided to update to the snow leopard. Remembering each and every update on my former windows systems, as well as the dist-upgrade on a deb-based system, I was really astonished how smooth the update went by. Sure, concerning the Apple software, everything works as expected, no problems there. But a lot of third-party software simply stops working, which also was to be expected. This is, I think, the big advantage of a Linux system: usually all the software in the repository, which mostly is all you need, is available in a working version, so it just continues to work. Here the minor and major problems I had to struggle with.


As it seems, GPGMail, a plugin which integrates a local installation of GnuPG to Apples Mail, seems to use a lot of internal API which of course is not supported officially and subject to frequent change, stopped working. The GPGMail maintainer seems to have no time to update it to the new API, but fortunately Lukas Pitschl stepped up to update it. Up to now now official release of GPGMail was rolled out, but reasonable stable versions are offered by Lukas via hist Dropbox or Github. The latest 1.2.3-v61 works for me so far. Thanks!


Having a history with Gentoo Linux I simply love the ports system, so I chose Macports over Fink to add additional Unix/Linux software to my Mac.

After upgrading Macports does will simply stopp to work with a somewhat strange Tcl error message, at least this was the case with me. Thus a sudo port selfupdate failed as well. So I downloaded the Snow Leopard version and installed it to get a working port command again. Even after this some port commands will fails, mostly due to architecture constraints of the older 32bit parts on Leopard vs. the new Snow Leopard 64bit.

After upgrading to the new Macports for Snow Leopard, the Migration page in the Macports wiki describes how to upgrade your installed ports to a new system. As I don’t need all installed ports any more I took the manual approach described, by simply removing all ports and re-building the parts I still need on my system. It needs some effort to upgrade, but with the view ports I use took just a few minutes to select the ports I need and a few hours of building while the system is still usable for other things.

iStat Menu

I like these little nerdy monitor items in the menu bar which tell me how much RAM I use, how the system load is or how much traffic is on the network. On Leopard I used the iStat menus in version 1.3, but these don’t work on Snow Leopard. iStat Menus version 3 comes as a trial version and will stop working after some time, so this is unfortunately no permanent solution. A friend of mine got a beta release of version 2 in preparation for the Snow leopard release which works well as long as you disable the update mechanism, but I couldn’t find the download link to this package.

So I started looking for alternatives to this proprietary software and found MenuMeters by Raging Menace which is GPL software. It does not look as nice the iStat menus look, and does not offer monitors for the temperature sensors, but basic Network/HD IO, CPU and memory usage are covered, which will suffice for me for now.

So much for now on this topic, let’s see if this was it all…

Categories: Mac, Technology Tags: , ,

The iPad – OMFG!!! The iPad!!!

May 1st, 2010 makii Comments off

Ok, jeder schreibt und bloggt über dieses komische iPad, das irgendwie alles können soll, oder auch irgendwie nicht. Und jetzt bietet sich mir die verführerische Gelegenheit dieses Ding mal auszuprobieren. Dann kann man ja auch Mal ein paar Absätze drüber schreiben, oder? Also dann:

Als aller erstes fällt mir auf dass der Safari auf dem iPad es nicht hinbekommt den WYSIWYG-Editor von meinem Blog hier richtig darzustellen. Das ist natürlich ziemlich doof wenn man bloggen will, und man nicht einmal den Fokus auf das Eingabefeld setzen kann… Und die Eingabe im Code-Modus ist genau so schlimm, denn man muss zwischen drei Modi der On-Screen-Tastatur hin- und herspringen um nur ein blödes Paragraph-Element zu öffnen oder zu schließen. Ebenso komisch ist es Umlaute zu tippen: hierzu muss man einfach länger auf dem a bleiben, um ein ä (oder andere Abwandlungen davon) zu bekommen. Für iPhone User ist das natürlich Usus und perfekt, die waren noch nie was anderes gewohnt. Fazit: Die Tastatur ist soweit nicht schlecht, aber effizient mit 10 Fingern erfordert Übung. Zumindest mehr als man an einem Abend rumspielen schafft. Auch wenn die Tastatur auf dem Bildschirm in etwa so breit wie die eines Laptops ist, der Winkel ist meiner Meinung alles andere als bequem und ich kann mir nur mit viel Fantasie vorstellen mit dem Gerät auf dem Schoß lange Emails zu tipppen.

So, nach zwei Absätzen der Pein bin ich jetzt wieder auf die gewohnte Tastatur meines Laptops umgestiegen. Nach den zwei Absätzen auf dem iPad hat sich doch eine gewissen Routine eingestellt. Ich konnte schon halbwegs blind tippen und sogar Umlaute gingen relativ intuitiv. Ebenso das Positionieren des Cursors im Text, wenn man sich vertippt hatte, sowie Copy & Paste. Auch wenn das alles schön und gut ist, und mit längerer Verwendung die Eingabe noch flüssiger geht: die fehlenden Umlaute auf der Tastatur (was natürlich dem Format geschuldet ist) stören den Fluss bei der Eingabe doch erheblich, und der ständige Modi-Wechsel für Ziffern oder Sonderzeichen ebenso. Soviel mal zur Texteingabe.

Mit dem mitgelieferten Safari hatte ich auch meinen Spaß. Wie weiter oben schon erwähnt weigert er sich den WordPress-WYSIWYG Editor benutzbar darzustellen. Selbiges sind mir mit einigen weiteren AJAX-Webseiten aufgefallen. So war es mir unmöglich den Google Reader zu steuern, sowohl in der Mobil- als auch in der Full-Fledged Variante. Auch wenn es solche Anwendungen sicher gute Programme für das iPad gibt sollte ein Browser doch zumindest reine HTML5+AJAX Funktionalitäten unterstützen, was Apple ja in seiner öffentlichen Diskussion mit Adobe bezüglich der Unterstützung von Flash auf Apples mobilem Betriebssystem ja als unterstützenswerte Standards angibt. Apple mutiert was sowas angeht tatsächlich zu einem kleinen Goliath.

Die restlichen Navigation ist Apple-typisch absolut intuitiv. Des öfteren habe ich mich über kurze Auswahl-Seiten wie z.B. im iTunes Laden gewundert, um dann festzustellen dass man da auch nach unten scrollen kann. Der Scrollbar (oder eine “Positionsanzeige”) wird beim Scrollen (und nur dann!) über dem Inhalt dargestellt. Diese Darstellung kenne ich auch von meinem N900, jedoch wird dort beim Laden der Seite im Browser der Balken immer eingeblendet, wird dann ausgeblendet, aber beim Scrollen auch wieder Sichtbar. Gut, das ist nicht wirklich wichtig, ich bin dieser Unzulänglichkeit aber auf den Leim gegangen.

What the iPad really is!

So, mal von der Eingabe weg zur Hardware. Unabhängig davon ist das ganze schon ein sehr beeindruckendes Gerät. Absolut sexy Format. Es fühlt sich, ohne jetzt in den Apple-Fanboy-Talk verfallen zu wollen, einfach alles Richtig an. Auch wenn es prinzipiell nur vier aneinander-geklebte iPhones sind…

Mein Fazit ist demnach: Alles in allem ist das iPad ein typisches Apple Gerät: Hard- und Software sind qualitativ hochwertig, es fühlt sich gut an und erfüllt seinen Zweck. Wie die meisten anderen Apple-Produkte unterliegt das Gerät und die Software natürlich den Apple-Typischen Restriktionen: Nur Software aus dem App-Store von Apple, den Dock-Connector als einzige, proprietäre Schnittstelle. Hiermit haben sich die Apple-Fan-Boys/-Girls ja schon abgefunden. Das heisst: Wenn man ein kleines Surf-Brett für den Balkon oder das Bett, oder ein kleines Gerät für die tägliche Arbeiten wie Mails checken oder kleinere Dokumente schreiben haben will, und natürlich zum Zocken, kann sich die Anschaffung ernsthaft überlegen. Ich bin noch unentschlossen ob ich sowas brauche.

Categories: Mac, Technology, Web Tags: , , ,

Browser Compatibility Fail

September 12th, 2009 makii Comments off

I’m known to be a big fan of Though I’m no subscriber I found a lot of new bands I did not know before.

The more interested I was when I found out about, a new and somewhat similar service comming from germany. They, integrated a nice player bar at the bottom of their page, and over all it’s a pretty funky page. Not, as tidy as, but it will work.

The most interesting part of this all is: They didn’t want to let me on their page. I think I use a pretty recent browser for my day-to-day portion of web surfing, but not as new as they want me to:

Steereo JS Browser compatibility check.

As it seems, they just support recent versions IE + FF, but no Safari. I thought we’ve passed this to implement major browser-dependend tweaks in our pages. As it seems I was wrong.

Copyright 2.0

July 8th, 2009 makii Comments off

Everyone knows about the recent conviction of the Piratebay-crew. Even if we have to see whether, or how long, it will last. (You know, the probably biased judge…)

At least this trial might make some of us think about copyright and such things. There is a hudge discrepancy between what the crowd does and what the IP organizations want us to do. Once more I think Lawrence Lessig brings it to the point best:

In the analog times you had to buy book, a newspaper or a disk to gain access to the story or the song. So, making copies of books or songs was actually hard work back then. Nowadays, creating copies of digital content is easy peasy. In fact, everytime you view a digital content from the web, you actually get a copy.

Bug they will never understand…

Via Techdirt.

Categories: Technology, Web, video Tags: , , ,

Flying MacBook

June 25th, 2009 makii Comments off

I hope mine does not fly away like this one day…

Categories: Mac, Sci-Fi, funny, video Tags: , , ,


June 9th, 2009 makii Comments off

Recently I found the pretty cool package logstalgia on Debian Times. It is a nice way to visualize access logs of your favorite http daemon as a pong game, every bullet being a single request, listed by client. You can also get into pause mode and view details to the single requests. But see for yourself:

Awesome, somehow. Isn’t it?

Now, Facebook went one step further by displaying all activities in the facebook network on a globe, distinguishing events by colors, and stuff. The project is named Palantir, like the crystal ball from LOTR which Saruman used as means of communication with Sauron. See the demo video. Most astonishing: Palantir is implemented using JavaME!

This all looks pretty neat. Facebook users mentioned that Google has something similar to visualize searches for years, and even my old employer CortalConsors visualized all trades with volume and location in the lobby for about 2-3 years! But still, the Facebook Palantir awesome!

Categories: Linux, Web, video Tags: