## Programming

A key virtue of a programmer is laziness. As an example it is what inspires me to automate my home to the point where I don’t have to lift a finger to switch on the light. Removing friction from a system is a anesthetic joy. The drug of efficiency, feels really good.

I still write code and people get surprised by that sometimes – maybe it’s the quality of the code 🤓.

## Docker container running Ubuntu on Windows

Containers are all the rage right now and rightfully so – not only do they help abstract away some of the complexity and dependencies of your apps and solutions, they also make managing of environments, and, deployments much simpler. And the fact that you can do it in a consistent, and repeatable fashion is just icing on the cake.

As a simple example, with Docker, on Windows (as in my case), I can run a dockerized app, on a different OS than the host, which can also be interactive.

The command below will spawn a container, pull down the image of Ubuntu and then run an interactive terminal, tying the terminal to the standard input. Of course in this example, this requires that you already have Docker installed (the Community Edition would be just fine to play around with).

docker run --interactive --tty ubuntu bash


Now, with Docker if you do get the following error (on Windows): “Error response from daemon: operating system on which parent image was created is not Windows.” as also shown below, the way to fix it is to switch on Experimental features.

To try and fix this, right click on the docker icon in the system tray, choose Settings, and from the setting screen, in the Daemon tab, enable experimental features as shown below.

And after enabling the experimental features, the docker daemon will restart. And post that, if you run the docker command again, it would work as expected:

• It pulls down the image (which is used to run in the container)
• Runs Ubuntu in an interactive session (this is because of the option I choose)
• And all within my PowerShell console on Windows.

This is just the beginning, there of course is a lot more to it.  🙂

## HoloLens–Device Portal (Part 2)

In addition to the HoloLens Device Portal (see part 1), another option is using the UAP HoloLens companion app which you can install from the store. I think this is a little more end-user friendly, and perhaps a little less developer focused. It exposes a subset of the same functionality.

Once you install it, you connect more or less in the same manner; I think most people will like the live streaming option. There is a bit of latency between the device and what is shown, but that could be somewhat because of our (possibly crappy) wireless which was overloaded with many folks at work.

Store Option

Once you connect and set it up then you see the above screen. Of course you can manage multiple devices from here.

Once you login, you see a lot of the same information as you saw in Part 1.

You can see the Live stream as shown here; and what might not be obvious that it is both sound and video which is streamed. In this screenshot you can see my (work) login screen, with the password login being a Hologram. Here it is ‘floating’ over the window, and you can see a flavor of the mixed reality.

As you can expect, you can capture either a photo or a video on what is being seen via the Device.

The photos or videos that you do take, show up here. I suppose they are saved on the device and you would want to take it off there.

The virtual keyboard again I think is one of the best features – saving so much time air-tapping and the arms.

App manager can do some elements of management, but not as much as the web version.

And finally, you can see some details on the device. I think the Shutdown and Reboot options are probably the one which are more useful.

All in all, this is a little more polished and end-user friendly. Useful when demo’ing the mixed reality solutions you are building.

## HoloLens–Device Portal (Part 1)

One of the advantages of running Windows 10 on the HoloLens is that it has all the regular features that you would expect. From a developers perspective, one of those being the Device Portal which is awesome. It is essentially a web server that is being hosted on the machine, and allows you to manage your device over Wifi and USB.

It is a must have if you want to stream your apps (including Holograms) so that others can see it, or alternatively you can record and then share. And of course there are details for various debug situations and the Virtual input saves your fingers from getting tired! You also use this to side load the apps you built. There are REST APIs you could use if you want to program, and there is also a UAP app on the store (more on that in part 2).

To get to this, you browse to the IP address. Below are a few screenshots from my playing around which shows you the various aspects of the portal and what all you can do. And the beauty of this is, as a Windows developer, this all should be very familiar and nothing new.

Home Screen – once you login

3D View Settings

Mixed reality capture – one of the key elements that lets you share the magic with others

Perf Tracing and the various levels you can set as part of Windows Performance Toolkit. This is WPR/WPA support in Systems.Diagnostics.Tracing – see this post for more details.

Process details and you can sort by the relevant column.

Process details #1 – showing various details from Power to Framerate to IO, Memory, etc..

Process details #2

Process details #3

App Manager which is where you side-load apps and manage them

Crash Data – the name says it all

Kiosk Mode – this is really interesting; you can ‘lock’ into one app and use that. I wonder how one breaks out of it when done being in this mode and wanting to get back to ‘regular’.

All the ETW (Event tracing for Windows) details and the providers you can want. Again pretty standard stuff.

Simulation – not sure if this is used for regression or playback in another setting – where the room capture would help. Does open up interesting possibilities. I think it might allow one to capture the spatial mapping of a room, which then you might be able to use in the emulator (such as someone has done here).

Networking Configuration where you go and manage this.

Virtual Input – a great time saver.

And finally some of the security settings to ensure no one on the same subnet is mucking with you; or when there is more than one device then you talking to the right one.

## Creative Coding

As we start to play and explore with new AR/VR mediums like Oculus and HoloLens there is a stronger shift from the traditional medium of working from a more transaction with-known-outcome based model to a more expressive and exploratory model. In the context of many enterprises this is a bigger shift – albeit some of it they have started seeing with mobility but still not the same.

I really like how Rick explains and expresses this both in terms of definition and thinking. The clay analogy I think really helps.

## Testing LaTeX

Can we see the a formula displayed in lovely maths? (and trying a simpler equation, as the last one did not parse properly)

$i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>$

Ohh, looks pretty! Though some LaTeX is being finicky, need to take out time to start posting some stuff here, given this is supported. 🙂

## Z-Wave visualiser?

At home I have a multitude of sensors and devices – ~80 or so which are a combination of water sensors,  motion sensors, door sensors, humidity, temperature, etc.

A good bunch of these are controlled and integrated with Smartthings, and some I can interact with other apps (e.g. Amazon Echo or Philips Hue etc.).

Most are Z-Wave based and some are WiFi. I wanted to know if there are any z-wave visualisers? Essentially software that uses a USB z-wave network device as a node and then can plot what the mesh looks like. Would be awesome to be able to debug the packet hops from the controller to the device.

Any suggestions?

## WordPress 4.1 and Firefox 34.0.5 Bug

I am on the latest version of both WordPress and Firefox as of this writing – namely v4.1 and v34.0.5 respectively and running on a TechPreview of Windows 10 (Build 9879 to be precise).

My main browser is Firefox, and whilst I also have Chrome and of course IE – I use them only on occasions of in some cases when I have to use them for one reason or another.

When trying to login to WordPress from Firefox, I just cannot seem to login and get the dashboard. I know the user name and password is correct, and I don’t get any error – but keep getting the login screen again. Logging in again with IE is not a problem. I can’t recall when this started – if it was when WordPress was updated or FireFox – but both have recently, and it is very annoying to say the least!

I haven’t had the time (yet) to try and figure out what is wrong.

## ‘Old’ Surface (PixelSense) stuck on boot up

Samsung SUR40 which recently got stuck at boot up (see the photo below). Once the Kernel lib loaded, for some reason was getting stuck at:

StrongROM version 03.30 Build:_P

Powering it off or on, did not help. Neither did trying to get into the BIOS to try and change some things.

I did get this back up and running, and in the end the solution was quite simple – I had to physically take out the power cable (just powering it down was not enough); wait a few seconds and then plug the power cord in, and boot it back up.

## Interesting Find #24

Here are the interesting finds of this time around.

1. IDA – A cool debugger which runs on most platforms and different from the MS variety.
2. TypeScript – as the name suggests, it is strongly typed JS which compiles down to standard JS! This can only be good I think given all the crazy things one can so in JS. More details here.
3. Can you hide anything from NSA?
4. TV Tuners – did you know they can let you spy – who knew?
5. grepWin – a powerful regex-based search and replace tool – and can work across multiple files.
6. Twine – is a wireless sensor block tightly integrated with a cloud-based service. What all things one can do with Twine? Here are a few examples for inspiration.
7. Visual.ly – tell your story visually; good resource for infographics and data visualisation
8. Can an \$11,111 coffee pot turn out a better cup of joe?
9. What the Internet of Things (#IoT) needs to become a reality? Freescale has an interesting paper (pdf) on it.
10. High expectations Asian Fathers – enough said!
11. How to be a hacker?
12. 14 Kickstarter projects to watch out for in 2014
13. Alloy.UI – a really cool HTML and JavaScript library with lots of useful UI features. Builds on top of YUI3 and Bootstrap.
14. DON’T PANIC – The Facts About Population. Very interesting, especially the visualisation. You can find more on that here.
15. As sites and services become product aware, the age of pervasive commerce begins (remember Minority Reports?).

## Broken Nike FuelBand

The wife recently bought a Nike FuelBand which she was loving. However in about 4-5 weeks of regular usage, the strap on it broke and the links which hold it together fell apart. The device itself is working, but it cannot be worn now as it won’t lock making it quite useless.  😥

I was quite surprised as this is supposed to last more than this given both what it is meant to do and the cost of the device as well. Now this is an expensive paperweight.

Here are a few photos. This is what it looks like now, and cannot be locked, making it useless:

This is how it was when it broke and fell apart – we tried to rescue and pick up everything we could, but it seems there is a very small spring inside which is lost. This spring is crucial for the ‘lock’ and which acts as a rocker. Without this spring, this is useless.

This is I was trying to figure it out how to put it together and when I figured the small metal part (silver in colour) needs a spring which rocks it up and down. When one locks and unlocks this that spring is what is acting and allowing you to open and close this.

This is how the broken piece looks like after I put it together, everything looks OK, except it won’t lock.

I am not very happy with this situation right now – if this was a year after using the Nike FuelBand, perhaps I could still understand but 4 odd weeks of usage and this breaking is not acceptable.

I don’t have much hope in Nike, as where I am currently living, this is not sold and I am sure they would try and squeal out of trying to replace this or fix this.

## Securing you DokuWiki

After my WHS died and I moved to a Synology DS413 and using that as a ‘home server’ and have been extremely happy with it! The only thing I miss is backing up the Windows machines automatically (as WHS did), but overall I think this is better, flexible and more powerful compared to WHS.

I needed to look for a new wiki software. I recently moved from ScrewTurn Wiki (which was great BTW, but then is a dead project now) to DokuWiki which is perfect for my needs. I run two wiki’s at home and has much of our day-to-day things we as a family need. There are some sections of the Wiki, which are sensitive and I don’t want anyone one the network getting to it. I wanted to authenticate the user and once they login only then get to that.

As it turns out, securing your DokuWiki is quite simple. If you are interested in a similar setup then here is what you need to do:

1. Disable the registration option on Configuration settings. Some details on this can be found here.
2. Update the ACL (more of that here), there is a user group called ‘ALL’; set the permision for this group to “None”.
3. For the user group “User”, change the permisions to Edit.

This will ensure only logged in (and of course authenticated users) can read and edit and a anonymous user cannot see anything.

The only catch in this is that you need to manually maintain the users (e.g. add new users); my userbase is very small at home, so this is not a challenge at all.

## WordPress 3.6 and IE10

I don’t know what WordPress thinks of IE 10 (running on Win 8), but when I upgraded to WordPress v3.6, and I login to the Dashboard, it does not like IE running in compatibility mode and shows me the following. It would think I am still running IE 6! Also whilst I don’t get this with the compatibility mode switched off, everything does not work correctly and one has to use either Firefox or Chrome.

## What is a Vodafone thinking with Site Timing?

This has to fall in the weird category. Vodafone’s Corporate Online site, where I need to login to see my company provided mobile bill has timings from 07:30 to 22:30 GMT – WHY??? Don’t they get it, this is online and the site can be up and running 24×7! This is not some technical support I am talking about where they have actual humans monitoring and answering – this is access to the billing system.

When you are in another country and timezone (like I am right now), does Vodafone have any idea on how irritating this can be?

## Hello World

Yes, I am still alive. Between a baby and work, don’t have time for much else. I did want to say Hello World. Will try and be more regular here.