Sign in

Patrick is a software engineer from New England. Today, he resides in Seattle where he enjoys playing chess and ice hockey.
Close-up photograph of a ruby gemstone
Photo by Joshua Fuller on Unsplash

Years ago, I worked on a very large Ruby on Rails codebase that used constants to hold lists of credit card transaction states. For example:

class Txn
ACTIONABLE_STATES
= [:authenticated, :to_settle]
DONE_STATES = [:settled, :declined]
end

However, we had a bug where a settled transaction would return true when txn.state.in…


Photo by Luca Bravo on Unsplash

Assigning a static reference to an instance method call could be perilous. Let’s take a look at an example Java class to examine why:

/**
* Foo.java
*/

public class Foo {
public static String foo = Config.getInstance().getFoo();
}

Seems pretty innocuous in itself, but ostensibly we’re just assigning static…


Getting your blog post to play nicely with Safari Reader—my preferred way of consuming blogs—isn’t always obvious. This post documents my findings in how to optimize a blog for Safari Reader if you’re publishing outside of Medium (e.g. Jekyll).

Use the <article> tag

Safari Reader will look for a couple of container tags, but…


There’s been some significant infrastructure changes under the hood of Quasars and I wanted to talk about them here.

What changed

In another blog post I had talked about how Quasars uses Blue/Green Deployments, but as of today, that is no longer the case. In reality, very little has changed. …


I am the creator and administrator of quasa.rs, a social link-sharing web application (like reddit or hackernews) for astrophysics. It’s a fun side project that keeps me from getting rusty with Ruby on Rails because, sadly, I don’t use Ruby for my day job anymore. Plus I get to talk…


Synthesizing a full major out of MIT’s OpenCourseWare

MIT’s OpenCourseWare is an amazing resource—I often can’t believe that it exists at all. For the unfamiliar: OpenCourseWare is a collection of some of MIT’s classes, often complete with lecture videos, problems sets, quizzes, and answers. Oh, it’s also completely free.

There’s a significant drawback though (well, two drawbacks considering…


How likely it is for each digit of pi to appear? Let’s find out by charting the digits of pi into a frequency graph.

  • Are there patterns?
  • If not, is it suitable for random number generation?

Method

The more data I can collect, the more apparent patterns (if any) will appear…


In 2012 I, with two other nerdy roommates, switched to Dvorak. Five years later (four of them spent as a Software Engineer) I am switching back to Qwerty. In fact, I am struggling at 30 WPM (a 70% reduction in speed) to write this post now.

The Dvorak Simplified Keyboard, patented in 1936

Why did I switch in the first place?

Patrick Brown

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store