I’m having trouble focusing (according to the Melon anyway), but at least the device and software seem to be functioning. As expected, the software needs a lot of work. No use in bashing beta software though.

Many dating services ask countless questions. With EEG matching, there should be no need for the questions that most people shade the truth with.

I have no idea what this ‘Color Spectrum Analysis of EEG Data’ (from Biometric Dating) is, but it’s sure pretty:

Granted, they are in the process of testing their theory by using data from long-term married couples. I sure hope they’re using happily married couples, otherwise the consequences could be disastrous!

I’m sure ‘the kid in the garage without a degree’ is no dummy, but this premise:

And so that large percentage of medicine that is effectively being practiced by non-MDs is going to expand.

is simply ludicrous.

There’s a big difference between creating health and wellness appliances and mobile applications and diagnosing and treating patients. The distinction is outlined in FDA clarifies the line between wellness and regulated medical devices. If you claim your product acts like a doctor (treat or diagnose) or doesn’t fall into the “low risk” category, then your company will have to follow FDA regulatory controls.

The HL7 FHIR (pronounced “fire”) standard has been under development for a while. It became a Draft Standard for Trial Use (see DSTU Considerations) in Jan 2014. The recent announcement of the vendor collaboration Argonaut Project has fueled some “interoperability excitement”™.

Introduction

The most common use for JavaScript frameworks is to provide dynamic client-side user interface functionality for a web site. There are situations where a JS application does not require any services from its host server (see example unhosted apps). One of the challenges for this type of application is how to distribute it to end users.

This post will walk through creating a static AngularJS application (i.e. no back-end server) and how to create and publish a lean Docker container that serves the application content. I will mention some tooling but discussion of setting up a JS development environment is beyond the scope of this article. There are many resources that cover those topics.

Also note that even though I’m using AngularJS, any static web content can be distributed with this method.

Side Note on AngularJS

One of the major advantages of using AngularJS over the many JavaScript framework alternatives is its overwhelming popularity. Any question or issue you may encounter will typically be answered with a simple search (or two).

Creating an AngularJS application

The easiest way to create a full-featured Angular application is with Yeoman. Yeoman is a Node.js module (npm) and along with its Angular generator creates a project that includes all of the build and test tools you’ll need to maintain an application.

Shell

1

2

$npm install-gyo

$npm install-ggenerator-angular

Generate the Angular application with yo. Accepting all the defaults will include “Bootstrap and some AngularJS recommended modules.” There’s probably more functionality included then you’ll need, but modules can be removed later.

Shell

1

2

3

$mdir myapp

$cdmyapp

$yo angular myapp

The yo command will take a little while to complete because it has to download Angular and all of the modules and dependencies.

Creating and Publishing the Docker Container

A typical Ubuntu Docker container requires more than a 1GB download. A leaner Linux distribution is CoreOs. The coreos/apache container has a standard Apache server and is only ~250MB.

Add a Dockerfile file to the myapp directory:

Dockerfile

1

2

3

4

# Build myapp server Docker container

FROM coreos/apache

MAINTAINER MyName

COPY dist/var/www/

The key here is the COPY command which copies the content of the dist directory to the container /var/www directory. This is where the Apache server will find index.html and serve it on port 80 by default. No additional Apache configuration is required.

Create the docker container:

Shell

1

$sudo docker build-tdockeruser/myapp.# This will create a 'latest' version.

Output:

Now push the container to your Docker hub account:

Shell

1

$sudo docker push dockeruser/myapp

The dockeruser/myapp Docker container is now available for anyone to pull and run on their local machine or a shared server.

Starting the Application with Docker

The application can be started on a client system by downloading the running the dockeruser/myapp container.

Shell

1

2

# Instead of 9001, use 80 or 8080 if you want to provide external access to the application

The run command will download the container and dependencies if needed. The -d option runs the Docker process in the background while apache2ctrl is run in the container in the foreground. The application will be running on http://localhost:9001/#/.

To inspect the Apache2 logs on the running Docker instance:

Shell

1

2

3

4

5

$sudo docker exec-it my-app/bin/bash

root@bfba299706ad:/# ls /var/log/apache2/

access.logerror.logother_vhosts_access.log

root@bfba299706ad:/# exit # Exit the bash shell and return to host system

$

To stop the server:

Shell

1

$sudo docker stop my-app

If you’ve pushed a new version of the application to Docker hub, users can update their local version with:

Shell

1

$sudo docker pull dockeruser/myapp

This example shows how Docker containers can provide a consistent distribution medium for delivering applications and components.

My 6 year old Lenovo T400 finally gave up the ghost. It didn’t totally die (it probably never will, thank you IBM), but the screen was starting to flicker and it reliably rebooted itself whenever I was doing something useful. Very annoying.

Decision Process

I’m not going to detail all of my system requirements or decision making process, but here’s a high level outline:

I primarily need a Ubuntu development machine. My T400 is a dual boot 12.04/XP. In recent years I’ve rarely used Windows, but there are some tools that are nice to have around (e.g. Visual Studio).

I looked hard at the MacBook Pro but at the end of the day I just couldn’t bring myself to go that route. Besides the higher hardware cost/performance ratio re: the alternatives, I guess I’m just not a Mac person.

I really wanted to get an Ultrabook form factor. Not only for the portability, but I’m not ashamed to say that the ‘cool factor’ played a part in the decision.

I looked at all of the standard Ultrabook offerings: Lenovo, ASUS, Dell, System76, Acer, etc. No touch, no ‘convertible’ (if you need a tablet, buy a tablet), no Windows 8. The deciding factor for me was reliability. Besides the T400, I have a T60 in the closet that still runs fine.

Buying Experience (not good!)

Products that are discontinued, overstocked, or returned unopened. These items are in their original factory sealed packaging and have never been used or opened.

Boy was I disappointed when the package arrived! First, the only thing in the box was the laptop. No AC power adapter, no docs, no nothing. To my amazement, the machine was in suspend mode. When I opened the lid it came out of hibernation to a Win7 user password prompt! I didn’t even try to guess a password. I couldn’t believe it!

The machine was in pretty good shape physically, a little dirty and missing a foot pad, but no dents or scratches. Certainly opened and used! At least the BIOS confirmed that I got the correct hardware (i7, 8G RAM, 256G SSD).

After many calls to multiple Lenovo service centers I got nowhere. No return, no exchange. Maybe I should write a letter to The Haggler, but even then I probably wouldn’t return the machine anyway. I got a great price (much better than what I could find on eBay) and the Lenovo Outlet no longer has any i7 X1 Carbon’s listed. Also, I’m a techie so disk partitioning and re-installed OS’s is not a problem.

I’m thinking now that Lenovo might have screwed up a repair shipment and I ended up wiping some poor schmuck’s SSD. Oh well.

Anyway, as unpleasant as this was, I now have a development laptop that should meet my needs for many years to come.

Installation Notes

Dual boot. Here’s the right way: WindowsDualBoot, but because I installed Ubuntu first (mistake) here’s what I did:

Used GParted to partition the disk to my liking. Don’t forget to add a Linux swap partition (8G for me). The Ubuntu installer will complain if it’s not there and find it automatically if it is.

Created a bootable Windows 7 USB stick. The Universal USB Installer above works fine for this. Install Windows 7 on the Windows partition.

After Step #3 the system will only boot Windows. Use Boot-Repair (option #2) to re-install GRUB.

Ubuntu 14.04 seems to work flawlessly on the X1. There were only two hardware compatibility issues that I read about:

Not waking up from suspend mode. This is resolved by updating the BIOS firmware. Upgrading from v1.09 to v1.15 fixed it for me. The Lenovo firmware only comes as a CD image (.iso) or a Windows update application. Because the X1 does not have a CDROM drive the only reasonable way to upgrade is via Windows. People have upgraded the firmware via USB (see BIOS Upgrade/X Series), but it’s really ugly.

Fingerprint reader. Haven’t tried to use it, and probably won’t.

Happy Ending (I hope)

Like most things in life, nothing is ever perfect. This experience was no exception.

I have a JRuby/Rails project with some Rspec tests that take 80 seconds to complete on the T400 and 20 seconds on the X1. I can live with that improvement. 🙂

I made an off-the-cuff comment because of the contrast I saw between the way other industries approach standards vs. the medical device industry. Bridget and Tim kindly responded with informative feedback.