About three years ago, I was involved in the most heated argument I’ve experienced thus far in my career. I wish I could say it was about something important with long-term consequences, like a decision about which data store or framework to use. Nope. It was about code formatting. Specifically, the argument was about tabs vs spaces in a spectacle that was a little too similar to a scene from Silicon Valley.
Everyone I’ve worked with agrees that code should follow a consistent style. It’s easy to set up a linter that will fail your CI build when these styles aren’t being followed. But standard linters fail to accomplish two things that I’ve always viewed as necessary evils when programming with a team: deciding on styles, and following them.
My world was rocked when my team started using Prettier. Prettier is an opinionated code formatter. It automatically formats your code based on styles that the creators of the tool have decided upon.... Read more
A couple weeks ago, I migrated my blog from Tumblr to a static site generator. (I ended up settling on Hugo, but my choice of tool is irrelevant for this post.) When it came to deployment, I decided to have the generated HTML live on GitHub Pages since it’s free, easy to set up, and my source code (content, theme, and configuration) were going to live there anyway.
The easiest way to accomplish this with minimal setup is just to have your site generator output your built site in a folder called
/docs. Rebuild your site after any change you make, push to
master, and you’re good to go.
This solution was fine at first, but it got a little annoying having to manually re-build my site and commit the output of that build on every change. Not to mention the fact that committing build artifacts to version control broke my heart a little. I wanted a way to keep only my source chances in my git history (with the build folder in
.gitignore), and have the build and deployment process happen automatically when I pushed my source code to GitHub.
There’s a Black Mirror episode rankings thread where dozens of people have ranked every Black Mirror episode. I thought it would be interesting to average up all the rankings to get a general consensus of people’s favorite and least favorite episodes. Without further ado, here’s each episode ordered by its average ranking from that thread:... Read more
I live with four other hungry college students. I've been cooking for them (and friends that occasionally join us) about once a week. Here are some of my favorite recipes, along with some of my personal notes.... Read more