Go, Postgres, Redis, Me

Uniting Go, Redis Cluster Mode, Postgres, and Docker into Something Meh

Recently I was tasked with implementing Redis with Cluster Mode enabled for my company’s production application. One of the nice things about working in the modern software age is that cloud providers abstract a lot of complexity away from you. In our case, we are implementing AWS’ ElastiCache, which supports Redis Cluster Mode natively. However, it’s not so easy to replicate locally. When I set about doing this, what I thought would be a fairly standard Google search. I figured there’d be an immediately available docker-compose file supporting both Postgres and Redis Cluster Mode, but I wasn’t able to find it. As a result, my goals with this post is to create a working proof of concept that utilizes the tools I work with daily and can hopefully be of use to other developers. ...

March 11, 2022 · 8 min · logan
golang gopher up long time

24 hours in Go

(Image credit to quasilyte on DeviantArt) Disclaimer: The code you are about to read is not safe for work. Because it is terrible. It is here if you dare. I've saved off the results in the 24_hours branch. To save some sort of professional dignity, I've made some touchups to the main branch. At my current job, I do a lot less programming that I’d like to. It is no fault of my employer. As an SRE, I am tasked with what is required to get the product moving. At the moment, that is less programming and more of infrastructural work. A lot of my job recently has been configuration, writing YAML, troubleshooting CI/CD pipelines, and interfacing with external teams. As a result, I can feel a few of my programming muscles atrophying. ...

September 7, 2021 · 9 min · logan
Gambling on Stocks

Stocks vs Sports: Inception (0)

I love gambling on sports. I never win money, but adding a bit of risk to an otherwise mundane matchup can make watching games more exciting. I don’t love gambling on the stock market. It just isn’t as much fun. In both cases, I take my money and use it to buy a chance at more money in the future. Where the outcome in sports is influenced by the competing teams ( and in some cases, the referees), the outcome for stocks is controlled by any number of “animal spirits”. The uncertainty of the stock market clearly has many influential factors, from normal market fluctuations to public manipulation. Yet gambling on sports is viewed as a riskier and less lucrative proposition. Does it have to be? A savvy investor will likely outperform a savvy gambler, but what about an idiot like me? Is there actual historical data that would support that if you bet with no strategy and invested with no strategy, Wall Street would win out over Vegas? Is there a way to beat the odds by using my rudimentary data analysis skills? Of course not! But I still want a way to answer these questions with a silly and over-engineered solution. ...

June 11, 2021 · 7 min · logan