Blog

Blog Archive

2026 May 6

Coding with AI: Part 1

My experience with using a large language model to help me write code has been surprisingly positive so far, especially given how problematic LLMs can be in most other walks of life. And it’s been much more useful than I expected.

I think that’s mostly due to how dry software development can be. A lot of the effort involves poring over documentation or discussion threads to figure out why something doesn’t work as expected. Unlike other disciplines where using LLMs to be creative is morally questionable, most of my prompts are requests to gather and summarize technical details from various sources and make recommendations based on them. The few times I asked an LLM to do something creative it failed, which makes me feel better about preferring to work through those types of puzzles myself.

It has also been a godsend for helping me resolve a few dozen quality-of-life technical issues, both for web development and macOS in general. I may not always find a solution, but I’m more likely to discover one than when I sifted through a dozen search results. Thankfully, as someone who has been online since before the internet was a thing I have pretty good instincts for when information isn’t accurate and comprehensive. That feels even more important now that the source of the information is abstracted away from the user.

My current weapon of choice is Claude, although Gemini has been helpful as well. I recently abandoned the Claude Code extension for Visual Studio Code because I ran into a few limitations that were deal-breakers for me. I was tired of my chat sessions being unavailable to the CLI, the website, or the macOS app because they were confined to single VSCode workspace. And it consistently had trouble modifying its own configuration files in ~/.claude no matter how much I tweaked the permissions in ~/.claude/settings.json. I have since switched to using Claude Code in two terminal sessions, one for the project I’m currently working on and the other for whatever web dev and tech questions pop into my head as I go.

I was initially reluctant to experiment with AI because my primary goal was to improve my coding skills, not have some model write everything for me. That’s still true, but I’ve accepted how an LLM can serve as a valuable secondary learning aid when paired with primary sources like video tutorials or documentation. I’ve also been using it to generate a project plan by feeding it a detailed initial prompt and asking numerous followup questions until I’ve settled most of the details.

2026 April 3

Some recent photos

Bare Cove Park chairs

Two Adirondack chairs at a lookout point in Hingham’s Bare Cove Park. The chairs have signs with hearts on them. They reminded me of the weighted companion cubes from the classic video game Portal.


White-tailed deer in winter

Hello fren. A white-tailed deer nonchalantly snacking a few steps from the bike path.

Tags: photo

2026 March 6

Reordering Tailwind classes in Astro using Prettier

Yesterday I spent some time getting VSCode Prettier plugins to work with both Astro and Tailwind CSS. I wanted Prettier to automatically reorder Tailwind’s utility classes in HTML, CSS, and Astro files.

Here are the two VSCode plugins in question:

Installation and configuration

The commands to install both of them as dev dependencies were straightforward:

npm install -D prettier prettier-plugin-tailwindcss
npm install -D prettier-plugin-astro

I opted for Tailwind’s suggestion to create a .prettierrc JSON file at the root level of the project. I found this advice online:

“Your configuration must list prettier-plugin-tailwindcss last in the plugins array for it to process the output of other plugins correctly. You should also explicitly define the parser for Astro files.”

.prettierrc:

{
  "plugins": [
    "prettier-plugin-astro",
    "prettier-plugin-tailwindcss"
  ],
  "overrides": [
    {
      "files": "*.astro",
      "options": {
        "parser": "astro"
      }
    }
  ],
  "tailwindStylesheet": "./src/styles/global.css"
}

Troubleshooting

I could see Tailwind classes being reordered in HTML and CSS files, but nothing was being changed in .astro files.

I verified there were no errors in VSCode’s Output panel for Prettier:

["INFO" - 9:10:30 AM] Using config file at /astro_site/.prettierrc
["INFO" - 9:10:30 AM] EditorConfig support is enabled, checking for .editorconfig files
["INFO" - 9:10:30 AM] Resolved config:
{
  "plugins": [
    "prettier-plugin-astro",
    "prettier-plugin-tailwindcss"
  ],
  "tailwindStylesheet": "./src/styles/global.css"
}

I checked if Prettier was able to change .astro files using the CLI via the terminal. That worked, so the problem was in the code editor.

npx prettier --write src/layouts/BaseLayout.astro # this worked!

It turns out I overlooked a setting from the prettier-plugin-astro README to use Prettier as VSCode’s Default Formatter for .astro files.

User Settings:

{
  "[astro]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
  },
}

And now I’ll never need to think about ordering Tailwind utility classes again!