The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Code reuse

Last post 02-11-2013 10:13 AM by configurator. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-10-2013 2:10 PM

    Code reuse

    The solution I'm currently working on is a subset of a folder, so I'm not sure how many lines of code are in it but the entire folder has 129662 lines of code (according to wc -l).

    I just ran Visual Studio's command "Analyze Solution for Code Clones". Its final report:

    257 Clone Groups  |  571 Cloned Snippets  |  14468 Lines of Cloned Code.
    That's 11% code reuse. Only 89% to go!
  • 02-10-2013 2:20 PM In reply to

    Re: Code reuse

    They should really code VS to respond, "you really don't wanna know" in situations like this.
      <-  I couldn't make my shit work, so here's a Godzilla head.


    "There is no such thing as a diet." - Lorne Kates

  • 02-10-2013 9:14 PM In reply to

    Re: Code reuse

    configurator:
    The solution I'm currently working on is a subset of a folder, so I'm not sure how many lines of code are in it but the entire folder has 129662 lines of code (according to wc -l).

    I just ran Visual Studio's command "Analyze Solution for Code Clones". Its final report:

    257 Clone Groups  |  571 Cloned Snippets  |  14468 Lines of Cloned Code.

    That's 11% code reuse. Only 89% to go!

    No, that is 11% (i didnt double check the exact match) of DUPLICATION and 89% unique code....given that tools for finding this type of duplication (semantic rather than lexical) are fairly new, these results are actually fairly good [based just on the counts, without being provided with sames]

  • 02-10-2013 11:03 PM In reply to

    Re: Code reuse

    TheCPUWizard:
    No, that is 11% (i didnt double check the exact match) of DUPLICATION and 89% unique code...

    Way to miss the joke. (I haven't actually used this feature, but given that the documentation says it only matches nearly-duplicated sections of 10 or more statements, a sanely-written program should have a reported duplicate code rate of approximately zero.)

  • 02-11-2013 3:20 AM In reply to

    Re: Code reuse

    configurator:
    That's 11% code reuse. Only 89% to go!
    What's perhaps more worrying is that apparently you still have around 115,000 unique lines of code left.

     

  • 02-11-2013 10:11 AM In reply to

    Re: Code reuse

    Severity One:
    What's perhaps more worrying is that apparently you still have around 115,000 "unique" lines of code left.

    FTFY. Most of the code is only unique enough to not be found by automatic analysis tools. I estimate this code base, if written correctly, would be around 30KLOC.
  • 02-11-2013 10:13 AM In reply to

    Re: Code reuse

    configurator:
    30KLOC.
    Assuming we'd keep the same silly architecture and coding style, that is. If written actually correctly I think it could fit in 10-20KLOC.
Page 1 of 1 (7 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems