> For the complete documentation index, see [llms.txt](https://hanfak.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hanfak.gitbook.io/workspace/general-paradigms/cognitive-complexity.md).

# Cognitive Complexity

* A measure for how complex your code is to read and understand
  * Testable code != readable code
  * difference from cyclometric complexity (measure of testability)
  * Level of 15 or less is good goal
* The paper
  * <https://www.sonarsource.com/docs/CognitiveComplexity.pdf>
* <https://community.sonarsource.com/t/how-to-use-cognitive-complexity/1894/3>

-<http://minborgsjavapot.blogspot.com/2019/08/why-declarative-coding-makes-you-better.html>
