Clean Code - Formatting Matters

Topics covered
Popular Clips
Episode Highlights
Horizontal
Horizontal formatting in code is crucial for readability. Alan Underwood shares his frustration with formatters that break strings after 80 characters, preferring scrollable strings instead 1. He advises limiting method chaining to two methods per line to avoid excessive horizontal length. Joe Zack highlights that 40% of lines in popular projects are between 20 and 60 characters, suggesting a natural tendency towards shorter lines 2.
Vertical
Vertical formatting focuses on minimizing the distance between related code elements. Michael Outlaw emphasizes avoiding unnecessary hopping around in source files 3. He also discusses the importance of organizing methods and properties logically within a class. Joe Zack prefers having constructors and public methods at the top, followed by other methods in a logical flow 4.
