Slashdot Mirror


Undocumented Open Source Code On the Rise

ruphus13 writes "According to security company Palamida, the use of open source code is growing rapidly within businesses. However, the lack of documentation and understanding of how the code works can increase the vulnerability and security risks the companies face. OStatic quotes Theresa Bui-Friday saying, 'In 2007, Palamida's Services team audited between 300M to 500M lines of code for F500 to venture-backed companies, across multiple industries. Of the code we reviewed, Palamida found that applications written within the last five years contain 50% or more open source code, by a line of code count. Of that 50% of open source code, 70% was undocumented. This is up from 30% in 2006.' How can businesses protect themselves and still draw on open source code effectively?"

4 of 94 comments (clear)

  1. 70% Undocumented, huh? by Devin+Jeanpierre · · Score: 5, Insightful

    How do you measure something like how well things are documented with a percentage? Some code simply doesn't need documentation. Other code needs plenty. Is 0% a 1:1 relationship between lines of code and lines of comments? That whole thing seems a bit strange. They could certainly back it up if they wanted to, but that'd be too much effort.

    --
    -Devin Jeanpierre
  2. Same old, same old. by khasim · · Score: 5, Insightful

    In today's world of 24/7 and persistent network access, developers dispersed across multi-national sites can include open source, freeware, public domain, evalware (demos of commercial software), etc, into the code they are writing without triggering the usual checkpoints in the procurement process.
    I've seen that same issue YEARS ago. And I'm not talking code snippets. I'm talking systems that had "evalware" tools in them.

    This has NOTHING to do with "multi-national sites" or any of that.

    This has EVERYTHING to do with clearly stating the rules and ENFORCING those rules.

    The rules do not enforce themselves. Someone, somewhere has to approve the code that goes in.

    The problem is that management does NOT understand code and will happily farm out the work to anyone who says that they can produce X lines for $Y. Without oversight. The less oversight, the less expensive the project is. Which means bigger bonuses for those same executives.
  3. Re:Source code is its own documentation by jps25 · · Score: 5, Insightful

    I disagree.
    This isn't about closed vs open source, this is about decent programming.
    Comments in code are neccessary and a minimal requirement for any project.
    At least add one line to any function explaining what the function does, what its input is and what it returns.
    This isn't so hard and it won't kill you, but it'll make life easier for you and anyone else who will have to deal with the code later.
    It also makes finding errors easier, as your code may not be doing what your specifications say it should do.
    I don't understand this hatred for comments and the "code-is-its-own-documentation"-philosophy. I really don't.

    <code>
    #include <iostream>
    #include <algorithm>
    #include <iterator>

    #define ch_ty(ty)           std::istream_iterator<ty>::char_type
    #define tr_ty(ty)           std::istream_iterator<ty>::traits_type

    #define cin_iter(ty)        std::istream_iterator<ty, ch_ty(ty), tr_ty(ty)>( std::cin )
    #define void_iter(ty)       std::istream_iterator<ty, ch_ty(ty), tr_ty(ty)>()

    int main( int argc, char *argv[] ) {
      while ( (cin_iter(size_t)) != void_iter(size_t)
                  ? ( std::cin.unget(),
                      argc += *cin_iter(size_t)
                  ) : (
                    printf( "\nsum: %d\n", --argc ), system("exit")
                  ) );
    }
    </code>

    Perhaps easy to understand, but one comment-line would save you minutes wasted understanding and reading it.

    or

    <code>
    #include <stdio.h>

    int v,i,j,k,l,s,a[99];main(){for(scanf("%d",&s);*a-s;v=a[j*=v]-a[i],k=i<
    s,j+=(v=j<s&&(!k&&!!printf(2+"\n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&&++
    l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=0:++a[i])>=s*k&&
    ++a[--i]);printf("\n\n");}

    </code>

    Well, obviously obfuscated, but one comment and it's immediately clear what it does.

  4. Gotta love Slashdot by Anonymous Coward · · Score: 5, Insightful

    Gotta love this place. At the time of this posting, there are 11 comments modded 3 or higher. Of those, only ONE makes any reference to the act of documenting where the code is coming from (which is what the article is about). All the rest are talking about writing documentation for code, or commenting code as its written. Way to miss the ball, guys! This article is addressing you specifically, yet you have no idea what they're even saying because you can't be bothered to try to listen. Nice.