flay version 1.4.3 has been released!
Flay analyzes code for structural similarities. Differences in literal
values, variable, class, method names, whitespace, programming style,
braces vs do/end, etc are all ignored. Making this totally rad.
Changes:
1.4.3 / 2011-08-10
-
1 bug fix:
- Fixes for 1.9 with --diff. (mmullis)
Thanks, it works, but it printed this warning:
$ flay /Users/alex/projects/vfs/lib/vfs/**/*.rb
skipping /Users/alex/projects/vfs/lib/vfs/storages/specification.rb:
Can’t change the value of false
here’s source
https://github.com/alexeypetrushin/vfs/blob/master/lib/vfs/storages/specification.rb
just curious, according to power law
(Power law - Wikipedia) there should be 20% of language
constructs (structural patterns) that are used 80% of time.
It would be interesting to process with flay let’s say about hundred of
most popular gems and collect pattern usage statistics.
To answer the question - what of the ruby constructs and structural
patterns are used most often?
And then we can apply these statistical knowledge to shape the API of
the ruby itself, to make these most used constructs and patterns more
simple and compact.
I created very basic tool that demonstrates how the power law applied to
the size of sources,
Whould be interesting to see how it’s applied to the syntaxis and the
structure of the ruby code.
P.S. Actually 20% is too wide, we don’t need them all. But because the
Power law has the property of self-similarity, in these most used 20
percents there alre also 20 most used percents (and so on).
And these 4% (20% of 20%) are covering 64% (80% of 80%) of all patterns
used in code.