Algorithms 101 Roads & Town Centers

Alright, there’s this one algorithm that I’ve solved before. I’ve always found it to be a rather fun little exercise to work out. It popped into my head recently and I wanted to recollect how the logic of it went, but my Google-fu wasn’t so great. In the end, I didn’t find the algorithm problem statement but I’ve recollected it as best as I could from memory. If you know what the name of this challenge is I’d love to know what it’s called or if I’ve put it back together correctly. Ping me @Adron.

So the story goes something like this. There once were some nations with a number of cities in each nation. Every citizen has access to every city and every city has a town center for all the citizens to enjoy. Recently the roads were damaged from a lack of maintenance work, ya know, like in real life. Meanwhile there was a revolution that led to catastrophic war that destroyed all the town centers in the nations. So now none of the cities have reachable town centers or functional working town centers anymore! The citizens of the world are angry at the nations and demand immediate fixes to their roads and town centers, with a priority on the town centers! The leaders have decided that the roads shall be repaired and have hired me (you) to assist!

The nation has n cities, we’ll number 1 to n. The cities have two way roads, totalling m roads. A citizen has access to the town center if: their city contains a town center and their city has a road to travel from their city with a town center to another city with a town center.

The following is a map of one great nation of cities with currently impassable roads that must be repaired.

Nation

more

31. January 2018

Logitech M331 Silent Mouse

Recently I was playing Transport Fever. If you’re unaware of this epic, nerd, god game and you like those types of games, you should definitely check it out. If you’re not into those, just suffice it to say that there is a lot of mouse clicking in the game. During the last few weeks when I startup the game and navigate about building my railroad empire a certain someone else noticed that the mouse clicking increases exponentially.

I thought to myself, “we need a solution to this!” I began searching for a silent mouse, first using a little Google-fu, but also a quick query on Twitter among the Twitterverse. Quickly a result came back that looked like it would work out in Logitech’s M331 Silent Mouse product.

Logitech M331

more

29. January 2018

Algorithms 101 - Big Sums

I’ve been practicing up on some algorithms with Go per my Resolutions for 2018 item “Write More Code, Build Patterns, Algorithms”. Here’s a few of the ones I took a quick review of, from the algorithm perspective.

The first algorithm I took a dive into is a big sum problem. Part of the reason is I wanted a refresher on how Go deals with various integer data types. Easier to set it to memory if I play around with the data types versus just simply reading up on the specifics.

more

06. January 2018

Building a Data Thrashing CLI Tool in Go

I need a tool just to do some testing against an API end point. I figured I’d throw one together real quick in Go. With a few libraries it’s just a few steps to get the job done. The following is that project. Eventually I’ll create the services that will run in some containers I’ll throw into a Kubernetes cluster, but for now, it’s all CLI. Onward.

The first thing I’ll need is Cobra.

Cobra CLI

more

31. December 2017

KubeCon Keynote Day Two

KubeCon Logo

Kelsey Hightower, Chen Goldberg, and Anthony Yeh

Day two kicked off (read on for day one wrap up) with Kelsey Hightower, Chen Goldberg, and Anthony Yeh. The big push from Kelsey and team focused their keynote around the development story around Kubernetes. Specifically, that a developers and apps users, should never need to know they’re using Kubernetes. He, Chen, and Anthony all talked about the idea we developers - as I’ll offer is true - want to work within our workflow committing, tagging, and knowing our applications will appear in test, development, QA, UAT, and production as we work.

Clayton Coleman

Next Clayton Coleman from Red Hat came up to talk about “Boring is Good”. I found Clayton’s quote “Red Hat helsp build boring software” to be well stated and also an apt description of how Red Hat succeeds today. Red Hat currently, boringly, runs some of the largest Kubernetes clusters. They use Prometheus to gain observability into those clusters and work dilligently to improve Kubernetes.

more

07. December 2017

Good Morning KubeCon?

KubeCon Logo

I hope you’re having a good morning so far. KubeCon has kicked off in full force like the pro-conference that it is. With 4k+ people in attendance the crowds are distinctive, even among a city like Austin. The conference lit off the day with an absurdly early registration time of 7am, and a continental breakfast of some fruit and pastries.

more

06. December 2017

KubeCon - Arrival, Flight, and Scheduling

I’m on another plane departing Seattle via SEATAC (SEA). An Alaska Air Boeing 737-900 to be specific. The flight is currently en route to Austin, Texas and the vast majority of people aboard are going to KubeCon. The seats, as they always are, aren’t built for any mortal, normal, reasonably sized human being. So we’re all cuddled up annoyingly but making the best of it we can. Seriously though, I’d rather be on an overnight train. I’d rather spend another 24+ or more hours comfortably studying some Netflix infrastructer and chilling out instead of flying, but that isn’t really an option in this giant country, so onward I go as the dream of comfort in transportation eludes me.

more

05. December 2017

A Few Things I Learned Today in Visual Studio Code

I opened up Visual Studio Code today with an intent to use it for all my editing, documenting, and coding today. My priorities today, on a day I’ve taken off from work, is to work on my upcoming Terraform Course, a little Go coding, and also a few general tasks and notes. While I work on these priorities, you dear reader, get the benefit of my random notes. ;)

more

03. December 2017

Build a Kubernetes Cluster on Azure with Terraform

Azure

In the previous post I wrote about building a Kubernetes Cluster with Terraform, I covered the bases of building a cluster in Google Cloud Platform. Today I’m going to tackle the Azure Platform. There are a lot of similarities being the same task, but there are some differences which I’ll take a look at. The repository to this write up is located in another_new_world on Github.

First things first, locally you’ll want to have the respective CLI tools installed for Azure, Terraform, and Kubernetes.

more

15. November 2017