Not feeling the flog…

I don't think that I'm really understanding the value of flog. Heckle, I
get. What am I supposed to do with a report like this:

  Total score = 2264.64752355478

  RGB#none: (486.2)
    169.4: freeze
    160.6: new
    135.5: lit_fixnum
      9.9: from_percentage
      6.0: sclass
      4.8: alias
  [snippage]

What does this really tell me?

-austin

···

--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
               * austin@halostatue.ca * http://www.halostatue.ca/feed/
               * austin@zieglers.ca

Total complexity of your project is 2264ish. 20% (486/2264) of your complexity lies in RGB, and I'm guessing that its all building up your constants (from the names in your report).

What does `flog ... | grep -v '^ '` give (just the top-level stuff)

For RubyGems:

Total score = 7318.5427518653

Server#run: (203.9)
OpenURI#open_http: (161.0)
Policy#verify_gem: (135.9)
main#none: (118.0)
Validator#alien: (105.8)

Server#run is a good candidate for refactoring (3% of complexity!), as is Policy#verify_gem (2%!). main#none is just toplevel code. (OpenURI is in there for fixing proxy stuff :/)

Note: values are an arbitrary, they only matter relative to the total, and relative to other modules or methods.

···

On Nov 16, 2007, at 21:53 , Austin Ziegler wrote:

I don't think that I'm really understanding the value of flog. Heckle, I
get. What am I supposed to do with a report like this:

  Total score = 2264.64752355478

  RGB#none: (486.2)
    169.4: freeze
    160.6: new
    135.5: lit_fixnum
      9.9: from_percentage
      6.0: sclass
      4.8: alias
  [snippage]

What does this really tell me?

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars

Total complexity of your project is 2264ish. 20% (486/2264) of your
complexity lies in RGB, and I'm guessing that its all building up
your constants (from the names in your report).

Pretty much.

What does `flog ... | grep -v '^ '` give (just the top-level stuff)

Total score = 2306.67251009945

RGB#none: (486.2)
AdobeColor#initialize: (226.8)
AdobeColor#to_aco: (125.4)
RGB#to_hsl: (76.0)
HSL#to_rgb: (75.8)
MonoContrast#regenerate: (70.0)
CMYK#to_rgb: (54.9)
Metallic#none: (40.6)
Gimp#initialize: (38.2)
AdobeColor#readwords: (34.2)
RGB#to_cmyk: (33.9)
CMYK#==: (32.2)
HSL#mix_with: (32.0)
RGB#from_html: (30.0)
AdobeColor#readutf16: (29.7)

I think I'm getting it now. Inasmuch as the reported complexity
indicates the likelihood of harder to understand code or potentially
slower code, the percentage of complexity makes a difference.

Not a lot of value for the project I'm flogging right now (the
successor to color-tools that will be used in the upcoming PDF::Writer
1.1.4). Thanks.

-austin

···

On 11/17/07, Eric Hodel <drbrain@segment7.net> wrote:
--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
               * austin@halostatue.ca * http://www.halostatue.ca/feed/
               * austin@zieglers.ca

Eric Hodel wrote:

I don't think that I'm really understanding the value of flog. Heckle, I
get. What am I supposed to do with a report like this:

  Total score = 2264.64752355478

  RGB#none: (486.2)
    169.4: freeze
    160.6: new
    135.5: lit_fixnum
      9.9: from_percentage
      6.0: sclass
      4.8: alias
  [snippage]

What does this really tell me?

Total complexity of your project is 2264ish. 20% (486/2264) of your complexity lies in RGB, and I'm guessing that its all building up your constants (from the names in your report).

What does `flog ... | grep -v '^ '` give (just the top-level stuff)

For RubyGems:

Total score = 7318.5427518653

Server#run: (203.9)
OpenURI#open_http: (161.0)
Policy#verify_gem: (135.9)
main#none: (118.0)
Validator#alien: (105.8)

Server#run is a good candidate for refactoring (3% of complexity!), as is Policy#verify_gem (2%!). main#none is just toplevel code. (OpenURI is in there for fixing proxy stuff :/)

Note: values are an arbitrary, they only matter relative to the total, and relative to other modules or methods.

Ah ... so it's a "complexity profile". Couldn't flog display its report with percentages and cumulative percentages? So, for your example, you'd get:

Total 7318.54 Percent Cumulative
Server#run: 203.9 2.79% 2.79%
OpenURI#open_http: 161 2.20% 4.99%
Policy#verify_gem: 135.9 1.86% 6.84%
main#none: 118 1.61% 8.46%
Validator#alien: 105.8 1.45% 9.90%

...

···

On Nov 16, 2007, at 21:53 , Austin Ziegler wrote: