Computing primes with CSS
I’ve been working on a redesign of this site, so doing more CSS, finally internalizing Sass, etc. During my reading, the nth-child pseudo-class caught my eye.
Ned Batchelder's personal web site, blog, writings, software, math, parenting, autism
Visit nedbatchelder.com → RSS feedOn Hacker News Aug 2009 – Sep 2025
Software Engineering 10Life, Learning & Writing 3Web & Frontend 2Math & Algorithms 2Tools & Productivity 1Society, Policy & Culture 1
I’ve been working on a redesign of this site, so doing more CSS, finally internalizing Sass, etc. During my reading, the nth-child pseudo-class caught my eye.
When Rubik’s Cube first appeared decades ago, I jumped on it. I bought one, and spent an entire summer fiddling with it. Over that summer, I developed a solving technique that has stuck with me. My technique is not the fastest; that was never the goal. My algorithms make sense to me because they are constructed, and…