Published Nov 29, 2016

Clean Code - Formatting Matters

    Dive into the importance of clean code formatting as the hosts explore horizontal and vertical strategies, debate coding standards, and highlight tools that enhance debugging and code quality, all while engaging with the passionate developer community.
    Episode Highlights
    Coding Blocks logo

    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.

    Related Episodes