State and Caching in Minitest

Last time, I learned that using let blocks in minitest cause minitest to define a method on the test class, and I hypothesized that this was to allow tests to share code while preventing them from sharing state. But the method that gets defined caches the results, so that the initializing block is only evaluated on the first call. I want to convince myself that test methods cannot corrupt this cache, or rather, can’t corrupt this cache without doing so on purpose. Continue reading “State and Caching in Minitest”

Throwing Darts at Code

I’ve been thinking about code reviews a lot lately.

My mom has often worked as an editor, and she once told me of the most difficult thing about being an editor (I paraphrase):

You have to let the writer keep his or her style. The challenge is to improve the writing without making it seem like you wrote it.

Working as a technical writer and as an English teacher, I thought about these things a lot. I would often think, “that is not a sentence that I would have written, but it is clear. It works.” Sometimes I would read a sentence and think, “I don’t know what that meant; that sentence doesn’t work.” I would change the sentence in the second situation but not the first. Continue reading “Throwing Darts at Code”

Heroku Is Fun

The other day, I had an idea for a simple website. I wanted to find an easier way to deploy side projects than I’ve used in the past. AWS gives me too fine a control over things I don’t care about, so I decided to try out Heroku. It was much easier than I thought it would be. Here is basically what I had to do to get a prototype on the public internet, admittedly at a subdomain of herokuapp.com. Making a Heroku account is the usual “sign up with an email and a password,” to I’m assuming you’ve done that step.

Continue reading “Heroku Is Fun”