I had the pleasure of attending Compute Midwest 2016 today. There was a fantastic speaker line up with a few Kansas City natives.

Bibop Gresta  – COO of Hyperloop Transportation Technologies 

Bibop talked about their work on the Hyperloop. The most striking thing about HTT to me is not the technology but the way they’re creating and innovating on the product itself. Instead of a typical startup with employees, the vast majority of the work is done by people remotely from around the world in exchange for stock options per hour they work. This takes remote work and global operations to an extreme. 

A few more interesting notes from his talk:

  • HTT’s plan is cheaper than existing infrastructure (trains / subways) and self sustaining because it is energy net positive.
  • They’re using a polymer that he called Vibranium in all seriousness
  • HTT plans on using virtual windows with IPS and motion tracking facial software to move the perspective in the window.

 Bob Metcalfe – Inventor of Ethernet and Cofounder of 3Com

Bob talked about the history of ethernet and networking at large. He was a fantastic and engaging speaker. With his 40+ years of experience in the field he shared insights on building products and dealing with competition and snuck in a jab at the most recent IoT attack.

  • The idea for radio (wifi) was around before the first spec for ethernet made it into IEEE, the technology was just lacking so they pivoted until the time was right.
  • He stressed the freedom of choice among competing alternative products
  • He stressed that it’s not ok to be better than a competitor simply because you’re incompatible. This was a large problem that they fought when ethernet was catching on.
  • Humans are more and more strongly connected and companies who leverage this succeed.
  • Competition hardens us against the status quo.

Kaitlyn Thaney – Director of Programs at the Mozilla Foundation

Kaitlyn talked primarly about how Mozilla is larger than just Firefox, and went into more detail about the Mozilla Foundation. She went into greater detail about the history of Mozilla going back to the Netscape + AOL merger and how Mozilla split of from AOL shortly after. 

  • We should iterate until we reach intuition. This is particularly true for web and user interfaces.
  • Web literacy takes more than just developers
  • Hive KC
  • Mozilla Foundation protects and builds the open internet, but open source is still taboo. 

Adam Leibsohn – COO of Giphy

Adam was born and raised in Kansas City. His entire presentation was, as you’d expect, 250 slides of gifs. He started it off by stating loud and clear that it’s pronounced with a hard “g” – real issues first. In a nutshell, the vision for Giphy is to be the search engine of the messenger generation. Text is “outdated” as an input method and things are trending towards images, facial recognition etc.

  • Words are clumsy. They’re excellent at literals, bad at abstracts.
  • The printing press democratized storytelling, photography democratized moment sharing and the gif should democratize emotion sharing.
  • Stories are information disguised as entertainment.
  • Past and present storytelling is linear, but the web isn’t. 
  • Content needs to be translated for the web, not simply transposed.
  • They’re starting to to sentiment analysis on gifs.

Jordan Evans – Engineer at NASA JPL

Jordan shared plans and NASA’s vision for the next Mars rover in 2020. The goals for the next mission are:

  1. Determine whether life ever existed on Mars.
  2. Characterize the climate.
  3. Characterize the geology.
  4. Prepare for human exploration.

The overall discussion was very technical and he reviewed various parts of the next rover. He also mentioned that he considers Europa to be a much more scientifically planetary body to explore, mostly due to the liquid water.

Danny Cabrera – CEO of Biobots

Danny discussed a few of the challenges around 3D printing organic tissue and things that they’re currently overcoming. As he sees it there are two major reasons why biology is difficult:

  1. Biology is done (and always has been) mostly by hand and is rarely automated.
  2. Biology today is done in 2D petri dishes

Biobots aims to fix both of those issues by moving to 3D models. While printing organs isn’t on their immediate horizon, they seem to anticipate printing for the purpose of testing solutions and medicines moreso than transplanting. The idea is that pharmaceuticals and organs and remedies should be hyper localized to the patient rather than a cure all for the masses like chemo today.

Davyeon Ross – COO of ShotTracker

Davyeon showed the technologies involved in creating ShotTracker. They’re primary goal is democratizing (keyword at the conference) analytics in sports. Starting in basketball but plans to move into other sports.

  • You can’t improve what you don’t measure.
  • Pivoted from pure software to a hardware company
  • Hardware is really hard to do
  • Started purely consumer and moved to team based marketing

Alex Menzies – AR / VR Innovator with NASA

Alex talked about and demoed software that they had created at NASA for creating renderings of Mars for use in the Hololens so that geologists could actively participate in research on Mars from Earth. The software takes all photos from the live stream of the Curiosity and other orbiters and generates terrain from them. One of the more interesting parts of his presentation was a note in passing about choosing the best images programmatically because of the disparity in pixel density even at a distance between the rover and orbitals.

  • When the first people walk on Mars they will be accompanied by thousands of people on Earth, all living the experience through augmented / virtual reality from all the cameras and sensors on the planet “Telenauts”
  • In technology we go from astounding to normal very quickly.
  • The Hololens has been very instrumental in practicing installing radioactive materials on the new rover.

Augmented reality, big data and security were understandably the big topics at the conference. Several people mentioned the security breach in IoT recently. Overall it was a fantastic experience with a lot of interesting speakers.

We’ve been doing quite a few server migrations recently and ran into a few peculiarities with changing nameservers on Namecheap. First and foremost:

No trailing periods (.)

AWS Route 53 and other hosting providers will give you NS records with a trailing period. If you use a trailing period in a nameserver record for Namecheap you’ll get a very generic error that doesn’t tell you what’s wrong.

A few other things:

  1. The name of the name server should be provided without spaces in the beginning as well as in the middle of the name servers hostname (e.g. as “ns1. nameserver.com” may result in error, while “ns1.nameserver.com” will be accepted).
  2. The name server should be provided without the trailing period in the end (e.g. as “ns1.nameserver.com” but not “ns1.nameserver.com.”).
  3. Name servers should be provided in the fields without their IP addresses.
  4. Name servers should be properly registered, i.e. it is possible to point a domain only to an existing name server.

There are NPM packages for implementing various analytics providers in Angular 2 but for simpler requirements there isn’t always a reason to include Yet Another Dependency.

At it’s most basic implementation what we usually need to do is track pageviews. To do so we need to watch the Angular 2 router (or your router of choice) and trigger a Google Analytics event.

In your index.html include the Google Analytics script but remove ga('send', 'pageview' ... ):

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXX-XX', 'auto');
</script>

Next, in one of our application files (I would recommend the application root but not the application bootstrap file) we need to cachethe current route,add a router subscription and trigger an event if the route changes.

In app.component.ts:

import ...
declare var ga:Function;
export class AppComponent {
  currentRoute: string = '';
  constructor(router: Router) {
    router.subscribe((route) => {
      var newRoute = route || '/';
      if(newRoute !== this.currentRoute) {
        ga('send', 'pageview', newRoute);
        this.currentRoute = newRoute;
      }
    });
  }
}

The above is all pseudo code and needs modification for most use cases, but in general we need to:

  1. Include Google Analytics script in index.html but remove ga('send', 'pageview', ...);
  2. Add declare var ga:Function; to app.component.ts
  3. In app.component.ts cache a version of the previous route.
  4. In the constructor in app.component.ts add a router subscription and if the route changes, use ga('send', 'pageview', ...); to send the update to Google Analytics.

Testing your local environment against Xcode and Browserstack is great but at the end of the day they are still just emulators. If you need to test against an actual mobile device it is useful to load your current local environment on a mobile device and do your testing immediately before you push to a remote server.

The following instructions are pretty specific since most Front End dev where I work is done on a Mac but I imagine that the instructions would be similar for a Windows machine.

For the record there are third party plugins that you can do this with as well, but if you do not already have those installed as part of your workflow that should not stop you.

Mac to iPhone:

  1. Verify that your server is running locally, for example, http://localhost:3000
  2. Connect to the same network on both devices.
  3. Find your computers name by either looking in your sharing settings or opening up your terminal. Ex: acarlson-mac
  4. In a browser app on your phone go to {{your-computer-name}}.local:{{port}}

Mac to Android:

  1. Verify that your server is running locally, for example, http://localhost:3000
  2. Connect to the same network on both devices.
  3. Find your computers internal IP address by either looking in your sharing settings or using ifconfig in your terminal.
  4. In a browser app on your phone go to {{your-internal-ip}}:{{port}}

Quick tip: When working in Angular 2 if you get an error that looks like:

EXCEPTION: TypeError: Cannot read property ‘visitStatement’ of undefined

Or:

EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot read property ‘visitStatement’ of undefined

Try checking your code for an empty ‘click’ event binding (<component (click)=""></component>). If the event is left empty it can throw that relatively nondescript error.