Twitter uses code refactoring to reduce risk and improve testing
Andrés Ornelas, Web DevOps lead at Twitter, decided to go a step beyond software testing. He took a peek underneath the covers of Twitter's code in order to manage the risks associated with defects, and ultimately, to simplify testing. He found that by developing better techniques for analyzing its code, it could also improve, reuse and reduce the costs of adding new features.
- The implementation depth of functions (maxdepth)
- The maximum number of statements in a function (maxstatement)
- The maximum length of a line of code (maxlength)
- Cyclomatic complexity, which measures the number of paths that could be traversed as a program is executing code.