This post originated from an RSS feed registered with Ruby Buzz
by Jim Weirich.
Original Post: Feedback on Line Noise (and other stuff)
Feed Title: { | one, step, back | }
Feed URL: http://onestepback.org/index.cgi/synopsis.rss
Feed Description: Jim Weirich's Blog on Software Development, Ruby, and whatever else sparks his interest.
Wow, there were lots of responses to the LineNoise and PythonAndRuby postings
last week. Here’s some of the feed back.
On Line Noise
First of all, let me remind everyone that a line noise score is for
entertainment purposes only, and trying to derive something deep or serious
about a language from its line noise score is counterproductive.
BrianMarick
reminded me of a signature survey that Ward Cunningham had done. Ward
throws out all but a few characters to generate a signature for a Java
file. Surprisingly, you can tell a great deal about a file from the
signature. Check it out here.
JamesRobertson
wonders how Smalltalk would fare against the line noise filter. There is
some question how to exactly count Smalltalk code, since there is no
standard text representation for Smalltalk. I tried the fileout format from
Squeak and removed all the extra puctuation that is added during fileout.
Here is my results for Smalltalk …
James came up with a score of 35, but on his own source code running on a
different version of Smalltalk. A lot of the Smalltalk score came from the
class declarations, and if VisualWorks differs from Squeak significantly in
the way classes are declared, that could easily account for the difference.
TedLeung would like to
see a larger sample. He suspects that the Ruby line noise ratio would be
higher. Perhaps, but I haven’t seen it. From the very little research
I’ve done, Ruby and Python get roughly the same line noise score on
larger files.
On Python and Ruby Mindsets
Richard
comments on the PythonAndRuby posting
and complains about my characterization of the Python "."
operator. He says
"x[y]" is a dictionary lookup. "x.y" is an
attribute lookup that can have nothing at all to do with a dictionary.
He mentions that the __ getattr __ and __ getattribute __ hooks in Python
may redirect the "." operator so that no actual dictionary is
used. He suggests "attribute lookup" would be more accurate.
His terminology is probably more accurate, and I was delibrately glossing
over the details. But the main point that Python programmers view the
"." as some type of lookup is still very pertinent.
The Right Attitude
In the midst of all these Python and Ruby comparisons, I would like to wrap
up with a posting from Mauricio Fernandez’s blog.
Mauricio recounts a conversation with a stranger on a plane where they
discuss design patterns and dynamic languages.
It was only much later that I remembered that he told me he was a
Pythonist. This means (obviously) that we should have fought to death. Too
bad we forgot it ;)