How to integrate an Axure prototype with a live chat application using Flask and SocketIO.

I recently created a prototype sales flow in Axure that contained a dummy chat button. One of the next requests for prototyping that I received was on testing the actual activation of the chat button and the subsequent screens after. However, I went slightly further than only prototyping the chat button interaction.

Why not add live chat to it so you can test end-to-end ?

Since participating on a few U-lab sessions organised by my colleague, I firmly believe that the more realistic your environment, the better the tester can focus on the actual proces that is being tested. It doesn’t need to look exactly right (although that’s fine too) as long as most or all of the functionality is there. Otherwise a tester can become focused on an missing element and not on the actual prototype.

For instance, the sales flow I previously created contains a general conditions text. At first I just added a page to the prototype so the user could at least click on the general conditions link, but I left the actual page empty.

One or two test users found the empty page, and remarked on it repeatedly – it clearly bugged them, even though it was only a very small part of the flow they were asked to test. So I quickly added the beginning of the actual text to the page. Subsequently there were no more remarks.

So instead of using pre made ‘fake’ speech bubbles to ‘make pretend’ that there was a chat session going on, I got to thinking about my previous experiences with Python and Flask and the way you can use those tools to create a website with very little effort.

Wouldn’t there already exist a way to easily setup a live chat server and integrate it with the Axure sales flow prototype ?

A quick google search later I had found a simple tutorial (made by the wonderful knowledgeable Flask-guru Miguel Grinberg) on using websockets with Flask and Flask-SocketIO, setting up a simple chat application server that could be reached by surfing to the page, allowing actual client-server communication using a javascript library for the webclient.

The backend : live chat application using the Flask micro-framework

Let’s first describe the ‘backend’ : I used Flask together with some extra libraries like Flask-SocketIO to create the chat server.

[Flask is what is called a framework, written in Python, that allows you to code a web application using only a few tools and templating languages that have been configured to work together. It’s called a micro framework because it allows you to work fairly freely, not confining you too much. A full framework is much more rigid in using databases, templating languages, etc]

Soon after, I had a chat server running that allowed you to start up a browser, enter a room and type in a line of text, hit enter, and have it displayed on two different sessions that were in the same ‘chatroom’.

As long as you are on the same (wireless) network, you can visit the server and chat together in a room. So the U-lab organiser or a third party can run the ‘server’ on his mac, and the tester can use a browser on another device to visit the server url (using another id) and we have a live chat going between the two parties.

As I wanted to test the mobile view of it, I modified the provided example to use Bootstrap and css-styled it so that the chat lines are not shown as simple text but as speech bubbles, similar to Messenger. If the user entering the chat line is the same as the user it is being shown to, it is shown on the right side of the screen, else it is shown on the left.

Also, I removed the first ‘login’ screen from the example provided so I could call the chat screen up from within the Axure prototype based on url parameters so the user does not have to login any more.

Obviously this had an impact on using sessions (which is being used by the socket emitters to know who is emitting what), as these sessions were established in the separate login screen.

As I didn’t want to rewrite the whole code and only had a few days to set this up, I made it so that the sessions are actually created by the url parameters when the chat page is called.

The result is something that I consider to be unsafe for real live applications, but is ‘Good Enough’ to use for testing a prototype in a U-Lab.

The frontend : Integrating the Axure prototype with the chat app

The integration with the Axure prototype is fairly easy if you want to link on the desktop : you can code up an action to call an external url when clicking on an element, and decide wether to call this up in a new window or in the current window.

I first tried integrating the chat directly into an inline frame that was inside a dynamic panel, however once you use an inline frame you then lose all the session information and you can no longer chat. So it needs to open in a new window/tab.

However, I wanted to test a mobile prototype, and coupled with the above, this caused some fairly unique problems :

  • the user is in the middle of a sales flow, so if (s)he needs to ask for help, (s)he should be able to get back to what (s)he was doing, without restarting the sales flow – so I need to open up the chat application in another mobile window
  • we usually install such a web app onto the home screen, so that Mobile Safari opens up full-screen. However, doing that makes it so that a new window created from there cannot be closed – you can only ‘return to the app’ which restarts the app, which is not what we want
  • using the javascript command window.close() on IOS to close a chat window and return to the prototype is problematic and not something that works consistently. Some browsers for example restart the whole prototype, or refuse to close the window at all. In the end, I could only use it with the ‘Brave’ browser, a fairly new browser for IOS

In the end, to keep everything on the same server, I published an export of the Axure prototype to html and stored those pages in the local chat server under the static directory (flask can easily serve static files as well).


My prototype can call up the chat in a new window, and the user can be returned to it. It is a worthwhile addition to actually see people start up, use, and end the chat.

Templating the chat page itself is fairly easy, it’s just bootstrap css that you can edit.

The chat server is however more finicky than it should be – if the computer hosting the chat server goes to sleep, it is best to restart the chat server. Plus caching by browsers means that if you do make any changes, you need to make sure that the cache in the (desktop) browser is refreshed. Or you keep wondering why your changes do not become visible…

The actual integration with the prototype was more difficult because I was integrating with a mobile prototype. I’ll have to look into this on how to do a better integration next time.

Moving from Android to iPhone 6S : First Impressions

I recently moved back from using a Samsung Note 2 for almost 3 years to a brand new iPhone 6S plus phone. Before my Note 2 I had a iPhone going back all the way to the original iPhone.

Why did I originally move to Android ?

Mainly because of the big screen and me being a voracious ‘binge sf reader’. iPhones didn’t offer large size screens at that time, and my eyes are having more and more difficulty reading tiny texts. Using a large screen and larger sized fonts on the Kindle app solved that problem for me and converted me to the big phablet phones.

Also, I became bored with my iPhone. Everything I could want was in there, but all the settings have been pre-selected by someone else. I wanted to see what I could do more with an Android.

While I definitely enjoyed tinkering with every Android setting possible, there came a time when I wanted to move back, especially when the iPhone 6 came out with the large screen variant.

The reasons why I moved back to an iPhone 6S Plus

  • The slowness of my existing phone: After using my android phone for almost 3 years, it became so very slow that I wanted to throw it at the wall. Having your phone ring and not being able to answer the call because the swipe you make takes 20 seconds to be recognised (and the caller has already hung up) is a major issue for me. Starting up your camera and waiting 10 seconds for it to come up ? Too much. I know that I could get some speed back by reinstalling, but really, this is not how it should work.
  • Not getting the 4G network: only 3G was possible. This is slowwww when you know that 4G is out there if you have the right phone.
  • No upgrade : almost every iphone gets an upgrade to the latest iOS for several years after. Not so with Samsung phones, which, due to the extra stuffing Samsung puts in, gets -maybe- one OS upgrade, and then almost a year after the upgrade originally came out. Then they promise another one, but never deliver. Anybody wanting to go for an Android phone, take a Motorola or Nexus phone, they upgrade easily.

Things that I noticed immediately on my iPhone

I’ve put a positive or negative score next to each item, to indicate how ‘bad’ I feel this is.

  • (–) No individual sound levels for sounds are available (eg. the alarm clock and the ringer share the same volume) !
  • (—) Worse, a bug that makes it that when you select ‘no sound’ for the alarm, only vibrate, the vibrate does not work!
  • (+++) The blazing speed of the new A9 chip !!
  • (+) Using 4G instead of 3G is nice, but to my surprise it is only a little bit smoother.
  • (+++) Integration with iTunes and Mac OS X in general is just so smooth and it. just. works. Photos sync, music syncs…
  • (-) Still no sd card integration, you must pay a premium for using the integrated memory, but I knew this already
  • (+) “Hey siri” works, but I don’t use it too much, not yet integrated in my old mind.
  • (++) Logging into your phone with the touch of your finger – nice !
  • (+++) Quickly checking the picture you have just taken – bliss !

Honestly, the thing that I could hardly believe was the alarm clock volume that is not separate from the ringer volume.

This new phone of mine can do just about anything, yet the alarm clock sound is stupidly fixed to the same volume as the ringer sound ! I kept looking for a setting that I missed, but no, forums confirm that this is not possible with the default alarm clock. It’s linked to the ringer volume.

I’m definitely not the only one having this problem… and meanwhile, in Android each app has it’s own volume setting.

Sure, there are plenty of third party apps out there that do, as well as workarounds. But really, for this expensive piece of integrated hardware and software to not have a user-optimised ‘John Ive’-fixed-it-for-you-way of doing this is beyond the pale.


I’m quite happy with my new iPhone 6S, it has wondrous new features and incomparable speed to my old phone, yet at the same time I’m stumped that basic things like individual sound volume didn’t get fixed or better said, *still* haven’t been fixed. All in all, it’s still a big improvement over my old phone and I enjoy using it every day, hopefully for the next few years !

Comparing the speed of a Devolo / TP-Link homeplug versus a RJ-45 cable

Procrastination can sometimes be measured in years.

In this particular case, 15 years passed between asking the electrician to run a CAT-5 RJ-45 cable to the first floor when building our house and today when I actually crimped the cable with ethernet plugs and made use of it. And boy, the speed difference is enormous !

There were of course a few years that I could not use the cable, due to the room being used for other things than intended. But the last five years or so I have used homeplug appliances like devolo and tp-link instead of connecting the network cable. The speed was okay, but not great, and I sometimes had network interrupts or slowdowns that I suspected originated from the homeplugs.

This weekend I finally bought the necessary tools to crimp the cable and perform a few speed tests. I used with my Safari browser, as this is an HTML5 test. Most of the other tests still seem to require flash, which I no longer wish to use.

Here is the short and sweet result of the speed test when using the homeplugs – you can get more results when clicking on the image :

And here is the result when I switched to using ethernet cable :

As you can see, the download speed of the connection is roughly 6 times faster by cable than via the electrical home network while the upload speed is only slightly higher. I redid the test with the cable using the Chrome browser to make sure that there was no caching from previous tests, and got just about the same results.

Wow. That’s a very, very big difference in download speed… I do wonder why the upload speed did not change significantly ?

Conclusion : while the homeplugs are certainly a viable solution for many houses where ethernet cable is not usable (old house, renting,…) you are certainly better of speed-wise in using a RJ-45 cat5 ethernet cable.

UP24 and why I will buy a Fitbit next time

TL;DR The design flaw of the UP24 makes for a product that breaks easily and cannot be repaired. It is too expensive for what it delivers.

Last year, the second of July 2014, I bought an activity tracker from Jawbone, called the UP24. It was very stylishly made in matt black plastic. It performed well and has made me realise I need to move more. So far so good.

But now, less than a year later it is broken. The plastic is deforming at both ends, the small status light no longer works, battery charging is nearly impossible because the connector is loose and the button on the other end no longer works.

It has become just a piece of dark plastic that I will probably have to throw away. 150 euros down the drain (it currently sells for 129 euros, fyi).

My colleague, who has a Fitbit, recently broke his plastic bracelet. Rather than buying a new activity tracker, he just bought a new bracelet for about 30 euros. Still a lot of money for a plastic bracelet, but a whole lot cheaper than buying a new Fitbit.

The Fitbit itself is just a small device inside the bracelet, so he transfered it into his new bracelet. While he paid 30 euros for the bracelet, at least his is still functioning. At least he had the choice to replace it whole or in part.

I love the app, I love the functionality. But I don’t like throwing money away.

The next activity tracker will need to be sturdier, and/or be able to be repaired or have similar functionality like the Fitbit. So the next activity tracker unfortunately for Jawbone, won’t be anything from them.

Surface Pro 3 Review

I’ve been using a Microsoft Surface Pro 3 ( a 2in1 hybrid tablet/laptop pc ) for a few months now, and I thought this would be a good time to share some feedback.

The Surface Pro 3 I bought is equipped with an Intel Core i5 CPU, 256 GB SSD and 8 GB ram. I chose this version because I wanted a good CPU that will last me a year or 3, and enough disk space to comfortably store stuff. It’s the laptop that I tote with me just about everywhere.

Here are some bullet points that capture my feelings towards it:

– WEIGHT : it’s incredibly light, my backpack feels almost empty, especially compared to when I take my (2011) Apple Macbook Pro. The current Macbook Pro weighs a lot less, and against a Macbook Air the weight difference is almost negligible ( Surface 3 is 2.42 pounds (with keyboard) against the Air’s 2.96 pounds). It’s a handy carrying size.

– SCREEN : the screen is big enough and with a high enough DPI to really make your pictures and movies ‘pop’. I love it.

– DRAWING : I originally bought the Surface Pro 3 for the included N-Trig pen, as I wanted to take notes, and I always wanted to learn how to properly draw. I’ve found out that I’m not using it as much as I want to, although note taking works fine it’s something that I will have to get used to. I’ve bought Clip Studio Paint to draw with, which works fine if you want to freeform draw. But what I’m really looking for is a ‘webdesigner’ vector drawing program that is usable with gestures and touch. On the mac I would go for iDraw, Artboard or Sketch. On Windows 8 I can’t really find a similar program except for Inkscape and the now-defunct Microsoft Design which isn’t fully touch-compliant. Adobe Illustrator or the now defunct Fireworks seem good alternatives, but they cost too much for my limited usage of them.

– WINDOWS 8.1 : using it with Touch it now makes sense. Suddenly everything is much more intuitive. I didn’t really understand how to work Windows 8.1 until I started using it on a touch-capable laptop. It all makes sense : the charms, the swipe up or down, swipe from left to get to your previous app – it all works beautifully. I even started swiping the screen on my mac (to my great frustration). Touch really adds an intuitive dimension, and I for one am waiting for Apple to add it to their laptops.

– HARDDISK SIZE : 256GB for an SSD is plenty of space. Although it is filled up for about half of it’s size already, now that most programs are installed, there should not be a lot of extra disk space needed, bar a few games now and then. I’ve bought a Sandisk 128 GB memory card from amazon on which I store music, movies and some less-frequently used software. If I need the soft I move it first to the SSD – launching from there is very slow, but that is probably more due to the micro sd card.

– PERFORMANCE : I really can’t fault the performance of the Surface, there are no hiccups, everything runs smoothly, even QGIS and a few games on it. The i5 Surface has a Intel 4400 graphics card. While some older graphic-intensive games do work (Fallout 3, Divinity Original Sin), in general they make the fan go on and the Surface gets really hot. You can certainly play games (a few of the best can be found in the Windows store AND are adapted for touch), but it’s best to limit yourself to some less graphic intensive games.

– KEYBOARD : the clip-on keyboard really should be integrated in the price – without one, you are buying an over-priced tablet. With one, the ensemble of tablet + keyboard is still pricey but you suddenly have a good laptop as well. The keyboard is ok, the keys have a bit of a good give and I would not want to work on this keyboard day and night like I would with my macbook pro, but they suffice well for travelling.

– BUGS: there were some initial bugs (not sleeping, not waking, iffy wifi connectivity) that were not immediately solved which garnered quite a bad press. Since then there have been several firmware releases that have solved the majority of the bugs. I only experienced the limited wifi issue in the beginning, but after an update this bug went away. However, it still (very infrequently) comes up and the only solution is to reboot the system (which goes fairly fast, but is still a hassle for such a pricey beast as this one).

My current conclusion :

All in all, I’m very happy with my purchase. It is a very fine fully featured travelling computer with enough space to store all your stuff in. I absolutely love the intuitive way of working with a touch display and hope that Windows 10 will keep this functionality (or I won’t be upgrading). I like Windows 8.1 in it’s Touch-enabled version quite a lot more than on a regular laptop, but in all honesty I still prefer the Apple desktop as I have more experience with that and it makes more sense to me.

If Apple would add a touch screen to their new or future macbook (one that I can draw or write upon with a pen) that would probably be my next buy instead of a Surface 4. Since that won’t be the case for quite some time or maybe for ever, I will continue using my very nice 2-in-1 hybrid tablet / laptop.

SquareUp accepts CHIP cards now – will it be enough to get back on track ?

It seems that Square has seen the light, perhaps sooner than the rest of the US : swiping your card is showing to be more and more to be a security and fraud risk. In 2015, all new cards in the US will contain an EMV chip.

This is the reason why I wrote on this same blog in 2011 that Square wouldn’t be able to work in Europe in it’s current configuration

So a few weeks ago, they introduced a new cardreader that can accept EMV Chip-enabled cards. The EMV page contains some worthwhile statistics about exactly *why* the US is moving to using EMV cards. The numbers are staggering : it seems that the US has 24% of all credit card sales, but 50% of the fraud !

The following are lots of links to articles around the web discussing this new card reader and it’s impact for Square.

Mashable has a short article about this new reader, but if you want the technical in-depth details, go for the Ars Technica article. There you can learn for example that the new card reader is not yet fully chip-and-pin compatible : for now, you can only do a signature using the chip card, as the new guidelines in the US do not require that PIN is enabled.

Forbes has some interesting tidbits as well about Square, that it has lost 100 million in 2013, and has burned through more than half of it’s venture capital. Not good for a young company that needs to grow.

Which makes me think that Square is betting big on this new card reader to climb back out of the red.

If they are very quick (and *if and when* their adapter can also do PIN) they might still be able to grab themselves a slice of the market here in Europe and other parts of the world – there are still people here that would love to use the Square card reader as well. However, more and more competitors are launching themselves here, for example iZettle is already active in several European countries.

Google ChromeCast : nice but limited (in Belgium, for now)

Last month I was passing through France and had the opportunity to buy a Google Chrome Cast doohicky for 35 euros; since then you can now also buy it in Belgium.

For those not in the know : the Chromecast dongle allows you to ‘cast’ things from your smartphone to your tv. So for example you can show Youtube clips or the latest snaps of your kids on your tv.

Setup is a breeze, really the easiest setup ever for such a complicated interaction of software and hardware – just install the hardware on your tv and install the chromecast app on your smartphone, the app gets you up and running in minutes.

Behind the scenes it must be quite complex: the app disconnects your smartphone from your wireless network, searches for the Chromecast dongle which is on it’s own default network, and asks your wifi password so it can pass it on to the Chromecast, updates it with the latest firmware, reconnects to your network, and it’s working ! I was fairly impressed with the ease of setup.

Once the setup is done, you can start ‘casting’ pictures, home-videos, etc from your smartphone to the chromecast. Each app that can do that has a chromecast icon somewhere that you can tap, and then select your chromecast dongle.

The data you are casting is actually not directly sent to the chromecast, but first goes up to the internet, and then back down to your dongle.

  • Disadvantage : your casted picture/video travels out of your local network, to make a detour on the internet – more distance makes it slower
  • Advantage : Google Movies / Netflix movies / Youtube clips stream at a decent resolution for your smartTV, and probably come ‘directly’ from the Google/Netflix/Youtube servers instead of traveling via your app.

I played around with it for few days, and here is my feedback :

  • It makes any tv with a spare HDMI and spare USB port a ‘Smart TV’ so you can upgrade your TV for a low low price of 35 euros
  • It plays well with your smartphone and any apps that can cast data (I use Android, YMMV on an iPhone)
  • In our world where our mobile phone is becoming more and more a centerpiece of our live, this integrates very nicely
  • If you could just use it for casting your own pics and (silly YouTube) videos, then the price of 35 euros is just right to make your tv smart, but it will be sitting mostly unused behind your tv: unfortunately out-of-view is out-of-mind
  • However, when you can use it to control your NetFlix account (or other similar streaming service)and order movies from your mobile to stream to your TV, *then* it becomes much more interesting !
  • Netflix has announced that it is coming to Belgium sometime this year. Meanwhile Google has quietly opened Google ‘Play’ Movies in Belgium as well… in the same week as they announced that their Google Chromecast is available in Belgium as well…

    Hmmmm… smells like a strategy to me 🙂

TP-Link, D-Link, Devolo with HomePlug AV are all compatible

I just bought a new TP-Link starter kit to replace my last Devolo device (since I’m not a fan of Devolo anymore). Cheap when compared to other devices, especially as it has 2 ETHernet ports, which is what I was looking for.

The title on the box of the TP-Link starter kit, however, is a bit misleading : 300Mbps AV500 Wifi Powerline Extender Starter Kit.

My eyes just skimmed over the first words (300Mbps) and I immediately went looking for another device than this, because I was searching for a *500* Mbps AV device. Not a 300 Mbps.

I took me a few times to actually completely read the description on the device (after looking at more expensive devices). Turns out that it is actually a 500Mbps AV device, and the 300Mbps is for the WIFI part of it !!

TP-Link, you might want to change that… Customers might think like me that this is a 300Mbps device and go for another device.

The devices itself are small. The plastic does not feel perhaps as sturdily made as Devolo or D-Link, both of them seem like big blocks compared to the TP-Link device. However, that is not what you buy it for… So far, the TP-link devices certainly work, with almost zero setup.

Using WPS on the router I activated the Wifi-Cloning at the TP-Link device, a few blinks, done, and then it automatically repeated my wifi. Where the wi-fi reception in the kitchen was guaranteed to be close to non-existant, due to the router being behind multiple walls with different angles all the way at the other side of the house, suddenly reception of my network is now between 3 and 4 bars ! ETHernet ports work as well, as I can stream video from my NAS to my tv.

I can also confirm that TP-Link, D-Link and Devolo all happily talk to each other – as long as it states on the box that they are AV Homeplug compatible they should work fine together !

Importing a comma-separated csv file into Numbers Tool

I created this to scratch an itch of mine when reading a csv file into Numbers that contained commas. It turned out that Numbers puts each line into a single cell. It ignores the commas. And there’s no way to specify that the delimiter needs to be a comma, not a semi-colon.

Here’s a small tool made using a small python script and Platypus that will launch as a ‘droplet’ and will allow you to drop a csv file on it that has COMMA (meaning this , ) separated values.

It will accept any csv file and convert from commas (,) to semi-colons (;) and save the result out again as “filename2.csv” – Numbers should be able to open it correctly then. Your original csv file is only read.

Please note that commas inside double quotes are preserved and not converted.

It works on my smallish csv files, but please note :


Please note there is NO feedback if something goes wrong.

It works on my 2 macs (using OS X Mavericks), so I figured I would throw it out in the wild for those people who also might need it.

You can download the (non-signed) app here : – you’ll need to open it using RIGHT-CLICKING on the App the first time.

Feedback, comments, bug reports, etc are very welcome. If possible, I’ll try to respond and help you out.