Re: [ANN] flog 1.1.0 Released



Thomas Metge wrote:
Chad Perrin wrote:
On Tue, Aug 21, 2007 at 05:05:33PM +0900, Ryan Davis wrote:
flog version 1.1.0 has been released!

* <http://ruby.sadi.st/>
* <http://rubyforge.org/projects/seattlerb>

Flog reports the most tortured code in an easy to read pain
report. The higher the score, the more pain the code is in.

% ./bin/flog bin/flog
Total score = 128.7

So . . . is that a good result, or a bad result? How do you define
"pain" in this context? Judging by the website, it looks like uses of
eval qualify as "pain" -- which seems like an odd metric.


Flog#report: (21)
4: puts
2: sort_by
...

So . . . is "puts" a "painful" method, then?


good point... flog looks like a great tool, but what is a "good" score and a "bad" score?

tom


never mind... i think i'm catching on (at last)... this is extremely useful for pointing out painful parts of your code, not necessarily giving a relevant final score. i.e. (from sample on website):

class Test
def blah # 11.2 =
a = eval "1+1" # 1.2 + 6.0 +
if a == 2 then # 1.2 + 1.2 + 0.4 +
puts "yay" # 1.2
end
end
end

in here, it would be worth removing the "eval" statement... which i can understand. it'd be interesting to see the weighting scale used though. i'll have to take a look at the source...

nice job on flog!

tom

.



Relevant Pages

  • Re: [ANN] flog 1.0.0 Released
    ... Happy birthday! ... Flog reports the most tortured code in an easy to read pain ... the more pain the code is in. ...
    (comp.lang.ruby)
  • [ANN] flog 1.0.1 Released
    ... Flog reports the most tortured code in an easy to read pain ... the more pain the code is in. ...
    (comp.lang.ruby)
  • [ANN] flog 1.0.2 Released (read: I suck)
    ... Flog reports the most tortured code in an easy to read pain ... the more pain the code is in. ...
    (comp.lang.ruby)
  • [ANN] flog 1.0.0 Released
    ... Flog reports the most tortured code in an easy to read pain ... the more pain the code is in. ... Birthday! ...
    (comp.lang.ruby)
  • Re: [ANN] flog 1.1.0 Released
    ... Flog reports the most tortured code in an easy to read pain ... the more pain the code is in. ...
    (comp.lang.ruby)