Reasonable Wearables

The results of the wearables hype are slowly getting into our homes and everyday lives. My feeling is that many people around are too focused on simply one thing. The watch! How do you understand the term wearables? Does wearable equal to watch?
I have read some interesting reviews and articles about the cool new hardware. For example this one: What The Apple Watch Could Be.
I do not have any wearables at home but so far, I am not so excited on having some. The feedback I was able to observe was rather mixed. Starting with I got too many notifications, it is crucial to configure the notifications properly to I got interrupted still.
Let's try to step out of the box and try to redefine the term wearables by specifying the requirements.
  • I want to be able to get notified about important events - an incoming message, phone call, appointment in my calendar, anything around me.
  • I want to be able to have this type of notification at hand, without the need to find my phone (yes, that lazy I am).
  • I want to be able have a phone call, read a message, lookup any short information.
  • I must be able to suppress anything of the above easily when I want to run in a distraction free mode.
  • As a bonus, it would be great if it could prevent some dangerous situations for example.
  • I must be able to continue my daily routines while doing anything on this list.

What do you think of now? Apple Watch or Google Glass? The later was stopped already. And both of them violate the last requirement.
How about headphones? Many of us wear them already almost all the day. Let me try to explain to you what my most favorite wearables would look like.
First, we need to start with the best hardware inside. The Headphones are able to connect to WiFi, 3G or Bluetooth. The Bluetooth might be soon replaced by something that does not take 3 seconds to get connected.
They are still Headphones, so their main task is to play music or sound. We need a HiFi Digital to Analog converter. Not like all those noisy wireless headphones we have nowadays. The sound must be crystal clear.
The Headphones should be able to operate standalone (without any mobile phone near to them), playing my music stored in the cloud, getting notifications on emails.
The Headphones should be able to connect to my mobile phone to tell me about text messages or incoming calls. The Headphones also have microphone in it so I can make a call. The microphone can be used to filter outside noise while playing music too. Btw. can you imagine having a phone call with your wrist?
I can configure what happens to the music while a notification comes. Either the music keeps playing in the background or it can be paused. I can browse through the emails, messages, agenda using simple voice commands. Everybody is used to people having phone calls on the street so this even does not look weird. The Headphones can also have a couple of buttons in case you wanted to stay quiet. And of course, you can control the Headphones with your mobile phone, smart TV or tablet.
A nice voice of your choice can read out loud subjects of your emails. None of them actually gets marked as read (unless asked) for you to still have to check them.
You can keep walking or driving a car with these Headphones.
For hearing impaired, the Headphones can work as an amplifier. They can be sensitive to ambulance/police siren and selectively amplify that over your playing music (mishearing an ambulance can be dangerous).
When I want to enter the distraction free mode, I can simply take the Headphones off. They can detect it so they stop the notifications, pause your music and remain silent. Of course you can just stop the notifications and keep listening to the music, there is a button for it. This is especially important because I usually do not want to get the notifications all day long. I want to process them in batches.
It would be also possible to configure the Headphones when to tell you about all the notifications that happened since the last check.
The Headphones can easily measure your heart beats and depending on the time of the day and the location, they can fine tune the music style according to your current mood. Or they can control your smart home and dim the lights when you fall asleep at 10pm while listening to the music on your couch at home.
Wouldn't it be great to have such Headphones? So far it looks that I need to start producing them.



I once put down an quotation I found in a book. Albert Einstein was supposed to have said that, unfortunately I could not find a reference to it right now. The quotation reads:

"The explanation of the world and its causes must be simple and elegant in the end. The 'world formula' that is not simple and elegant cannot be true."

There is one more quotation by Albert Einstein that is definitely his and you can verify that online:

"Everything should be made as simple as possible, but not simpler."

I really like these as the real minimalism is very close to my hearth. I can demonstrate that on a tool set that I use for my daily work. As an IT engineering manager, I spend a lot of time working on a computer. The biggest bottleneck at my work is the way I make the computer do what I want it to do. There is a desktop environment controlled by a keyboard and a mouse. This did not change for decades now. I am a little bit skeptical about revealing a surprisingly more efficient way anytime soon. So I try to be as efficient on these devices as I can.

For the desktop environment I use Fluxbox. It does its job and it does it fine. Simple lines around the windows, no fancy 3D effects, no shades, no amusement park stuff. I do not have any icons on the desktop itself, just a B&W picture with my friends. I run the most used applications via shortcuts, usually Win key plus some letter. For those not associated with any shortcut I press Alt+F2 and type the name of the application. I use several desktops, each having a dedicated meaning. The second one is for a Web browser for example. This means that I can immediately get (Win+F2) to the application I am looking for. When I see my friends looking for the windows through various desktops on Ubuntu, it looks really cool and is filled with a lot of eye candies. But it takes time. IMHO this is not a well spent time.

You might say that I am just trying to be a weird nerd. I would like to assure you about my only goal which is being efficient.

Btw. I love shortucts! A single key press (well, technically multiple keys at the same time) and bang, the desired action just happens. No need to move from the keyboard to the mouse and back. Mouse is for web browsing, keyboard is for the real work ;-)

Most code developers probably know that from their favorite IDE. It can go beyond that. You can approach that as a great exercise for your brain. Always try to learn a new shortcut. There are also some other good options (hint: lookup the linked series name on youtube).

For the keyboard, there are various options, everybody is likely to find their own way. The key principle is, in my opinion, to make it a thing you do not take care of. You should not think about using it, you should not think about what key to press. Truly keyboard with blank keys helped me to address this problem. The first two weeks were a real nightmare but definitely wort it!

I did not find anything special for the mouse so far. Just and ordinary one, large model that fits my unusually long fingers. I tried trackball, or the mouse allowing you to hold it under a different wrist angle. But these did not work for me. Simply, it is the mouse, intended for the leisure time on the Internet, so not a big deal to me. Reading what I see takes more time than cursor navigation.

As I already mentioned, I incorporated these optimizations to be effective. To spend the appropriate time in the Quadrant no. 2 (see image below) as suggested in the book The Seven Habits of Highly Effective People by Stephen Covey.

Why I am talking about all of this stuff? This is a simple question. My impression is that we are constantly exposed to technology that tries to pull us into Quadrant no. 1. The amount of such distractions is increasing in the form of more interactions on social networks that gets closer and closer to you. What do you do when a phone beeps while you are reading a book? Do you look at the phone? However, I would like to talk about this in more detail the other time.

Now I wonder, is it just me who is obsessive by being efficient? What optimizations did you incorporated in your environment?


My era of commits

I committed myself to commit something every single day. To just improve the world a little piece every day. GitHub is not the only way how to achieve that of course. However, I have multiple projects there that really need some attention and improvements. So this is what I selected for now as a metrics of my goal.
I do not have a defined time for how long I am going to continue with this. So far I find it fun and it looks cool in the statistics. I am likely to stop/pause this while I will be on our honey moon this summer (come on, I can be committed but I am not a workaholic).
So far this resulted in the following benefits:
  • I really do something on those projects everyday, even when I am tired and not in a mood for it. Usually this can be overcome easily, it is just sufficient to start.
  • The projects move forward in big leaps and there are no periods of radio silence.
  • I managed to implement even features I would not think I could do that easily.
  • The projects are getting public interest, I managed to attract more students to do their seminar works or internship on them.
  • I learned many new things, it is easier for me to stay in touch with recent technology news and watch what is new on the Internet.
What are your commitments to make the world a better place to live?



Vintage photo style in Gimp

I was seeking for some way how to make a vintage effect to photos in Gimp. I discovered several tutorials and combined them together to something that works for me. Here is the recipe mainly for me not to forget it.

  1. Create three layers in the picture and fill them with colors. Listing their attributes from top to bottom in the Layers window:
    • Some "computer" blue color, the one like in old Dos times. I used 0949e9, Opacity around 17. Layer mode Screen.
    • Some pink color around e865b3, opacity 20, layer mode Screen.
    • Light yellow, like yellow paper for taking notes. My color is fbf2a3, opacity around 60, layer mode Multiply.
    • Now goes the original layer.
  2. Increase contrast to something around 21 in the original layer.
  3. Slightly decrease Hue (-9), increase Lightness (+9), and lower Saturation (-30).
  4. You can further add dark corners. Create a new layer right above the original picture. Use Eclipse selection tool to select the whole picture. Feather selection by reasonable amount of pixels (depends on the photo size, I use 150-400px). Invert selection and fill the corners with black. Set the layer opacity as desired.

More glares can be added by a separate multiplied layer with white and yellow color paintings.


JBoss Developer Studio freezes with XSD, WSDL, SwitchYard editors

Recently I started facing a strange issue on my ArchLinux boxes with JBoss Developer Studio (which is an enriched Eclipse under the covers). I was not able to open XSD, WSDL or SwitchYard visual editors. Part of the GUI just froze. Clicking on the close button opened the close dialog which allowed part of the interface to be redrawn.

I was quite desperate about it. It only affected my ArchLinux x86_64 boxes. I used multiple JVMs (Oracle, OpenJDK), different window managers (Fluxbox, Openbox, Gnome Shell). I verified the same Linux kernel in Fedora does not cause the issue. So what now?

What gave me some guidance was this command I found on StackOverflow (you must provide your own process number):

cat /proc/803/maps | awk '{print $6}' | grep '\.so' | sort | uniq

I compared the libraries before and after opening the problematic editor.

> /usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so
> /usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-file.so
> /usr/lib/libcom_err.so.2.1
> /usr/lib/libcrypt-2.18.so
> /usr/lib/libcups.so.2

This was a trace of a pretty old Eclipse bug. Surprisingly, the bug is still present in Eclipse Kepler with Gtk 2.24.20.

I tried the suggested workarounds by disabling CUPS server in /etc/cups/client.conf and passing -vmargs -Dorg.eclipse.swt.internal.gtk.disablePrinting to Eclipse. Both helped a little, but did not make Eclipse completely usable.

What really helped me was installing cups-pdf package, enabling CUPS via

systemctl enable cups.service

Then I started the service with

systemctl start cups.service

And configured a PDF printer at localhost:631.

I cannot express my happines about running CUPS on my machine :-(


Book review: Well-grounded Java developer

Vital techniques of Java 7 and polyglot programming

  • Publisher: Manning
  • Authors: Benjamin J. Evans and Martijn Verburg
  • Ranking: I would definitely recommend this book

Originally, I wanted to write a complete review of this book but I found some really good reviews already available on the internet. What I would like to say is that this book is exactly what the title reads. If you want to be a good Java developer and you mean it, you should know all the information in this book. A great thing about it is that it has a very balanced level of details. The information are presented in a compact well understandable form without wasting the reader's time. So if you did not read it yet, go to the nearest book store or library.


HashMap serialization issue

Today, we discovered an interesting behaviour in Oracle JDK 7 with my colleague. This also affects OpenJDK 7. There is a change in the implementation of the HashMap serialization. If you serialize and then deserialize a HashMap, two private fields are changed. The first is threshold and the second is table. While these changes do not seem to have any effect on the public behaviour of the class, it makes various testing a little bit harder.

For example, you developed a client/server application that exchanges some objects. These objects might hold some properties in a HashMap. To test the correctness of the communication channel, you send a serialized object from the client to the server. The server deserializes the object, changes an attribute and sends the serialized version back to the client. The client performs the same changes to its version of the object and serializes it too. Then the client compares the serialized byte arrays. With JDK 7 it finds them different and this is a problem in my opinion. Or do you find it a completely insane integration test scenario? I already found it in many projects so I suppose it is not that uncommon and bad.

A reproducer can be found at GitHub. I also logged an issue with Oracle. They are now about to review it. However, I suppose they are not going to fix the issue since it does not influence the public API. Who cares about testers...

. .