Recently I came across the requirement to add additional classNames to components so the QA team could use Selenium to test our app.

I had two requirements for adding these:

  1. I didn’t want to go through the complete codebase to give all components some recognizable class
  2. I wanted the additional classes to be gone in production so my output remains clean


The way I achieved that was to intercept the render method call. It was more difficult because of the way that browserify packages modules so I could not get to ReactCompositeComponent before it was mixed into a wrapper and had to modify it through a detour. Here’s the code. Just require it in your project and it should register itself.

const instantiateReactComponent = require('react/lib/instantiateReactComponent');

// intercept all render calls
if (process.env.NODE_ENV !== 'production') {
  const instance = instantiateReactComponent({ type: 'InterceptRender' });
  const oldRender = instance.constructor.prototype._renderValidatedComponentWithoutOwnerOrContext;
  instance.constructor.prototype._renderValidatedComponentWithoutOwnerOrContext = function interceptRender() {
    // before render: this._instance is the instance
    const renderedComponent = oldRender.apply(this);
    // after render
    return renderedComponent;

 | Posted by | Categories: Development, React | Tagged: , , , |

I was one of the first who got their PunchThrough Bean, a small inexpensive Arduino which can be programmed through Bluetooth. Only problem was, there was no way to do that from Windows because the official tools only support MacOS so far. A Windows port was promised for September but even now, 3 months later it is not sure when this will finally land.


So I looked through the forums and found some bits and pieces here and there that helped me put it all together. Here is the step-by-step guide to get it working.


Build a wired connection


The Bluetooth protocol used for programming the Bean is proprietary and not documented so the first thing you need to do is get an AVR programmer and connect it to your device.

I used a USBASP programmer because it was really cheap. I got this one on ebay but any should work. Once you have that you need to install the drivers as described on the official USBASP page.

  1. USBASP device
  2. Drivers


The next step is to wire the usbasp cable to the Bean. This thread has everything you need to do that: but I found it a little difficult to know which pins to connect where.



The Bean board. You need to connect all the PURPLE pins + GND to the respective pins on the USBASP plug



The plug coming from the USBASP programmer



Depending on the cable you have going to your usbasp, refer to the 6 or 10 pin layout and connect all the pins to the respective (PURPLE in the image) pins on the Bean.


Pins for the programmer seen on the right

Pins for the programmer seen on the right

The wiring to the pins for the programmer. Not pretty but it works.

The wiring to the pins for the programmer. Not pretty but it works.

bean and programmer

usbasp connected to the bean for programming



Connect the programmer


You should now be good to go with the programmer and need to install the arduino software. The arduino software comes with avrdude.exe which we will use to test the connection.

  1. Get arduino environment version 1.0.6
  2. In your installation folder find avrdude.exe (arduino-1.0.6\hardware\tools\avr\bin\avrdude.exe)
  3. Connect the usbasp to your Bean and to the usb of your computer
  4. Run “avrdude -c usbasp -p m328p”


Avrdude should show an output like this:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK

avrdude done. Thank you.


This means your connection is working. You can now proceed to programming.

As stated in the original thread you need to get the LightBlue package to be able to program your Bean. Extract the hardware and examples folders into the same folders in your arduino environment.


Communicate with your Bean


As a final step, have a look at the BeanExplorer universal store app that I have started writing:

At the moment it is fairly limited but it allows you to communicate with the Bean over Bluetooth, send and received serial communication data. I intend to get it to a state where it is similar to the official app although it would also be cool to make it into a prototyping tool with more options for controlling the bean, like sending files or other data.


If you know your way around c#and would like to contribute to the code, drop me a line.



 | Posted by | Categories: Development, dotNet, PunchThrough Bean | Tagged: , , |

Keepzer for Pebble

18 March 2014

The new Keepzer app for the Pebble smartwatch has just been published. I am really excited about the upcoming personal analytics.


Get the app here:

And then create a free Keepzer account to get going:


Have fun and be sure to let me know what you think!


 | Posted by | Categories: Development | Tagged: , |

2013 and 2014 have been called the year of wearables already with new devices seeing the light of day almost every week. There are smartwatches, rings, bracelets, belts or devices built into shoes and clothing. Here’s a small selection of the better known ones or newer ones:


  • Pebble (smartwatch with apps and notifications)
  • Galaxy gear (smartwatch with complete android)
  • Smarty ring (get notifications on your finger)
  • The Dash (earphones with tracking ability which also work as a headset)
  • Flyfit (fitness tracker for your ankle)
  • Atlas (smartwatch with fitness tracking abilities)
  • …and hundreds more

One thing that strikes me though is how inefficient and niche all of those devices still are. Not one company has the idea to build a more connected ecosystem. Here is a list of things that I think are wrong currently:


  1. do I need notifications on my wrist, my finger, my smartphone and my tablet? do I really need to be reminded 4 times that somebody commented on my facebook post?
  2. all of those devices need their own battery
  3. all of those devices need their own bluetooth 4 connection to your smartphone
  4. none of the data which is collected can be brought into context of one another. these devices are extremely selfish and only care about their own apps. Therefore the knowledge which can be gained through using them is extremely limited.


1. Functionality

So far all wearables implement the same functionality. There are notifications and some sort of fitness tracking using an accelerometer. Sometimes you can use apps but this is where the imagination of the creators stops.

I propose creating devices which are good for a single purpose only.


  • A watch which sends notifications and lets you interact with your smartphone
  • Or if you prefer notifications in a more unobtrusive format, it can be a ring too
  • A ring that only has an accelerometer and can do some precalculation of the data so it figures out certain movements on its own
  • A ring that measures your pulse or your blood pressure (having only one of those in one ring will make it smaller)
  • A chest strap that measures your pulse and heartrate

The benefits of having specialized devices will be that

  • they are smaller
  • more suited to their one task
  • the functionality I want can  be achieved by combining different devices


2. Power

The name wearable already says it. Those are devices worn on your body and their sole purpose is to track ones physique, movement, health and connect us to the digital world surrounding us. Once I take off that tracking ring it doesn’t need to stay on. Once I put away those headphones they don’t need any power. The watch only needs to be on when on my wrist, when I put it away for the night I probably have a bedside watch.

So the question which comes to my mind is, do they need their own battery? Wouldn’t it be much better if you had one large battery somewhere on your body and all devices would get power from there through skin conduction or some other means? They could have a tiny cell that would let them keep settings once disconnected from your body but that’s it.

The benefits:


  • I only have to charge 1 battery pack so I never have to worry about some of my 10 devices running out of juice
  • I could easily have a replacement pack which would work for all devices at the same time

I can imagine my morning to become something like this: Get up, strap on my power pack chest belt, put on my watch and rings and see them power up as soon as they touch my skin.

I can also imagine that a certain power signature coming from the central power pack would identify the wearer to the devices so they might be paired to me and work only when I put them on.

Sony has filed a patent already in 2006 for sound transmission through the body using electrical signals. I imagine that this can be modified easily to transmit power to devices.


3. Communication

With the central power pack we also have the ability to implement communication between devices through skin transfer or other means.

Interesting methods include:


I imagine that all those methods could be made quite small and low power, reducing the need for individual transfer of information through the air (using bluetooth or other wireless technologies)

With only skin related transfer, intercepting the data becomes much harder and requires at least touching somebody which we have a natural reflex of preventing already anyway.


Here is what it could look like:

Once central hub device facilitates communication and transfers power to the other devices

Once central hub device facilitates communication and transfers power to the other devices


  1. The central power pack and hub transfers power to all devices on the body and has a bluetooth or other wireless connection to the smartphone or computer which will facilitate an internet connection, for example for storing data in the cloud or other connected services. The hub can also have a large buffer for storing sensor data while not connected to the internet.
  2. There are two classes of devices, input and output.
  3. The ring, necklace and armband could be input devices, tracking movement data (ring and armband) and speech data (necklace)
  4. The wristwatch and earphones are output devices with the wristwatch being used primarily during the day for notifications and tracking feedback whereas the earphones could deliver spoken feedback when running or doing sports and the wristwatch is not used.


4. Central data repository

The last piece which is necessary to make all this data collection worthwhile is a large repository for the data which can also make sense of it. This will in most cases be a cloud service with analytics capabilities built in.

All data coming in could be analyzed and any feedback for reaching personal goals or making healthier choices could be fed back to the output devices of choice, whether it is earphones or wristwatches or just the smartphone.

What we need for this to work is a standard for storing personal data. One attempt at creating a protocol is called Tent. It’s a good start but at the moment too much focused on blog posts.



Now that we have the technical capabilities to create interesting sensors and wearables what we need is to open them up. All of the devices should work together seamlessly using standard protocols to communicate over the Body Area Network (BAN) and with the cloud storage service for personal data.

Once we get this, wearables will finally leave their niche and become a huge trend and thriving ecosystem.

At Keepzer I am working on creating the cloud solution for personal data. I would love to talk to more device makers about opening up the data to benefit all of us.


 | Posted by | Categories: Technology | Tagged: , , , |

Data is everything

9 May 2013

It is time to move from “my APPS” towards “my DATA“, after all it doesn’t matter how I created something, just what I can do with it is important.

 | Posted by | Categories: Technology |

Dribble King

6 April 2012

My latest game has just been certified and accepted to the Windows Phone Marketplace. It is called Dribble King and you have to keep a golf ball in the air as long as you can.


It is written with the XNA framework, features a beautiful background, 3d-model golfball, great physics (courtesy of Farseer) and sound. There is a global highscore King List and a daily King List. But to get there you have to be really good. It’s not as easy as it seems (and not as boring).


A great game for a break or in between. Challenge your friends!


Get it here: Dribble King in Windows Phone Marketplace


For more details, all highscores and an iPhone version, visit the Dribble King Homepage!

I know it sounds like something obvious but I recently realized that it is not. When we write a piece of software then there is very often the urge to finish it, make it work and get on with our lives. The new things are always so much more interesting and then such “minor” things like user interface, design and performance get thrown overboard so quickly. It came to me when I was thinking not about software actually but about umbrellas, funny, isn’t it?

Well, the thing is, I can’t seem to find one which is at the same time small but still durable and good looking. There seems to be just one design which more or less works for everybody and just gets copied all the time. It is in fact so prevalent that you don’t have any other choice anymore (except for size, then there are other designs too). It’s not that I want anybody to find me a nice umbrella, it’s much more far reaching. When you look at any product with many players in the market, starting with umbrellas and going to the technological fields, it seems to me that many designs get copied. This results in good products which are usable for many people and there’s nothing to say against that of course, the only question that comes to my mind is, why so rarely somebody thinks about pushing the product to the limits of the technically possible (or feasible, if we want to stay with this website’s name).

A good example for that is Apple vs. the rest of the computer manufacturers. Let me make it clear that I am no Apple Fan-boy, quite far from it. I prefer other alternatives which give me more freedom in the things I can do with my gadgets. But be that as it may, one thing that Apple has been good at, is pushing the limits. The question that comes to mind is, why nobody bothered to make slim computers which push towards the limit of what is possible in size reduction and usability before Apple did? Why has nobody built a tablet which is sexy before Apple did? There are enough players in the market who are comparable in size or used to be bigger even but still they were just content with what they had. Tablets were introduced before the iPad but they were chunky, not sexy and didn’t work very well and I can’t blame anybody for not buying them. The success of this product does not just show that the time for this category was right but that finally somebody produced something that you didn’t have to be ashamed of lugging around in public.

The same with laptops. I believe it would have been possible much earlier for anybody to build slim laptops. It’s just so much easier to stay with the tried and true design and convince oneself that it is selling well, so nobody wants anything different. I’m talking of course about the Macbook Air. It’s just slim and sexy as hell. There are still so few competitors in terms of design for those categories of computers and I just hope that this will change at some point.

So, I decided to start with myself and start producing not just any software but instead software that I can get behind and say, this is as good as I can make it. It’s easy to get something to work but it doesn’t mean that it will be fun to use yet.

That’s my plead to everybody out there for today, push the boundaries of your own abilities even if optimizing your software for speed or making your product more durable and slim (and sexy) is so much more boring than just getting into that new cool project! I know, there’s the cost factor also to consider but I believe that this investment in quality will pay off big time later on, be it in customer satisfaction or less returns.


Thank you for reading, now get on with your cool fantastic project which I will love to use once it’s ready 🙂

 | Posted by | Categories: Technology | Tagged: , , , , |

Vocab Hamster

12 June 2011

Finally it is done. Today I submitted my second application to the windows phone marketplace. It is called Vocab Hamster and revolutionizes vocabulary list building and learning.

You can check it out here one it has been accepted:


 | Posted by | Categories: Development, Windows Phone | Tagged: , , |

Do you like to watch cartoons, superhero or supervillain movies? Do you read comic books?

Have you ever wondered how those fantastic characters manage to build their super weapons, invent their super machines or crazy chemicals in such short time? And how they manage at all since it’s only them, mostly a single fed up individual who has a grudge at the world?

Well, the answer is simple. THEY HAVE MINIONS.

What is a minion then? Wikipedia says: “A minion is a follower devoted to serving his master relentlessly”. So, all those brainy characters have a lot of tiny, often not very smart followers who do their deeds. They have an army of workers who don’t demand much but are very able-handed. They carve out caves for their master’s lair, they build rockets and weapons. In short, they extend the reach of their master by following his ingenious plans and making them a reality in very short time. And the more minions there are the more fantastic is what they can build in a short time.

So, what does that mean for us? After all slavery has been abolished a long time ago and we don’t really want to go back to those times when some humans were worth more than others. Also, animals are just not going to cut it. They have no hands, except for monkeys maybe, but then again, would you really trust a monkey to build your rocket ship even if you give it the plans? I didn’t think so…

So, the only possible solution is to finally use all the knowledge of computers and AI to finally transform those TOOLS into MINIONS. So, instead of having to tell them every single step which they can then do very fast (like render a video, print something, do some calculations) we need to employ all those algorithms to be proactive and helpful.

It’s nice to have a calendar application which reminds me of upcoming events but it’s just still too clumsy. I still have to tell it when to remind me and that I want to be reminded at all. And if I then dismiss the reminder my calendar is just accepting it quietly and I can still miss my appointment, my plane, my date. Instead, we need to make those applications proactive. Let the calendar know more about my life, like where I am during the day (gps is in every phone nowadays so why not collect this data for personal use), let it know what I’m wearing and when, let it know what I’m reading, what I’m eating and so on. We’ll have to find ways of course to collect this data effortlessly. Position collecting is within reach but how about what I’m eating and what I’m reading? I certainly don’t want to type it into some application.

Once we have this data, there’s a real chance for a digital assistant. If it knows what I know then it can make suggestions based on previous experience and preferences. So if my assistant knows that I usually leave for work at 7:30 then why doesn’t it know that it should wake me up automatically when this time comes close. It knows how long I need for breakfast and maybe on which days I’m having it. It can tell me that my bus is leaving in 15 minutes and I will just not make it, give me alternatives (so when the next bus comes).

In conclusion, let me finish by demanding MINIONS, for everybody. Everybody should have their own and lots of them for every small task there is and finally the computers will evolve from tools to assistants. What a beautiful future awaits us!

 | Posted by | Categories: Technology | Tagged: , , , , |

Something that strikes me from time to time is the question whether it would not be possible to make fans more efficient. The places I mostly run into them are for cooling, so for example in computers or on hot summer days.

One thing that is immediately apparent about fans is the noise they produce. This noise is in part due to the motor when it is moving but this source is mostly negligible, thinking of motors with magnetic bearings nowadays. So most of the sound a cooling fan makes stems from the blades cutting throught the air and moving it around and about quite a lot. This sound can be reduced a little bit by designing the fan blades in a good way but still the big question remains:

Isn’t there a better way to make air move in a steady flow than using blades that swish through the air and push it forward?

Let’s think of the benefits for a second.

1. Having no moving parts mean that less things can break

2. In big fans, the blades are necessarily also big and a source of danger for unobservant fingers

3. The noise. Think about how silent the world could be when we needed no moving blades to make air or water move.


In my third point I already meantionend another application of the bladeless fan. It could be used to propel boats, making them quieter and hopefully more efficient.


Now, the benefits are clear but the big question remains. What possibilities do we have to make it happen? There is one technology which works in salty water and achieves something like that but I think it’s quite inefficient still and not so easy to implement. I’m talking about the magneto hydrodynamic effect, or MHD.

In short, MHD works by running a current through seawater (it’s salty, hence it’s a good conductor) and applying a magnetic field along the axis of the thruster. Because a lorentz force acts on any current flowing through magnetic field lines, the conducting material, sea water or ions, is pushed out the back and propels the ship. Alternatively, this principle can also be used to pump water. Read more about it on Wikipedia:


The question i’m asking myself now is, whether it wouldn’t be possible to come up with an efficient design for air which uses similar technology. There are some problems which arise when trying to apply this principle.

1. Air is a very bad conductor. Simply running a current through it will not work or require ionizing it first.

2. Having a big magnet close to the hard drives in a computer is still a bad idea. SSDs should not be affected though.

3. Air is comprised of many different components which might behave differently.


Let’s have a look at the average composition of air (Wikipedia):

78% N2

21% O2

~1% Argon

There are some small components like carbon dioxide and other things but the biggest parts we have to deal with are oxygen and nitrogen in molecular form.  The only possibility i’m seeing in using this composition to our advantage is using the molecules somehow. If the molecules were polar, like water for example it might be possible to do something with the tiny dipoles.

At 20°C, the saturation Humidity Ratio of water to air ist 0.014659, which is abou 1.5% of the weight of the air is water. This is already a very small number but since we almost never have 100% humidity the average figure will be much lower, I guess about 50% of that or 0.75% of the weight of air is contributed by water. That is not much but might be sufficient to get some airflow if the water molecules could actually be used.

The only chance there is to grab those water molecules and get them moving is in my eyes to use their dipole moment somehow. Let’s take a look at that.


A dipole, like the water molecule consists of one positive and one negative charge. Once these move in a magnetic field they are also subjected to the Lorentz force and thus deflected in a certain direction. If the molecule was made to “wobble” in resonance (by applying a high frequency electric field to the molecules), the two charges would move back and forth. Since their electric charge is opposite and their direction of movement is opposite at all times, the resulting Lorentz force would always point in the same direction and with the charges separating the whole molecule would move in one direction and then move back again when the charges contract again. The whole molecule would start some wobbly back and forth motion, synchronized with the motion of the charges.

There are only some minor problems.

1. The distance between the two charges is very very small. It is on the order of 3.9pm (picometres). That is less than the hydrogen atom radius at 25pm, so it is very small!

2. The molecule would wobble back and forth with the resonant frequency and so no forward motion would be generated.

3. Since the molecule is so small, the resonance frequency would be very high. About 1600GHz, which is a lot (microwave radiation is at 2.49GHz)


Solving this high frequency problem is a difficult technical task and the comparison with the microwave oven raises another question of possible heating of the water vapour instead of just moving the molecules (due to energy absorption).


Another possibility would be to use a much lower frequency for the electric field and use the effect, that a dipole aligns itself along the electric field lines. Applying a static field (like in a Capacitor) will make the water molecules align along the field, rotating if necessary. It is this rotation which might be used to actually propel them forwards.


Changing the polarity of the electric field would cause the dipole to flip into the opposite orientation and if a magnetic field is also applied to the region, a Lorentz force would result. The only remaining problem is now, that we don’t know in which direction the dipoles flip. Just switching the field would make some dipoles rotate clockwise and some dipoles would rotate counter clockwise, thus eliminating any effect there was by averaging the motion over many molecules.

One possibility around that would be to use at least 4 electrodes instead of just 2. By adding them perpendicularly to the first two electrodes, we have an effective way to control the direction of rotation of the dipoles.

By adding more poles and rotating the field accordingly, the motion becomes more controlled but that should not be necessary. The only thing needed now is a small calculation of the actual effect which is to be expected. We still need to know how long the molecules need to rotate to the new position and what field would be necessary to chieve the rotation of all molecules of air humidity.

As calculated earlier, the maximum content of water in air is about 1.5%. We use half this value to estimate the content of water vapour to 0.75% as an average value. Taking a tube with a distance between the two electrodes (the length of the faces of the cube) of 2cm and a length of 10cm (that seems like a reasonably small tube which would be useful for testing purpposes or cooling small things).

The volume in the tube is then 40cm³ and the corresponding weight of the air is (at approx. 1.2kg/m³ at sea level) approx. 4.8g, thus having a water content of 0.036g or 36mg. Not an awful lot but we’ll see where that gets us. At 18g/mole for H2O this should amount to 1.2e21 water molecules.

Each water molecule has an electric dipole moment of 1.85D (Debye) and in total 7.44e-9 C*m. To counteract this charge and hence align all molecules to an external electric field, with a distance of 2cm between the capacitor plates we would need a charge of 3.72e-7 C.

Now let’s calculate the capacity of our simple plate capacitor. It should be 8.85e-13 F (Farad). The voltage we need on those plates is the charge needed on the plates divided by the capacitance of our capacitor. That amounts to 420KV. Hmpf. That doesn’t sound like a safe voltage. Hope I calculated that right. Bringing the plates close together would help thing but only linearly. To reduce this to a somewhat manageable 1KV we would need to reduce the size (diameter) of the tube by the root of 420 (the amount of water and thus dipole charge depends on the diameter with a power of two and the capacitance cancels out the size of the plates duo to the symmetric distance / area). So, in total we arrive at a diameter of 1mm. Pretty small but not too bad. We could later attach many of such tubes in parallel and should still be able to create a respectable airflow (but friction will play a greater role.


So, the only thing missing is the question of how much a water molecule will be displaced in one whole rotation (or possibly also a quarter rotation at first since the rest derives from that).

The charge is said to be 10e, separated by a distance of 3.9pm (see here). That means, that in a quarter rotation, a charge of 20e moves by half that distance perpendicularly to the magnetic field (which can be fixed, the charges always move the same distance regardless of orientation). This is equivalent to 1e moving by 39pm. Now on to the magnetic field.

It seems that when calculating the Lorentz force, another problem comes to light that I didn’t think of. The charges cross the magnetic field lines in different directions when they make their round trip. This would lead to oppositely directed Lorentz forces and thus a net zero effect. The only way around that which comes to my mind now would be to change the direction of the magnetic field also on these turning points but as magnetic fields go, when they are strong enough, reversing them takes some time or involves very large currents and might be technically difficult to handle.

The remaining calculation I will do in a second part of this post. If you actually stayed with me until here, respect. I would be happy to discuss this topic, let me know what you think and whether I made some grave mistakes somewhere!




 | Posted by | Categories: Technology |