[ANN] KABLAME! 0.2.1 Released

Discussion in 'Ruby' started by Jacob Dunphy, Jun 22, 2008.

  1. Jacob Dunphy

    Jacob Dunphy Guest

    This is the first "announced release" of KABLAME!

    KABLAME! started as a way for me to show my managers that half of the
    development team wasn't writing any tests. It was a stupid Rails
    plugin that I've now turned into a stupid gem. It uses scm blame
    commands to determine how many lines project contributors have
    written. It currently works with git and svn.

    The gem installs a pair of binaries, git-kablame and svn-kablame,
    which can be used to KABLAME a project.

    Usage example:

    git-kablame lib specs -> Runs git blame on every .rb file in these
    directories and returns a list of contributors and the lines they've
    written.

    Example output:

    ++++++++++++TOTALS++++++++++++
    **WINNER** tom **WINNER**
    tom ==> 1115
    dick ==> 750
    harry ==> 369
    **LOSER** harry **LOSER**


    So give it a try and see if you're the most prolific coder on your team.

    gem install kablame

    Check out the (very limited) docs at rubyforge:
    http://kablame.rubyforge.org

    Check out the source at github:
    git://github.com/jdunphy/kablame-gem.git
     
    Jacob Dunphy, Jun 22, 2008
    #1
    1. Advertisements

  2. Jacob Dunphy

    Axel Etzold Guest

    -------- Original-Nachricht --------
    Dear Jacob,
    caveat: I am part of the (maybe minority) of Ruby coders who don't use
    any Rails whatsoever, so what follows might not apply to Rails development ...


    But I feel that the longer I've used Ruby, the more concise my coding becomes,
    so counting numbers of code will turn out those people as losers who actually
    make use of advanced concepts, to keep their code short, and easily maintainable, including by others.
    When it comes to counting lines of code, I've no doubt I'd still win hands down against most
    of the experts coming up on this list to solve problems once and for all, but I can't really enjoy that victory :(

    I am not sure if I really can help out with answering the question, 'who is contributing in a team to get things
    done', but maybe one can use some combination of profiling of the code at hand, comparing it with profilings
    of similar code, and arrive at statements like, 'to get task X done, you shouldn't be using 99 percent of processor
    power for ten hours, so person Y, who wrote that part of the code should go back and work through it again.' --
    so maybe you could combine your existing project with some coder-specific evaluation of profiling ?

    Please view this just as an attempt to defend concise-writing people in your company.

    Best regards,

    Axel
     
    Axel Etzold, Jun 22, 2008
    #2
    1. Advertisements

  3. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1


    This scheme is faulty not only because of the assumption that more
    lines make better code (i once worked on a project where creating one
    of [simple] page pdf took the original coder 4000 LOC - he would be
    the clear winner), but also because it is pretty easy to beat -
    without actively doing something bad.

    If my company would use such a scheme, i would go against accepted
    practices and correct every tiny whitespace error (in my/the projects
    fashion of indention and paranthesis). Thats 2 seconds of work and at
    least one line per correction. "Convert Tabs to Spaces" is also a
    command that gets you a long way on you quest of "tagging" lines with
    you name. ("Sorry, my text editor does that by default. Forgot to
    switch it off.")

    If you do wish to show that someone doesn't commit on some arbitrary
    subtree (e.g. /trunk/tests, as it seems to be you case) a simple "svn
    log tests | grep ..." would suffice.

    There is a reason why I prefer "svn praise" to "svn blame" because it
    should only be used in a constructive sense. (e.g. being able to
    contact the original author)

    Regards,
    Florian gilcher
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.8 (Darwin)

    iEYEARECAAYFAkheKT8ACgkQJA/zY0IIRZZeoACgs+ZAKVtp14UFUM9yhAQfLDbm
    T70AmwVU/yBX4M8n0VXBTFRL7HOMkWHp
    =C3oe
    -----END PGP SIGNATURE-----
     
    Florian Gilcher, Jun 22, 2008
    #3
  4. Jacob Dunphy

    Jacob Dunphy Guest

    I'd like to take the opportunity to apologize, here. The original
    purpose was to verify that some of our team was not conforming to TDD
    policies on a regular or useful basis. The gem, in its current form,
    is what I consider a "novelty gem." It serves no practical purpose,
    other than to start an amusing conversation with your co-workers. I
    have no faith in the gem as a performance metric or a judge of
    quality.

    The only positive effect KABLAME! ever had was turning one of our team
    members into a serious TDD believer. When he saw the first print-out
    and realized he was 10th on the list, he had visual motivation (on top
    of my hounding and harassment) to start writing tests with every
    feature he worked on or changed. He started writing tests everywhere.
    He started writing them in his personal projects. The quality of the
    code reflected the new drive to be a more comprehensive tester. That,
    of course, is only one isolated case. I'm sure the KABLAME! would
    also rob babies of their candies and push old ladies into mud puddles.

    Sorry to anybody who took KABLAME! seriously. It wasn't released to
    produce anything other than laughs.

    -Jacob Dunphy
    Manufacturer of Novelty Gems


     
    Jacob Dunphy, Jun 22, 2008
    #4
  5. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    Thats quite another way of putting it. From your original post, it
    looked like
    it was used to blame other people in front of a manager. Using it for
    visual
    confirmation for someone that doesn't know where he stands in relation
    to others is quite different. (I assume that he was in denial of the
    fact that he
    was the "weakest" tester.)

    Using such a tool as a way of friendly criticism is okay (see my
    "praise" statement),
    but it seemed like you used it aggressively. I'm happy that this was a
    mis-
    understanding.

    Regards,
    Florian Gilcher
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.8 (Darwin)

    iEYEARECAAYFAkheiBoACgkQJA/zY0IIRZa6cgCfRtiu+CzG/hH3WejTlD/5AKfh
    NLQAoJ1xWK7gEmRCDk9iScpG93RHKGP6
    =9c70
    -----END PGP SIGNATURE-----
     
    Florian Gilcher, Jun 22, 2008
    #5
  6. Dijkstra once said that he referred to that metric as "lines of code
    *spent*". :)
     
    M. Edward (Ed) Borasky, Jun 22, 2008
    #6
  7. Adopt the practice of gnirotcafer.

    irb(main):001:0> "refactoring".reverse
    => "gnirotcafer"
     
    Joel VanderWerf, Jun 22, 2008
    #7
  8. You are aware that code 'quality' is a far more complex concept than
    'has lots of tests'?


    Ellie

    Eleanor McHugh
    Games With Brains
    http://slides.games-with-brains.net
     
    Eleanor McHugh, Jun 24, 2008
    #8
  9. I'm sure he does. I'm sure he also realizes that C0 analysis like
    rcov doesn't do much good, documentation analysis for dcov isn't a
    true tell for how easy the code is to understand, complexity analysis
    from flog isn't a good indicator of how well something is solving a
    problem, and so on ad nauseum.

    Tools are just that: tools. And they help you solve problems that you
    see that you are having. If he saw a _people_ problem with TDD (as
    in, "Oh, there are enough tests!" or "Tests aren't needed!") then
    perhaps this tool solved his problem.

    Knocking it because it doesn't solve every people or technical problem
    related to testing is like knocking Rails because it doesn't write the
    web app for you.

    --Jeremy



    --
    http://jeremymcanally.com/
    http://entp.com

    Read my books:
    Ruby in Practice (http://manning.com/mcanally/)
    My free Ruby e-book (http://humblelittlerubybook.com/)

    Or, my blogs:
    http://mrneighborly.com
    http://rubyinpractice.com
     
    Jeremy McAnally, Jun 24, 2008
    #9
  10. Ah, but the perception outside of the Ruby and Rails communities was
    that Rails *did* write the web app for you. ;)

    But you're right ... when the only tool you have is an inclined plane,
    you have to be careful where you are standing.

    Wait ...

    <ducking>
     
    M. Edward (Ed) Borasky, Jun 24, 2008
    #10
  11. Jacob Dunphy

    ara.t.howard Guest

    it would seem you've got the order reversed!? seriously ;-)

    a @ http://codeforpeople.com/
     
    ara.t.howard, Jun 24, 2008
    #11
  12. Jacob Dunphy

    Jacob Dunphy Guest

    The source is available. Feel free to make modifications. ;)
     
    Jacob Dunphy, Jun 24, 2008
    #12
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.