Thursday, December 31, 2015

What happened 2015?

So, as you noticed, I did not really blog a lot this year, i.e. 2015.
Let me quickly recap what I was busy with in the last couple of month (lame excuse, I know).

In summer I changed job from Oracle to vmware. Still handling the channel/partner business, but now no longer for (boring) hardware, but for - to me - exiting software. The concept of the software defined datacenter - or SDDC for short - is something I really like. Virtualize everything. Move from on-premise to cloud(s) seamlessly... pretty cool I think.

Enough of the professional plug.
I still found time for some nice hacks at home.

I've been recording my electricity and gas consumption at home for years, nay, decades now. What started with a plain ascii file in the early 90s, turned in to a DB2 application on OS/2 (with visual REXX) , and then to a very rudimentary web application (against the same DB2 database) under Windows XP and 7. Over the years I slightly modified the web application to also be mobile friendly, so I could take my phone (Nexus 5 right now) or iPad and enter the data while I was reading the meter.
Did I mention that I'm a nerd and do this weekly? No?
Well perhaps I should.
Not very interesting from a hack perspective, is it?

So this year I decided to change this, and I

  1. created an Android app for it
  2. added the anyline meter reading to it (because I did not want to get into the OCR stuff myself)
  3. created a REST interface to my database (building upon the old web application I had), using Jersey.
Two really impressive things here. Anyline... check it out. Excellent meter reading SDK (and other OCR stuff) on iOS and Android. 
And Jersey, wow!! REST with the click of a button, yet you are still in full control. And also getting JSON and XML with the same code. Nice.

Now for step 4 I'll re-write the old web-app to a pure Ajax/jQuery/JSON thing, and will only keep the REST interface to the database.

And step 5, already started: I bought some NFC tags (from whiztags, thanks for the hint, Max). One will go to the gas meter, the other one to the electricity meter, and both are registered to my app on Android. So when I go near the meter, it will automatically open the app with the OCR scanner for the respective meter. Click, and done.

So that's the last half year - or so - in a nutshell.

Sunday, November 22, 2015

NetBeans and DB2 again

So for various reasons (mainly the 64bit v 32bit problem with the native driver) I changed my DB2 JDBC driver to type 4, i.e. the Universal driver.
However, when I connect from NetBeans with an URL like jdbc:db2://localhost:50000/sample the schema would stay empty.
Nothing. Zip. Zilch. Zero.
Quite some googling and debugging - mainly with a little java program like this:

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

public class MainDB2 {
    private static final String URL = "jdbc:db2://localhost:50000/SAMPLE";
    private static final String USER = "roman";
    private static final String PASSWORD = "pwd";
    private static final String SCHEMA = "roman";
  public static void main(String[] args) throws Exception {
        Connection conn = DriverManager.getConnection(URL, USER, PASSWORD);
        try {
            DatabaseMetaData dmd = conn.getMetaData();
            ResultSet rs = dmd.getTables(null, SCHEMA, "%", new String[] { "TABLE" });
            try {
                while ( {
                    int count = rs.getMetaData().getColumnCount();
                    System.out.println("Column count: " + count);
                    int i;
                    for (i = 1; i <= count; i++) {
                        try {
                        } catch (SQLException e) {
                            System.err.println("Exception reading column " + i);
            } finally {
        } finally {

I was able to trace it back to an SQLCODE -443SQL0443N with diagnostic text "SYSIBM:CLI:-805". SQLSTATE=38553. Google this and you will get to here and learn that - again - a package was not bound, this time the db2schema.bnd file. Bind it as suggested in the article with the usual db2 bind db2schema.bnd blocking all grant public

and voila, NetBeans will find the schema.

Gets me every second year, it seams.

Friday, September 25, 2015

The iOS9 Podcast app is totally broken

Usually I hate and hence avoid to slam an app or service like this, but the podcast player in iOS9 really sucks. At least for video on an iPad.

No full screen video anymore, too much white space, and even with all that unused space, the controls are too small

Exhibit A:

Please Apple, we need an urgent update to fix/revert this.

Sunday, September 13, 2015

How to hide a userid from Windows login screen

With DB2 on my home PC[1] I have a service account for the DB2 instance, makes life a lot easier than trying to map it to you actual user(s).

However, regular Windows (Home) setup has 2 defaults that are annoying:
a. password and account expiry for this user.
b. the userid appears on the Windows login/lock screen, although nobody is supposed to sign in with it.

Create a maintenance free user
The first issue I fixed a couple of month ago, because that was really annoying. Because DB2 just would not start. And the first two times this happened I had to work through db2diag.log to find out what happened.
So, make sure the account actually never expires (that's separate from the password). With admin privileges run
  net user db2admin [2]
to check if the user account expires.
If it does, then run a
  net user db2admin /expires:never
to fix this.

The password expiration is trickier, since it cannot be done with the net user command.
To make the password everlasting, run
  WMIC USERACCOUNT WHERE "Name='db2admin'" SET PasswordExpires=FALSE

I found this thanks to the folks at StackExchange.

Hide the service account from the login screen
I wanted to do this on Windows 7 already, but never found the time or cared enough. Now with the move to Window 10 I thought of it again and fixed it.
So this can be done with group policies and stuff, but not on a standalone Windows Home edition.

Registry and Microsoft Technet to the rescue:

Create an entry under
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList and list the db2admin user with a dword (32) of 0 to hide it. Remove the entry or set it to 1 to show the user again.


[1] Ha, now that I no longer work for Oracle, I can again freely admit it... Not that I really held back on this in the past 5 years.
[2] replace db2admin with the userid you need this for

Saturday, September 12, 2015

Windows 10 installed

While I finally made it to a Mac (MacBook Air 13) at work, I gave in and let Microsoft install Windows 10 over my Windows 7 on my home PC.

It went surprisingly smooth and without any problems.
Except that my Tomcat did successfully start under Window 10, because for some weird reasons Redmond decided to install and activate the Internet Information Services (which I previously did not have), and those blocked port 80 of course.
Simple de-install of those features, reboot and everything was running fine again. All apps and services I had running (or those I could think of within 30minutes) are running fine again.
Amazingly even my DB2 instance did not create any problems at all.

Now I only have to get used to the new UI, but even that seems easier than I thought.... well, as long as I have the keyboard.

Sunday, August 23, 2015

WiFi + Train + Google Location = weird

For some while now, the Austrian Railways (OeBB) offer free Wifi at least on their premium trains ("railjet"). The trains are good and fast, the Wifi (most of the time, at least in Austria) is good, but it confuses the heck out of the Google/Android location services.
The trains operate all the routes from Zürich to Vienna, from Munich to Budapest, from Graz to Prague, etc etc.

And it seems that Google (and Apple as well) associate various geo coordinates to those access points, On my route from Vienna to Salzburg, both my iPad and my Nexus 5 "re-located" me to Graz, Linz and Prague, while I actually was just around Salzburg.

(For the convenience of readers outside Central Europe I include the map as a reference for the screw-up)

There must be some way to report those access points to Google so they exclude them from location services. The concept of mobile hotspots/access points should be too common.

Any idea anyone where I can report this ?

Thursday, July 23, 2015

Vertical Video - revisited

Can I just say TOLD YA.
Here to be precise.

YouTube for Android will play vertical videos in full screen

As much as we all might want to stop people from recording vertical videos, the Periscopes and Snapchats of this world have made these clips so prevalent that, sadly, they're just not going to go away. Giving in to the inevitable, YouTube's Android App is getting the ability to play vertical videos in full screen, ...

Wednesday, July 22, 2015

Publishing in the 21st Century

I always found that one of the core features or tasks of a publisher it to spend money made with best-selling artists on the newcomers. This applies both to publishers of music (a.k.a. labels) and literature.
Call it a cross-subsidy (and yell fire if you are too neo-liberal for this).

Over the last decades it appears that this is no longer the case.  
It seems that corporate financial controlling measures are being applied to each author or book of its own (or artist/album), and if it can not turn a profit, it will not be published. Profits from say Harry Potter [1] stay with the Harry Potter team and division and are not invested to find the next promising author.
That's because everyone hates cross-subsidies. Even within one company.

I especially find this is the case in music:
Take the recent rant of Taylor Swift against Apple. She complained (whether rightfully or not) about the fact Apple will not pay the artists during the 3 months trial period, because they, Apple, themselves don't receive any money.[2] Let's for a second ignore whether this is fair or not, let's turn to a separate aspect:

Taylor Swift claimed in her open letter to Apple that she's is not complaining for herself (as she gets enough money) but for the young / indie artists:
This is not about me. Thankfully I am on my fifth album and can support myself, my band, crew, and entire management team by playing live shows. This is about the new artist or band that has just released their first single and will not be paid for its success. ...
So is she asking Apple to take on the role of a publisher? She is asking them to help (i.e. finance) the young artists. Shouldn't the labels be doing this with the revenues they already make?
Interestingly she does not mention that this could be done out of the revenue streams from her music, only from the young artists themselves. That's odd.

So this is only a little less greedy than actually asking for herself - as she claims this is not doing.
Not so philanthropic after all.

Where are the publishers or labels in all of this? By taking themselves totally out of this equation, they will get by-passed in the future. Why would anyone need a publisher, when they don't even fulfill one of their core tasks? What's the value of a label/publisher to a young artist?

Instead of greedily clinging to their old business model, which is falling apart, they should think of creating new and relevant offerings to their customers, i.e. the artists.

[1] I admit I have done the research on this author/book/publisher, I just use it as an example. Correct me in the comments if I'm wrong.
[2] Apple of course changed this after her open letter.

Saturday, July 18, 2015

Yahoo Pipes no more...

So, Yahoo decided to pull the plug on one of their most interesting services: Yahoo Pipes.

So I revisited the service as long as it is still there. Turns out, the only 2 cases where I'm still using Pipes is for aggregating and filtering RSS feeds.

So I will look into one of the alternatives now, as listed here for example. 

Thursday, July 09, 2015

Quick Perl Hack

My regular commute train quite frequently has a delay of somewhere between 3 and 8 minutes, which is annoying when you really hurry up in the morning to be sure to catch it - it's only a 6min walk or so -  and then you notice that all the rush was in vain, because the train wont be there for the next 5 minutes.  But then again, you can't rely on it being late...

Wouldn't it be nice to already know this at home?
Well luckily on the website of our Austrian Federal Railways (ÖBB) and in their mobile apps you can watch the "Station monitor" as they call it. That is, you get almost the same screen display as the have in the station, with the delays showing - if any.

However, that would require 2 taps on my mobile .... way too cumbersome for me.

So I put together a quick Perl hack, just to stay in shape.
First analyze the webpage and the actual Ajax call in the background.
Then so some lenient JSON parsing, fix three stupid perl mistakes I managed to make within 1 hours. Filter on the train that I actually want, and send a PushBullet notification to my mobile and schedule this through cron on my QNAP for 8am every morning. Just in time to let me know whether I would need to speed up or not.

That was yesterday.

This morning, though, I of course did not get any notification, because I forgot the proper use lib ... in my perl script, so it would pick up my personal PushBullet library. Which of coursed worked during testing yesterday, because I was in another working directory. Will I ever learn?!

And at the same time I learned from my wife, that she is taking an earlier train this summer, so while I was at it, I updated the script to monitor 2 trains (with only 1 notification).

Should work fine now... But let's see tomorrow morning.

Saturday, June 13, 2015

Vertical Video

The other day I was browsing the Internet Trends 2015 presentation by Mary Meeker from this year's Code conference (and I urge you to do the same).

Out of all the excellent observations and predictions, one especially caught my attention: Something Funny Happened on the Way to the Small Screen ... Small Screen Vertical Viewing Became Big Deal. (Slides 22ff).

Video buffs and know-it-alls (like me, ahem) always frown upon iPhone/Smartphone users recording (and posting) portrait/vertical video. "Look at those stupid idiots", we yell, "they don't even know that video is supposed to be landscape. Don't they know anything?" Bruhaha.

Well, bruhaha ourselves.

Where does it say that video has to be landscape? Just because the cinematic/theatrical screen was horizontal, and (almost all) PC screen are? Soon the majority of viewing devices can now be either - horizontal or vertical, like tablets and smartphones. And the phone is even more likely to be held in portrait mode (the tablet less likely). See the data in the presentation.

If content producers and designers focus on this as a design element, this can be a competitive advantage.

Saturday, May 23, 2015

FlickrTab for Chrome

How about an extension for the Chrome Browser that does nothing for your productivity, almost the opposite: Flickr Tab

All it does: it will show a photo from flickr every-time you open a new (empty) tab on Chrome. That's it.
No productivity value at all. But you get to see truly awesome pictures.
I installed it a couple of weeks ago when it first was released, and enjoyed it ever since.

Thursday, April 16, 2015

Moto 360 first experience

A couple of weeks ago, I got a Moto360 Android watch/wear, and by now I have been trying it out in daily life, Here's how that works / worked:

One disclaimer, though: A couple of days after I got it, I went on a short London vacation/trip (with the family), and I deliberately decided to leave my Moto360 at home... On the second day in London I started to regret this...

1. In the morning I start wearing it just before I leave home and start my commute (a couple of minutes walking, traind and underground).
Here I mainly use it for reading (and dismissing) notifications, like incoming emails and sms/text.
Responding to a text is really not an option, or do you want to talk to your watch while on the underground (unless you are Dick Tracy)

Podcast player control (BeyondPod in my case) works like a charm.

2. Then a full office day with internal and external meetings and coffee breaks. Again, mostly reading and dismissing. Also, the reminders about upcoming meetings are nice.

During the coffee breaks, the most important use case is showing it to co-workers... I hope that wears off.

Regarding calls (regardless when), the watch of course only helps, to see who's calling, and more smoothely reject the call. When you want to take it, you still need the phone.

3. Commute back - see above,
Swarm/Foursquare check-ins - if you are really still into that, like I am - work quite fine with Wear for Swarm.
The Minimal & Elegant watch face I started using today 

4. Once I get home, the battery is usually still around 40%.

5. In front of the telly ... yeah, that's the only time I really dare talk to the device. Works quite well, as long as you stick to English.

Even though Google (on the phone) has no problem with switching between German and English dication, on the Moto360 I only got it to work with English. 

So some text/chat replies do still not work (when I'm in a German conversation), or I start responding with "Thanks" instead of "Danke" :)

I did manage to have quite complete chat conversations just using dictation through the watch. More than just "Thanks".

6. In the evening, I put it in the charging station on my nightstand and the watch now doubles as an alarm clock, and gets charged at the same time.

The biggest problem so far interestingly occured during the night: a couple of days ago, the Wear app on the Moto 360 itself crashed, and kept crashing, even after rebooting the watch [1]. Which was indeed annoying because my newly enthroned alarm clock kept flashing bright wite every 3 minutes (while it kept crashing and restarting). So I just switched it off, tried to re-synch all apps in the morning. That still did not fix it, so I did a full reset and re-paired the watch. Works fine now.

Impression and experience so far: Totally nice piece of art (and technology), which works extremely well. Battery is a lot better than expected. Proper use-case worth 200+EUR: none so far

[1] There, I said it "Rebooting the watch"... How dorky/nerdy is that. Just shoot me.

Saturday, April 11, 2015

LastPass - a must

It's really that simple:

Using the same password for each and every site or webservice is just not an option:
a) because of different and incompatibly password rules and policies
b) for simple security reasons.
If one site gets hacked and passwords leak (and it will and they will) then those nasty nasty people will have access to all (or many) of your accounts.

Creating (much less remembering) 100 separate and secure passwords in your head simply wont work.
So you need a service to do this for you.

I choose LastPass some time ago, and it works great, especially the random password generator, and the auto-fill feature on web-sites and Android apps.

I know, some will say, that LastPass can get hacked and then all my accounts (incl online banking and all) are revealed. True. But still more unlikely than all the other scenarios.

As of today this is the most secure choice for me.

There are others like 1Password, or Apple's key chain... (here's a list).  If you don't yet have any of those, get LastPass now.

Wednesday, April 08, 2015

Bluetooth beats Wifi

The other day - when  I was on the train to Prague - I needed to get some work done on my iPad, but the WiFi on the train was dead. Usually then, I enable the hotspot on my Android phone, but this time I decided to finally try this over Blueooth.

I wanted to do this a long time ago already, but the Wifi was too easy.

So, what can I say... it is almost as easy (of course), but uses a lot less energy, both on the iPad and more importantly on the Nexus 5.

I guess, I'll keep it like that. Bluetooth tethering definitely beats Wifi tethering.

Tuesday, April 07, 2015

Public Ads for the Amazon Store

In Android-Land the amazon app store is this mythical creature... romoured to exist, but not a lot of people have actually seen it ... except - of course - if you are a Fire user. An even rarer and more mythical creature then :)

So I was quite surprised last week on the London tube to see Amazon being advertised for an app right next to the Apple App Store and Google play.

Saturday, March 28, 2015

Moto 360

I've been playing with the idea of getting an Android Wear smart watch for some time now. Specifically I had set my mind on the Moto 360, and luckily a dear friend of mine (and fellow geek) owns one. So after a brief intro (over some beers) I was even more inclined to get one. Then one of our local discount retailers (Hofer) had it on offer, and more or less at the same time it has been offered at quite a reasonable price on eBay (including some additional watch bands).

So I got it from ebay. Yesterday it arrived.
Ok, the unboxing is less spectacular with a pre-owned device, but still nice.
Charge the watch, install the Android Wear app from the play store and follow the instructions.

First thing I did, was send a text to my son (who was clogging the DSL line again) via the voice dictation on the watch. Boy, did I triple check this before sending :) But it worked flawlessly.

Half an hour later I was conducting a Facebook Messenger chat partially from the watch...
Why? Because I could.... (and I needed to test it).

And then, just for the fun of it, I told my watch to play some music on the phone. Soooo cool.

So, over the next couple of days I hope to find some more meaningful use cases.
One thing I really hope for, is that I can keep my phone in my pocket when I receive a text or any other notificaiton while I'm on the train/commute... Let's see how that works out.

And, oh,  thanks, Max, for making me do this.

Thursday, March 26, 2015

Android Automatic WiFi Login - no more

One of the most useful Android apps - Wifi Web Login - stopped working with Android 5.0/Lollipop. The reasons seems to be that Lollipop now continues to use the mobile data (3G, ...) connection if fails to connect to the internet through wifi.

So whenever you are connected to a (public/free) hotspot, which requires a web login (or just acceptance of their terms of service). Android will ignore the Wifi, until you login/accept.

Actually, a good move.
But it seems to break Wifi Web Login, which automated this for me anyway...
Now I'm back to logging in manually...
Still easier than before, because I only have to drag down the Wifi notification, and accept the ToS for some standard hotspots.
But sort of a step back.
Hopefully this will get fixed, but neither the webpage nor the play store hint towards a fix.

Thursday, February 26, 2015

Java updates without Ask Toolbar

One thing that has annoyed me, since Sun started this, was that the Java Installer / Updater would not only have crapware like the Ask Toolbar, but also - of course - have this selected by default.

I always found it inappropriate for a large IT vendor like Sun to include such intrusive sponsoring.
Especially with a security sensitive thing like Java.

Anyway, I just learned that you can turn this off.. Not sure since when.
In the Java Options (Windows Control Panel -> Java) on the Advanced tab, scroll down to the bottom, and there you have it.

Suppress sponsor offers when installing or updating Java.

Quite hidden, and not easily found by exactly those average Joe Users who would actually install the Ask toolbar ...
But ... eh... thanks ?

Friday, February 06, 2015

Google Glass is not dead

Now that everyone rushes to tell us how they always knew that Google Glass had been doomed to fail from the very beginning, I just want to note here, that I'd like to revisit their claim in 1 to 1.5 years.
My guess is, they will look pretty stupid.

Thursday, January 01, 2015

Android Screeen Recording

While I was trying to access my broken Nexus 5, I managed to get keyboard/mouse/touch access via the debug bridge (adb), but from time to time I had serious problems actually reading certain parts of the the screen (broken display!).

So I checked if and how I can do screen recordings, and found that it works really easy. At least starting with KitKat.

Fully documented on the official adb pages.

Of course you need USB debug access to your phone, but you do not need root access (!).

So all you need is a terminal/shell and then you can do start screenrecord.


adb shell screenrecord /sdcard/test.mp4
and stop it with Ctrl-C

and then get the file to your PC with
adb pull /sdcard/test.mp4
and remove it on the device with
adb shell rm /sdcard/test.mp4.

And this is the video, showing at first nothing (display off), then I switched the device on and then I swiped up to unlock:

There are some useful options available:
--helpDisplays a usage summary.
--size <WIDTHxHEIGHT>Sets the video size, for example: 1280x720. The default value is the device's main display resolution (if supported), 1280x720 if not. For best results, use a size supported by your device's Advanced Video Coding (AVC) encoder.
--bit-rate <RATE>Sets the video bit rate for the video, in megabits per second. The default value is 4Mbps. You can increase the bit rate to improve video quality or lower it for smaller movie files. The following example sets the recording bit rate to 6Mbps:
screenrecord --bit-rate 6000000 /sdcard/demo.mp4
--time-limit <TIME>Sets the maximum recording time, in seconds. The default and maximum value is 180 (3 minutes).
--rotateRotates the output 90 degrees. This feature is experimental.
--verboseDisplays log information on command line screen. If you do not set this option, the utility does not display any information while running.
If especially like the --time-limit for short recordings.