Weeknotes 44
1st May, 2022
“Slow progress”
-
I didn’t know you can pass relative dates to Git.
git reset –hard main@{5.days.ago}
But…I’m not sure I would ever want to? The imprecision worries me. Surely you know which point in time you want to return to?
-
Slow progress on the side project I spoke of last week. I fear it might not get done like the myriad other projects I’ve started over the years. Staying interested in my side projects remains a problem. It usually starts at the point at which they get hard.
-
CTRL-o
in Vim takes you back to the last place you were before you moved. -
TIL that Ecto allows has a
--migrations-path
option so you can split up migrations by type, or organise them as you please. As Peter Solnica says:This is really nice because you can easily split migrations into various groups (ie schema changes, data changes etc
-
I’ve seen quite a lot of chat on Twitter in recent months advocating that most of your tests should be higher level acceptance tests – tests that test what the end user does from the top down. These types of test are a great idea, and very valuable, but the idea that they should make up the majority of your test suite is extremely misguided.
Trying to refactor a complex codebase with these tests alone is very difficult. Acceptance tests are slower to run, more likely to break, and harder to debug.
We need to stop being so dogmatic. Higher level acceptance tests are one part of the testing toolbox, not the only tests you need.
-
It’s a shame you can’t start an adhoc review on GitHub without a PR. I occasionally want to communicate about existing code without having any new code, but this isn’t possible unfortunately.
-
vim-dirtytalk: spellcheck dictionary for programmers – This is a cool idea. I’m constantly adding obscure programming words to my personal dictionary, and this would obviate that.
Unfortunately, I couldn’t get it to work with Neovim using the default installation instructions – it seems to only be compatible with Vim 😞 I worked around the issue though. Hopefully it gets updated to work with both Vim and Neovim.