Last quiz. Twenty code lessons, four weeks. How does the pipeline feel compared to Day 1?
Completely different. I can look at a dataset and see the transformation — group first, aggregate, rank, normalize — before I've written any code.
That's the mental shift. Individual patterns in Week 1, their compositions in Week 4. When you see the pipeline before the code, you're designing instead of improvising.
The group-by plus reduce pattern is what I want to lock in. Day 26 was where I felt the most new mental effort.
Six questions on exactly those Week 4 patterns. Eighty percent to pass.
Group-by pattern — groups.setdefault(key, []).append(item) fuses check-init-append into one call. Output shape is {key: [items]}.
Aggregate accumulator — totals[k] = totals.get(k, 0) + v for per-key sums. Swap + v for + 1 to count, or max(...) to track extremes.
Top-in-group — group first, then {k: max(v, key=...) for k, v in groups.items()} reduces each group to its winner.
Normalize records — list comprehension of dict literals — .strip(), .lower(), .get(key, default) per field.
Pipeline composition — empty guard + multiple reductions + dict literal return. Complex behavior from small well-composed pieces.
Last quiz. Twenty code lessons, four weeks. How does the pipeline feel compared to Day 1?
Completely different. I can look at a dataset and see the transformation — group first, aggregate, rank, normalize — before I've written any code.
That's the mental shift. Individual patterns in Week 1, their compositions in Week 4. When you see the pipeline before the code, you're designing instead of improvising.
The group-by plus reduce pattern is what I want to lock in. Day 26 was where I felt the most new mental effort.
Six questions on exactly those Week 4 patterns. Eighty percent to pass.
Group-by pattern — groups.setdefault(key, []).append(item) fuses check-init-append into one call. Output shape is {key: [items]}.
Aggregate accumulator — totals[k] = totals.get(k, 0) + v for per-key sums. Swap + v for + 1 to count, or max(...) to track extremes.
Top-in-group — group first, then {k: max(v, key=...) for k, v in groups.items()} reduces each group to its winner.
Normalize records — list comprehension of dict literals — .strip(), .lower(), .get(key, default) per field.
Pipeline composition — empty guard + multiple reductions + dict literal return. Complex behavior from small well-composed pieces.