# Code by Tom ## Posts - [Don't use your chatbot to communicate](https://codebytom.blog/2026/09/dont-use-your-chatbot-to-communicate/): At a company where most communication is written, your writing is part of how people know you. In my work about 90% of the communication is written via Slack, P2 (internal blogging system), Github and more. Just like when you read a book from your favourite author, or a blog post from your favourite blogger, you come to know a bit about them and their personality. How they write, how they think, what their sense of humour is like. Writing is a creative outlet after all, and our personality is often expressed through these creative outlets. I am sure you can […] - [TAI;DR](https://codebytom.blog/2026/09/taidr/): TAI;DR (Too AI; Don’t Read). Like most people these days, it’s becoming impossible to engage with generative content, even if you’ve edited it. - [From social media to the open web for teens worldwide](https://codebytom.blog/2026/08/from-social-media-to-the-open-web-for-teens-worldwide/): Countries around the world are starting to ban kids and teens from using social media. Australia have already banned U16’s and other countries including the UK are following suit. Personally as someone that has two young kids, I think it’s the right call. I’ll acknowledge that there are good aspects to social media. People use it to document their lives, post photos, put their thoughts and ideas out there for others to see. It’s a place to find others who share the same interests as you, who you may never otherwise have met. The problem is all of these good aspects […] - [A simplified Site Editor in WordPress](https://codebytom.blog/2026/08/a-simplified-site-editor-in-wordpress/): I recently re-watched Dave Smith‘s proposal and demo on making the WordPress editing experience simple, and it resonated with me. I’ve been using WordPress for well over a decade, so a lot of its terminology feels natural to me now. But that’s probably because I’ve internalised the relationship between the UI and the underlying architecture. For many people, that relationship is not obvious, and often the product exposes implementation details directly in the user experience. I’ve always known this was a problem but never had the space to really think about a solution that covered all of the surface area of […] - [Death by a thousand small decisions](https://codebytom.blog/2026/07/death-by-a-thousand-small-decisions/): Engineers have always strived to write less code. We’ve created paradigms, principles and ways of working to help us with this. DRY, utility functions, abstractions, shared sources of truth to help us build mature, stable solutions. Writing less code wasn’t the motivation but it did become the side effect. But now code is cheap to produce, who is keeping an eye on these things? Why use an abstraction, or a utility function when AI can just reimplement it in seconds? Why even care opening your IDE to find out if these things even exist in your codebase anymore? Duplication is cheaper […] - [Conduits in the Community](https://codebytom.blog/2026/06/conduits-in-the-community/): The complaints about LLMs on open-source projects I believe are well documented by now. Slop PRs, automated issue spam, unmanageable review backlogs solving issues that aren’t really problems. But I’m interested in what happens when you use LLMs on the flip side of community driven, open source projects. What happens when the maintainers just become the conduits of LLMs. Interacting with maintainers of open source software could feel like collaborating with a bot. Opening a thoughtful issue, or spending time drafting a nuanced PR only to get the reply “You are absolutely right! Thank you for bringing this to our attention. […] - [I’m back: Returning to Automattic](https://codebytom.blog/2026/06/im-back-returning-to-automattic/): Six months ago, I wrote a post saying goodbye to Automattic after five incredible years. It felt like the right time to try something new, stretch different muscles, and see how engineering looked from a completely different vantage point. My time away was incredibly valuable, and I’m grateful for the experience and the brilliant people I worked with. But leaving a place after half a decade gives you a rare kind of clarity. It forces you to figure out not just what you can build, but what you actually care about building. Turns out, I deeply missed the open web. I […] - [Be embarrassed again](https://codebytom.blog/2026/05/be-embarrassed-again/): I’ve been watching a trend in engineering cultures, where shipping unreviewed, LLM-generated code isn’t just a shortcut people take in secret anymore, it’s not only openly allowed but actively encouraged. When you ask users to pay for your software, integrate it into their daily workflows, personal lives, or build their own businesses on top of your platform you are asking them for a profound leap of faith. Yet, under the guise of modern AI ‘efficiency’, we are routinely betraying that trust by treating their data as a means of testing code we didn’t write and don’t comprehend. We are trading quality […] - [Why "quick" code reviews are hurting you and your team](https://codebytom.blog/2026/01/why-quick-code-reviews-are-hurting-you-and-your-team/): I recently caught myself giving a rushed approval, and it forced me to realize that these “rubber-stamp” reviews aren’t just a lapse they are a systemic risk. AI tools increasingly assist in writing our code, the ability to perform deep, intentional code reviews is becoming the most critical skill. We are entering a world where the volume of code being produced is exploding, thanks to LLMs. While AI is great at generating syntax, it often misses the nuance of edge cases, architectural consistency, and long-term maintainability. This is where you set yourself apart. In the age of AI, the “coder” is common, […] - [The cost of synchronous meetings](https://codebytom.blog/2025/12/the-cost-of-synchronous-meetings/): As software engineers, our most valuable currency isn’t lines of code, it’s focus. We all know the flow state: holding a complex mental model in your head, connecting the dots between systems. Then, a calendar notification pops up. Synchronous video meetings are often the unintended enemy of this flow. They require three rigid things: a specific time, a specific place, and an immediate shift in mindset. You have to drop what you’re building, enter a new context, and contribute instantly. There are certainly circumstances where video calls are necessary sometimes you need high-bandwidth communication to resolve ambiguity. But every meeting effectively taxes […] - [Make change cheaper: Making a new engineering job less draining](https://codebytom.blog/2025/11/make-change-cheaper-making-a-new-engineering-job-less-draining/): We glorify adaptability in tech. Pivot fast, learn faster, ship faster. But every change taxes the same systems you use to think clearly and make good decisions. Starting a new job as a software engineer is peak change. New codebase, new tooling, new rituals, new acronyms, new people. Your brain is building fresh predictions for everything. How PRs get reviewed, where incidents get triaged, which tests to trust, which Slack channels matter. That learning tax is real, and it draws from the same pool you need to do meaningful work. In stable environments, habits carry you. Shortcuts form. Complexity becomes familiar. […] - [Five years at Automattic: A goodbye](https://codebytom.blog/2025/10/five-years-at-automattic-a-goodbye/): After five incredible years, I’m moving on from Automattic. It’s been absolutely class. I started working on WordPress.com, which was a brilliant introduction to the company. After a year, I moved to WooCommerce and never looked back. Over the next five years, I bounced between five different teams, each one giving me the chance to work with people who are genuinely passionate, ridiculously talented, and absolutely hilarious (whether they meant to be or not). What i’m taking with me I’ve worked on some interesting projects during my time here—some challenging ones too, and I’m dead proud of what we’ve achieved. But […] - [Tracking Record Divergence with Content Hashing](https://codebytom.blog/2025/10/tracking-record-divergence-with-content-hashing/): When users duplicate records in a database, tracking whether copies have diverged from their source becomes challenging. A content hash provides a simple mechanism to detect when duplicates no longer match their parent. The Problem Consider an email_templates table: User A creates a template (id: 1, parent_id: null). Then User B duplicates this template (id: 2, parent_id: 1). Both records are identical. User A then updates their template’s subject to “Welcome aboard!”. The parent_id on User B’s record still points to id: 1, but the records no longer match since the subjects are different. Content Hashing A hash function converts variable-length […] - [Write less, not more: Where time is really saved with AI assisted writing](https://codebytom.blog/2025/09/write-less-not-more-where-time-is-really-saved-with-ai-assisted-writing/): We’re drowning in AI-generated content. Company channels overflow with verbose updates. LinkedIn feeds scroll endlessly through AI-polished posts. Blogs churn out article after article, each longer than necessary. The problem isn’t the quantity, it’s that we’re using AI backwards. Most people use AI as a content multiplication machine. Why write one post when you can write five? But multiplication without curation creates noise, not signal. The result shifts cognitive burden to readers, who must extract meaning from inflated prose. Distillation, not generation Instead of asking AI to expand your thoughts into lengthy pieces, ask it to compress them. Use it to: […] - [An overview of basic cryptographic concepts](https://codebytom.blog/2025/08/an-overview-of-basic-cryptographic-concepts/): I’ve been learning a little more about cryptographic fundamentals, this post documents my exploration. I’m focusing on the practical use cases, underlying mechanisms, and trade-offs that influence implementation decisions. In future, I plan to dive into more of the implementation of some of the below. Hashing and salting Hashing is basically a one-way function that takes any input and spits out a fixed size string of characters. Think of it like a meat grinder, you can put a steak in and get minced/ground beef out, but you can’t reverse it and turn it back into a steak. The same input always […] - [Localised content in a VPN-first world](https://codebytom.blog/2025/08/localised-content-in-a-vpn-first-world/): In this day and age websites have always tried to be helpful. They show prices in your currency, highlight your local news, or suggest content based on where you are. That’s not inherently bad in theory, it’s personalisation. But when connection location becomes the gatekeeper, we risk building digital experiences that can crumble in an instant under sweeping national changes. On July 25, 2025, the UK’s Online Safety Act took effect, enforcing strict age-verification for anyone trying to access certain content. You’re now verifying your identity to see this content, maybe your face, maybe your credit card. The goal was to […] - [Building the Block Hooks API: My WordPress core experience](https://codebytom.blog/2025/07/building-the-block-hooks-api-my-wordpress-core-experience/): What is the Block Hooks API The Block Hooks API allows a block to automatically insert itself relative to instances of other block types. For example, a “Like” button block can ask to be inserted before the Post Content block, or a Mini Cart block can ask to be inserted after the Navigation block. Think of it as WordPress’s answer to the classic theme hooks and filters system to extend site UIs, but specifically designed for the block editor era. As the name suggests, you can only insert blocks with the Block Hooks API. The API works holistically with site editing. […] - [The hidden cost of AI reliance](https://codebytom.blog/2025/07/the-hidden-cost-of-ai-reliance/): I want to be clear: I’m a software engineer who uses LLMs ‘heavily’ in my daily work. They have undeniably been a good productivity tool, helping me solve problems and tackle projects faster. This post isn’t about how we should reject LLMs and progress but rather my reflection on what we might be losing in our haste to embrace them. The rise of AI coding assistants has brought in what many call a new age of productivity. LLMs excel at several key areas that genuinely improve developer workflows: writing isolated functions; scaffolding boilerplate code like test cases, configuration files, explaining unfamiliar […] - [How to make your WooCommerce additional checkout fields conditionally visible in the Checkout Block](https://codebytom.blog/2025/05/how-to-make-your-woocommerce-additional-checkout-fields-conditionally-visible/): This feature requires a minimum version of WooCommerce 9.9.0 In our previous post, we covered the basics of adding additional fields to the WooCommerce Checkout Block. Now let’s take it a step further and explore how to make those fields appear and disappear based on customer choices, cart contents, or other dynamic conditions. Conditional visibility allows you to create smart, adaptive checkout forms that only show relevant fields when needed, reducing form clutter and improving the customer experience. Table of contents Why use conditional visibility? Conditional fields help you: Understanding JSON Schema for conditions WooCommerce’s additional checkout fields use JSON Schema […] - [How to add additional fields to the WooCommerce Checkout Block](https://codebytom.blog/2025/05/how-to-add-additional-fields-to-the-woocommerce-checkout-block/): This feature requires a minimum version of WooCommerce 8.9.0 The WooCommerce Checkout Block provides a powerful API for developers to add additional fields to collect information from customers during the checkout process. Whether you need to gather special delivery instructions, business details, or marketing preferences, additional checkout fields make it easy to extend your store’s functionality. In this post, we’ll walk through the process of adding your own additional fields to your checkout form and show you practical examples you can implement right away. Table of contents Getting started To add additional checkout fields, you’ll use the woocommerce_register_additional_checkout_field() function. This should […] - [My thoughts on the future of the web in the world of AI](https://codebytom.blog/2025/05/my-thoughts-on-the-future-of-the-web-in-the-world-of-ai/): The conversation around AI’s impact on the internet often swings to extremes. Either AI will make the web obsolete, or nothing will fundamentally change. I feel like we’re at a pivotal moment where it’s genuinely difficult to predict the actual outcomes, but the reality likely lies somewhere in between. While AI will reshape how we interact with information online, my sense is that the web as we know it isn’t going anywhere anytime soon. The web will endure, but differently Despite AI’s remarkable capabilities, the notion that everything will be funnelled through a large language model misses crucial points about human […] - [How Engineers Slow Their Team Down, Rubber Ducking and a Hidden CSS Performance Gem - Surf Report, Issue #6](https://codebytom.blog/2025/04/how-engineers-slow-their-team-down-rubber-ducking-and-a-hidden-css-performance-gem-surf-report-issue-6/): Welcome to Surf Report, your weekly dose of my open tabs! Each week, I’ll be rounding up a handful of links that caught my eye. Think of this as my digital spring-cleaning, where I finally rescue those tabs I’ve left open for weeks, promising myself I’ll read them… only to forget they exist until my browser is begging me to put it out of its misery. - [The Marathon of Software Engineering](https://codebytom.blog/2025/04/the-marathon-of-software-engineering/): My brother is running an ultra-marathon today, stepping up to the starting line with minimal training. As I think about what leads up to someone stepping on the start line, I’m struck by how much it mirrors the world of software engineering. The race itself, the day of the event, isn’t the real story. It’s the culmination of months of unseen effort: waking up in the dark, braving cold weather, training alone while others sleep or relax, and balancing family life with an intense schedule. That’s where the true grit lives. There’s paralells in software, when a polished product or solution […] - [Reacts Reconciliation Engine, Turning Clarity into Chaos and Repairing Whats Broken - Surf Report, Issue #5](https://codebytom.blog/2025/04/reacts-reconciliation-engine-turning-clarity-into-chaos-and-repairing-whats-broken-surf-report-issue-5/): Welcome to Surf Report, your weekly dose of my open tabs! Each week, I’ll be rounding up a handful of links that caught my eye. Think of this as my digital spring-cleaning, where I finally rescue those tabs I’ve left open for weeks, promising myself I’ll read them… only to forget they exist until my browser is begging me to put it out of its misery. - [Tracing the Thoughts of an LLM, Code Reviews, Speed vs Efficiency and More - Surf Report, Issue #4](https://codebytom.blog/2025/04/tracing-the-thoughts-of-an-llm-code-reviews-speed-vs-efficiency-and-more-surf-report-issue-4/): Welcome to Surf Report, your weekly dose of my open tabs! Each week, I’ll be rounding up a handful of links that caught my eye. Think of this as my digital spring-cleaning, where I finally rescue those tabs I’ve left open for weeks, promising myself I’ll read them… only to forget they exist until my browser is begging me to put it out of its misery. My Recent Posts A Performant Way To Batch Delete Transient Data in WordPress I worked on a PR recently to introduce an internal function in WooCommerce to batch delete transient data. Metrics suggest its twice […] - [A Performant Way To Batch Delete Transient Data in WordPress](https://codebytom.blog/2025/04/a-performant-way-to-batch-delete-transient-data-in-wordpress/): As a developer working with WordPress and WooCommerce, I recently had the chance to tackle a small but meaningful optimization. Transients in WordPress are a handy way to store temporary data. The standard approach requires looping through a list and calling delete_transient() for each one individually, which, while functional, isn’t as efficient as it could be. I saw an opportunity to improve this process and submitted a pull request to WooCommerce to introduce a new function: _wc_delete_transients(). You can check out the full details in the pull request here: WooCommerce PR #55931. The idea behind `_wc_delete_transients()` is simple, rather than deleting […] - [MCP Explained, WP 6.8 iAPI Best Practices, LLM Assisted Large-Scale Test Migration and More - Surf Report, Issue #3](https://codebytom.blog/2025/03/mcp-explained-wp-6-8-iapi-best-practices-llm-test-migration-and-more-surf-report-issue-3/): Welcome to Surf Report, your weekly dose of my open tabs! Each week, I’ll be rounding up a handful of links that caught my eye. Think of this as my digital spring-cleaning, where I finally rescue those tabs I’ve left open for weeks, promising myself I’ll read them… only to forget they exist until my browser is begging me to put it out of its misery. My Recent Posts Why We Should Start Writing DocBlock Comments More in Your Codebase In my latest post, I explain how static types and signatures fall short of giving AI tools like LLMs the context […] - [Why You Should Start Writing DocBlock Comments More in Your Codebase](https://codebytom.blog/2025/03/why-you-should-start-writing-doc-block-comments-in-your-codebase/): In our current codebases, we’ve leaned on static type systems or naming conventions to document our functions. And that’s not a bad start, they give us the basics: what goes in, what comes out, and the general shape of things. But as our project grows and we rely more on AI-powered tools, I’ve been thinking about what those approaches don’t cover. They don’t tell us the why, the context, the edge cases, or the quirks. That’s where comment blocks, those structured, natural-language notes above our functions come in. They’re especially vital for making our codebase work seamlessly with large language models […] - [2025 React Trends, Get Comfortable Being Wrong, Feelings on TDD and More - Surf Report, Issue #2](https://codebytom.blog/2025/03/react-trends-get-comfortable-being-wrong-feelings-on-tdd-and-more-surf-report-issue-2/): Welcome to Surf Report, your weekly dose of my open tabs! Each week, I’ll be rounding up a handful of links that caught my eye. Think of this as my digital spring-cleaning, where I finally rescue those tabs I’ve left open for weeks, promising myself I’ll read them… only to forget they exist until my browser is begging me to put it out of its misery. My Recent Posts Helping New Engineers Get Up To Speed Having worked as a software engineer for over a decade across multiple companies and teams, I’ve experienced the onboarding process from a newcomer’s perspective more […] - [Helping New Engineers Get Up To Speed](https://codebytom.blog/2025/03/helping-new-engineers-get-up-to-speed/): Having worked as a software engineer for over a decade across multiple companies and teams, I’ve experienced the onboarding process from a newcomer’s perspective more times than I can count. Each team I’ve joined has had its own onboarding approach, shaped by their unique responsibilities within the product and the different codebases they manage. This can feel overwhelming, especially when you join a team mid-project and worry that your questions, however basic they seem are pulling your colleagues away from their work. (Spoiler: they mean it when they say there’s no such thing as a stupid question.) Here are some ideas […] - [Compound AI Systems, WPUI, WordPress' useSelect Hook and More - Surf Report, Issue #1](https://codebytom.blog/2025/03/compound-ai-systems-wpui-and-wordpress-useselect-hook-surf-report-issue-1/): Welcome to Surf Report, your weekly dose of my open tabs! Each week, I’ll be rounding up a handful of links that caught my eye. Think of this as my digital spring-cleaning, where I finally rescue those tabs I’ve left open for weeks, promising myself I’ll read them… only to forget they exist until my browser is begging me to put it out of its misery. My Recent Posts QuickSort: The Clever Sorting Algorithm Sorting data is a common task in programming, and I’ve heard that QuickSort is one of the most efficient ways to do it so I wanted to […] - [QuickSort: The Clever Sorting Algorithm](https://codebytom.blog/2025/03/quicksort-the-clever-sorting-algorithm/): Sorting data is a common task in programming, and I’ve learned that QuickSort is one of the most efficient ways to do it. I’ve recently been learning about this algorithm. What makes it so efficient, when to use it, and if it is practical. What QuickSort Does QuickSort takes an unordered list like [5, 2, 8, 1], and sorts it into order, like [1, 2, 5, 8]. It’s a “divide and conquer” method: 1. It picks a “pivot” (say, the first number, which is 5).2. Split the list: numbers smaller than the pivot go left, bigger ones go right.3. Repeat on […] - [How I Use AI in My Day-to-Day as a Software Engineer](https://codebytom.blog/2025/02/how-i-use-ai-in-my-day-to-day-as-a-software-engineer/): As a software engineer, I’ve woven AI into my workflow to boost productivity and sharpen my thinking—without letting it run the show. Here’s how it fits into my daily routine: I use tools like Cursor for coding, but I don’t just accept its suggestions outright—I verify and refine them. I also upload code files to query their logic or ask high-level questions, like “What’s this module doing?” It’s a sounding board with answers. I do the same for code reviews—both my colleagues’ and my own—asking AI to spot bugs or gaps in logic. It’s like an extra pair of eyes that […] - [Understanding the Halting Problem](https://codebytom.blog/2025/02/understanding-the-halting-problem/): Recently, I’ve been learning about something fascinating in computer science called the Halting Problem. Don’t worry if you’re not a programmer, I’ll be explaining this in the only way I know how. In simple terms. The Time & Paradox Problem Here’s the fundamental issue: How can you predict if something will go on forever… without waiting forever to check? Imagine you’re watching a program run, and you want to know if it will ever stop. If it does stop, great! You have your answer. But if it keeps running… how long do you wait? 1 minute? 1 hour? 1 year? Maybe […] - [WooCommerce 9.7: Fixing Variable Products Going Out of Stock](https://codebytom.blog/2025/01/woocommerce-fixing-variable-products-going-out-of-stock/): TL;DR: WooCommerce has implemented validation for cached variation data. When invalid data is detected, the system now automatically rebuilds it from the database, eliminating the need for manual intervention by merchants. Will be released in WC 9.7.0 A challenging issue (which has over 130 comments!) I encountered was the mysterious case of products incorrectly showing as “out of stock” despite having available inventory. This bug was particularly frustrating for merchants as it directly impacted their sales and required manual intervention to temporarily fix. Understanding the Problem The issue manifested when variable products would suddenly display “This product is currently out of […] - [Script to Convert CSV to Github Issues](https://codebytom.blog/2025/01/script-to-convert-csv-to-github-issues/): Inspired by wanting to die at the thought of creating multiple issues via Githubs UI. I wanted to share a new script I’ve put together that should make issue creation a bit easier. If you’ve ever needed to create multiple GitHub issues at once (like when planning a new feature or documenting a batch of bugs), this should save you some time. What it does This is a simple script that creates multiple GitHub issues from a CSV file. You just need to prepare a CSV with your issue details (title, description, and optional labels), and the script will create them […] - [Refactoring Product Context Block Registration in WooCommerce](https://codebytom.blog/2024/12/refactoring-product-specific-block-registration-in-woocommerce/): We often encounter solutions that grow organically over time, accumulating complexity as new features and edge cases are handled. Recently, I had the opportunity to refactor WooCommerce’s product specific block registration system, transforming a function-based approach into a more robust, pattern-oriented solution. Here’s what I learned along the way. The Challenge Our original system used registerBlockSingleProductTemplate, a function that handled block registration for product-related blocks. The existing implementation created new store subscriptions for every block registered, resulting in O(n) subscriptions where n is the number of blocks. Each subscription would independently: This meant that with 10 blocks, we had 10 separate […] - [LLMs Will Supercharge Open Source Projects Like WordPress and WooCommerce](https://codebytom.blog/2024/12/llms-will-supercharge-open-source-projects-like-wordpress-and-woocommerce/): Open source software has always thrived on community knowledge and collaboration. Now, with the emergence of Large Language Models (LLMs), we’re entering a new era where these AI systems can act as force multipliers for open source projects, particularly those with rich ecosystems like WordPress and WooCommerce. The Power of Collective Knowledge What makes LLMs particularly powerful for open source projects is their ability to understand and synthesize vast amounts of information from multiple sources: This collective knowledge, accumulated over years of community contributions, gives LLMs a comprehensive understanding of both official APIs and real-world usage patterns. Beyond Official Documentation One […] - [Cache 22: The Importance of Validating Transient Data](https://codebytom.blog/2024/12/cache-22-the-importance-of-validating-transient-data/): As we know, WordPress transients provide an excellent way to store cached data temporarily, improving performance by reducing unnecessary database queries or API calls. However a common pitfall I have come across recently is assuming the presence of transient data is valid and usable and can ultimately result in affecting stores bottom line which no doubt has been the case of users experiencing this issue. https://github.com/woocommerce/woocommerce/issues/50855 In short, variable product availability data gets cached in transients to improve performance. However, if this cached data becomes corrupt (which it is doing), your store might show in-stock products as out of stock. Directly […] - [Introducing New UI Features vs Stability in WooCommerce](https://codebytom.blog/2024/07/introducing-new-ui-features-vs-stability-in-woocommerce/): Recently in WooCommerce we’ve faced a challenge. How to introduce new UI features without disrupting existing store designs. I’ve been thinking of a strategy to address this, focusing on automatically opting in new stores for UI updates while preserving existing store designs. The Challenge “I want new features to respect my existing store design and functionality to maintain a consistent user experience and avoid unexpected changes.” Me. I made this quote up. This problem isn’t new – we’ve faced similar challenges with rolling out block template updates, and more recently Woo’s Block Hooks API implementation. Approach This approach could have benefited […] - [Setting up wordpress-develop and Gutenberg repositories locally](https://codebytom.blog/2024/05/setting-up-wordpress-develop-and-gutenberg-repositories-locally/): When contributing to WordPress core and/or Gutenberg you may find yourself in a situation when you want to open pull requests to both WordPress/wordpress-develop and WordPress/gutenberg. Typically most peoples local environments consist of a local development tool such as LocalWP or Studio but these come with their own managed versions of WordPress, not the Github repository you’d need to version control yourself to open pull requests. This was a problem I found myself in recently whilst working on a project, and fortunately I found a solution that works pretty well for me. Prerequisites My folder structure its like below: Setup And […] - [Tech newsletters I subscribe to](https://codebytom.blog/2024/03/tech-newsletters-i-subscribe-to/): This post was inspired by an internal post at Automattic that someone posted. So I’ve decided to post my own on here of the newsletters I currently subscribe to, in no particular order. Console Weekly newsletter to receive information about new and existing developer tooling. Console’s mission is to help developers do their best work. Whether reviewing the best tools in our devtools newsletter, interviewing technical experts on our podcast or investing in early-stage developer-first startups, Console has grown to be a trusted, independent resource for experienced developers. Subscribe here: https://console.dev/ Syntax Snack Pack This is similar to Console in the […] - [Working at Automattic as a Software Engineer](https://codebytom.blog/2024/02/working-at-automattic-as-a-software-engineer/): I started working at Automattic in August of 2020. I was previously working remotely for a company based in London on a social media management tool, the company and team were great there and I still talk to many friends I met during my time. I saw that Automattic were hiring, I knew a tonne about them from my days working in agencies as a WordPress and WooCommerce developer longing for an opportunity to work on on open source software wherever I wanted, whenever I wanted. Once I saw they were hiring for JavaScript engineers I immediately threw my hat in […] - [Block Hooks API & The Core Navigation Block](https://codebytom.blog/2024/02/block-hooks-api-the-core-navigation-block/): Back in November it was announced that Woo will be dedicating resources (aka moi) to help advance the Block Hooks API in WordPress while validating, testing, and implementing its usage in WooCommerce. Lately I’ve been working on enabling the core Navigation block to have inner blocks auto-inserted via the Block Hooks API. Why? This was one of the most requested features for the API, and was something we could utilise in Woo (think inserting Customer Account, Mini Cart blocks etc into the Navigation) so it was also in our interest to help get this included in WP 6.5. After multiple attempts, […] - [Working remotely in the Canary Islands during the UK winter](https://codebytom.blog/2024/01/working-remotely-in-the-canary-islands-during-the-uk-winter/): Some quick background, I’m not a digital nomad. My home/work life is pretty typical besides working from home. I have a mortgage, family and a dog so packing up and working in a different country each week is unrealistic for us. As the winter chill has fully settled in the UK, bringing with it gloomy skies, rain-soaked days, and an overall sense of seasonal depression, I found myself yearning for a change of scenery (permitting it’s sun soaked scenery, obviously). The usual routine of battling the cold, wet weather whilst working alone during the winter months was miserable to say the […] - [Block Hooks API: Understanding ignoredHookedBlocks logic](https://codebytom.blog/2024/01/block-hooks-api-understanding-ignoredhookedblocks-logic/): The following post describes the process as of WordPress 6.5 and above. The initial release of the Block Hooks API in 6.4 works slightly differently. Currently I’m working on a project which involves understanding the new Block Hooks API and its internals. For those that aren’t already familiar I’ll pull an excerpt from the release post to help understand what it is, and why it’s used. WordPress 6.4 introduces Block Hooks (#53987), a feature that provides an extensibility mechanism for Block Themes. This is the first step in emulating WordPress’ Hooks concept that allows developers to extend Classic Themes using filters and actions. Specifically, the Block […] - [The best WordPress plugin for code syntax highlighting](https://codebytom.blog/2024/01/the-best-wordpress-plugin-for-code-syntax-highlighting/): I’ve used a number of WordPress plugins in my time to help add syntax highlighting to my posts (on this blog, and older ones). They’ve always been clunky, unintuitive and buggy. As a result I always fell back to the native Gutenberg Code block. That is until I found Code Block Pro. You can find it on the WordPress plugin directory here. For comparison here is some example usages of it using a contrived piece of code I asked ChatGPT to produce for me. Gutenberg Code Block Code Block Pro Line highlighting Line blurring Multiple themes Other features Other settings include - [Enabling Xdebug with WordPress core and VSCode](https://codebytom.blog/2024/01/enabling-xdebug-with-wordpress-core-and-vscode/): In this post I’m going to briefly run through how to get Xdebug working with the WordPress core project and VSCode. Prerequisites: Update .env variable Go to the file wordpress-develop/.env and update the variable LOCAL_PHP_XDEBUG variable: Add php-config.ini variables Go to the file wordpress-develop/tools/local-env/php-config.ini and add the following variables: Create VSCode launch.json config Go to the Debug tab in VSCode and if you haven’t already got a launch.json config file create one. If prompted with the question of ‘type’ select PHP. You’ll need to add the following pathMappings property: The entire configuration should look something like this: Start debugging Now we’ve […] - [Storing and querying database entries based on location](https://codebytom.blog/2024/01/storing-and-querying-database-entries-based-on-location/): In this post I’m going to walk you through how I created a solution to storing, and looking up database entries that had location data attached to them. I will be using PostgreSQL with PostGIS extension installed. Having the PostGIS extension installed is required. PostGIS offers significant advantages for more advanced geospatial operations and complex queries. Set the scene Lets assume we have an in-person events application. Each event will require some location based data attached to it, in our case that is going to be the longitude and latitude for the events meeting point. Create the necessary database tables For […] - [Install PostGIS with Docker on your Remix stack](https://codebytom.blog/2023/06/install-postgis-with-docker-on-your-remix-stack/): In this brief post I’ll be doing a walk through of how to install, and enable the PostGIS extension in your Remix stack. This will assume you’re using the Blues Stack but I’m sure you can apply any learnings to other setups or stacks. Remix Blues stack includes: PostGIS is an open-source software extension for the PostgreSQL database that adds support for spatial and geographic data, as well as providing spatial operations and analysis on stored data. For example, if you are storing restaurant data and want to find out, based on your current co-ordinates what restaurants are within a nearby […] ## Pages - [Posts](https://codebytom.blog/posts/) - [Home](https://codebytom.blog/): Alreet Hello, I’m Tom. A software engineer from the north west of England. I build, break and explore things on the web. Here you’ll find thoughts, learnings and occasional shit posting. Working on open source at Automattic, previously at Atlassian. Latest ## Optional - [Agent (MCP protocol)](websites-agents.hostinger.com/codebytom.blog/mcp) [comment]: # (Generated by Hostinger Tools Plugin)