Re: [ANN] flog 1.1.0 Released
- From: Thomas Metge <tom@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Aug 2007 05:33:31 +0900
Thomas Metge wrote:
Chad Perrin wrote: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):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
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
.
- References:
- [ANN] flog 1.1.0 Released
- From: Ryan Davis
- Re: [ANN] flog 1.1.0 Released
- From: Chad Perrin
- Re: [ANN] flog 1.1.0 Released
- From: Thomas Metge
- [ANN] flog 1.1.0 Released
- Prev by Date: Re: [ANN] flog 1.1.0 Released
- Next by Date: Problems getting Mechanize working...
- Previous by thread: Re: [ANN] flog 1.1.0 Released
- Next by thread: Re: [ANN] flog 1.1.0 Released
- Index(es):
Relevant Pages
|