The zen of writing bad code
summary
This walks through concrete PowerShell code‑golf reductions: actual solutions that run on the code.golf validator and appear on the leaderboard. It uses PowerShell 7 operators (null‑coalescing, ++), shadow aliases like date/get-date, pipeline property expansion and deconstruction, and counts characters while trimming whitespace. Examples hit a 16‑character day‑of‑week solution and a 29‑character Fibonacci vs a 27‑character best, with working outputs and diffs from the site so every tight rewrite is verified.
AI-written summary · about
chapters (10)
- 0:00Code golf and bad code intro
- 3:19PowerShell whitespace tricks
- 8:55String and array hacks
- 13:11Deconstruction tricks
- 20:27Loop optimizations
- 21:55Day of week challenge
- 32:30Fibonacci efficiently
- 42:50Alternative approaches
- 43:31Switch vs if in golf
- 45:39Conclusion and feedback
related talks
30mNot Black and White: Cryptic Crosswords, Code Golf, and the Rules of a Language
49mThat Works?! Quines and Other Delightfully Useless Programs
21mPeople, The Good Parts
01h 05mWhy You Should Write Code That You Should Never Write
43mPlaying With Elixir
01h 02mThe Art of Code
26mGolf Scripting with Ruby - Helping Santa Schedule Christmas
01h 04mThe Art of Code
