Validated Learning using Google Analytics

The rising demand for getting a Minimal Viable Product (MVP) to the market as quickly as possible has highlighted the criticality of Validated Learning within the Software Development Life cycle (SDLC.) Validated Learning is an important step to take after you implement your vision because it allows you to test your product or feature to determine whether it is useful. To test, we use a principle called the Build-Measure-Learn. In Eric Ries’ 2012 book “The Lean Startup,” he describes the Build-Measure-Learn principle as a feedback loop which enables you to act on the metrics (feedback) you’ve gathered and decide if your vision is valid or if you should change it up a bit, or “pivot” as Eric puts it. Throughout the remainder of this blog post, we’re going to apply 2 of the 5 principles in Eric’s book: (1) Validated Learning and (2) Build-Measure-Learn. Let’s consider our first scenario.

Imagine you have a vision for a feature that includes 2 ways for your audience to consume some data: (1) A tabular view and (2) a very rich visual view in a map format. The tabular view will probably take the least amount of time, but the visual view can more than likely take much more time depending on the implementation. Your vision includes a button on the tabular view to switch to the map view, but the page does not reload to capture this event. This is the perfect usage of a GA Custom Event.

Google Analytics (GA) can be a powerful tool to achieve the metrics for proper Validated Learning. Typically, a marketing professional would include a small script on each page and simply track each page to determine the metrics. However, with more and more websites adopting a Single Page App (SPA) architecture, this becomes much trickier because of its asynchronous nature. There are many techniques that can use Google Tag Manager (GTM) to help with some of the inherent difficulties of page and event tracking in a SPA, but for this post we are going to focus on GA directly.

Let’s Build Something!

Using the code example above you can attach a click event to capture these asynchronous events in your web application.

Once this is setup you can test your events in the GA Dashboard under the Real-Time > Events or Behavior > Events > Overview (Note: this will take up to 24 hours to view events). A similar technique can be used to track page views on a SPA since you may have a menu that loads separate views entirely.

Another challenge I faced was how to test all of this code locally while monitoring GA for these events. I use Visual Studio 2015 with IIS Express which simply uses localhost in your url bar with an appended port number. Since GA requires your tracked website to end in a top-level domain, you must do a few things to make this work. When setting up your property in GA, you can include any url you wish since you will configure your local system’s host file to accommodate it. I always configure something like “localhost.io” to get started. Once this is entered into your new Property and saved, its time to configure your local system. The steps I am going to use are for Windows 10, while using Visual Studio 2015 with IIS Express as noted above.

Locate your application.config file within the solution’s \.vs\config folder and edit it to include a new binding protocol that omits the url name and only includes your configured port number as follows:

Now locate your hosts file and edit:

Set the Start URL in your project file to:

If you have any trouble with configuring your local system, more information here.

An alternative to the steps above is to install the Google Analytics Debugger extension for Chrome. Once installed and turned on, you can view all GA events in the Developer Tool’s Console tab. You can download it here.

Let’s Measure and Learn!

This technique will enable your marketing team obtain Validated Learning using data from the GA dashboard on how your web application features are used, and where to focus your development effort going forward. Continue small efforts like this one, and you will be entering the Build-Measure-Learn feedback loop.

Additional Info and Sources:
https://en.wikipedia.org/wiki/Minimum_viable_product
http://theleanstartup.com/principles
https://support.google.com/analytics/answer/1008015?hl=en
https://developers.google.com/analytics/devguides/collection/analyticsjs/pages
https://developers.google.com/analytics/devguides/collection/analyticsjs/events
http://stackoverflow.com/questions/4709014/using-custom-domains-with-iis-express/32744234#32744234

Espruino Pico C# COM Test

I was very excited when I finally received my Espruino Pico from my first Kickstarter backing last week. I have a Raspberry Pi and an Arduino, but this was different because it natively ran JavaScript. Since I’m a web developer this was a programming language that I was very familiar with. My deep interest in technology started out as a kid with electronics, so being able to use C# code to communicate with a micro controller has always interested me. So far I am very pleased with the ease of use and the short amount of time it took to get get started.

2015-04-27 22.05.04

 

Here is the code for my first quick test of how C# can communicate with an Espruino Pico which you can enter instructions to toggle on the green LED as well as pushing the button on the Espruino Pico to publish an event handler in C#. Simply create a console app, paste the code into the Program.cs file and load the JavaScript onto the Espruino Pico that is located toward the top of the file within a comment block. Depending on your specific computer, you may need to modify the COM port specified on line 21.

 

 

I’ll try to get some more examples that further integrate C# code with the Espruino Pico. Enjoy!

 

More Info:

Espruino Pico Homepage

Espruino Pico Kickstarter

Espruino Twitter

Espruino YouTube Channel

Espruino Web IDE

  

Mechanical Keyboards for the Office

A couple of years ago I decided to seek out a keyboard that did not include a 10 key pad. This desired feature ended up cutting my keyboard options drastically. It is handy to have the 10 key pad, but I wanted the mouse to be closer for ergonomics. I found myself looking at a mechanical keyboard manufactured by Cooler Master 10 key-less with Cherry MX Red switches. It was unlike any other keyboard I had ever tried and I bought it. It took a few weeks to get used to, but I knew it was worth it. For those who are not familiar with Cherry MX switches, they are the individual switches beneath each key that are color coded according to their feel.

Cherry MX Red Switches
Cherry MX Red Switches

Fast forward a year or so and I was in the market again. Not because my Cooler Master keyboard had any problems, but I took it home to use it. I researched more mechanical 10 key-less keyboards and found the Code Keyboard from WADS Keyboards with Cherry MX Clear switches. It is the brain child of Jeff Atwood after seeking a perfect keyboard for programming. I was a little worried about the $150 price tag since I felt I paid as much as I a keyboard could be worth with the Cooler Master at $70. The reviews were mostly 5 star and my employer was willing to provide it to me, so I ordered it.

codekeyboard
WASD CODE Keyboard

When I received it and took it out of the box it was the heaviest keyboard I had every felt. One of my managers commented that it felt and looked like an old Russian built machine. I agreed, but I felt that was a good thing. I appreciate well built machines and this is one of them. Most of this weight is from a steel plate that the key switches are mounted to. This makes it also feel very sturdy while typing on, but does add a little more noise than membrane switches found in a typical Microsoft keyboard you will find in most offices. They were not as noisy as the Cherry MX Red switches in the Cooler Master keyboard which is a very loud keyboard. I also liked the different configurations that it offered like being able to disable the caps lock (which I set up immediately).

My first day using the Code Keyboard was good, but not great. I knew from my past experience with the Cooler Master keyboard that it took a while to get fully comfortable with so I gave it time. After 3 weeks of using it full time I can say that I am very happy with my choice. The Cherry MX Clear switches are nice, but felt a little weird at first. They have a tactile bump while being pressed unlike my Cooler Master Cherry MX Red switches. The Cherry MX Clear switches are also a lot less common than most other switches. I know the mechanical keyboards are mostly used in gaming, but they are more and more being adopted in an office setting. They are also being discovered by typists looking for a high quality keyboard that will last.

To wrap it up I would just like to say that mechanical keyboards are worth the extra money if you are someone that is interested in a high quality keyboard that is very accurate. It will also far outlast most other common keyboards.

 

More info:

Jeff Atwood: http://blog.codinghorror.com/the-code-keyboard

Code Keyboard: https://codekeyboards.com

Cherry MX Switches: http://www.keyboardco.com/blog/index.php/2012/12/an-introduction-to-cherry-mx-mechanical-switches