Teeing up Python - Code Golf
Offered By: EuroPython Conference via YouTube
Course Description
Overview
Syllabus
Intro
WARNING
Code Golfing
Snake Oil' Benefits
What are Strokes?
Ever written code like this?
Counting up the strokes
Visual Diff
Initializing dict values
Cleaning Up Resources
Context Managers
Exception Handling
"Simple" implementation
Let's decorate with @contextmanager
Functions aren't scary
Quick Functions Primer
Goofus and Gallant Highlights
Goofus and Gallant explore functions
Goofus and Gallant explore map
Goofus and Gallant explore reduce
Goofus and Gallant explore filters
Comprehending Comprehensions
Comprehensions Deconstructed
Better Mapping with Comprehensions
Better Filtering with Comprehensions
Better Reduces with Compressions
Better dicts with Comprehensions
Where can conciseness help?
Quick Whiteboarding Tip
Final Takeaways • Stroke reduction (making code more concise) reduces the cognitive load to understand code.
Taught by
EuroPython Conference
Related Courses
Learn to Program: The FundamentalsUniversity of Toronto via Coursera Python Data Representations
Rice University via Coursera Introduction To Haskell Programming
Chennai Mathematical Institute via Swayam Python Functions, Files, and Dictionaries
University of Michigan via Coursera Python Data Structures
University of Michigan via edX