Wrong Tracks
Blog Yeah, kitt finished writing this at 11:08 on 19 March 2024Little did we know, we were standing at the wrong tracks.
We had walked over to the train station this morning, dragging our suitcases, clickity clickity clickity, and arrived with plenty of time to buy tickets and find the right tracks to be at for our train ride to Modena. I was very delighted that we had so much time to chill at the tracks. As the train departure time approached, though, there was no train on the tracks. WTF?
I looked around about 10 minutes before departure, no train, and heard a couple asking the information kiosk guy where the train to Modena was leaving from. He told them to go down the stairs, through the tunnel, and over the track 4. SHIT! The tracks had changed. Let's go, Jonathan!
We hurried across, and found our train, but oof, that rush was not what I would have preferred! But, made it!
Lines de Jonathan
Blog kitt decided around 18:58 on 15 March 2024 to publish this:There's a photographer that I follow on Tiktok (before you roll your eyes about the TIktok part, and trust me, I understand said eye-rolling - I mostly watch what Jonathan sends me, and flip briefly through my for-you page (FYP), but not much else. I'd rather someone else curated for me), who gives wonderful instructions on how to shoot good photos. I'm not a great photographer, but I can, according to Jonathan, find some good shots, and know to focus on people with the interesting background over their shoulders when offering to take photos of other tourists, and not have said tourists in 10% of the photo, and to use the rule of thirds, and write run-on sentences about my photography skills.
I'll try to find the actual tiktok, but the one I watched recently from said photoographer talks about how to pose and photograph someone standing casually. The photographer wants to draw the viewer's eyes along a line to the photo's visual focal point, regardless of the photo's subject being a landscape or a portrait. With people as the subject, the line can be harder to determine, but should still be there.
In this case, the pose was a casual lean against a door frame or wall, with the outside arm rotated and slightly back, and the line going from shoulder through hips to foot. I didn't quite manage the lines I wanted, but I didn't not manage the lines I wanted. The line is there, we just need to work more on the angle of the line.
Feet to the flames
Blog Instead of being asleep at 10:00 on 9 March 2024, kitt created this:Mike: "I need to find someone to hold my feet to the flames to get things done."
Me: "I think it is less about finding someone to hold your feet to the flames, and more about finding someone to help you hold your own feet to the flame."
Semi-retirement can be difficult to navigate if you're previously a high-productivity professional.
IDD
Blog Posted by kitt at 12:22 on 26 February 2024Okay, 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 Instead of being asleep at 13:45 on 20 February 2024, kitt created this:I 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!