Recap for 2016

End of year recap

It’s that time again. Time to reflect on my themes for the year and see how I did on them. This is an annual tradition of mine to see how I am doing in general. I find it is a useful accountability tool for myself to make sure I am not wasting too much time on unimportant things and am spending the time that I would like on personal development.

Theme 1 -Regular Blog Updates

This theme was an epic failure. I count 21 posts for the year. Less than half of last years posts. I could make a couple of excuses but it all comes down to the major changes in my life in 2016. It started in February with the birth of my 3rd child. The first 3 months of a new baby wipes you out mentally and physically so that already made things a challenge.

After that I made another major life change, I took a new position as a Principal Engineer at a startup company. This was a great change for me and I am really happy to be working on a new exciting project. Back in April I was working on a major architectural project at my previous company and all of a sudden 3 different recruiters hit me up with 3 interesting opportunities. Like most people in software development I see about 3 – 4 job inquiries per week from various recruiters. I would say 95% of these positions sound terrible, so it is pretty easy to dismiss them generally. I was in a very good position in my previous company so it is also easy to be selective about what you are willing to take. So to see 3 really good opportunities at the same time where the work sounds exciting, the companies sound interesting and the pay is very competitive is most unusual for me.

I started down the road with the first company, when the second recruiter contacted me. So I started talking with them and it is at this time I realized that the first company wasn’t going to be a culture fit for me. Their culture would require that I fly to Portland every 6 weeks to meet up with the other development team there and that was just too much travel when I have 3 young children. The morning that I was going to do my onsite interview with the second company a recruiter that I have talked with for about 8 or 9 years dropped the 3rd opportunity into my lap. Another startup position which had me interested. I arrived for my onsite interview at the second company and we spent some time discussing the type of Software Development that I enjoy doing as well as what I would like to do ideally with a software architecture. The interview went great and about 3 hours after I returned home from that interview I was contacted by my recruiter and he said they wanted to move forward with an offer. I was pretty excited by everyone I had met so I didn’t end up moving forward with the 3rd company as I had found what I was looking for.

Theme 2 – Read Lots of Books

As expected this fell off for the year compared to the previous year with all the new changes in my life. But I did really get back into it in the fall here and have read some good stuff. On the religious side I have been working on Last Testament by Pope Benedict XVI, and The Confessions by St Augustine. On the programming side I have been working on Functional Programming in Java by Venkat. I can’t recommend this book enough it is absolutely amazing. In Non Fiction I read Hillbilly Elegy by J.D. Vance. This book is also amazing to understand a part of the country that is often ignored. Anyone who was confused by the election results this year should really read this book as I think it lays out why middle America is so angry. Anyway that is a small selection of what I have read or am reading.

Theme 3 – Work Stuff

My third theme was some work stuff that I wanted to get done. That didn’t happen due to me changing jobs, but at my new company I have a new list of things that I want to get done for 2017.

Theme 4 – Swift

While I didn’t get around to Swift or iOS development this year I did spend some time in a different language. For the last 2 months we have been doing a lot of front end work at the office, so I have been learning angular.js and lodash. In the past I haven’t found JavaScript that interesting, but I have to say with using angular and lodash it is growing on me. Lodash is ridiculously powerful and I feel like the key to being productive in the JS world is to know this library. Angular brings a lot of patterns that remind me of Spring development which is also nice coming to it from my background.

Theme 5 – More work stuff

Again I didn’t hit this theme as I left my previous role before I got to this, but I did do something sort of similar. When I was interviewing for my current role I mentioned that I would like try doing a micro service architecture built around Spring Boot. I felt like this might make for more maintainable code long term. One week into my new job I was tasked with rolling out this architecture and designing and implementing the first micro service. We had 2 sprints to get it done. It took a big push, but we made it and it was a huge success. Later this summer we rolled out the second micro service. The other developers have been very happy with this architecture and it looks great from both a scale-able application standpoint and from a devops standpoint as Spring Boot is built with devops in mind which really makes it easy to roll out new services.  We will be beginning our 3rd Spring Boot app starting with the first sprint of 2017.

The other aspect of this theme which is relevant to my new role is there are certain aspects of our legacy app’s architecture that I would like to evolve and improve and I have already begun working on that. I am reworking the persistence layer to more heavily lean on Spring Data JPA and less raw Hibernate. I am also reworking the Controllers to use the latest Spring annotations like GetMapping and PostMapping as well as the way we wire the services with the goals of just making all new development on the older platform faster and more lightweight.

Theme 6 – Open Source Contributions

This was a failure. I did some reporting on issues so I at least tried to work through issues I saw, but with the new baby and new job I was far too short on free time and mental energy to dive into another code base and try to contribute to it.

Closing thoughts

If we just want to score this on what I hit it looks pretty bad. That being said I am really happy with my year. It has been a great year. As I said in the post laying out the theme, it doesn’t really matter to me whether I do these things what I care about is personal growth. That is part of the reason for themes and not concrete goals. And on the growth concept this has been a fantastic year. The year turned out completely differently than it started out and I am really happy with where I am. Over the next few days I will lay out the themes for 2017 for me.

Upgrading from Ubuntu 14.04 -> 16.04.1 under Amazon EC2

The Upgrade Process

I finally got around to upgrading my web server from Ubuntu 14.04 to Ubuntu 16.04.1. I decided to jot down my experiences in case anyone else runs into these issues.

Preparation

The first thing I did prior to doing the upgrade was to run updraft plus to backup the Blog’s database and files. After that finished I logged into the Amazon EC2 console and created an image of my AMI. This way in the worst case scenario that I trashed my image I could just boot the backup image and be where I was before I began.

The next thing I did was check to see if I had screen installed. My thinking on these sorts of upgrades is you can easily lose your network connection and it is nice to be able to get right back to where you were without worrying about it if something goes wrong.

Beginning the upgrade

Ubuntu has a handy command:

 sudo do-release-upgrade

I invoked the command. It let me know that it would start ssh on an additional port just in case I got disconnected during the upgrade. I said yes to begin and it began downloading all the packages it needed. Amazon seems to have a ton of bandwidth so this step is super fast. Wouldn’t you know it but in the middle of this my network connection dropped. Luckily I was able to ssh back in and reattach to my screen session without issue. There were a couple of questions I had to answer about whether to keep a config file that I had modified or else replace it with the package maintainers. I made the decision for those questions based on looking at the diff to see if the differences in the files were important or not. At the end it asks to reboot to finalize the upgrade so I said yes.

The Aftermath

The machine booted up quickly and as soon as I was able to ssh in I logged into the website to see if everything was still working. I was promptly greated with a 502 Bad Gateway error. I started poking around and I could see that my nginx config hadn’t been changed and the service seemed to be running. At that point I figured it must be an issue with php-fpm. It turns out that it didn’t even have the package installed for php-fpm and the php packages that I did have were upgraded from 5.0 to 7.0. After googling around I was able to find out that the unix domain socket name and location have changed in the new version of php. I edited my default.conf for nginx and pointed it to the new socket location:

fastcgi_pass unix:/run/php/php7.0-fpm.sock;

That being done I needed to make some changes on the php-fpm side. The config file has moved where previous it was located under /etc/php5/fpm/pool.d/www.conf the new location is /etc/php/7.0/fpm/pool.d/www.conf

In this file I needed to update the following fields:

listen = /run/php/php7.0-fpm.sock
listen.owner = nginx
listen.group = nginx

In this case I didn’t change the listen value I just used that value above to update my default.conf under nginx. After setting those values and restarting php7.0-fpm and nginx services my site was back up. Hopefully this will be helpful to anyone else who hits the same issue after they upgrade.