-
My Joy-Con diagnosis came back from Nintendo: “liquid damage main board”. Turns out C dunking it in a glass of water might not have been the best for its delicate electronics.
-
C surprised us one morning by saying “go go” when “Go Jetters” came on the TV during breakfast (after family favourite “Hey Duggee” but before family least-liked “Peter Rabbit”).
E and I now sing the theme song on demand.
-
I’ve been working on a brand new Rails application at work and it has been a long time since I had to build something customer-facing from scratch.
What test frameworks should I use? Should I still use Cucumber? What front-end framework should I be using? Should I theme Bootstrap? What Rubocop configuration should I use? Should I use Standard?
In the past, I’ve tried to reduce the amount of code I had to write (e.g. perhaps unthinkingly in the name of “Don’t repeat yourself”), extracting as much as possible so I could whip up resourceful controllers with the fewest lines of code. Now though, I’m less concerned about optimising for that initial writing and more concerned about making the code easier to read, change and delete.
The gamble I’m taking is that it might take a little longer to write at first but it’ll be much easier to understand and change in future.
Perhaps I’m getting more cynical about my ability to predict the right abstraction. As Sandi Metz said:
Prefer duplication over the wrong abstraction.
I’m reminded of Jay Fields’ “Working Effectively with Unit Tests”:
[Test] code and production code is written, maintained, and reviewed in drastically different ways. Production code collaborates to provide a single running application, and it’s generally wise to avoid duplicating concepts within that application. Tests do not, or at least should not collaborate; it’s universally accepted that inter-test dependency is an anti-pattern. If we think of tests as tiny, independent universes, then code that appears in one test should not necessarily be considered inadvisable duplication if it appears in another test as well.
I wonder if it is also useful to think of separate parts of your application as “tiny, independent universes” too.
-
I had to sign up for a Facebook account in order to fix a problem with Instagram embeds and, despite providing only my name and a work email address (which no one else would have in their contacts), Facebook suggested I add people I know in real life.
I was spooked until I realised Facebook use the phone number you give for 2-factor authentication to look you up in others’ contacts.
Weeknotes 71
By Paul Mucur,
on