Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Complex is better than complicated

Complex is better than complicated

975ff6c8166f6f32889f004a904ffa39?s=128

Oursky Limited

July 10, 2015
Tweet

More Decks by Oursky Limited

Other Decks in Programming

Transcript

  1. Complex is better than complicated

  2. We build complex software

  3. We don’t want complicated code

  4. Cyclomatic complexity • M = E − N + 2P

    • E = the number of edges of the graph. • N = the number of nodes of the graph. • P = the number of connected components. • https://en.wikipedia.org/wiki/Cyclomatic_complexity
  5. Limiting complicated code • National Institute of Standards and Technology

    - 10 • Either • Under the limit • Provide a written explanation of why it become so complicated
  6. Software • C/C++/Objective C - https://github.com/terryyin/ lizard • golang -

    https://github.com/fzipp/gocyclo • Python - https://github.com/rubik/radon • Javascript - https://github.com/es-analysis/plato
  7. It can’t help • Stupid architect design • Human readability

    • Software Quality