@@ -590,6 +590,21 @@ INCORRECT: Putting the better option on the left will show it with RED ✗ styli
590590 },
591591 "speakerNotes": { ... }
592592 },
593+
594+ CODE COMPARISON SLIDE (codeComparison):
595+
596+ Like regular comparison slides, codeComparison also supports the "neutral" flag:
597+
598+ 1. EVALUATIVE (default, neutral=false or omitted):
599+ - LEFT side → RED background, RED heading (ineffective/worse code)
600+ - RIGHT side → GREEN background, GREEN heading (effective/better code)
601+ - Use when one code example is clearly inferior
602+
603+ 2. NEUTRAL (neutral=true):
604+ - BOTH sides → PURPLE background, PURPLE heading (both valid approaches)
605+ - Use when comparing valid code alternatives with different trade-offs
606+ - Examples: "Imperative vs Functional", "Optimized for Speed vs Readability"
607+
593608 {
594609 "type": "codeComparison",
595610 "title": "Prompt Example: Ineffective vs Effective",
@@ -605,6 +620,22 @@ INCORRECT: Putting the better option on the left will show it with RED ✗ styli
605620 },
606621 "speakerNotes": { ... }
607622 },
623+ {
624+ "type": "codeComparison",
625+ "title": "Code Style Trade-offs: Imperative vs Functional",
626+ "neutral": true, // OPTIONAL: Use neutral=true for valid alternatives (PURPLE neutral styling)
627+ "leftCode": {
628+ "label": "Imperative Style", // Both styles valid - neutral styling
629+ "language": "javascript",
630+ "code": "const result = [];\nfor (let i = 0; i < items.length; i++) {\n if (items[i] > 10) {\n result.push(items[i] * 2);\n }\n}\nreturn result;"
631+ },
632+ "rightCode": {
633+ "label": "Functional Style", // Both styles valid - neutral styling
634+ "language": "javascript",
635+ "code": "return items\n .filter(x => x > 10)\n .map(x => x * 2);"
636+ },
637+ "speakerNotes": { ... }
638+ },
608639 {
609640 "type": "marketingReality",
610641 "title": "Marketing vs Reality: What Actually Happens",
0 commit comments