~1 min read


184 words

Javascript is the wild west. There are no rules. Or that’s what they tell me at a minimum. A large percentage of this blog is dedicated to documenting the laws of the jungle, aka the norms, which may or may not be written down, and are certainly not universally known.

Today, I found out that my habit of prefixing an interface definition with an I or denoting a variable as private with an _ are not universally loved.

Moreover, some (like Jared Palmer and Google) are actively advocating against these practices in no uncertain terms (aka: “don’t do this”).

Style guides like Jared’s / Google’s are useful. They can be a short cut to avoid bike shedding conversations if a team agrees to them. At some point, the rule doesn’t matter as much as agreeing to the rule to avoid disagreements on trivial matters. That said, the merits of a consistent code base are not self-evident and it’s worth a few minutes to decide whether enforcing these sorts of rules make a difference as long as the code remains readable and easy to understand.

Related Posts
  • 2021 Daily Journal

  • Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!