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.
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.
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.
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.