There are 87 posts here

2021

2 in April
4 in March
5 in January

2020

6 in October
2 in August
2 in July
2 in June
8 in May
1 in April
1 in January

2019

2 in October
1 in August
3 in June
2 in May
2 in March
2 in January

2018

4 in October
1 in July
4 in May
1 in April
1 in March

    Working Conditions

    [Apr 10, 2021]

    I’ve always been an office employee, and over time I’ve seen almost every combination of working schedules. My ranked list:

    1. 2 days in office, 3 days at home.
    2. 3 days in office, 2 days at home.
    3. 5 days at home.
    4. 4 days in office, 1 day at home.
    5. 4 days, 10 hours, all in office.
    6. 5 days, 8 hours, all in office.

    This order has a few caveats: I have almost always had a “long” commute (it’s likely average by American standards but it’s long to me). 1-3 are pretty arbitrarily arranged and mostly based on the jobs I had those schedules at and how often other people were in the office. If 4x10 became 4x8 it would probably immediately jump to the #1 spot — there’s no substitute for an entire day back to yourself, but 10 hours of knowledge work is too much to expect from a brain on any given day.

    4x8 versus 4x10 and the pandemic schedules which tended to drift into “never in the office but always available” brings up a lot of other questions about availability of time versus actionable time. There were dedicated marketing campaigns for 24/7 office work pre-pandemic, and I don’t think anything has gotten better in that regard.

    Microsoft’s trash work from the toilet ideas

    One of the most important lessons I learned in my working career was from my first job. I was a contractor but I worked with a bunch of IAM machinists, and at shift change, down to the exact minute, they’d be pushing the doors open and running for their cars. Granted, they couldn’t take their work home — some of them worked with tools the size of small house, but that mentality of “the work day is done” has stuck with me.

    Permalink

    Opening Day

    [Apr 1, 2021]

    I don’t follow the Red Sox nearly as closely as I used to, but I at least knew today was opening day. Or, was supposed to be, I saw it was cancelled. The last time I was at Fenway for opening day was 2009, and the weather was about the same, low 40s and rain / something that looks like snow but lands as rain. It was the middle of three events at Fenway that were each so miserably cold that I gave up on going for at least five years.

    Fenway Park on Opening Day, 2009

    In a completely unrelated mental thread I referenced Adium today, and remembered that for a long time I had the Red Sox Adium duck in my dock, which made me wistful for a bunch of things, but maybe more non-square dock icons than anything.

    The Adium duck icon dressed as a Red Sox player

    Permalink

    Marking the Pandemic by Plane

    [Mar 27, 2021]

    We live under a common flight path for planes landing at Logan Airport in Boston. We’re close enough that we get airborne advertising — you can read the names on the bottom of the planes. The sounds trailing the planes converges as it passes over our house. I’ve flown over my house and seen it from the plane. It’s as normal to look up and see a jumbo jet as it is a seagull.

    Last March, there were no planes. The sky was silent and empty. It occurred to me that in a lot of places, the sky is always like that. But here, it was immediately noticeable that the planes were gone.

    Today was unusually warm for March, and we ate dinner outside. Planes flew over the entire time. As much as I missed a silent sky, hearing the planes again made it feel like things were closer to normal.

    Permalink

    Electricity

    [Mar 22, 2021]Permalink

    One Year

    [Mar 11, 2021]

    A year ago was my last day in the office. It was also my first day in that particular office — we were moving out of a WeWork into a new space and I needed to get my stuff out before everything shut down.

    The new place had (has?) a decent view. You can see from here that the city was already emptying out at this point.

    I was also in the city because my parents were in town, and I met them for dinner. The restaurant only had us and one other table. The train I took home was almost empty.

    I looked back at some notes from March of last year. I was very wrong about how long this would last, but almost everyone was. For a few days it seemed like maybe a planned April vacation was still on the table. Some notes that stood out:

    It’s the weekend, which I’m guessing is going to feel a lot like every other day of the week for a few weeks.

    This was definitely true. During the Summer I was also at least partially expected to be available for work so it really never felt like there was a weekend. The situation is better now: with my daughter having classes the weekends mean something to her again, and I occasionally flip the whole concept and do something like make pancakes for breakfast on a Tuesday. It’s not like anyone is rushing around in the morning, so why not.

    Talked to my mom, they seem ok. She said there’s a 30 day ban on all visitors to nursing homes, which she’s pretty upset about. I think worst worst worst case something happens to my Grandmother now and there’s no funeral.

    This one came partially true, unfortunately. We did have a funeral, it was a beautiful day in June so we could have it outside, but only five of us could attend. It was also the last time I’d see my parents in 2020, although they’re now half vaccinated, so hopefully that streak will be over soon.

    The 30 day ban was, in hindsight, closing the gate after the horse had bolted. After 98 years of living that's a shit way to go, but we are certainly not the only family in the country with this same story.

    We made cookies and Lorelei filled up a notebook I’m already running out of ideas.

    This was the third day in. I came up with lots more ideas, luckily.

    I’m tired of this shit.

    32 days in.

    Things, honestly, got better. You say “wow, we’re actually pretty fortunate” enough times and it starts to stick in your brain. Some highlights I found:

    Permalink

    Stencil, Markdown, and web components in Markdown

    [Mar 2, 2021]

    I’ve had an idea floating around for a while: MDX is great, but I hate all of the steps around configuring / building React components with it. If I’m writing Markdown, HTML is valid in Markdown, and Web Components are valid HTML, so why not just stick Web Components in Markdown and call it a day?

    That was the idea, anyway, I just never got around to trying it. I still don’t quite grok the actual Web Components spec, but I have used Stencil, and figured with some free time today I’d give it a shot. This is the result: Web Components in Markdown. It works! Of course it does. Probably the biggest difference between it and MDX (besides, React, obviously), is that Web Components in HTML can only accept string values, so in this example rather than passing an array of image sources, I passed a comma separated list, e.g:

    <picture-gallery images="https://source.unsplash.com/lvh5L46VWuA/600x600, https://source.unsplash.com/TjbedCFPQdc/600x600, https://source.unsplash.com/caM2RdHVAoc/600x600"></picture-gallery>

    One other nice thing here is you can stick fallback HTML into the <picture-gallery> part, and you get fallback content. If the JS loads, yay, a gallery. If not, whatever. I made an example of that here:

    You can see the code behind the site on Github, it’s slap-dash but it is functional.

    Permalink

    Rush - ing a repo

    [Feb 24, 2021]

    Some notes on moving an existing Git repository into a Rush monorepo structure:

    • The last monorepo setup I did was with Lerna. I much prefer the documentation and incredibly verbose configuration files of Rush. Lerna certainly has it’s place in specific setups but not the one I was trying to set up.
    • One point that wasn’t clear: if you have an existing repo you want to add rush to, you have to initialize it with rush init --overwrite-existing. Minor point but the error message from just running rush init didn’t make it clear that I should, and the documentation is a little vague on what --overwrite-existing is going to do (and it sounds worse than it is).
    • I used their suggestion of creating a package structure two levels deep. In this case /apps/[appname] and /tools/[toolname]. We’ll likely add a /libraries down the line, and migrate some more apps over.

    Seems like a decent tool, so far. The requirements here are low, I’m not trying to create an omni-repo of all of our back and front-end projects, just colocating some already related pieces of code in a happy way, and setting up a future state so more projects can become more closely related in the future.

    Permalink

    From Netlify CMS to Forestry

    [Feb 23, 2021]

    I’ve used Netlify CMS on and off on this site (and previous iterations of it) and while I think it’s a really great idea, the execution of the application is incredibly lacking, for a few reason:

    • The documentation is… not good. It’s ok, and I’m always hesitant to complain about documentation too much given how often I’ve dealt with software that included absolutely zero public documentation, but if I have to dig through Github issues to find answers to configuration problems that’s not a project I would be quick to recommend.

    • Running the admin panel locally is annoyingly hard. This has been fixed in later releases but still feels clunky.

    • You have to configure all of your fields in a YAML file, then commit them, then go make changes to the content. If you’re like me and you just move code and content independently this creates a lot of mismatched fields and inconsistency. That’s a me thing, but I don’t think it’s uncommon if you’re working with all of your content in Markdown files.

    • Sorting never seemed to work, and all of my files were ordered somewhat randomly when I opened the CMS.

    • Folders, in content and in the media library, didn’t really work either. I like to store my posts by year/month/title.md to cut down on how many I have to look at at once, and Netlify CMS just makes them one big list.

    To be clear, the very good idea behind Netlify CMS is that it is a light UI wrapper around your Markdown files, and it requires zero installation. You put a script tag on a static page and it does the rest. There’s no database, no deployment steps, you can directly edit the YAML front matter and Markdown content of your files and commit the changes to Git, at which point if you have a static site and Netlify hooked up, everything deploys and your site is updated. For a while there wasn’t a lot of good options in this market, but now there’s a few, so I started looking at alternatives this weekend. Among the interesting options:

    But all of those started with “download” or “get started by installing”. Then I found Forestry.io, which runs the UI on their servers (headless, the kids call it), but against your Github content. Getting started was similar to setting up a site on Netlify, you connect your Github account, pick the repo, pick the default branch. After that you give forestry some config settings (which it saves in a .forestry folder in the repo) and your content, assuming you already have some, sort of magically appears. You can then configure your media library (which, annoyingly, also doesn’t use folders but at least saves correctly to folders if you configure it to), and you can use existing content to build out a reusable front matter structure. I picked one of my “album a day” posts and forestry did (most of) this for me:

    (I added the Draft field after, since the post I picked didn’t have that in the front matter already).

    forestry also has a bundle of other options I don’t yet need but I’ve needed on past projects that are nice:

    • It can run a preview version of the site so you can see changes in real time.

    • Webhooks.

    • User roles (once you go to a paid tier).

    In general I recommend it, and editors like this are easy to recommend because they require almost no setup, and if you change your mind, you just go back to whatever other Markdown editing process you were using.

    Permalink

    CDNs Aren’t as Useful as They Used to Be

    [Feb 18, 2021]

    When I was learning to be a web developer it was beaten into my head that if you were building a site and loading 3rd party scripts on it (e.g. jQuery, Bootstrap), you should load them from a CDN because if a user on your site had been to another site that used jQuery (likely) and they used the same version of jQuery (somewhat likely), and that other site also used the same CDN for jQuery (i.e. https://code.jquery.com/, which was pretty likely given we didn’t have as many widely available CDNs back then), then the browser would pull the version of jQuery you were requesting from the cache instead of downloading it again. Everyone wins! Except the first site to request jQuery that a user hit with an empty cache.

    I’d gone on assuming that was functionally true but I needed it less and less as the sites I built started using npm packages and bundling everything at build time instead of requesting resources at run time. I thought it was true somewhat recently, when I decided we could load Google fonts from Google instead of bundling them because “if the user has it in the cache…”. But today I learned it’s not true at all:

    If your sites request the global jQuery, modules from unpkg.com, font files from Google fonts or GA's (Google Analytics) analytics.js, users will redownload the resources no matter if they downloaded and cached them for other sites already.

    What does this change mean for you? If your sites live on modern hosting that provides a CDN and supports HTTP/2, you can drop the third-parties and should ship all resources yourself. Relying on a third-party provides little value in 2020.

    In fact it hasn’t been true in Safari for a long time (since 2013), but as of October 2020 it doesn’t work in Chrome either. It maybe never really worked like we dreamed it did, comments on Hacker News imply actual cache hits were very low. I chose to believe there was a golden age of a long lived minor version of jQuery that got heavily pulled from cache hits, but maybe I chose to believe that just so this little nugget in my brain wasn’t useless all along.

    Permalink

    My Favorite Apple Watch App

    [Feb 6, 2021]Permalink