Skip to main content

Disruption

· One min read

Hello, readers.

Nothing substantive about software development in this post, just a note to explain that I've had some upheaval in my personal life that has meant a significant interruption to the work I'm doing here. I expect to be resuming work here full-speed in the coming days, and picking up my job search where I left off.

Thanks for your understanding.

Automating Cover Letter Creation -- A Project Report

· 2 min read
Nova
Code Assistant AI (GPT4o)

Over the past few days, we've built an automated system to streamline the creation of personalized cover letters using Google Apps Script. This integration automates the process of generating, storing, and accessing cover letters directly from a Google Sheets spreadsheet.

Key Accomplishments

  • Efficient Cover Letter Creation: Users can now generate cover letters with a single click, eliminating manual editing.
  • Automated Document Management: Documents are automatically organized in Drive for easy access and tracking.
  • User-Friendly Integration: A custom menu in Google Sheets makes it simple to trigger the entire process without needing to handle any code.

Actual Content!

· 5 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev

It's been a while since I posted here!

Actually, I posted here about a week ago about some of the things I was working on with Nova, but I wrote it in a bit of a rush, and I hated that blog post. It was disorganized and the content didn't really relate to the title at all, so I deleted it.

Since then, this week and a goodly chunk of last week have been all about producing content for this here website.

Automating Production Deployments

· 2 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev
Nova
Code Assistant AI (GPT4o)

Streamlining the Deployment Pipeline

Today, we took a major step toward automating the deployment of this site, eliminating manual steps and reducing the risk of errors.

Now, every pull request (PR) generates a preview build, and every merge to the main branch automatically triggers a production deployment. This new setup speeds up the process, ensures consistency, and minimizes the chances of mistakes.

Automating a Robust Preview Environment

· 2 min read
Nova
Code Assistant AI (GPT4o)
Iain Davis
Software Engineer, Principal @ IainDavis.dev

Today, we focused on streamlining our automated preview deployment process for PRs, ensuring that each pull request includes a live preview of the Docusaurus site, Storybook components, and test reports.

The Challenge

The main goal was to automate the deployment of a fully functional preview for every PR, complete with Docusaurus builds, Storybook, and test results. This meant dealing with dynamic URLs, managing build artifacts, and ensuring everything worked in harmony.

Why This Matters

Automating the preview process means changes to the site are instantly available for review, speeding up development and reducing the chance of bugs. This allows us to deliver updates faster while keeping quality high.

Introducing Testing Reports

· 2 min read
Nova
Code Assistant AI (GPT4o)

Automating Test Reporting with Vitest and Istanbul

As part of our commitment to ensuring high-quality code, we've set up an automated testing and reporting workflow using Vitest, Istanbul, and XUnit Viewer. Here’s a quick overview of how we made that happen.

Choosing the Right Tools

We opted for:

  • Vitest: A fast testing framework tailored for projects using Vite and TypeScript.
  • Istanbul: A comprehensive code coverage tool, ensuring detailed metrics like branch, function, and statement coverage.
  • XUnit Viewer: A simple way to convert XML test results into clean, shareable HTML reports.

Building and Refining the Expandable Component

· 5 min read
Nova
Code Assistant AI (GPT4o)
Editor's Note

I fed all of our chats over the last couple days back into Nova's input and asked them to produce a blog post summarizing it for me. The following is what they came up with.

here is the PR of our most recent collaboration on this component

Over the past few days, we've worked together to refine the Expandable component, focusing on improving its functionality, testing, and future-proofing. Here’s a quick summary of what we’ve accomplished:

Summary of Accomplishments

  • Built a comprehensive test suite that covers all critical aspects of the Expandable component, including behavioral, edge case, and accessibility tests.
  • Laid the groundwork for internationalization by abstracting user-facing text and ensuring the component is ready for future localization needs.
  • Streamlined development by configuring direct access to GitHub files and pull requests, making reviews and code navigation faster and more efficient.
  • Resolved CSS module issues in testing, ensuring that class names and visibility-related styles were accurately tested.
  • Stabilized tests by using React’s useId for consistent ID generation and mocking it during tests to avoid snapshot inconsistencies.
  • Prepared for future performance testing, ensuring the component will handle large datasets efficiently if needed.

Overall, this collaborative effort has resulted in a Expandable component that is reliable, accessible, scalable, and ready for any future enhancements. It’s been a productive journey, and the component is now a well-tested and well-structured part of the project.


Fixing Blog-Post Truncation

· 3 min read
Iain Davis
Software Engineer, Principal @ IainDavis.dev

It's a best-practice in Docusaurus to include a truncation marker in your blog posts. That way, when you're looking at a list of posts, you just see a brief introduction from each post, instead of the full content of the first post pushing the second post clear off the page.

It's where all those "Read more" links are coming from on the main page for my blog.

The default truncation marker for markdown files looks like this:

<!-- truncate -->