Weeknotes 2024 W18: Opportunity costs
Happy 17th birthday, Nanoc! The 1.0 release of Nanoc was on May 3rd, 2007.
Coincidentally, Nanoc crossed one million downloads earlier this week. Neat.
Nanoc is still such a nice tool to use. Its flexibility is what keeps me using it. For example, being able to write articles in my own markup language, or importing content from the note-taking app I use, or integrating KaTeX so I can show mathematical formulas. I can do all of that without needing to change Nanoc itself; it’s all plugins.
If you like the work that I do, whether it is Nanoc or otherwise, consider leaving a tip on my new Ko-fi page.
My unemployment has officially started this month. Getting the Arbeitslosengeld1 has been an adventure, and it’s not over just yet: one Arbeitsbescheinigung2 is still missing.
No other job search news to share just yet, but hopefully soon.
I struggle with opportunity costs when writing fiction. In other words, when I am writing one story, then it bothers me that I am not following up on ideas for other stories.
I have plenty of ideas, and they come in all shapes and sizes. Some ideas are for horror stories, some for weird fiction, some for mysteries. Some story ideas are short and self-contained, while others are for longer stories or serialized ones. Some are low-key, almost slice-of-life, while others are high concept and fantastical.3
Whenever I am writing one story, I find myself longing to write a story of a different kind. Plenty of writing I don’t finish because my interests have shifted onto new, more exciting stories — and then the unfortunate cycle continues.
I don’t know how to combat this. One way of getting a piece of writing to the end is to do it as quickly as possible: get the first draft written, a second draft written and edited and published before my interests shift. That is exhausting and not sustainable, though — especially for longer writing.
When it comes to fiction writing, I also struggle to combine all the skills needed to put a story together.
Writing is not just putting words on a page. It involves creating believable characters, in a believable world, responding to external events in a believable way. It’s crafting a plot with the right levels of tension, and dynamism in tension, that makes for engaged reading. And only then is it about writing down words. When it comes to writing down words, there are challenges too: point of view, tense, scene (with dialogue) versus summary, and more.
It’s a lot. A good piece of fiction writing is good at all these aspects, and I’m often overwhelmed, not knowing what exactly to focus on. I don’t even really know what exactly my strengths and weaknesses are.
Still, all of that comes with practice, yeah?
I’ve written before4 about how I miss Shopify’s dev
tool for setting up local developer environments. I’ve finally gotten around to implementing a local development environment setup tool for myself. This tool is ddenv and it works a bit like this:
% cat ddenv.yaml
up:
- homebrew: overmind
- ruby
- bundle
- node: 20.12.2
- npm
% ddenv up
Installing Homebrew package overmind skipped
Installing Homebrew package ruby-install skipped
Installing Ruby v3.3.0 skipped
Initializing Shadowenv skipped
Creating .shadowenv.d done
Adding .shadowenv.d to .gitignore done
Adding Ruby to shadowenv done
Installing Ruby gem bundler skipped
Installing bundle working...
Installing Homebrew package node-build pending
Installing Node v20.12.2 pending
Adding Node to shadowenv pending
Installing npm packages pending
This tool solves a few problems I have frequently:
-
It reduces the need for documenting how to set up a project for local development. Rather than describing the version of Ruby it needs, which system libraries or Homebrew packages that need to be installed, which version of Node, and so on, there is just one command:
ddenv up
takes care of it all.This isn’t too much of a concern when working on spare-time projects, but when collaborating with people across many different repositories, having a single unified way to get set up is invaluable.
-
It allows projects to each specify their own Ruby and Node version, so there’s no need to uninstall and reinstall versions when switching projects, or juggle environment variables like
$PATH
and$GEM_HOME
. -
It makes it straightforward to recover from situations where the dependencies/software requirements have changed and the environment no longer works: a
ddenv up
invocation brings it back to working order.
I want to spend as few brain cycles as possible trying to figure out how to get a development environment set up, and this tool is the solution.
There’s no magic in ddenv:
-
It piggy-backs on Homebrew when it can.
-
For installing Ruby versions, it uses ruby-install. It reads the version from .ruby
‑version . -
For installing Node versions, it uses node-build.
-
It uses Shadowenv (a tool similar to direnv) to specify per-directory configuration, such as specific Ruby or Node versions.
This tool purposefully avoids using VMs and containers (like Docker). Those approaches can come with significant performance hits,5 and tight feedback loops are crucial. Sharing files and environment variables across VMs and containers is also not trivial.
For it to become stable and mature, it needs high test coverage and support for handling more dependencies (Python, PostgreSQL, Redis, etc).
There is one big change I’m already making. The current implementation is in Ruby and so it requires a Ruby environment, which creates conflicts because the ddenv tool itself is also used to manage a Ruby environment — one that ddenv itself isn’t part of. This leads to funky situations. As a result, I’m moving the implementation to Go.6 Having a native executable is simpler in so many ways.
I am writing this tool for myself first and foremost. I believe I’ll get it to the point where it’s mature enough to be usable by others, but it might take a while.
Entertainment:
-
I picked up Anno 18007 and it’s such a time sink. It’s enjoyable, but it is ruining my productivity. Perhaps uninstalling it would be best for me.
-
For a second time, I picked up The Last Wish8 but did not get very far. Something feels wrong about either the writing or the translation, and I really struggle to enjoy it.
-
I picked up Shirley Jackson’s The Lottery and Other Stories.9 Lovely weird fiction.
Links:
-
Why AI is Doomed to Fail the Musical Turing Test (Adam Neely)
Tech links:
-
Your non-linear problem of 90% utilization (Jason Cohen, 2015): As true today as when it was written.
-
Motorcycles, Cars, Websites, and Seams (Jim Nielsen)
-
How an empty S3 bucket can make your AWS bill explode (Maciej Pocwierz): Yikes.
-
Unemployment benefit. ↩︎
-
Certificate of employment. This is a requirement for the Arbeitslosengeld, and needs to be provided by (former) employers. ↩︎
-
Most of the stories I write end up unfinished and not polished enough to publish them. A handful of stories have ended up on my Fiction page, but plenty just lie around in draft folders on my laptop. ↩︎
-
See Weeknotes 2022 W34: Insomnia and Weeknotes 2022 W45: Burn II. ↩︎
-
If you’re on macOS and you use Docker for local development, you’ll incur a performance penalty of 1000%–2000%. It’s akin to using a laptop from a decade or two ago. ↩︎
-
I settled on Go because it’s the compiled language I am most familiar with, but was considering other languages too. Rust could’ve been nice, and Crystal would have been straightforward given how similar it is to Ruby. ↩︎
-
Anno 1800 (Ubisoft Blue Byte, 2019), published by Ubisoft. ↩︎
-
Andrzej Sapkowski, The Last Wish, trans. Danusia Stok (New York, NY: Orbit, 2019). ↩︎
-
Shirley Jackson, The Lottery and Other Stories (New York: Farrar, Straus and Giroux, 2005). ↩︎