OT: Just browsing

This is really just Sort-of_Off_Topic. I am currently in a state of
code-burnout and was browsing the web to clear my head. Someone on this
list, I think, is a principle on this wiki. I forget how I found it. I have
noticed that whenever there is any kind of code challenge, by common
agreement the metrics by which the entrees are judged are only speed and
keystrokes. I personally always feel incompetent to send in an entry,
because my experience has been business apps where correctness,
maintainability (read: where it’s not the language that confuses the
maintainer but rather the implemented algorithm), and mutability. At any
rate, I ran across this wiki page:

http://c2.com/cgi/wiki?MostGamesProgrammersDontGrokObjectOrientation

It seems that many Ruby programmers have a “game progammer” mentality.

Albert

Hi –

This is really just Sort-of_Off_Topic. I am currently in a state of
code-burnout and was browsing the web to clear my head. Someone on this
list, I think, is a principle on this wiki. I forget how I found it. I have
noticed that whenever there is any kind of code challenge, by common
agreement the metrics by which the entrees are judged are only speed and
keystrokes. I personally always feel incompetent to send in an entry,
because my experience has been business apps where correctness,
maintainability (read: where it’s not the language that confuses the
maintainer but rather the implemented algorithm), and mutability.

In Ruby-oriented discussions about coding challenges, the merits of
striving for qualities other than shortness and speed often come up.
In particular, it’s been pointed out that not all coding puzzles and
challenges should be referred to as “Ruby golf”, since “golf” in this
sense very specifically means minimization of keystrokes. At one
point (in [ruby-talk:38668]), Pat Eyler suggested that we refer to
style-driven challenges as “Ruby figure skating” :slight_smile:

And then there (almost) was the Code Amelioration Contest of 2001,
which, had it actually taken place, would have revolved around the
challenge of maximizing readability and elegance of design.

So take heart :slight_smile: There’s already a history of looking at it this way
in the Ruby community, and room for plenty more. Mind you, I often
find “golf”-style challenges very educational and mind-sharpening, but
they’re not the whole story.

David

···

On Tue, 3 Sep 2002, Albert Wagner wrote:


David Alan Black | Register for RubyConf 2002!
home: dblack@candle.superlink.net | November 1-3
work: blackdav@shu.edu | Seattle, WA, USA
Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com

My experience is the opposite. The Ruby programmer community seems to
focus on maintainability, testing and using the expressive nature of the
language much more than on raw speed. After all, Ruby is an interpreted
language; if we needed speed we’d be writing in C.

I think you are misinterpreting the value people place on Ruby’s ability
to express complex constructs in a simple manner as a valuing the
reduction of “keystrokes” that results terse, unreadable code. Ruby has
good mechanisms for abstracting both data structures (classes/objects)
and control structures (blocks, higher-order functions). Therefore good
Ruby code will use blocks to express logic that would have to written
long hand in other languages.

E.g. using array iteration as an example, instead of writing code that
says “from the first index, i, of an array to the last index of an
array, get the element of the array at index i and then pass it to
function f”, Ruby coders would write code that says “pass each element
of the array to function f”. That is, Ruby code expresses the what and
abstracts away the how, and that is what people are judging in the code
challenges.

···

On Tue, 2002-09-03 at 15:14, Albert Wagner wrote:

This is really just Sort-of_Off_Topic. I am currently in a state of
code-burnout and was browsing the web to clear my head. Someone on this
list, I think, is a principle on this wiki. I forget how I found it. I have
noticed that whenever there is any kind of code challenge, by common
agreement the metrics by which the entrees are judged are only speed and
keystrokes. I personally always feel incompetent to send in an entry,
because my experience has been business apps where correctness,
maintainability (read: where it’s not the language that confuses the
maintainer but rather the implemented algorithm), and mutability. At any
rate, I ran across this wiki page:

http://c2.com/cgi/wiki?MostGamesProgrammersDontGrokObjectOrientation

It seems that many Ruby programmers have a “game progammer” mentality.

Albert

Dr. Nathaniel Pryce, Technical Director, B13media Ltd.
Studio 3a, 22-24 Highbury Grove, London N5 2EA, UK
http://www.b13media.com

I like “golf” because to do well in it you have to not only understand
the problem but push yourself to think about it and the language you
are using carefully. It provoke thought and ideas which are applicable
else where.

Regards,

Chris

···

On Tuesday, September 3, 2002, at 03:30 pm, dblack@candle.superlink.net wrote:

Hi –

On Tue, 3 Sep 2002, Albert Wagner wrote:

This is really just Sort-of_Off_Topic. I am currently in a state of
code-burnout and was browsing the web to clear my head. Someone on
this
list, I think, is a principle on this wiki. I forget how I found it.
I have
noticed that whenever there is any kind of code challenge, by common
agreement the metrics by which the entrees are judged are only speed
and
keystrokes. I personally always feel incompetent to send in an entry,
because my experience has been business apps where correctness,
maintainability (read: where it’s not the language that confuses the
maintainer but rather the implemented algorithm), and mutability.

In Ruby-oriented discussions about coding challenges, the merits of
striving for qualities other than shortness and speed often come up.
In particular, it’s been pointed out that not all coding puzzles and
challenges should be referred to as “Ruby golf”, since “golf” in this
sense very specifically means minimization of keystrokes. At one
point (in [ruby-talk:38668]), Pat Eyler suggested that we refer to
style-driven challenges as “Ruby figure skating” :slight_smile:

And then there (almost) was the Code Amelioration Contest of 2001,
which, had it actually taken place, would have revolved around the
challenge of maximizing readability and elegance of design.

So take heart :slight_smile: There’s already a history of looking at it this way
in the Ruby community, and room for plenty more. Mind you, I often
find “golf”-style challenges very educational and mind-sharpening, but
they’re not the whole story.

David


David Alan Black | Register for RubyConf 2002!
home: dblack@candle.superlink.net | November 1-3
work: blackdav@shu.edu | Seattle, WA, USA
Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com


Chris Ross - chris@darkrock.co.uk - http://www.darkrock.co.uk
Ferite Programming Language - http://www.ferite.org

In Ruby-oriented discussions about coding challenges, the merits of
striving for qualities other than shortness and speed often come up.
In particular, it’s been pointed out that not all coding puzzles and
challenges should be referred to as “Ruby golf”, since “golf” in this
sense very specifically means minimization of keystrokes. At one
point (in [ruby-talk:38668]), Pat Eyler suggested that we refer to
style-driven challenges as “Ruby figure skating” :slight_smile:

That’s a cool analogy. I had forgotten that one.

And then there (almost) was the Code Amelioration Contest of 2001,
which, had it actually taken place, would have revolved around the
challenge of maximizing readability and elegance of design.

I always liked that idea. I think we should still do it
someday. I have code I could submit, I just didn’t get
around to it before.

Hal

···

----- Original Message -----
From: dblack@candle.superlink.net
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Tuesday, September 03, 2002 9:30 AM
Subject: Re: OT: Just browsing…