The C ``Clockwise/Spiral Rule''

A nerdy trick to read C code sparked eye-rolls, nostalgia, and python smugness

TLDR: The article revives an old trick for reading confusing C code by mentally tracing symbols around a variable name. Commenters instantly split between calling it a handy survival hack, a misleading shortcut, and fresh proof that some programming languages enjoy tormenting people.

A classic programming explainer about the "Clockwise/Spiral Rule"—basically a mental trick for decoding those famously cursed C variable declarations—should have been a calm little lesson. Instead, the comments turned into a full-on language therapy session. The article says you can start at the variable name, move around it in a spiral, and translate symbols into plain English. In theory, it helps people read lines of code that look like keyboard accidents.

But the community was not ready to simply nod along. One camp said the rule is catchy but not actually correct enough, with critics insisting the real answer is still: learn the language properly. Another group got even more personal, saying being taught this trick in college actually made C harder to love, because it turns understanding into memorizing a party trick. Their preferred mantra? A much calmer-sounding idea: declarations should read like how you’d actually use the thing.

And then came the dunks. One commenter basically fantasized about a world where declarations are written in normal human language instead of puzzle format. Another dropped the killer line: "This is why I like python. str is a duck." That one landed like a sitcom punchline. Meanwhile, practical survivors chimed in with cdecl.org and a Linux tool that translates the gibberish for you—because if the code looks like a riddle, apparently the internet has already built a decoder ring.

Key Points

  • The article introduces the “Clockwise/Spiral Rule” as a technique for interpreting C declarations in plain English.
  • The rule starts at the identifier being declared and proceeds outward in a spiral or clockwise direction.
  • The article maps key C syntax to English: `[]` means array, `(type1, type2)` means function taking arguments and returning something, and `*` means pointer to.
  • The article states that expressions inside parentheses must always be resolved first.
  • Three worked examples demonstrate the method on simple arrays, pointers to functions, and a more complex nested declaration involving `signal` and `fp`.

Hottest takes

"it isn't actually correct" — stephencanon
"Being taught this rule in undergrad really hampered my appreciation of C" — pcfwik
"This is why I like python. str is a duck." — AlienRobot
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.