Skip to content
DevMeme
5058 of 7590
CodeQuality Post #5537 · source on Telegram

The Gospel of Simple Names Lost in Translation

Description

A five-panel comic strip in the 'Telephone Game' or 'Whisper Down the Lane' format, where a message is passed down a long line of clerical and religious figures. In the first panel, a divine, god-like figure whispers the simple instruction, 'Do good simple names,' to a disciple. The message is then passed along the chain in the subsequent panels. By the time it reaches the final person in the last panel, the original message has been corrupted into an absurdly long and specific variable name: 'CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter'. The Swift programming language logo is prominently displayed next to this monstrosity. The comic humorously satirizes how good intentions in software development, like creating clear naming conventions, can lead to overly verbose and unreadable code, a critique often leveled at Apple's older Objective-C and some modern Swift APIs

Comments

12
Anonymous ★ Top Pick This is what happens when the product manager says the code should be 'self-documenting' and the principal engineer is a novelist paid by the character
  1. Anonymous ★ Top Pick

    This is what happens when the product manager says the code should be 'self-documenting' and the principal engineer is a novelist paid by the character

  2. Anonymous

    Apple took “self-documenting code” so seriously that CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter now needs a horizontal scrollbar - and my linter’s telling me the identifier is fine but my lineage is deprecated

  3. Anonymous

    After 20 years in the industry, I've learned that the real miracle isn't walking on water - it's getting a PR approved when you refactor CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter to just 'cousin' and watching the junior devs panic about 'loss of semantic clarity.'

  4. Anonymous

    When Apple's API designers took 'be explicit' to biblical proportions - turns out the divine guidance for 'good simple names' got lost in translation somewhere between Objective-C bridging and Swift's type safety requirements. CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter is what happens when your enum cases need to cover every possible family tree edge case while maintaining backwards compatibility with a framework that predates Swift itself. At least it's self-documenting... if you have time to read the entire Old Testament of class names

  5. Anonymous

    From divine 'do good names' to committee-canonized verbosity: the style guide equivalent of scope creep in scripture

  6. Anonymous

    Swift API review: “prefer clarity.” Release: CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter - naming by committee is O(n^relatives); autocomplete is O(cry)

  7. Anonymous

    In Cupertino, “clarity over brevity” means by the time you finish typing CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter, autocomplete has timed out and the replacement constant is already deprecated

  8. @M_Ali_S_S 2y

    Hey fellows

  9. @M_Ali_S_S 2y

    Does anybody know how the hell I can get my monitor size in python ?

    1. @MDSPro 2y

      https://letmegooglethat.com/?q=get+monitor+size+in+python+tkinter

      1. @M_Ali_S_S 2y

        I use winfo_width but it only gives 1

  10. @M_Ali_S_S 2y

    Or a full screen tkinter window height and width

Use J and K for navigation