Published Sep 3, 2019

SE-Radio Episode 278: Peter Hilton on Naming

Peter Hilton, an independent software consultant, delves into the art and intricacies of naming in programming, addressing its challenges and the crucial role of documentation. He shares practical strategies, including the use of thesauruses and pair programming, to refine and improve naming conventions in code.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Naming Challenges

    Naming in programming is notoriously difficult, as explains, because it involves both creativity and communication. He notes that while cache invalidation is expected to be challenging due to its technical nature, naming surprises many with its complexity because it requires conveying meaning to humans, not just machines 1. This dual role of names in code—making it both beautiful and comprehensible—demands careful consideration and creativity 2. Hilton likens naming to writing poetry, where choosing the exact word is crucial, and suggests that improving naming skills is akin to enhancing one's vocabulary through reading and engaging with well-written material 3.

       

    Naming Misconceptions

    Misconceptions about naming often lead programmers to undervalue its importance, impacting code quality. points out that many developers don't prioritize naming because they see it as less critical than other code smells, like long methods or excessive parameters 4. However, he argues that naming is a key aspect of human communication in code, which is often overlooked because it doesn't affect compilation 4. Additionally, suggests that certain programming languages, particularly those with strong typing, can encourage better naming practices by requiring more explicit naming of types and objects 5.

Related Episodes