Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Other Discussions
  3. The Insider News
  4. Is your code too complicated?

Is your code too complicated?

Scheduled Pinned Locked Moved The Insider News
algorithmsquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kent Sharkey
    wrote on last edited by
    #1

    Sourcery[^]:

    Measuring complexity of your code with two different metrics - Cyclomatic Complexity & Cognitive Complexity

    "The complexity that we despise is the complexity that leads to difficulty"

    T 1 Reply Last reply
    0
    • K Kent Sharkey

      Sourcery[^]:

      Measuring complexity of your code with two different metrics - Cyclomatic Complexity & Cognitive Complexity

      "The complexity that we despise is the complexity that leads to difficulty"

      T Offline
      T Offline
      trønderen
      wrote on last edited by
      #2

      Right. If the problem is super-complicated, then you can't expect the solution to be super-simple. If the complexity of the problem really isn't that bad, the code shouldn't be bad either. But how would you know that the problem really isn't that bad? It simply isn't the agile style. The modern way is to start by coding 'void main(int argc, char** argv) { ...' long before you start asking what the real problem is. At the time when you begin to really grasp the nature of the problem, you have already written a whole lot of code, based on an incomplete understanding. You will be living with that code as 'technical debt' for a long, long, time. In the style of agility, you will be programming around the old, badly (non)designed code, adding numerous 'ToDo's. Most real problems are really far less complex than the software written to solve them.

      B 1 Reply Last reply
      0
      • T trønderen

        Right. If the problem is super-complicated, then you can't expect the solution to be super-simple. If the complexity of the problem really isn't that bad, the code shouldn't be bad either. But how would you know that the problem really isn't that bad? It simply isn't the agile style. The modern way is to start by coding 'void main(int argc, char** argv) { ...' long before you start asking what the real problem is. At the time when you begin to really grasp the nature of the problem, you have already written a whole lot of code, based on an incomplete understanding. You will be living with that code as 'technical debt' for a long, long, time. In the style of agility, you will be programming around the old, badly (non)designed code, adding numerous 'ToDo's. Most real problems are really far less complex than the software written to solve them.

        B Offline
        B Offline
        BillWoodruff
        wrote on last edited by
        #3

        I can tell why the explanation of why you don't like Agile is too complex :wtf:

        «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

        T 1 Reply Last reply
        0
        • B BillWoodruff

          I can tell why the explanation of why you don't like Agile is too complex :wtf:

          «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

          T Offline
          T Offline
          trønderen
          wrote on last edited by
          #4

          One of the System Engineering textbooks we used at the University summarizes in a bullet list "Reasons why the project did not complete on schedule". Every second bullet point said "Poor planning". So some people said "Hey, that is a great idea for making our project last!" So they sat down and developed agile methods.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups