Building a 'Nosedive' rating app in a couple of hours

This month, the family and I have been watching the NetFlix series "Black Mirror", catching up older seasons and devouring Season 3.  One of our favourite episodes was 'Nosedive', and so I don't give out spoiler alerts here, I won't go into the plot line, but nevertheless, we were all fascinated by the 'Rating' app that everyone used on the show.

So much so, that my wife, the kids and I all started 'air gesturing' each other the 'swipe and flick' routine as if we were using the app to rate each other throughout the day.

This made me think - how about if we actually had a dummy app that we could use?  I noticed that NetFlix had created a demo site on the internet to promote the show, so I (ahem) "borrowed" some of the assets like the background, star graphics and the rating sounds, and mocked up a small dummy 'Nosedive' app in a couple of hours that I had spare.

Now I can really annoy the kids.  "Didn't do your homework?, ONE star for you!" (dew dew dew dew dew).  Wife brings me a nice hot cup of tea? "Five stars, my dear..." (dinga ding ding ding DING!).

I never intended to make money from this little side project - I just installed it on our phones using my developer account.  I am releasing the source code on GitHub in case any others want to take things further.

Please note that this is nothing like the actual app - there is no facial recognition (although I have been playing around with the Microsoft Face API to see if I can do something there).  There is not aggregate rating for people, and there is no central database that things are stored in (though I have thought about using Firebase to store rating data in the cloud).  It is purely a gimmick - although there is no reason that anyone can't take this starting code and build all that on.  Have at it! :)

Building the App

The app itself is built using the Ionic framework, which I have been using for over a year now, and really love.  It facilitates creating a hybrid app quickly and easily that can be used on iOS and Android devices.  No need for Swift or Objective-C, it is all done in javascript and HTML/CSS.

Nothing too tricky about this app - it is a simple one page application, which is the rating page.  As I mentioned all the assets, including the background swirling pink video, the rating star graphics and the notification sounds, were all downloaded from the NetFlix promotional site I mentioned above.  That is 90% of the work right there.

The rest was just implementing the swipe gestures to set the star level, and then the flick gesture to 'send' the rating and play the sounds.

Setting the ratings was one area that stumped me for a while.  Initially, I was playing around with the $ionicGesture event handler, and trying to trap left and right swipes including the distance swiped and the swipe velocity to try and calculate the star rating to give.  That all turned out to be extremely tricky and difficult, so in the end, I ended up using a typical programmers shortcut - in that I cheated! :)

I ended up placing an HTML range slider control on the screen, just under the stars.  I then made this slider element invisible, and used CSS to reverse offset the slider to that it lay just on top of the stars themselves.

This way, if anyone put their finger on the stars and moved left or right, it effectively moved the hidden slider left and right.  The upside is very accurate tracking of where the user lifted their finger, as the rating value would correspond with the star where they lifted their finger.

The downside is that on some devices, the slider will not move unless the user starts their finger on the current star (e.g. if you wanted to go from 2 stars to 5 stars, you would have to place your finger on the second start, then slide to the fifth star.  If you just tapped the fifth star or started on the third star to slide up, the slider would not move).  Most users I tested this on (well, my wife and kids) seemed to naturally start at the current star anyway, so I figured I could get away with this.  At least it worked with minimal (read: NO) coding required.

The last thing so do was to implement the Cordova Native Audio plugin to generate the sounds.  This was pretty trivial to do, and was only a few lines of code.  I had to capture the swipe up gesture to trigger the 'send' sound at first, then wait one second, then play the 'rating' sound depending on the rating (one to five) that the user had chosen. Check the code for details.

Yes, yes, yes, the pedants among you might say well the sending phone only plays the 'send' sound and the rating sound is played on the receiver's phone, but for our app, we aren't really 'sending' the rating anywhere, and are just using it as a too to tease or annoy others, so the rating playing on our own phone after a delay is enough to let the other person know exactly what we think of them (as long as they are in hearing range in a relatively quiet environment).

Anyhow, I will let others feel free to build upon the code base and see what they come up with.  I won't be releasing this app on the App Stores or anything, as I don't want to push things too far and be hit with a copyright violation from NetFlix!  Have fun.

 

Getting heard on the internet

Picture courtesy of National Geographic

Picture courtesy of National Geographic

Someone once told me that the ideal size for a human community is something in the order of 500 people.  Apparently that was the average size of a village or community back in the day, and it meant that every person pretty much knew everyone else.  Neighbours would know each other and look out for one another when they were sick or in need.  Anyone who tried to misbehave or act out was generally known, and quickly brought back into line by the collective, because everyone had a stake in the wellbeing and survival of the community.

Yesterday I was introduced to a new 'game' online at paperplanes.world (Tip: Visit it on your mobile browser).  It is a beautifully designed, simple site which lets you make paper planes, stamp them with your location and 'launch' them out into the internet.  You can also 'catch' planes that others have launched, look at where they have been by the stamps on it, then stamp it with your own location and relaunch it back into the virtual skies again.

It is fascinating to see where some planes have been in their travels, and also exciting to see where you planes will end up.

A deceptively simple game, but it was all the more engrossing to me, as it took me back to my childhood loves of building, discovering and connecting with others.

When I first signed on to the game yesterday, there were around 100,000 planes flying around this virtual world.  I launched a few, and caught many.  Most of the ones I caught were filled with stamps, showing the number of people who had caught it in the past.

But today when I went back online, there were around 400,000 planes flying around.  Quadruple what it was yesterday.  I caught a few planes, but noted that nearly all of them had only one stamp - from the originator who built and launched the plane in the first place.

Somewhere along the line, the balance tipped.  When I started, I felt an instant connectedness to the others playing the game, because the planes I launched had a good chance of being caught, and the planes that I caught had been stamped by so many others.

But now, any planes I launched into the ether would likely just buzz endlessly around the world, lonely and ignored in the huge stream of lost and lonely paper planes.  That connectedness that I once experienced is now severely diluted in the increasing noise.

I can only imagine that the players who started in this game when there were only a few hundred planes flying around would have a different argument - that they were catching the same planes over and over again, and had little chance of seeing a plane from the other side of the world.

I feel exactly the same when it comes to social media platforms like Twitter, Instagram or Medium.

The early days of the platform means that what you say is easily visible to other early adopters, and the feedback and conversations you have will be meaningful and rich.  But over time, the increasing crowds initially is exciting, as you perceive your audience and reach growing, but there comes a time when your uniqueness and individuality (and sense of self importance) within that ecosystem is simply diluted away to something generic.

That is why, in my latest startup SaaS app, I am not going for large numbers of users, but rather a quality community.  We recently removed our free plans to further accomplish this goal.  I am proud when asked, to say that my users number in the hundreds, instead of six or seven figure mark.  At this stage I still know virtually all my users by name, and support tickets can still stay personalised and friendly.  My users are not statistics on a spreadsheet.  They are part of my village.

As for the paper planes game, I have changed my thinking there too.  I no longer make and launch planes into the already crowded skies.  Nowadays I am happy to simply capture other people planes, stamp them and send them on.  I now relish catching planes with only a single stamp on them, because I feel that when I stamp them and send them on, in effect I am saying "This lonely plane matters, and I hope it has a great journey".  Somewhere in the world, someone will check their stats on their launched planes, and I hope it gives them a brief spark of connection with a guy in remote Australia.

20 years of Blaze...

The 1st of September marks a major milestone in my life.  It will mean that I have been running my company, Blaze Business Software Pty Ltd for 20 years now.  Two decades.  It seems almost unbelievable to me at times.

Back in September 1996, I had only been married for a month, I was about to turn 30, and I decided to start a software consultancy business out of my bedroom.  Thus began the rollercoaster, including getting an office in the Cullen Bay area of Darwin, growing the team to at one stage around 16 people, and then now coming full circle to just my wife and I working from a home office again in a 'lifestyle' business.

So many changes in the IT industry at that time.  When I started Blaze, the internet was just hitting mainstream here in Australia, and everything was still dial up.  We were one of the first offices to get an ISDN line into our office, and I clearly remember setting up a small Windows 98 server in the back which was running some sort of DOS mail daemon so that we could have individual email addresses for every employee.  Something that was so rare back then.

We were also one of the first companies locally to upgrade to Microsoft Exchange and implement ActiveSync.  I clearly remember proudly showing off how I could read and reply to emails on my Palm Pilot in real time to all my clients.  Nowadays that is just an expected thing, but back then I was pleased that we were pushing the envelope and being cutting edge.

Lots of nice memories, such as being the finalist in the Telstra Small Business Awards up here in 1998 I think.  Lots of other small awards and achievements.  But there were also some really tough times, and many days where I didn't know whether I wanted to close the doors forever and go raise sheep in the Italian mountains.

But through all that, I still wake up every day and look forward to doing the work I do.  I am always grateful to have met so many wonderful people through my business.  From clients (many of whom I still work with 20+ years later), to employees who have become close friends, to colleagues and competitors and everyone who has walked through the doors or called in the past 2 decades.  Thank You.

Proving that it is never too late to be a 'startup', this year I have embarked on a whole new reboot of the business, as we become a SaaS company providing subscription based business software.  Given that I will be turning 50 this year, I don't know if I will have the energy to keep on with the consulting and support role for many more years, and I am looking forward to setting up a passive income source from a modern, web based subscription platform.

Just another step in our long and interesting journey.  Hope to see you all along the way...

One month with the Apple Watch

While I am an Apple fan, and got a lot of their hardware devices, I was never really enamoured by the Apple Watch when they announced it, and never really planned to get one.

However, about 6 weeks ago, I got a special promotional offer from one of my credit cards companies for an Apple Watch Sport edition which was essentially free, because of the points activity on my business card.

So I decided to take them up on it and place an order.  It arrived within a week and I have been using it every day since then.  Bear in mind that I haven't worn any sort of watch for nearly 20 years now, it took some getting used to, having this metal weight on my wrist again.

Here are my observations on the device.

The Good

I must say that I have been pleasantly surprised at how comfortable, and how quickly I became used to wearing a watch again.  This is the smaller Sport watch edition, and I think the size and understated band suits my skinny wrist better.

I like the fact that I can customise the watch face, and I love that pairing it up with my iPhone 6 automatically loaded up all the Watch compatible apps on the device immediately.

Things I have especially loved is using Siri on the watch - far easier that the phone, especially when I have been cooking and I can just raise my wrist to my mouth as ask Siri to set timers etc.  Same as when I have been working in the garden, although in that situation, there have been a couple of cases where the reminder settings (to move the sprinklers) didn't take because the actual phone was in a distant room inside the house.  

The need to pair the watch to the phone to do simple tasks is one thing that needs to be revisited I believe.  A little more independence for quick tasks would be handy.

I have also started using the Gyroscope app in the past few months, and I like that the watch will integrate with Apple HealthKit, which then integrated with Gyroscope.  Love that my heartbeat stats and steps taken are recorded and consolidated in one place.

However, there have been a few issues because I think I have interconnected too many apps!  I linked RunKeeper with Gyroscope before I got the watch, and now I think the combination of RunKeeper and HealthKit trying to update my steps concurrently is causing some issues with inaccurate data.  I will have to try and unlink some of the apps to simplify.

The Bad

The biggest issue I have with the watch is the battery life.  I have to charge it up at least once a day, and it takes around 90 minutes to charge up fully on the magnetic charger that Apple provided.  The watch always seems to go flat at inopportune times for me, so I end up doing things where I needed the watch (e.g. exercising) without it.

I also wanted to get the watch to replace my old FitBit and Misfit fitness tracking devices - mainly for sleep tracking.  Both the MisFit and FitBit could automatically track whenever I was asleep and generate stats for my movement and rest periods, but the Apple Watch required an app for that.

I ended up purchasing "Sleep Pulse" and I bitterly regret doing so.  I find it quite useless for tracking sleep as you have to manually activate and deactivate it when going to bed.  The interface is also really clunky and there are LONG delays between tapping on the screen and getting feedback.  It never works properly and I am missing reports and stats almost every second day.

Another thing that I could not believe wasn't a built in feature on the watch, is the ability to select podcasts on the device.  When I am walking in the morning, I always listen to a selection of podcasts, and I would dearly love to be able to select from my list of subscribed casts.  Sure I can start/stop and wind back/forwards once one is playing, but I cannot get a list of my subscriptions on the watch.

I do love the way I can just raise the watch and say "Hey Siri, next podcast" to skip through them, but so far have had no luck trying to specify them by name, e.g. "Hey Siri, play me the podcast by Tim Ferris".

 

Overall, I am quite happy with the watch, although I still wouldn't actually pay money for one at this stage.  

I remember when I got the iPhone and iPad, I was excited about developing apps for the device and seeing how I could push the boundaries of my coding skills.  The Apple Watch unfortunately hasn't given me that feeling.  I feel no compulsion to try and write any apps for it to see how I can improve my life.

It will be interesting to see how Apple develop this device in the future, or whether they will simply abandon it, but in either case, it has been a fun experiment to try it out, and I will likely keep wearing the one I have until it finally breaks.