Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Identifier length and limited programmer memory (2009)

A 2009 study finds that longer identifiers in source code, while more descriptive, increase cognitive load on programmers' working memory, potentially reducing code comprehension. The research suggests an optimal identifier length that balances descriptiveness with memory constraints for better software readability and maintenance.

Related stories

  • A blog post discusses a mathematical identity where pentagonal numbers can be expressed in terms of triangular numbers. It highlights that while examples don't typically prove theorems, in this case the identity Pn = T(2n−1) − T(n−1) holds, showing that three examples can suffice for proving certain relationships.

  • John D. Cook describes how a sequence of his blog posts often follows a hidden thread, beginning with a post about the mathematical approximation exp(−x²) ≈ (1 + cos(sin(x) + x))/2, which some commenters incorrectly attributed solely to a first-order Taylor expansion.

  • The nth pentagonal number Pn follows the formula Pn = (3n² − n)/2 for positive integer n. For non-positive integer n, the same formula defines a generalized pentagonal number.

  • Partial fraction decomposition is commonly introduced in calculus as a technique for integrating rational functions by breaking P(x)/Q(x) into simpler terms. However, the post suggests that this method has applications beyond integration that are often overlooked in a typical calculus class.