Code Writing Code, say what now! Meta Programming and PowerShell
summary
Demonstrates Meta Programming in PowerShell by actually generating code not just describing it: reflection and templating handle character escaping and indentation, Array vs ArrayList vs file output shows measurable speed differences, a pester-test generator produces tests for 118 commands into 99 lines, a static robocopy wrapper emits ~583 lines of PowerShell (needs hand-fixes for weird switches), and a real bug story admits a missing switch once drops about half a million rows so sanity checks are mandatory.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:11Meta Programming
- 3:08Pros and Cons
- 7:19Bugs
- 8:06PowerShell
- 8:44When to use Meta Programming
- 13:22Indenting
- 18:45Non expanded code
- 19:32Running the code
- 21:46Output methods
- 23:45File output
- 26:25PowerShell kills puppies
- 27:31Pester tests
- 34:56Static PowerShell function
related talks
49mCode Golf - The Zen of Writing bad Code
01h 37mMore Game Breaking PowerShell
46mCode Golf: The zen of writing bad code
01h 28mCode Golf: The zen of writing bad code II
47mThe Human Side of PowerShell Scripting
39mPower of AI and Code Quality and Performance
48mUnexplained phenomena: powerful tricks you likely didn't know were even possible
25mCommandLine Tools for DevOps
