Code Golf: The zen of writing bad code
summary
Walks through concrete PowerShell tricks that actually shave characters: optional whitespace, join/split/replace as operators, echo for arrays, deconstruction, parentheses-returning assignments, ++ behavior, ternary and null coalescing. Submits and validates on code.golf running PowerShell 7, builds a working 45‑character one‑liner FizzBuzz (site shows others at 42), and includes a 12 Days of Christmas one‑liner. Every claim is backed by code shown and executed.
AI-written summary · about
chapters (9)
- 0:00Code golf introduction
- 4:54PowerShell whitespace tricks
- 11:32String/array shortcuts
- 16:11Variable deconstruction hacks
- 23:11Increment operators
- 25:41Looping constructs
- 27:29FizzBuzz deep dive
- 40:14FizzBuzz one-liner
- 45:40Summary
related talks
01h 28mCode Golf: The zen of writing bad code II
49mCode Golf - The Zen of Writing bad Code
40mCode Writing Code, say what now! Meta Programming and PowerShell
12mWhy Less Code Isn’t Always Better
01h 45mWriting Award Winning PowerShell Functions and Script Modules
25mCommandLine Tools for DevOps
33mBetter Ops Together: Practical PowerShell Pair Programming...
32mFive Lines of Code
