Sure, it might not be obvious why the world needs yet another bot framework, but I’m working on one. The idea is to make a scalable, intuitive, and feature-rich framework that runs on the latest Ruby. Long-running tasks shouldn’t be a problem and the framework should make things like caching a breeze. Permissions are a first-class concept, as are features like threaded replies, reactions, blocks (for rich-text responses), and support for more than just chat input. Enter Waylon: a bot framework built with these concepts (and more) in mind.
Made it to Las Vegas for the Sin City Ruby conference. I’m stoked to be here and excited to see what cool stuff everyone is working on.
Most of the time, challenges I tackle with Ruby solve code-related problems. This includes things like web services, scripts, chatbots, etc., all of which are virtual in some way. Recently though, I decided to solve a puzzle in the real world.
My son was trying to put together a wooden puzzle. It requires having four colors (blue, green, red, and yellow) each present on all four sides of a rectangle. These colors are on wooden cubes that can be rotated. So four cubes, each with six sides to rotate around. It turns out that this means there are a lot of possible combinations of these cubes, most of which won’t work. By my math, there are six sides that can face up (a “
y” axis), multiplied by four possible rotations around that axis (
6 * 4 = 24) for each cube. Raised to the power of the four cubes (
24^4 = 331776). After about 30 minutes of hearing his frustration, I told him “I bet I can solve this puzzle with some code” but he was skeptical.
I took that as a challenge to both my coding skills and his respect for me as his dad, so I obliged. After finishing, I figured it would be worth sharing.
I just recently hit the three-month mark in my new position at Shopify. It has been an amazing experience, for sure. While I’ve definitely had other jobs that I enjoyed, I’ve never worked anywhere quite like Shopify or on my team. I’m working with some of my favorite technologies (like lots of Rails on Kubernetes and doing exciting things with MySQL), but it isn’t just that. The culture, especially on my team, has been fantastic. I have some really exciting (and solvable) challenges on the horizon, and I believe in our mission. I’m not drowning in work but there’s plenty to do. I can confidently say that the company does a good job of actually caring about us and our mental well-being.
This wasn’t meant to be a glowing review of Shopify as much as it is an insight into this new chapter of my life. Work is a huge part of who I am, so having it improve so much seems worth sharing. I’m genuinely excited to see where things go from here.
Meetings can take up a lot of time and cost companies a fair amount of money. They often distract from real work, and fill up our day. When we have too many of them, it is difficult to remain enthusiastic about participating. Here, I’ll provide my thoughts on meetings. I’ll make the case for why we should seek to reduce the amount of time we spend them, and why we should make the time we do spend in them as productive as possible.
I recently solved a problem I’ve always wanted to solve: writing a library that can unscramble words. I know, this is a pretty geeky and pointless endeavor. Geeky, though, is what I do.
Originally, the library focused on exact matches. Given some string, I could find all words that can be formed with those letters. After accomplishing my goal, I decided to extend the project to finding the longest word possible. I noticed that this sounded a lot like finding solutions for the game Scrabble. While the library is still a work-in-progress, I thought it might be fun to share my progress. This is the story of how I wrote a library and simple web service for solving Scrabble with Crystal.
I recently ran into an interesting issue with my home Kubernetes environment that runs my blog. As I mentioned in a previous post, I run my blog on k3s and I use cert-manager to manage my SSL certificates provided by Let’s Encrypt. Let’s say that I’ve temporarily changed my Internet provider and along with it, my router. This router does not appear to support NAT Loopback. The cert-manager documentation acknowledges the issue but doesn’t provide much of a solution. Cert-manager couldn’t renew my blog’s certificate because its self-check kept failing. I managed to solve the issue through a fairly simple CoreDNS change. Let’s take a look.
One of my favorite questions to ask (or be asked) during an interview is the classic “how does the Internet work?” question. It usually goes something like this:
You open your favorite web browser, type in “www.mysite.com”, and hit return. Almost like magic, a fully-rendered web page shows up on your screen ready for you to view. Tell me, with as much detail as you can muster, what just happened.
The reason I like this question so much is that it isn’t just academic; it is a peek behind the curtains at what this person knows. It reveals what they’ve dug into in the past, learned in school, or dealt with while troubleshooting. The details show how much time they’ve spent demystifying the world (at least related to our working environment). Thinking about this made me realize how really fleshing out a solid answer to this would make a great blog post, so here we are.
Occasionally, Kubernetes workloads require specialized nodes. Sometimes it’s for machine learning, or to save money through burstable node types, or maybe just to lock certain Pods to a dedicated subset of nodes. Thankfully, Kubernetes offers a few useful mechanisms to inform the scheduler how we’d like our workloads distributed: node-based or pod-based affinity rules along with taints and tolerations. I’ll go over how to use these briefly, but I use these frequently at work for numerous reasons. Recently, I realized something interesting about how Persistent Volume Claims (PVCs) work with dynamically provisioned storage like EBS volumes (meaning volumes that are created automatically by Kubernetes based on a StorageClass, rather than referencing existing volumes). The default behavior of a StorageClass is to immediately create a volume as soon as the PVC is created. This can have some consequences when trying to guide how Pods are scheduled.
Recently, I wrote an AWS Lambda function at work in Ruby but I didn’t have a handy tool for creating a project skeleton like
bundle gem does. That means nothing bootstrapped my testing for me. While copy+pasting code into
pry proved that my simple function worked, that wasn’t quite good enough. What I really wanted was the ability to use RSpec with my Lambda code. After a cursory search of the Internet for some examples, I was left disappointed with how little I found. So, I rolled up my sleeves and figured it out.