LATEST FEEDS

RECENT ARTICLES

More Programming Articles
01

Prompt Injection Defense: What Actually Reduces the Risk

There is no filter, classifier or system prompt that stops prompt injection. What reduces the risk is deciding, in ordinary application code, what the model is allowed to do once it has read text you don't control. The OWASP LLM01:2026 Prompt Injection entry, still number one on …

02

Caching in Go: An In-Memory TTL Cache, sync.Map and singleflight

For most Go services, an in-memory cache with expiry is a plain map behind a sync.RWMutex, an expiry time on each entry, and one background goroutine that sweeps out dead entries. That takes under 80 lines with generics and no dependencies. Two more pieces make it safe under load…

04

Base64 padding explained: why = appears and how to fix padding errors

The = at the end of a base64 string is padding. Base64 turns every 3 bytes of input into 4 characters, and when the input length isn't a multiple of 3 the last group comes up short. One leftover byte becomes two characters plus ==. Two leftover bytes become three characters plus …

06

Bash temp file: create and clean up with mktemp and trap

To create a temp file in Bash, call mktemp, capture the name it prints, and register an EXIT trap that deletes it. That takes three lines. Most of the trouble comes from what's around them: mktemp behaves differently on macOS and Linux, a second trap quietly replaces the first, a…

Explore