Andrew Culver Profile picture
Creator of https://t.co/fQcD61ZqoJ, https://t.co/7SDqscErtS, https://t.co/opTH8IhjDt, https://t.co/3R6OoYJpFL. Founded, sold, invested https://t.co/PG8ZNALFpK. 🍁 Hamilton, Ontario. ⚾️ Dodgers. ❤️ Japan.
Mar 9, 2019 13 tweets 4 min read
Recently I've been experiencing a personal renaissance with regard to writing shell scripts in Ruby, like this little one that trivializes rolling back some migrations so you can either touch them up and re-run them or give up on them altogether. I've been creating so many Ruby shell scripts that I wrote a Ruby shell script to remove the friction of writing new Ruby shell scripts. Running `new-script some-new-script-name` invokes this script and generates the following stub within my $PATH and marks it `chmod +x`.
Aug 8, 2018 7 tweets 2 min read
I’m going to quote anonymously from someone who deleted their tweet: “It’s easy to write untestable code which is why writing tests first guards against that.” This is a super common argument for doing TDD, but when you dig into it, it’s actually circular logic. 🙇‍♂️ “It's easy to write untestable code" is only true if you insist on testing things in isolation at a unit level. In practice, I find even the most abhorrent one hundred line methods quite testable with headless browser tests, regardless of how the code is structured.