Nick Davies

Author, Musician, Web Developer, etc.





Idi Davies, 2007? - 2023

2023-12-06 00:00:00 +0000

Idi swaddled in blankets

Idi came into my life in summer 2008, via the Dane County Humane Society. We don’t know for sure how old she was then. She was named for a dictator, in keeping with Mobutu Davies. She was never my cat alone, but her vets over the years knew her by my last name.

Young Idi looking down from above

Throughout her life, she loved her humans so much, those she lived with and those she got to know. When we had to leave her home during the day, we’d leave NPR on for her, to help keep her calm. Whenever we were sad or anxious or sick, she would drape herself on us protectively. Last time I was job-searching, she knew I was nervous during live-coding interviews, and she’d try to help the only way she knew how: by meowing and demanding pets.

Idi sitting mugly on a row of books

When we had a bunk bed in a small downtown apartment, she loved to be at face level for easy head-butting. Most nights, we had a bedtime ritual where I’d lie down and she’d walk up my chest and nuzzle my nose. This year in particular, she’d often do this again just before my morning alarm. She loved ear rubs, and it’d often make her purr. Lately she learned to pet us gently with her paw, as a way to ask us to pet her.

Idi looking at the camera from a high shelf

She enjoyed musical instruments: tin whistle, accordion, trumpet, keyboards, guitar. When I’d restring a guitar, she’d chase the loose strings.

Her jumping skills were never the best, but she loved sitting somewhere high. Over the years she moved four times, and always had to explore.

Idi sitting on a scratched up old couch

For many years, she loved playing with a “fishing rod”-style toy most of all, chasing it in circles until she’d spin out on the floor. She also loved chasing a laser pointer. She’d play-wrestle with my hand, always holding back her teeth and claws.

Idi sitting on my lap in the way of a laptop

She was no hunter, but she chattered at birds. When we lived in a 12th floor apartment, we’d put on bird videos for her. She’d look for the birds behind the television.

Her substances of choice were catnip–lots of rainbows to lick and kick–silvervine, and plastic carrot bags. Human food was rarely interesting to her, but there were times she went for a corn chip, or a cheddar popcorn bag, or a plate that had bacon on it. For a while, she had a habit of drinking water out of people’s water glasses. She’d also drink from the faucet in the bathtub. If you took a bath, sometimes she’d hop up to the side of the bathtub and drink the human broth.

A mischevious loaf in front of a laptop

We took her out on a leash occasionally, though it took a long time for her to get used to the harness. In her last few days, she actually requested to go outside, despite snow and meltwater on the ground.

I knew this day would come. I thought about it enough that I should have been ready for it when it came. Turns out not so much.

Playing video games with me

Making sure she ate enough had been a struggle, since her first brush with death back in 2011 or so. And then this year, everything started to go. She had a bladder infection in February, which led to an intestinal blockage in March.

Extremely cozy cat on a red blanket

Then in May, she was getting thin and bony, and the arthritis in her hips was getting worse and not responding to injections. That was the first time a vet suggested talking “about her quality of life”. It was a valid question–the vet only saw Idi growling and hissing–but it seemed like we were running out of potential treatments, and I started to wonder if she might not make it to next year.

Idi on her side looking at camera with big eyes

Over the following months, we started keeping score of how many servings of food she finished. Her front feet were collapsed, and it started to put a strain on her back feet, until she was essentially walking on her wrists and ankles.

In September, she suddenly started vomiting a lot. We got a last minute appointment with her regular vet. They gave her an anti-nause injection and said if she still threw up after that, she needs emergent care. So the next morning we had to take her to the ER vet. She was completely out of it when we got there; the doctor said she was in a state of shock.

Ready to pounce on squirrels in the TV

She was hospitalized most of that week, and they determined that she had an infection of her liver and gallbladder, and also diabetes. After five days in hospital, she came home with a tube in her neck and an intensive course of antibiotics.

Over the last two months or so, we’ve been back to the vet a lot. We’ve been doing feedings through her e-tube multiple times of day. For a little while, she was eating more on her own, and it seemed like she might outlive the tube.

Asking for pets please

In the past week, the nausea started coming back. Plus her back legs started failing her, and her eyes got a weird texture. Whatever reflex made her gnash her teeth and paw her face was limiting her ability to eat.

Then yesterday (Dec 5), she stopped throwing up. It seemed like an improvement at first, but by the evening, she was just really out of it and fading.

We took her to the ER, and they determined that her kidneys were failing. According to the ER doc, they could put her on life support, but even then she wasn’t likely to make it through the night. There was basically no chance she’d ever come home, or really be conscious again.

Coaching me while I exercise

In that first visit to the ER, there was no choice because she could pull through and have some quality time left with us. And she did. She made it clear every day that there was still joy in her life and that she wanted to be with us.

In the last visit to the ER, the choice was clear because drawing it out would do nothing for her or for us. It was still hard to give up on that chance she’d get better, no matter how implausibly slim it was.

Sitting on me in bed, about to bap me for not petting

I’m glad we had so much time together. I’m glad so many people got to meet her. Not just people who came over, but in the COVID/Zoom era, lots of coworkers and family and friends. And I’m glad that so much of her life is documented. Thanks to Sylvie, she had her own following on Instagram.

I would’ve had more time with her if I could. I know she would’ve wanted that too. We’re lucky that she was so very herself up until the end, up until she wasn’t here at all. We’re lucky that her slow decline didn’t frog-boil us into keeping her around in misery. This gentle, loving cat deserved a gentle, loving end.

Idi at the hospital for the last time

Experimenting with Priorities

2021-08-22 00:00:00 +0000

There are things that I should do in the medium term, but when they happen in particular isn’t important.

There are things that I would like to accomplish in the medium term, that are too large to take on in one uninterrupted chunk of time.

There are things that I would like to make regular habits of.

There are also things that I enjoy doing, when there’s time.

These things all compete for finite hours in the day. Even more finite, when you discount work, meals, and other things that are not subject to procrastination.

This is a challenge to figure out. Particularly because there are multiple areas where I want to continue progressing towards larger goals, without setting an area or goal aside entirely.

A novel where I just completed a draft (yay!), but there are revisions to make, before I figure out who should see it next (boo!). Plus a backlog of short stories to revise as well.

Lots of societal problems, and often multiple approaches to taking action on them. For instance, climate change needs to be addressed systemically, where effecting change through government is a long, uncertain process. There are also things I could do individually–donating to or volunteering with tree-planting initiatives. Helping with land-banking programs, or even buying and managing a piece of conservation land myself.

Songs to practice for playing with the band, and a solo album that I’ve started.

Things to try out in technology–new languages, new frameworks, ideas for apps to mock up. Sometimes these intersect with other priorities.

Plenty to do around the house: getting a solar assessment, an energy efficiency assessment, getting attic insulation, getting insulated windows installed–these count as “social good” goals to some extent as well.

Lately I’ve been in a job search cycle, which has largely preempted my usual careful balance of priorities. Now I’m trying to get back into some sort of rhythm.

A Solution?

I put up a physical whiteboard. Sure you can write to-do lists digitally, and to-do list apps. I sometimes do, as a way to at least get them out of my head, where they make a distracting rattling noise. But if you want a to-do list that’s going to stick around, and not get lost or ignored when Netflix or Overwatch are right there, I think something physical helps.

Most of my tasks to be done can or must be done from home, and while COVID has limited how much time I spend out anywhere, the limitation of location hasn’t been a problem. I can always take a picture of it before I go out.

I have the whiteboard divided up into sections, with my next to-do’s for each area. Things like “exercise” and “reading” are on there, just to remind me to do them periodically, and to give myself permission to. It’s not like having a strict manager looking over my shoulder and telling me what to spend every hour on. It’s more of a menu to pick from.

It might be too soon to tell, whether this will be a good system for me. I suspect that achieving balance might involve tracking some metadata of which section I’m pulling from more often.

Explaining explaining in Rails

2021-08-16 00:00:00 +0000

What is EXPLAIN?

SQL variants like MySQL include ways to inspect how a particular query would be executed, including what indices will be used. This can give you an idea of how the query can be expected to perform.

For instance, if there’s more than one index on a table that the query could make use of, it can be handy to know which one it actually will make use of, for the particular database instance. That’s not something that’s always easy to reason out abstractly, and what route the database picks can be dependent on the scale/shape of the data actually present.

The actual database query would go something like this:

EXPLAIN ANALYZE SELECT *** FROM *** ...;

But in the context of a Rails application, you may want to get this output from the Rails console, or add a statement somewhere in your application code that runs the query and writes the result to a log file.

I recently learned about this while troubleshooting a long-running query, where the tables involved in the query were temporary and not available after the fact, and the query itself was dynamically constructed in application code.

There are a couple ways to perform an EXPLAIN query, depending what you’re starting with…

Adding to a scope/relation

If you’re chaining together a scope or relation, something like Person.where(first_name: 'Nick'), then you can tack .explain on the end of the method chain, to return the explain output.

Bespoke SQL

Let’s say your code has constructed a SQL query directly. Maybe you have the query (as a SQL-encoded string) in a variable called sql.

In a model context, where self.class.connection is the database connection, you might run the actual query using self.class.connection.execute(sql). There are other methods that might be more convenient depending what you expect to get back from your query.

In order to get the EXPLAIN output, you do need to consult the database itself, and the syntax could be self.class.connection.explain(sql).

Hope this helps!

Querying tips: Comps

2021-01-11 00:00:00 +0000

Starting in January 2020, I queried a novel for the first time. Working through the list of agents I identified took about a year overall, though there was a chunk of time in April-July when I put the process on hold. I was starting to get editorial feedback, and wanted to put the novel through another draft before sending out more queries.

I gave it a fair shake, but now that I’ve reached the end of the querying process for that novel, I’m ready to trunk it for now and move on. I still think that novel has potential, and I have some ideas for how to improve upon the current nth draft, but I’m reluctant to sink time into another revision of it right now, when I could spend that time on something that hasn’t gone through that cycle already.

I’ve kept pretty mum throughout the process, on purpose. I didn’t want to reveal that agents I had queries out to were further down my list than others, not that that means anything. Nor did I want to reveal that other agents had already looked at the novel and passed on it, not that that means anything either.

Now I’m at a good point to reflect on what I learned along the way. Take this all with plenty of salt. I’m not an authority! This is just about my experience with the process.

In the first of these posts, I’ll be talking about comps. Comps, or comparable titles, are other books (or shows, movies, etc.) that you name-drop to help form an impression of your book. Some agents may ask for comps directly. It’s a common field in QueryManager. But pretty much any query you send out can include comps in the body of the query letter if you choose to, and it’s typically recommended to include them if you can.

The Comp Don’ts

Unfortunately, there are lots of ways to pick the wrong comp, or to misuse a comp.

Don’t aim too high

If you compare your book to a very successful touchstone of your genre, you’re probably saying one (or more) of these things:

  • You haven’t actually read much of your genre.
  • You may think very highly of yourself.
  • Your work may be cliche, taking inspiration from a well that many others have already drawn from.

If Harry Potter is the clear reference point, then so be it. No point in obscuring that, if the first time anyone reads the manuscript they’re going to spot your primary inspiration. In that case, make sure you also make it clear what new element you bring to it. Harry Potter, but in Antarctica.

Don’t aim too low

If you compare your book to a more obscure title, you risk giving one of these impressions:

  • The comp might not mean anything to the agent. (Whether they take the time to check it out probably depends on the agent, and how their day is going.)
  • If it’s a book that didn’t perform well, that could tell the agent that selling something similar is going to be an uphill battle.

Don’t go too old

If you’re citing a classic, you run into the pitfalls of citing a bestseller. You may think highly of yourself. You may not be reading enough of the genre you’re writing. You may be in dialogue with a work that there has already been a lot of dialogue with. It may be a style that got saturated. The readership may have moved on already.

Citing something older and less famous risks some of those perceptions as well. It also means that if a book didn’t do well, and isn’t still selling today, there’s a longer track record by which to judge it.

Although if your book taps into nostalgia for a particular period of literature, or if there’s specific source material you’re updating or subverting, it could well be the exception.

Don’t go too far afield

If you cite a comp that’s too different from your book, someone who reads your manuscript expecting one thing could be disappointed to find another. They could feel duped.

However, if you’re doing a genre mashup, you may want to do an X-meets-Y comp, as a way to specify which strains of each genre you’re mostly pulling from.

Don’t repeat yourself

If your book is about werewolves, you could comp another book about werewolves. But then including more comps about werewolves might just seem redundant and unhelpful. We get it. It’s a werewolf book, just like these hundred others. What else went into it?

The Do’s

I still struggle with identifying comps. With so many pitfalls to it, it would certainly be nice if there were just one methodical set of instructions to follow, but it’s a subjective thing. It depends on what your story is about, and how you could convey that to someone else’s mind. But here are some possible starting points.

Read

This is kind of the default way to get comps. If you like writing, hopefully you’re already into reading, right?

That said, it could be arduous to keep a pulse on books that seem similar to yours. If they’re recent titles, there’s no telling which ones are going to be well-received or not. Plus you likely also want to read things outside the particular sub-genre you’ve been writing in.

I don’t think “this could be a comp” would be enough to justify reading something front to back. If you hate it, then the person who’s going to love what you’ve written is liable to hate it too. (Or not! Who knows.)

Ask your readers

Writing isn’t a solitary pursuit. There’s always someone else’s eyes involved. Whoever reads your work, ask them, if you get the chance, what they would compare it to. Be ready for them to name things you might not actually like.

Get a second opinion about what genre (or genres) your story belongs in. You might be too close to get an accurate view of it. You worked so hard on that romantic subplot. That makes it a romance, right? Maybe you’ll gain a new understanding of what genre you should be listing in your query. Or maybe there’s something to fix in the manuscript, if it didn’t land in the genre you were aiming for.

Follow the tags

Use Goodreads, Amazon, or possibly your local library system, to find books that share characteristics with yours. This can also be a way to find authors, agents, publishers, etc. who are into what you’re into.

Keep track of your inspiration

Maybe you write because you read something amazing, and you want more of it in the world. Maybe there was a book that you read that didn’t go the way you expected, and you write to explore the possibilities that another author didn’t. Your influences could end up unrecognizable by the time you query. They could end up irrelevant (due to age or popularity). But it could be somewhere to start.

Test different combinations

Enter pitch contents like DarkPit, SFFPit, PitMad, DVPit (if that applies to you), etc. Try out a number of different pitches throughout the event, including different combinations of comp titles. See what people respond to.

Tailor your comps to the submission

If an agent has mentioned a particular book (favorably), then you know that’s a comp title that they’ll recognize, and that it’s something that matches their taste. That’s no guarantee of course. If you cite someone’s favorite novel as a comp, they’re going to have high expectations. But it does give you some common ground to build on.

Good luck!

I hope my thought process helps you with yours. Above all, my guiding principles throughout the query process are:

  • This is a match-making process for business relationships.
  • Agents are human beings.
  • You’re a human being too.
  • Agents are professionals.
  • You’re aiming to be a professional too.

Total Update!

2019-12-01 00:00:00 +0000

My intentions for regularly updating this blog have so far not turned into reality. There have been some other things going on. So here’s a rapid-fire update on various fronts:

Coding

For the Open Elections project, Wisconsin hasn’t had any elections lately, but we noticed that the website went down in August, and parts of the site are down still. It was an occasion for the folks leading that project to reassess how it’s presented online. Some of my effort since then has been prototyping what an alternative site could look like. I plan to post more about that later.

I’ve also been helping a Wisconsin assembly candidate get her website going. I didn’t have much experience with Wordpress going into it, so it’s been educational for me, as well as good practice in design. Is it exemplary? Next-level? Not yet. But it’s helping a challenger establish a competitive web presence against the incumbent.

I also switched my band’s site (gentlebrontosaurus.com) over to a Jekyll/Github Pages stack like this one. The concept of pulling content from Facebook and Twitter dynamically wasn’t reliable in practice. Events didn’t show up consistently. The newsfeed wasn’t very useful. The Facebook API version I’d used was going to be deprecated soon. Also the SSL certificate had expired, and it seemed like Heroku was going to charge for maintenance of that. Since the site didn’t really need a database or API keys behind it anymore, moving to a static site made sense.

I also fixed a couple things I’d noticed wrong with the page. YouTube embeds were loading Google Ads and Analytics scripts that caused errors. For the social icons, an a tag with an object inside it for SVG content no longer made the object clickable.

The downside of this stack is that I had the site written in Slim, and I had to convert it all to HTML. There is a Jekyll plugin for Slim support, but it doesn’t work with more recent Jekyll versions. More to the point, Github Pages only supports certain Jekyll plugins, and that one isn’t in the list. Nor is HAML.

Travel

My partner and I went on a trip to Catalonia. It was my third time there, her first. We spent about 5 days in Barcelona and about 5 days biking in the Girona region, mostly following the Vies Verdes and/or Pirinexus route. Though our itinerary didn’t go entirely according to plan. I intend to write more about that.

I wasn’t intending to plan another trip right away. But now biking season’s essentially over for winter (for me anyway), and for some reason I started looking at river valleys in the Alps. Now I think I’ve got a sweet itinerary plotted out, ready to go for next summer

Writing

I’m about 80% through the rewrite of “A City Divided” (I guess I’ve been calling it). Apparently that’s twice where I was as of July. I tried to really push through on that in November but didn’t hit my stride until near the end.

Now I switch back to “The Enthrallers” for a little while. I have a first draft of the next chapter to revise.

Then maybe I switch back, get through that last 20%, and get ready to start querying. That’s what the December holidays are for, right? That might be over-ambitious.

Otherwise

I had my first physical in a long while. It didn’t tell me anything I didn’t already know, which is probably a good thing.

I bought a coffee roasting machine. The Whirley-Pop just wasn’t cutting it. It made awful grating noises and the mechanism would jam up all the time, and the results were suffering. It feels a little less DIY to use a roasting machine, but this isn’t a “set it and forget it” kind of machine. You still actively monitor and adjust multiple variables as it roasts the beans. The results are already better and a lot more consistent.

Recently I played Disco Elysium, which I enjoyed a ton and highly recommend. It’s a detective RPG, and the core mechanic is that you walk around a town talking to people. Something you learn in conversation might allow you to go back to someone you already talked to and unlock more dialog options. But also party to these conversations are various voices inside the protagonist’s head. Things like empathy and rhetoric, and much weirder impulses. Those are also the skills you level up in. The dialog–internal and external–is often hilarious.