Wednesday, 11 March 2026

How AI Helped Me Update My Ancient Blog Template

Modernising My Blog Template

This idea had been on my mind for a few days. I was encouraged to go ahead with it after I read that the CTO of Microsoft Azure, Mark Russinovich, had reviewed some assembler code he wrote for the Apple II 6502 processor in 1986 using Anthropic's Claude Opus 4.6 AI model. It had read, analysed, and then found bugs in the code. [ZDNet: AI is getting scary good at finding hidden software bugs - even in decades-old code]

That was enough for me to consider reviewing the Google Blogger template that serves my blog. Though I started my blog in 2003, I started publishing on Google Blogger around 2007 and migrated the content from an old hosting service between 2010 and 2012.

Blog - Brick by heavy brick (August 2010)

The Analysis Process

I grabbed the HTML code with all its CSS yesterday and asked Anthropic's Claude Sonnet 4.6 to examine, analyse, and explain it before recommending how to update and optimise the code.

The codebase was 2,307 lines with 94,125 characters. It identified the time frame in which the template was created, from the code patterns of that era, breaking down the elements into ten sections and identifying what function each performed. It then analysed the different versions of HTML used, and I had code from HTML1 to HTML4 littered throughout the template.

Key Improvements Implemented

About ten minutes later, it addressed thirteen elements as shown below:

Suggested Changes to my Google Blogger Template

Then I asked it to integrate all the suggested changes into a comprehensive new code to use as my updated template:

  1. Remove duplicate legacy _gaq analytics block at the bottom
  2. Remove gtag('config', 'UA-7677511-4') from GA4 block
  3. Remove Alexa verification tag
  4. Remove IE9 compatibility tag
  5. Update Twitter embed format
  6. Fix HTTP email icon to HTTPS
  7. Make description meta tag dynamic
  8. Add Open Graph and Twitter Card meta tags
  9. Update Google Custom Search script
  10. Remove obsolete Google Stars code
  11. Remove obsolete CSS vendor prefixes (the -moz-border-radius, -webkit-, -goog-ms- prefixes)
  12. Remove revisit-after and keywords meta tags
  13. Update language translation widget to Google Translate Widget

The Result

With comments inserted to show where changes were made, I ended up with 2,272 lines and 87,382 characters. I have 1,000,000 points allocated for my monthly subscription to Poe.com, and I was charged extra points to process this activity. The initial analysis cost $0.17 (5,765 points), the integration was $0.65 (21,721 points), and the final user interface and experience element was $0.17 (5,765 points), totalling $0.99 (33,251 points).

Fine-Tuning the Translation Widget

What I was given from the Google Translate Widget was a list of all languages without the possibility of scrolling to the right after languages beginning with the letter M. I asked the AI model to review the code, first explaining the situation and posing the question: "Is there a way to select a language by typing in the first letter and then being given a list to select from?"

This was fixed by adding the option to start typing letters from a language name; the user is then presented with a list of languages to translate to.

Safety and Verification

Obviously, as a precaution (because I have read about AI causing problems like wiping out databases and such like), I made a backup of the template before I started anything, and I have made copies over time to ensure I can revert to status quo ante.

The Google Blogger Theme customisation tool also has a preview function. Critically, I wanted to retain the look and feel of my blog, regardless of the changes made. This meant I could check that everything was in the right place before committing to changing the template.

Conclusion

I suppose the time and cost that using AI has saved in updating the template is the key point here. This was all done within 30 minutes for $0.99 (£0.74), which is remarkable.

There is increasing trust in using AI models and tools, but you must always verify, check, and reverify before using AI-reviewed code in any environment, whether personal, experimental, or production.

A Google NotebookLM AI Audio Overview Discussion of this blog

No comments:

Post a Comment

Comments are accepted if in context to the blog, polite and hopefully without the use of expletives.
Please, show your name instead of defaulting to Anonymous, it helps to know who is commenting.
Links should only refer to the commenter's profile, not to businesses or promotions, as they will NOT be published.
Thank you for commenting on my blog.