Unerdwear

Developer tools · lightweight guides · security notes

Wash

Hands cleaning a keyboard
Source: Unsplash.

“Wash” can mean two very different things in a dev context:

  1. Cleaning devices (keyboards, laptops, phones) without wrecking them.
  2. Cleaning input data so it’s safe to store, render, and process.

Both are about the same principle: remove the bad stuff without damaging the thing you care about.

1) Washing devices: practical, low-risk cleaning

If you type all day, keyboards get grimy. The goal is to clean them without pushing liquid into switches, ports, or the battery.

A simple routine that’s hard to mess up:

Avoid:

2) Washing input: sanitisation vs validation

In software, “washing” input usually mixes up two ideas:

Validation is about correctness. Sanitisation is about safety.

The web basics: escape for the right context

When you output user-controlled text into HTML, the safe default is:

MDN is a solid reference for how browsers interpret content and APIs: https://developer.mozilla.org/

Don’t trust “cleaning” functions

A common anti-pattern is trying to “strip bad characters” with a regex. That usually breaks legitimate input (names, addresses, non-English text) and still misses edge cases.

Better patterns:

If you’re thinking about phishing and account risk, keep a calm checklist around too:

Small habits that help

If you only do one thing: don’t put raw user input into HTML, and don’t put liquid into keyboards.

Last updated: 2026-01-02