Themes for 2019

I am late to the party. Normally I tried to take off until Epiphany before I return to work, but I needed to start working on the 2nd so I wasn’t able to get to this post until now. As is my tradition I set my themes for the year that I want to focus on. I find doing so helps me stay on track and make sure that I am growing and improving myself.

Theme 1 – Health

I am carrying this one over from last year but it is always a good one for every year. In my feasting for the holidays I put on a little weight so I am going to attempt to lose 20 pounds before Easter. I hadn’t decided what I would do at the start of the year, but on Epiphany I decided I would do intermittent fasting and cut back on beer (and try to eat fewer carbs when I am eating). So far I am down 9 pounds 2 weeks in, so I should be able to exceed my minimum by Easter since the fasting will continue until then.

In addition to the health benefits of losing weight, I also would like to look better. Later on this year I will be involved in pitching for a series A and I want to look my best in those meetings. Ideally I would like to be more active this year too. When I was testing the Apple Watch that Sofi had I must admit the gamification aspect of closing rings was getting my to walk more and when I was walking was pushing me to walk faster to keep the heart rate up and close the exercise circle. So maybe I will take the plunge this year on one. Though at this point if I do that I would probably hold out for the series 5 in the fall.

Theme 2 – Learning

I have a couple of things in this bucket for the year. First is the machine learning course that I mentioned a few weeks ago. I am just about finished with the week 2 work and I can already see the benefits. It is already kicking my brain into gear thinking about the problems that we are trying to solve at work. Additionally I feel like the base knowledge will enable me to ask the right questions and help keep the ball rolling on that part of our system.

The second area of learning is going to be focused on is reading. Traditionally this is something I really push myself on, but I have fallen away from it a bit in 2018 just with interrupted sleep due to the ages of my children. Now that I am past that stage 2019 is going to be refocusing on getting through a bunch of books. Currently I am reading Leaders Eat Last which was a Christmas gift from my boss. I want to get back into my old pattern where I would try to read 10% of a book a day so I can get through a book in 10 days

Theme 3 – Security

Given all the sites that are constantly in the news each year with getting data stolen, I have decided it is time to take my password security to the next level. Instead of hard passwords I memorize I have switched to using a password manager and generating really long and random passwords that I don’t know. This makes is possible now to have no repeated passwords anywhere and I have found that it has already simplified my life.

I am also considering going the hardware key route instead of just using an authenticator app for 2 factor passwords, but I haven’t yet decided if I want to do that.

Theme 4 – Public Speaking

I have never been very comfortable speaking in public. Anyone who knows me knows that I am very talkative after I get to know a person, but something about being on a stage with all that attention directed at me has always made me uncomfortable. That being said it is a skill that I need to develop to go where I want to go in my career. Beginning this month I will be speaking at our board meeting, and then with needing to fund raise later on it is time for me to conquer this.

Fortunately the timing couldn’t be better in that I was also invited to speak at a developer meetup this year. I can’t think of a better way to practice this skill than to be speaking to a friendly audience of developers discussing technical topics. As that is an area in which I always enjoy speaking. Over my holiday break I began work on a talk, but when I realized it was going to take too much time I pivoted over to the Machine Learning class first as that is a greater need for me. Once I finish that class I intend to focus my time on putting this talk together and then I will get myself on the Calendar as a speaker (hopefully by Q2).

Conclusion

Those are my areas of focus for the year. As always I will do the run down at the end of the year and see how they turned out, as well as what popped up that I didn’t predict for the year. May everyone have a happy and productive year.

Coursera Stanford Machine Learning Course

I just signed up to take the Stanford Machine Learning Course for free on Coursera. Anyone who wants to take the course with me is welcome to join me over here: https://www.coursera.org/learn/machine-learning. They are only accepting enrollments until January 12th I think it said so not much time left to sign up.

2018 Year End Review

Recap for 2018

As is my tradition it is time to review 2018 and see how my year unfolded. The first thing that I always do is review my themes for the year and see how many of them I hit.

In general 2018 was an interesting year. The year started out with me on vacation. When I was on vacation I realized that I would have to change jobs in 2018 and luckily it all worked out for the better. I can say making that move was one of the best decisions I have made in my career. The difference between the first half of 2018 and the last half was a study in extreme opposites on the career front. Probably the biggest takeaway from that whole situation is that company culture may be the most important thing when it comes to choosing a position.

Without further delay here is how I did for 2018:

Health

I didn’t drop as much weight as I had hoped to at the start of the year. I think I lost 20 pounds in the first quarter and kind of slacked off after that. There will be another push for that again this year as I always like to start Q1 as a quarter to fast since Q4 for me is a quarter to feast. I haven’t figured out what approach I Am going to take? In the past I have done the Primal Prescription, Slow Carb, and Intermittent Fasting / Time Restricted Feeding. I will consider what approach I am going to take over the upcoming days. I also did DNAFit this year so it would be good to try to incorporate their diet ideas for my specific genes in whatever I decide to do. I should also push for more regular activity, so maybe in the end I will need to break down and get an apple watch just to use the data to drive accountability for myself. Not sure yet I have been holding out for it to do more than it currently does before I take the plunge. I do like that the series 4 at least has a larger display.

I suspect 2019 will involve more public speaking for me based on how things are looking so I also want get healthier for that as it is nice to look good if you are on a stage or the center of attention.

More Blogging

This theme was an epic fail. As I check my posts not counting this post there were a paltry 13 blog posts this year. Barely an average of 1 per month (vs my goal of 52 in general). This one I don’t even mind missing this year because it was for a good reason. I had so much stuff to learn for my new job this was one of the easiest things to cut to get more time. As I have settled in I hope to do better this year, but in general if I am pushing for a sprint deadline this is an easy thing to cut so I can get more code across the line. Once we get our product to market I hope to be able to plan more reasonable sprints.

Learning

I nailed this theme. It has been a great year for learning. Instead of the learning being books I read it has been practical things. First I learned Go Lang and implemented a micro serviced base architecture in it. I am still doing a lot of learning in Go. I haven’t yet figured out really the ideal patterns yet. One thing that I miss from Spring is how opinionated the framework is. There is a remarkable amount of consistency in code when you have the strongly defined stereotypes like that. When you see Go on the internet it is all over the place. Sometimes it feels like node code, sometimes it feels like C code, but it never really feels like people are using the same consistent patterns. I have played around with sort of the controller / service / repository layers and not sure that is the correct idiom. I have played around with just general event handlers and middleware patterns. I think this year will still be me trying to figure out what is the best patterns to use for backend services.

On the business front there was also a lot of learning for me. For the first time in my career I built an agile process that our team uses, and got a brand new team that didn’t know each other at the start off to a very good working cadence. Our process has worked so well that other parts of the organization have adopted it as their baseline and started iterating on it to adapt it to their teams. I have also applied some of the things I learned from domain driven development to build a model that allows the business and the technology teams to communicate with the same language.

Architectural Changes

This was underway when I left my previous company. We managed to convert some of our apps to Java from Groovy. We were doing this on a piece by piece basis at first going after the easy parts. We were also doing some restructuring to address some performance problems in the architecture around the time of my departure. This I would probably only give 50% to. Had I remained in that role I am sure we would have made major changes by the end of the year, but the organization had become too political for me and I got the opportunity of a lifetime at the same time.

Conclusion

All in all 2018 was another great year. The year ended much stronger than it started and I feel like I had a lot of personal growth this year. Looking forward to 2019 it is going to be a huge year for our company and for me personally.

Site Upgrade

I decided to upgrade my site to the new version of Ubuntu as I haven’t done that for a couple of years. It is always a nice thing to work on when I am on vacation as it is the sort of thing that I don’t really get around to normally when I am busy. What a pain that ended up being.

The Upgrade for the OS itself went very smoothly as it seems to normally do so for Ubuntu. But the upgrade to the newer version of PHP broke everything with my site. As I think back actually I think this happened last time when I went from Ubuntu 14.04 to 16.04 as well and it jumped from php5 to php7. I ended up with about a 3 hour outage trying to sort everything out.

The big issue I saw was the default user that php was using was different than the nginx user so it couldn’t write to the Unix Domain Socket. I also noticed all the configuration advice for nginx was very different than when I set up this site. It seems like things are laid out better with the whole snippets of different configurations instead of sort of everything going in the default.conf. At some point I may want to start over again from a blank AMI image and import my content into it. Then I could setup nginx a little bit more modern. Seems like there are lets encrypt plugins for it too, so I am wondering if I could have it auto-renew my certificates.

Another thing I could do if I redid the site, would be to switch to mariadb. I have heard it is supposed to be faster than mysql it might be fun to mess with something different. That being said I probably won’t get to that this winter as I am currently working on some content for a talk and I also want to spend a little time doing some machine learning classes on Coursera before I get back to work.

I did take advantage of the time in the config files to figure out how to tighten up my SSL Labs score. I found that I was missing just 1 item to push my key exchange test from a 90 to a 100 so I implemented that. I was hoping to be able to turn on TLSv1.3 as well, but unfortunately Ubuntu 18.04.1 ships with a version of OpenSSL that is too old to support it. I saw on a mailing list that it is supposed to be coming though so hopefully soon I will be able to update to that.

Reactive Streams Talk

Of all the regular conference speakers on the Java circuit Venkat is my favorite. He has the ability to break down complex topics and make them very simple to understand. In addition to all of that he also shows you why you should care, and how whatever he is presenting can make your development life better. I always hope that when I am explaining something that I can do it 1/10th as good as he does as then it will probably come across pretty fairly understandable to the person that I am talking to.

Venkat has done it again, I was looking at some news in my blog feed and one of the stories had a link to a talk he did at Devoxx Belgium (a conference I have always dreamed of attending) on Reactive streams. In 2014 I was at Venkat’s talk at SpringOne and it completely blew my mind and showed me why I needed to embrace Java 8 Lambda’s and Streams. With this talk on Reactive he is taking the same approach. Breaking reactive down in a way that you can relate to the Java 8 streams features and showing you why it matters. If you have a spare 2.5 hours this talk is well worth it:

Google Kubernetes Engine

Introduction

I have been messing around with Google Kubernetes Engine for the last few weeks now (as we are deploying my new app to it) and I have to say overall I am impressed. There has been a lot of talk about Kubernetes for a while and at first I was wondering if it was just the next piece of tech being over-hyped like so many things. Having used it now for a month I can say I understand why people are so excited about it. The learning curve is steep, but once you climb it, you will really appreciate the power of the platform.

As stated in my previous post, I have been building a Micro-service architecture in Golang and for deployment we decided to go with GKE. Go seems to be extremely friendly for docker containers, I have been using Alpine as my base and the container size of each service has been really tiny (around 10MB or less). This is quite a difference compared to Java containers that end up very large when you think of all the jar files that go into a typical spring boot app. There are a few things that you need to do to build your Go app for docker. You need to disable CGO so and tell the build to use Go’s networking for DNS resolution and not to rely on GLIBC’s as Alpine is built on musl libc. The other great thing about Go is the cross compiler is built into it, so you are an environment variable away from being able to compile your app for Linux even when running on a Mac as I do. The only other thing I do is add ca-certificates to my alpine base for SSL connections.

History

Initially when I started building my backend I was using Spring Cloud Gateway and Consul to handle load balancing and service discovery. When I went to bring our services to the cloud I discovered those would no longer be needed as Kubernetes has built in load balancing and service discovery. The integration between Spring Cloud and Consul is great, and what happens is you can just register your app name in consul and spring cloud will automatically route to it based on name. I have an Auth service named auth and I would hit spring cloud at http://localhost:8080/auth and it would look up the auth service in consul and route the request there automatically to my auth service which was running on 9999 at the /. I wanted to keep the same sort of approach in my Ingress and service discovery in Kubernetes.

Kubernetes the beginning…

 Initially I started using the default Google Ingress which behind the scenes provisions a Google Cloud Load Balancer (HTTP/HTTPS) load balancer and then should route the different requests to the different services based on your kubernetes service and Ingress. I was having issues getting the Google Ingress to work correctly with the URL rewriting that I wanted to maintain from my previous design and I discovered a second issue with it, which was it doesn’t support Websockets. We are planning on doing a lot of app communication between the backend and front end via a  websocket and this was going to be a painful limitation for us. We considered using Server Sent Events to push events to the client and rest calls for the messages from the client, but this wasn’t ideal.

I did some digging around and discovered that you can install NGINX as your ingress and behind the scenes it provisions a Google Cloud Load Balancer that is a TCP Loadbalancer. The advantage of this is that we can now send websockets into our cluster. Instead of our SSL terminating at the GCLB, it would now terminate at our Ingress when we were ready for it. As soon as I switched to NGINX all the URL rewriting issues I was seeing went away.

TLS Configuration

Once I had reached a point of having traffic into my cluster from the outside, I decided it was time to provision TLS. I discovered Certmanager which allowed me to configure my certificates through Let’s Encrypt my preferred certificate issuer. When I ran the SSL Labs test against my cluster I discovered that SSL was configured really well and I scored an A+ on their test. The only issue I am having is trying to figure out how to enable support for TLSv1.3 I haven’t been able to get the Ingress to support that even after messing with the NGINX configmap. It is supposed in the current version of the NGINX Ingress, but it is disabled by default and I am still fighting that part of the config.

Configuration examples

The final challenge that I faced was supporting multiple URLs for my cluster and just routing the Ingress based on what URL was being requested. I created a fanout Ingress which worked great but I struggled to find a config that would allow me to have multiple secrets for TLS depending on the URL. I finally found that config and thought I would share it here (which sensitive details changed).

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target
: "/"
nginx.org/websocket-services
: haskovec-api-service
name: nginx-haskovec-api-ingress
spec:
rules:
- host: api.haskovec.com
http:
paths:
- backend:
serviceName: haskovec-api-service
servicePort: 9999
path: /auth
- backend:
serviceName: haskovec-api-service
servicePort: 9998
path: /service2
- host: service2.haskovec.com
http:
paths:
- backend:
serviceName: service2-service
servicePort: 9999
path: /auth
- backend:
serviceName: service2-service
servicePort: 9998
path: /service2
# This section is only required if TLS is to be enabled for the Ingress
tls:
- secretName: api-certificate-secret
hosts:
- api.haskovec.com
- secretName: service2-certificate-secret
hosts:
- service2.haskovec.com


The above Ingress shows using multiple hosts connecting to multiple pods behind a service and routing based on the URL and domain name. It also shows what multiple TLS certificate secret stores look like.

To create your certificates with Certmanger you will need to configure an issuer  as below (again details changed):

apiVersion: certmanager.k8s.io/v1alpha1
kind: Issuer
metadata:
name: letsencrypt-production
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
#Email address for acme registration
email: jeff@haskovec.com
#Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-production
#Enable the http-01 challenge provider
http01: {}

And a certificate:

apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
name: api.haskovec.com
spec:
secretName: api-certificate-secret
commonName: api.haskovec.com
dnsNames:
- api.haskovec.com
issuerRef:
name: letsencrypt-production
kind: Issuer
acme:
config:
- http01:
ingressClass: nginx
domains:
- api.haskovec.com

You configure an additional certificate as above for each domain name that you are getting certificates for. And just like that certmanager automagically goes out to let’s encrypt gets certs for that domain name and stores it in the referenced secret.

Conclusion

All things considered I am blown away by working in a Kubernetes environment. Google takes away the pain of actually provisioning your cluster so you can focus on your app. Deployments are a breeze, I just push all my new docker containers, updated my deployment yaml file and apply it, and kubernetes does a rolling update of all my services. This is allowing us to basically have infrastructure like we are a company with a huge devops team when in reality we have no devops engineers. I will definitely be using this on my projects going forward!

Go lang

It has been a crazy few months in startup land. The interesting thing for me about startups is no matter how crazy it is compared to corporate work, I find myself really content amidst the chaos. The big change here is we have decided to build our backend architecture in Go instead of Java. Having done Java for 19 years this is a big change, but for business decisions we decided that the trade offs with Go were better for our long term business needs than the trade offs with Java. Now that I have been using it for a few months I figured I would discuss some of the differences between the languages and what I like and dislike about each.

First Impressions

Just from an initial impression to me, Go seems like a cleaned up C language. You basically have a low level language with primitives and structs, slices (lists in Java), maps, and not a lot more. You end up having to build and write more code than in Java. But in sort of a nod to the good parts of OO they have interfaces and methods that you can attach to structs. At that point it is almost like a super lightweight C++.

I find that I spend a lot more time wiring up code in Go. Having done Spring now for 10 years you spend very little timing wiring up your code as everything is autowired, and you mostly just focus on business logic. Same for SQL Spring Data provides such a nice DSL you don’t write that many database queries either. In my initial analysis it took about 10 times as much code to write a simple REST backend in Go as compared to Spring Boot. But it used 1/10 as much RAM or less. This is the reason we decided to spend more money on Development costs (as it is much more code to write than Java) as we believe the savings on cloud hosting costs down the line will make it a better decision for us.

Go produces a single binary just like Spring Boot gives you a fat jar so I consider them equal here, but the startup time for Go seems to be instant, where as due to all the reflection and wiring at startup in Spring it seems like those apps typically take about 5 seconds to start in my experience (if there is a database involved).

Ceremony

General

Go has taken some steps to remove the ceremony in the language. One of the big differences that I notice is that you no longer needs ()around your statements in for loops, while loops and if statements. I repeatedly find myself putting those in by default and then having the IDE remove them. Another big difference is you no longer have to terminate your statements with ;as the compiler automatically puts those in for you. A little bit like Groovy in that regard.

Iteration

You would think that after doing all that work to remove ceremony that the language would be clean in general. But here is where I see the low level C type stuff come through. In Java if I want to iterate through a list it looks like this:

for (item : list) {

Basically it reads as for each item in the list, and the you operate on it. Go has a range statement to iterate through an array or slice. Here in lies a big difference in Go between Java is that you can return multiple values from a function or method. The designers of the language decided to have the range statement return both the index and the value. Generally in Java if I am using a for each it is because I don’t care about the index, I use a standard for loop if I need the index. Go has the standard for loop but for some reason they decided to return the index as well. You end up having to throw it away if you don’t care about it which feels like more ceremony again so the above statement ends up reading:

for _, item := range list { It is hard to look at that and think that reads better than the Java even though they got rid of the parenthesis.

But even this sort of misses the point as I am not even using for each that much in Java these days instead we have moved to a higher level yet and now use stream operations and handle everything in a functional style. What ends up happening in Java is you spend your time telling the language what you want to happen and let it sort the details of how to do it (lazy execution, or parallel execution, it doesn’t really matter with streams). In Go you spend your time telling the language how you want it to do the iteration so it feels like you are back down in the weeds again.

Initialization

Initializing an empty list also feels like it is more ceremony in Go. In Java you might have:

var list = new ArrayList<String>();

You look at that line and you have the ceremonly of the generics and the () to state which constructor you are calling and then the semicolon to terminate the statement. In go you end up with something like

list := []string{} again I wouldn’t call that better, just different. The ceremony here is the := which allows you to leave out the var at the front and you have the braces at the end which are initializing the struct. It is shorter but again neither seems to read better nor worse, just different.

References

One other big difference which really brings me back to C is you have to specify whether you are dealing with a value type or reference type in Go. In Java all primitives are value types and all Objects are reference types so you don’t have to spend any time thinking about it especially in a world of autoboxing. The drawback to the Java approach is if you need performance and memory compactness sometimes you need to use arrays of primitives and not collections. This is something that can definitely trip up a new programmer. Another problem is if autoboxing isn’t handled correctly it is possible for a NullPointerException to be thrown which could also be confusing to a junior developer.

In Go you have to explicitly thing about whether you are passing a value to a struct or a reference to it. Arrays and slices and maps are automatically reference types but any of your structs you have to explicitly declare if it is a pointer or a value type. For example

type struct Person {
  Name string,
  Age uint
}

pointerToPerson := &Person{Name:"Jeff", Age:41}

valueTypePerson := Person{Name:"The Doctor", Age: 904}

If you want to use pointerToPerson above you have to dereference it with the *. If the pointer is nil you will panic if you dereference it. On the other hand the value type if you don’t initialize it goes to default values so the default for the string is an empty string ""and the default for the integer would be 0.

Concurrency

Concurrency is where Go both shines against Java and feels lacking at the same time. Let’s talk about what is great if you want to call a function concurrently it is amazing you simply do:

go handleData() and handleData() will be executed concurrently. The great thing about go calls is they are extremely lightweight. When I read about project loom where they want to bring fibers and continuations to Java. Because they are much lighter weight than a thread in Java you can have thousands of them without a performance issue. It is my understanding that their is a threadpool underneath that executes your different go routines I think similar to an executor in Java with runables, but again I think the go routines are using much less memory than a Java Runnable.

This kind of light weight concurrency seems to be the direction everything is going whether it is the node system of events and async callbacks or even the reactive movement going through spring. Everyone is trying to execute more things concurrently with a very small thread pool.

There is much more ceremony in a Java Runnable or Callable. First I have to implement an interface and then put my code in a specific method. Then I need a Thread or an Executor on which to execute the code. If it were a Runnable and I needed a return type I would need to pass in some sort of concurrent collection to safely send the data back to the other thread in, or I could return it directly in the callable when I get a future out of that callable that can give me the return value.

Java definitely has a ways to go to catch up to go with the ease of concurrency, but the types are much richer for concurrency in Java so with java.util.concurrent.* one has access to about anything you need. In Go you pretty much just have channels to safely pass data between separate Go routines this again has that simple feeling of C where you are building everything up from primitives vs Java where the libraries are much richer.

Tooling

Here in you can tell how young of a language Go is. To me the tools feel like going back in time to around 2005 in Java. The debugger (delve) is primitive and I often find it not stopping at my break points or not showing me the values of all of my variables. I remember using JBuilder and Visual Cafe and some of the early Java IDEs and having similar issues of the debugger just not working that well. I find myself using printf statements to debug again which feels like going back in time 20 years.

IDE support seems decent though otherwise (if you throw out the debugging issues). I am using IntelliJ Ultimate with their Goland plugin and find myself very productive in writing code. It is the same IDE that I know and love from my Java work, and the understanding of the syntax in general seems to be great. I hear that VSCode is also pretty good for writing Go.

Enterprise Features

This is a small point but one that I just hit in the last week or so and that is that the language lacks support for batching SQL statements. Given that Java is such a strong enterprise language I just assumed that would be built into Go as well, especially given that the language is 9 years old, but maybe most of the internet type software being built isn’t using batch operations to slam a lot of data into a database at once.

Conclusion

At this point I still think Java is a more enjoyable language to program in. I like the higher level you can operate at with things like the stream api, and I like how opinionated Spring is. I think that saves you time setting up a new service and leads to consistency when dealing with new code that you haven’t seen before. Go concurrency model feels like it could be more powerful which is why there is that Java project loom to bring fibers and continuations to the language. The value types are an advantage and result in Go using very little memory compared to a typical spring project, which is again why in the Java world they are working on bringing value types into the language. Go is definitely powerful and fast and effective at what it does. If I were still a C programmer I would probably love it, as it feels like C without all the annoyances. As it stands now I can use it, and it works well, but I am not yet passionate about the language.

Here I go again

This isn’t just a reference to an 80’s hairband song, I have decided to go to work for another startup company. It was just over a year ago when we sold Choose and I took my previous role. When I joined that company I expected to be there for a while. I was given a position to lead the architecture of a new system that had been built by a consulting company to replace a legacy system. Technology wise there were a lot of great decisions made with the new architecture that they had. It was a modern Spring Boot stack, composed of micro services.

I dove into it and started learning the businesses domain. As things sometimes happen in the fall there was a shakeup with the leadership which resulted in the CTO who hired me leaving in January. I was on vacation at the time and I had called into the meeting and heard that announcement. As I sat there thinking about that I was thinking given the trends that were going on, it wasn’t feeling like the culture of the new leadership was compatible with my workstyle. I started thinking about what should I do next.

Out of the blue that afternoon I get a text from my friend Kevin whom I had worked with at Choose. He and another former coworker and friend of mine had started a venture capital fund. Kevin mentioned that they were in talks with a company that they were considering funding and he would like to introduce me to the CEO as he felt like we would work together. After a great initial meeting, I then started doing some meetings with the rest of the team. I was really intrigued by the team at this point. They had a big vision and all around seemed like amazing people to work with.

As things happen the whole fund raising thing takes a great deal of time and I started feeling like maybe it wasn’t going to come together so I started considering some other opportunities as the situation with the leadership at my former company kept deteriorating. My manager left to take a new role, and he was absolutely amazing.

In May the conversation around what we would be working on and my role resumed and we were finally able to get a planned worked out and an offer accepted by the end of June. At that point though I already had my summer travel planned for July so we planned on getting started when I got back from our travel. Once again we had an issue though in that I was rear ended in our minivan and the body shop didn’t repair it in time for us to start our travels up to Minnesota and Wisconsin. We would have been left with just 4 days up there and 4 days of travel which sounded like a nightmare when doing a 1000 mile road trip with 4 children. At that point I requested pushing out my start date another week so that we could have a proper vacation and that wasn’t a problem so we headed north and spent a wonderful couple of weeks with my family.

We headed back to Texas and I finished up my last week of work, and finally at the end of July I started my new role. This is the first time in my career that I was the first engineering hire and this is the earliest stage in a start up that I have ever been able to work on. I just finished up my 4th week of work (I had intended to write this in the first couple of days but I have been too busy to get to it until now), and it has been an amazing ride already. Although I have only been there a month it feels like so much has happened already. I am just excited to be building a new company again and to be diving into amazing architecture and implementation work on a new product.

Serverless and Spring Cloud Function

We have been discussing going to a more serverless architecture at work and so I decided that I should do some research to see where that stuff is now. When I was at Choose we used AWS Lambda to implement the backend of an abandoned shopping cart service. We would then use that data to drive an email campaign to encourage the users to come back and finish purchasing an energy plan. It had a huge effect in driving conversion rates and we were able to implement the service in about 25 lines of vanilla java code. I opted not to use Spring as I judged the startup times to be too slow for it to be worth it. To manage libraries we used the maven shade plugin in our build process to build a fat jar.

In my current role we will deploy on AWS lambda as well. One thing I am looking for in considering serverless frameworks is what allows the developer to have a very nice flow as well, as back when we did the abandoned cart service debugging was a painful experience. At that point I think we did a bunch of console logging messages to figure it out. That won’t scale up for a development team that is going heavy into serverless it is too inefficient.

Then last week I came across this Spring Tips video about a new project Project Riff. I am happy to see Pivotal getting into this space as they build great frameworks and tools. And Riff seems no different it allows a developer to easily install it on their laptop and seems like it has first class support for Google Cloud and anyone’s infrastructure that is already running Kubernetes.

So I really liked the Riff part of that video. But then I was watching the Spring Cloud Function part. Now everyone who knows me knows that I love the Spring framework. I have been using it since 2008, and I think in terms of what it can do for you on Java server apps there is nothing else close. It really accelerates developer productivity and lets them focus on solving business problems. But as I watched this video I was sort of like I don’t get it. Like year I get that people want to use Spring in serverless, but when you watch it take 5 seconds to stand up a function, to me that is a deal breaker. It is too slow and if you are being charged by the second for your service paying 5 seconds to execute a function that will take less than a second is too expensive.

I was pretty much ready to write Spring Cloud Function off as a bad idea based on that then I saw something on Twitter about Dave Syer demoing something at Spring IO this week which brings massively faster startup times. I suspect it has something to do with the spring-context-indexer that Juergen talks about in this video, but I have been unable to find any examples or documentation on how to use it.

The other thing I need to take a look at is the AWS SAM Local tool. The big pain point I had doing Lamda’s a couple of years ago was around debugging them. This looks like it may solve that problem for us by giving us an convenient way to hook this into our development lifecycle.

Apple Watch Series 3 Review

I have been watching the Apple Watch for a couple of years now debating about whether I should get one or not. Initially they looked too limited. The battery life on the initial model was very short and then there was the whole lack of being able to get the watch wet, among other limitations. I decided to sit back and wait a few years and see how it evolved.

The Series 2 started looking interesting, but I still didn’t find it compelling enough to give up the freedom of nothing on my wrist. Finally they announced the series 3 last fall and it started to sound like something that might potentially work for me. First it is setup for swimming with. While I don’t swim very often, for me having a watch on in the pool was always a nice way to keep track of the time. Then factor in the ability to track your workout and get texts and take a call without having to get out and dry off, it starts to look really good for someone who is more active than I am.

I decided to buy a 38mm Series 3 for my wife for Christmas. It sounded like the battery life was getting decent and many of my initial complaints were addressed. My thinking was she doesn’t always have her phone on her when dealing with the kids, so with the watch she would always get my texts or could answer the phone if she wasn’t near her phone.

She used it for a bit, but in the end she found that the battery life still wasn’t quite long enough for her that she would forget to charge it and it would be dead, or if a call came in she couldn’t answer it on the watch anyway as the baby was napping, etc. Given this she decided that we should sell it and she would do something else with the money, so I was thinking well before I sell it I should try it out for a couple of days just to see if I found it interesting enough to get one for myself. Obviously if I were getting one I would go for the 42mm as I find the screen on the 38mm a little bit small, but for testing purposes it would work perfect for me.

In my use I found that I could get about 20 hours out of the battery. That isn’t terrible as it should keep going on your longest days, but in a perfect world I would really like to see the thing last about 3 days. Normally you can just charge it every night so the current battery life isn’t really a deal breaker, but if you wanted to use the watch for sleep tracking, you would have issues with the current battery life. That being said, I don’t think I would use it for sleep tracking as I think having the thing on when I was trying to sleep would just annoy me. I think if I decide to go that route I would rather look at something like the Nokia Sleep which looks much less invasive than wearing a watch all night. At this point with an infant I don’t think really want to track my sleep though as I think ignorance how much many interruptions I have at night is probably bliss at this point.

The integration between the watch and my iPhone X is pretty amazing. You start the music or podcast app and immediately have controls on your watch for what your phone is playing. So when I am out walking the dog, I don’t have to pull my phone out of my pocket to skip a song or to adjust the volume it is all right there on the watch. When I glance at the time on the face I have a watch face that shows me my next calendar event, so I can immediately see when my next meeting is without having to check my phone. All the health metrics (activity and heart monitoring) automatically show up in your health app.

Basically it does what I feel Apple does best, which is to erase the boundaries between their different products. A perfect example of this, is I have a Honeywell Lyric T5 Thermostat. One of the reasons I went with that model instead of a Nest or something else was that it supported Homekit and I wanted to play around with the native integration on my phone. Then when I bought an Apple TV 4K suddenly you can program automations on your Homekit stuff as it just hooks in with the other devices it finds on your network. Granted I could do that before with the Lyric T5 App, but now it is integrated natively in my phone.

The watch is the same way, it gives you tight integration with your phone, and removes more boundaries. The model I have is the Wifi only model. The LTE sounds interesting, but not at the price that AT&T charges for it. I don’t think it adds enough value in my life to justify $10 a month for the service. At $5 a month it could get interesting. My neighbor has one of the original watches and he said he likes how well it works with his airpods as well. So when he is walking he can be playing something through his phone controlling it on his watch all going to his ears with no wires involved and everything just works. If you had the LTE model and a subscription to Apple Music you could even leave the phone behind as you don’t need it anymore. But again I don’t see myself going that route. I own over 4,000 songs, so the idea of renting music doesn’t sound interesting to me as I mostly own everything I want.

The workout app is interesting. I don’t really work out, but I am trying to be a bit more active for health reasons. Most of my activity consists of taking my dog for a walk in the evening. There is an outdoor walk as one of the options in the workout app. Typically I track my walks by having my phone in my pocket and checking Activity under the health app. I usually check how many steps I have at the start of the walk and then see how many I have after my walk to have a rough guestimate of how many steps I walked. The watch still gives you all that, but in addition to that it will also give in real time your distance in miles as well as the time you have been doing that working and what your heart rate is. I find that when walking the dog if I am nearing the end of the walk and I am at 1.5 miles I will push myself a bit and make sure we go for more than 2 miles. I also found it to be useful to sort of push your pace and get your heart rate up, as opposed to just tracking steps, without tracking your speed. Once you end the workout it will also give you the average time it took you to go a mile, and some other stats like average heart rate.

Many of the apps I have automatically have a watch version. I found most of these I have no interest in having on the watch and removed almost all of them. I left the Nokia Health app on there though and it was cool that when I earned a new badge exercising one night on there that it showed the achievement on the watch as well. One thing I disliked is that to remove some of the apple built in apps you have to remove them on your phone. A perfect example of this is the News app and the Stock app. I want neither on the watch, I want the watch to be really focused and just do 3 or 4 things, but to remove those apps from the watch I have to delete them from the phone. Apple doesn’t give me an uninstall option like it does with 3rd party apps. That is pretty annoying as perhaps I want to check my stocks every now and then on my phone I just don’t want it cluttering up my watch app screen, yet I can’t use it in that way.

One of the things I most enjoyed about the watch was getting text notifications on it (you can also get facebook messenger and slack messages there too if you want them). Mostly for when I was driving and I feel a text come in. You can just glance at it quickly at a stop light without having to pick up your phone (or miss the message until later as I do many times now).

So after using it a couple of days do I find it interesting enough to buy? At this point the answer is no. I don’t quite see what the killer app is. It is nice, and somewhat useful, but mostly it just feels like a fun toy at this point. The heart monitoring I must admit I do like. I also like the activity app that sort of nudges you to stand some and be more active. Those are all good things for me. But ultimately it isn’t enough to justify the price.

So what would get me to buy one. Well if I got a gym membership and was swimming regularly I could see myself getting one to track that workout. I think a real killer feature for me would be if the thing could some how do glucose monitoring. I would love to have like real time monitoring of that so that when I ate food I could see how it spiked my blood sugar. I think that kind of tracking would nudge me into eating healthier and would ultimately be the killer app for me. I could also see the watch being a game changer for my friends that are serious about running. The way it gives you the altitude change, average time per mile, weather, and heart rate, would be pretty useful for tracking how your runs are going. My sister does a ton of cardio and I could see her getting a lot out of the watch as well. And with the activity sharing if all your friends are in the Apple Ecosystem it could be useful to try to get a little competitiveness to encourage you to go out and be more active. But in my case it is about 50/50 between the Apple and Android eco systems so maybe some of the people that you want in your activity group you couldn’t get.

Maybe the series 4 will finally deliver the killer feature that will get me into one, but for now I will remain on the sidelines. (There is a rumor that the 4 will offer an even larger screen than the 42mm which sounds nice as well).