Night Working Computer Setup

Although I wrote about how automatically turn the internet off at night, sometimes my schedule shifts later or I am trying to get some side project work done and want to burn the midnight oil. In this post I’ll cover what I consider the best tools for an evening computer work environment.1 So what can you do besides changing your text editor colors?

Chrome

I use Chrome for my browser since it has many extensions and doesn’t seem to eat up memory at this point. For the nighttime setup I’m using one extension to make the new tab page black, and another to make most other pages dark.2

Dark Reader

To make most pages inverted and dampened, I highly recommend the Dark Reader Chrome extension.3 It is excellent. Sites look as good or better than their brighter counterparts. Github diffs in particular look really good. Here’s a screenshot of it in action:

Github with Dark Reader
Dark Reader Settings

Dark Reader has several hue and brightness settings that you can change (see right image), and you can toggle it globally or for a particular website. Generally I just turn it on globally with alt+shift+d at night and turn it off in the morning with the same shortcut.

Read on →

Writing Composable Shell Functions for Better Workflows

Recently I finished up some shell functions that help me with some common git and testing workflows. They are up on Github, but I wanted to call them out since they might be helpful to others and just making something open source does not mean that it is discoverable. I think the philosophies are pretty solid even if you use different tools. You could use similar functions if you are using Bash or ZSH.

Overview

The general problem that I am trying to solve is that different tools like RSpec, git, or RuboCop produce output in a certain format, and I often want to do things with that output. For example, I might want to re-run the RSpec tests that just failed so I can verify fixes more easily.1 However, RSpec outputs in a certain format that is not easily consumable. For example:

...
Failed examples:

rspec ./code/fail_spec.rb:2 # something failed
rspec ./code/fail_spec.rb:8 # yet another failure
...

If I want to re-run these two tests, I could copy the two lines and paste into my terminal. This would have a couple of downsides though. One is that I would need to spin up one RSpec process for each test that failed. This is time-prohibitive if the project loads the Rails environment. It also prevents me from getting a reliable list of the tests that failed so I can repeat this process. Last, I’d like to ideally use a faster test runner like Zeus or Spring. So my real goal is to re-run the failing tests as quickly as possible.

One approach that I took for a few years was to copy the output, paste it into an editor (Vim), and then do some macros or other commands to munge it into the format that I want. However, this is time-consuming and potentially error-prone. It is also usually wasteful since I need to do it each time that I want to transform the output to a particular format, and often I don’t have the editor macros saved. It can be nice to have the list of tests to retry in an external editor to be able to check them off, but I prefer to not need the intermediate step.

Solution

The specific solution I made to solve this problem was to create a shell function that I called respec:

Read on →

Turning Down the Volume on Social Media

I am generally a fan of creating small challenges for myself. Sometimes they are to grow in a specific area, sometimes they are just to see if I can do something for a prolonged period of time. Some of the challenges I have done in the past few years:

The Social Media Challenge

Last year, I realized that I was spending more time than I wanted to on Twitter, Facebook, and the like. These sites would often link to posts that I would also read, and ended up being a huge time sink.

Certainly there is value in finding new articles that I wouldn’t have normally read, but on the whole the time was not very well spent. How many of the random articles that I read had something of substance or that I could later recite even a single noteworthy fact from? I found myself trapped in a self-inflicted filter bubble / echo chamber.

The Origins

Miles tweeted this post:

Read on →

Commuting Probably Costs More Than You Think

My wife and I currently live on the northeast side of Indianapolis and work near downtown Indianapolis. We have been discussing whether we would like to move, and if so, where. For the past year or so, these talks really haven’t had much energy. We’d decide to look into moving, and then not really do anything about it. Currently we’re in a month-to-month rental with some nice landlords. However, it’s pretty far from where we work.

Last weekend I decided to quantify the costs of commuting. I figured this would give us something to work with and if it was surprising, would motivate us to take action. In typical fashion, I made a spreadsheet.

The spreadsheet shows what we are currently paying per month in total housing costs (rent, utilities) and commuting expenses. By extension, it also shows what we should be rationally willing to spend per month in total housing costs (based on our current costs of housing and work transportation.) For example, if every month of commuting costs us $300 and we are spending $1000 in rent each month, spending $1300 on a place with zero commute would be theoretically equivalent.

Here is the commuting breakdown spreadsheet that I came up with.

What surprised me

Overall, I was surprised by the amount that we should be willing to pay. I expected it to be high, but not 50% more than we are currently paying. Part of the surprise was probably due to the fact that two people’s commutes would be lowered.

After doing this analysis, I would definitely question any commute to see how it could be reduced. All things being equal, we would prefer to pay less than more, but this figure gives a nice bounds considering we think our current rent is acceptable.

Read on →