In our new house, I basically have been given free reign of the garage. Its too small for a car, so I have decided to turn it into my workspace. I plan for it to be a place where I can get better at doing my own maintenance on bicycles, plus provide a place to work on other home projects. The most important piece of any good bike maintenance center is a nice bike stand. I’ve never had space for one, so I was excited to get something high quality and dependable.
Today I learned about an old project called Gitana that builds an SQL db from a git repository. It does a bunch of other things too (consume issues, stackoverflow, etc) but I didn’t explore any of those. I used it to do some analysis of a repo at work to extract some data about when people are merging pull requests.
I have been training on my bike for most of the year, and it culminated last week at RAMROD 2019. I did the ride last year as well, and had decided to challenge myself to do it a second time this year.
Recently I discovered the term “run those systems in anger.” This was from a podcast I was listening to (either Software Engineering Daily or YCombinator) and the guest was talking about building software and how to choose the right frameworks/tools. The idea is that you should probably choose the tools you hate the most because you have probably spent some time “running those systems in anger,” and you probably understand how it will break/fail in interesting or surprising ways and can build around those. If you choose something new and shiny, you don’t yet know all those fun failure modes, so they bite you unexpectedly.
Today I learned about Webmentions and webmention.io. Webmention is a standard for federated communication between servers, allowing one server to indicate to another that it has published content with a link to (aka “mentioned”) some content on the target server. This is standardized so that it does not require a single owner or centralized service (such as Twitter or FB) to facilitate the communication or store the data, each server can do it itself.
Webmention.io is a service that can facilitate webmentions for any website, and I don’t fail to see the irony there. However, since webmentions are a standard, you would not be locked in to a single service, and you could implement your own sending/receiving code yourself at some future date. The best use case for webmention.io that I can see is the ability to receive and display mentions on a static website, where the service provides the necessary hooks for the webmention implementation, and your site remains a collection of static assets.
Today I learned about Catastrophic Backtracking in Regular Expressions. This is a form of Regex that has O(2^N) CPU complexity, causing it to effectively never return when executed against even a reasonably short string. I won’t attempt to go into depth, the link above does a great job of that, but this affected our service by blocking the main thread and causing the service to become entirely unresponsive with a pegged CPU. We did not initially identify the problematic regex as it seem innocuous enough, so it took several days to diagnose the root cause. Identifying the root cause was exacerbated because the problematic regex was only executed in a small number of circumstances, so the service would be healthy until this reasonably rare case was encountered again in several hours or the next day.
Today I learned about
NOWAIT for PostgreSQL. This is an option for the
SELECT FOR UPDATE command, allowing you to control the behavior of locking rows during a transaction. We use
SELECT \* FROM table WHERE col = 'value' FOR UPDATE to provide exclusivity when updating certain objects in the database. Adding the
NOWAIT option causes this statement to error and return immediately if the row is already locked, allowing the application to handle this case in a more interesting way than simply waiting indefinitely.
I’ve recently been building an app using Flutter, and the experience has been really awesome. This is my first real foray into building a mobile app, and the Flutter SDK has done a great job of shrinking the learning curve.
I have recently purchased a Google Pixelbook to help satisfy my curiosity about the feasibility of a non-OSX platform for development. I plan to use the Pixelbook as my daily driver, and I’m writing a series of blog posts about the experience.
Howdy. I’m a software engineer, and this is my blog. I like building software, riding bicycles, and playing with gadgets.