Code Wrench
Author

Code Wrench

Focuses on code debugging, performance optimization, and real-world engineering, sharing efficient development tips and pitfall guides. We break down technical challenges in a down-to-earth style, helping you craft handy tools so every line of code becomes a problem‑solving weapon. 🔧💻

175
Articles
0
Likes
33
Views
0
Comments
Recent Articles

Latest from Code Wrench

100 recent articles max
Code Wrench
Code Wrench
Apr 12, 2026 · Databases

How to Safely Build a Primary Key Index on a 10‑Billion‑Row Table

When a table exceeds a billion rows, creating a primary key clustered index can turn a routine operation into a disaster, but by using OFFLINE mode, MAXDOP, SORT_IN_TEMPDB, proper tempdb sizing, and a detailed runbook, you can safely rebuild the table with minimal impact.

Large TablesOffline IndexSQL Server
0 likes · 7 min read
How to Safely Build a Primary Key Index on a 10‑Billion‑Row Table
Code Wrench
Code Wrench
Mar 31, 2026 · Artificial Intelligence

How LocalAI Turns LLMs into Fully‑Featured Agents with Async SSE and Multi‑Tenant Isolation

This article deep‑dives into LocalAI’s source code, revealing how YAML‑defined agents are transformed into Go‑based concurrent engines, how an asynchronous SSE lifecycle stream replaces simple token streaming, and how state tracking and multi‑tenant isolation enable robust, production‑grade AI programming assistants.

AsynchronousGoLocalAI
0 likes · 7 min read
How LocalAI Turns LLMs into Fully‑Featured Agents with Async SSE and Multi‑Tenant Isolation
Code Wrench
Code Wrench
Mar 27, 2026 · Artificial Intelligence

Building and Understanding LocalAI Agents: From YAML Config to Source Code

This tutorial walks through creating a custom LocalAI Agent with a simple YAML file, invoking it via the API, and then dives into the Go source code that registers routes, handles asynchronous chat requests, and manages agent state and memory for multi‑turn, tool‑driven interactions.

AI agentsGoLocalAI
0 likes · 7 min read
Building and Understanding LocalAI Agents: From YAML Config to Source Code
Code Wrench
Code Wrench
Mar 23, 2026 · Databases

Why Your MySQL Queries Slow Down in Production and How to Fix Them

The article explains why locally fast MySQL queries can become painfully slow in production, identifies three common pitfalls such as ineffective indexes, oversized Go connection pools, and hidden type conversions, and provides concrete optimization techniques spanning index design, query planning, Go‑MySQL integration, and systematic self‑checks.

GoMySQLQuery Optimization
0 likes · 9 min read
Why Your MySQL Queries Slow Down in Production and How to Fix Them
Code Wrench
Code Wrench
Mar 20, 2026 · Cloud Native

Inside Traefik v3: How Its Configuration Watcher, Router, and Concurrency Model Work

This article provides a senior Go engineer’s deep dive into Traefik’s source code, explaining the configuration hot‑reload engine, routing dispatch mechanism, and graceful concurrency model, and shows how to tune the proxy, build custom plugins, and apply the concepts to production‑grade Go services.

Configuration ReloadGoTraefik
0 likes · 13 min read
Inside Traefik v3: How Its Configuration Watcher, Router, and Concurrency Model Work
Code Wrench
Code Wrench
Mar 19, 2026 · Backend Development

Exploring tRPC-Go: Inside a High‑Performance Pluggable RPC Framework

This article walks through the inner workings of the open‑source tRPC‑Go RPC framework, detailing the client invoke lifecycle, selector reporting, codec serialization, transport handling, server processing, plugin architecture, streaming support, and performance‑oriented design choices for Go backend developers.

GoRPCplugin architecture
0 likes · 20 min read
Exploring tRPC-Go: Inside a High‑Performance Pluggable RPC Framework
Code Wrench
Code Wrench
Mar 17, 2026 · Backend Development

How to Elegantly Extend 1Panel: Three Proven Paths for Custom Development

This guide explains three practical approaches to extend the open‑source 1Panel platform—using the app store for custom apps, adding backend modules with Go, or modifying the Vue front‑end—while emphasizing non‑intrusive development to avoid upgrade conflicts.

1PanelDockerVue
0 likes · 8 min read
How to Elegantly Extend 1Panel: Three Proven Paths for Custom Development
Code Wrench
Code Wrench
Mar 16, 2026 · Backend Development

Mastering Chromedp: Go‑Based Chrome Automation for Real‑World Use Cases

This article provides a comprehensive guide to using the Go library chromedp for Chrome DevTools Protocol‑driven browser automation, covering its core architecture, practical techniques for navigation, network interception, anti‑bot evasion, performance tuning, and production‑grade recommendations with full code examples.

Chrome DevTools ProtocolGobrowser automation
0 likes · 10 min read
Mastering Chromedp: Go‑Based Chrome Automation for Real‑World Use Cases