IDD
Blog Instead of being asleep at 12:22 on 26 February 2024, kitt created this:Okay, so, you've heard of Test Driven Development, where tests (unit, functional, system, integration, and contract) are written first, then the code that passes the tests is written to that test's specifications, as a way to write good, efficient, tested code.
There are also Acceptance test-driven development (ATDD), behavior-driven development (BDD), example-driven development (EDD) and story test-driven development (SDD) styles of code writing. I'm most familiar with the last.
We have (mostly because I wanted) a tech-debt sprint every 4th sprint on my main project at work. These are sprints where we do not introduce new features, but rather fix bugs, improve infrastructure, increase performance, or refactor that write-once-to-learn-copy-once-and-shit-copy-again code into a don't repeat yourself (DRY) bit of code. When feature development is blocked, for whatever reason, we continue developing, but the priority order is often unclear.
Until today.
Katherine commented she was doing Irritation Driven Development (IDD) and I love the term. "These things bug the F out of me, I am going to fix this" seems a great way to bring joy back into a project and code. I am delighted.
Find the bug, Rails edition
Blog Written with a loving hand by kitt some time around 13:45 on 20 February 2024I have this code in a model in a Rails project.
validates :name, presence: true, on: :create validates :email, presence: true, format: { with: URI::MailTo::EMAIL_REGEXP }, on: create
Let's put it in an Author model:
class Author < ApplicationRecord validates :name, presence: true, on: create validates :email, presence: true, format: { with: URI::MailTo::EMAIL_REGEXP }, on: create end
When retrieving a list of all of the authors without email addresses (because, well, we are cleaning up these things) with this line of code:
authors = Author.where(:email: nil)
... two new blank authors are created at the WHERE query. Both of their names and emails are blank. This is absurd!
Find the bug.
I narrowed the problem down to those validates lines, but could not see the bug. After an hour of puzzling, I asked Katherine to look. When she said, "what the?" I felt a little bit better that this was something weird.
She figured it out, though.
class Author < ApplicationRecord validates :name, presence: true, on: :create validates :email, presence: true, format: { with: URI::MailTo::EMAIL_REGEXP }, on: :create end
F'ing symbols. Yay for Katherine's second set of eyes! Whoo!
MEOW
Blog Written with a loving hand by kitt some time around 09:47 on 20 February 2024<!-- _ .__(.)< (MEOW) \___) ~~~~~~~~~~~~~~~~~~-->
Is that offensive? Down a rabbit hole.
Blog Instead of being asleep at 14:01 on 13 February 2024, kitt created this:"I hope you take this the way it is intended, but, you'd make a good dyke."
Yes, yes, I would. I have the whole "who the F cares about clothes" vibe. Makeup and I don't get along, but I know the origins of that one. Though, let's be real, that's not really what being a dyke is actually about. Yet, I wholehearted agree I would, except that my attraction to women sexually is close enough to zero to be considered zero.
The comment, though, had me heading down the rabbit hole of "Is the word dyke offensive?" It has been reclaimed by the LGBTQ+++++++ community, so no, but, as always, context matters. Someone intending the word as a slur is offensive. Someone using the word as a term of endearment is not offensive. Like a lot of words.
And the etymology of the word? FASCINATING. Go read it.
Given my brother thought I was gay when I was in high school, I guess I give off gay, dyke vibes. Except to gay people. They know I'm not.
Covid Sucks, Slow Start
Blog Written with a loving hand by kitt some time around 20:39 on 5 February 2024The thing that gets me about Covid is that 3-5 day incubation period between catching covid, and showing symptoms. Sure, Covid isn't a zombie virus that has a 28 day incubation period, which is good. I can only imagine how sucky we would be as a culture and society and race if Covid had a 28 day incubation period. We would have so many more deaths.
Anyway, friend caught covid. I had had dinner at his place last Tuesday evening, the day he was feeling off. At the end of dinner when we were all sitting around talking, as we often do, he commented he had a shooting pain up the back of his neck, similar to when he had Covid six weeks ago. "It's not Covid, I just had it," he said. "You can't build immunity to something that changes every month," I responded. I then left in a hurry, thinking flu, RSV, Covid, a cold, pick one, any one, they all suck. Two days later he was testing positive for Covid. I am sad for my friend. Covid sucks.
I mask in public by default, and avoid almost everyone these days, my few friends excepted, so isolating isn't difficult at least, if I am infectous. Yay for remote work.
I haven't tested positive so far this round. I have, however, been in bed or on the couch for 14+ hours a day for each of the last five days. Walking is about as much as I can manage, movement wise. I was going to start the 75 Hard challenge on February 1st. I skipped that. I don't know how much of this is psychosomatic and how much is shit-I-have-covid. See above: testing negative. Radical rest has been my default, though, this month so far.
Or maybe all this is just ennui, an attempt by my psyche to shift me over onto my path.
Biases of the Day
Blog Yeah, kitt finished writing this at 11:37 on 27 January 2024Through various and assorted internet consumptions, biases that have come into my awareness again today:
The Mandela Effect
The Mandela effect is the situation where a large number of people believe that an event occurred, when it, in fact, did not. It is the large-number-of-people version of the false memory phenomenon:
In psychology, a false memory is a phenomenon where someone recalls something that did not actually happen or recalls it differently from the way it actually happened. Suggestibility, activation of associated information, the incorporation of misinformation, and source misattribution have been suggested to be several mechanisms underlying a variety of types of false memory.
The Mandela part comes from the large number of people who believed Nelson Mandela died in the 1980s while in prison, though, in fact, he survived, was released, and went on to help South Africa reduce its apatheid (while abolish is supposed to happen, we know that biases and political change don't happen overnight, and I don't actually know if South Africa's system of discrimination on grounds of race is actually gone - given my understanding of racism through the lens United States' inability to see beyond gender and race and age, I'd be surprised if SA managed the removal of apartheid in fewer than two generations).
Sadly, the one oft quoted about the Fruit of the Loom is actually wrong: there was a horn on the logo for a short bit, though the company denies it.
The Michelangelo Phenomenon
The Michelangelo phenomenon is an interpersonal process in which close, usually romantic, partners influence or 'sculpt' each other. Over time, the Michelangelo phenomenon causes individuals to develop towards what they consider their "ideal selves," as their partner sees them, and therefore acts around them, in ways that promote this ideal.
One could argue that, "the Michelangelo model suggests that close partners sculpt one another's selves, shaping one another's skills and traits and promoting versus inhibiting one another's goal pursuits" works only if one is in a relatively stable relationship where at least one partner is able to model this behaviour. Said modeling would need to be strong enough to overcome the resistence of the other partner's beliefs about themselves if both partners aren't able to positively affect each other.
A good reason to stick with the partner that makes you want to be a better person.
Golem Effect
The Golem effect is a psychological phenomenon where low expectation placed on people causes a poor result or performance.
The Golem effect is a psychological phenomenon in which lower expectations placed upon individuals either by supervisors or the individual themselves lead to poorer performance by the individual. This effect is mostly seen and studied in educational and organizational environments. It is a form of self-fulfilling prophecy.
Yeah, assuming the worst will make the worst appear: "if I'm being punished for this, I might as well do it." In families, parents having no expectations for children definitely affects long-term quality of life of the children. This phenomenon just sucks everywhere is exists.
The Golem effect is not quite the opposite of the Michelangelo Phenomenon. The Michelangelo phenomenon sculpts positively. In relationships, the Golem effect is giving up, not trying in a relationship, assuming the worst in a partner. Actively sculpting negatively, though, pointing out everything bad, and focusing on all the disappointments, thereby sucking all the joy out of a relationship and destroying it, probably has a different term which hasn't surfaced for me yet today.