Published Aug 18, 2023

SE Radio 577: Casey Muratori on Clean Code, Horrible Performance?

Casey Muratori challenges the balance between clean code practices and software performance, arguing for the prioritization of efficiency without sacrificing readability and maintainability. He delves into the impact of coding decisions on business success, critiques misconceptions about optimization, and underscores the strategic significance of language choices in software development.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Readability Debate

    The debate over code readability often centers on the trade-offs between clean code practices and performance. argues that while class hierarchies might seem more readable, they can obscure the actual operations of a program, leading to performance issues 1. He believes that procedural code, when written well, can be just as readable and more performant. questions whether hiding implementation details truly aids understanding, to which Casey responds that it often complicates debugging and comprehension 2.

    I tend to like code that reads like what it does, because to me, that's the most. When I think about code readability, I don't think about just, I think I know what the code does. I want to actually know what the code does.

    ---

       

    Clean Code

    Clean code principles are often praised for enhancing code maintainability and understandability. However, challenges this notion by suggesting that these principles do not always lead to the most performant code 3. He argues that many examples of clean code do not attempt to optimize procedural code for readability and performance simultaneously. notes that Casey's critique has sparked significant debate within the software community, highlighting the polarizing nature of his views 4.

    There were so many arguments between people that did not involve me that came out of this video that that seemed to be the biggest actual result.

    ---

       

    Cognition vs. Performance

    The balance between developer cognition and code performance is a contentious issue. questions the effectiveness of practices that claim to enhance cognition, arguing that they often fail to deliver in real-world scenarios 5. He points out that despite claims of saving development time, many systems require extensive rewrites for performance improvements. highlights the common belief that modern computing power negates the need for performance optimization, a notion Casey disputes by emphasizing the importance of efficient code 6.

    People claim that they're saving development time, but then you look at their history and they've had to throw out their entire system, not once, not twice, but oftentimes three or four times in the space of ten years for performance.

    ---

Related Episodes