On Wed, Mar 31, 2010 at 01:59:36PM +0200, Jules Copeland wrote:
> I'm teaching myself RoR, and I've found myself on this forum a fair few
> times when looking for solutions to problems.
> 
> I've also found many other sites with help forums and tutorials as well.
> 
> This may seem like a petulant request, but please for the love of all
> things holy, can people stop using foo and bar in code demos and
> tutorials please?

Yes, it's a petulant request. Welcome to programming. There's a culture and
a tradition here. You aren't going to change it. Foo and bar (and baz, and
quux -- see
http://www.catb.org/~esr/jargon/html/M/metasyntactic-variable.html for
more) are part of that culture tradition.

> It may be because I'm very new to this and I have to work through every
> step one by one
[...]

Yes, you're very new. When entering a new culture, try not to play the
"ugly American" and expect the culture to change and suit you. (Disclosure:
I am a US citizen and as liable to be labeled an "ugly American" as anyone
else.)

> Using Foo and Bar, just seems to add another level of mental processing
> to go through before you can start grasping the concepts of what's being
> explained.

You need to learn the jargon when entering any field. When it comes to
programming, you need to understand bits, bytes, floating point number, a
million other things and, yes, foo and bar and friends.

> I appreciate that sometimes, real world examples might make it more
> complicated if the words/variable names being used seem to overlap with
> what might be Ruby code (to a newbie at least).
> 
> Can I just ask for a little bit of imagination when giving examples
> please?

No. The point of foo and bar, which you have so blithely missed, is to
avoid details that would distract from the meat of what is being discussed.
When you see something like:

module Foo
  def do_foo
    puts "Foo!"
  end
end

class Bar
  include Foo
  def do_foo
    puts "Bar!"
  end
end

...you can immediately tell that we're looking at an example of whether a
method in an included module is overridden by a method in the including
class or not (hint: it is). Those placeholders could be absolutely
anything, but using foo and bar make it clear that the names should not be
the focus of your attention.

> (Sorry to come on here and rant in my first ever post, I just figured
> this would be a good place to get it seen - I hope I'm not alone in my
> frustration).

You may not be alone in your frustration, but you need to get over it.
Why do algebra examples typically use x, y, and z as variables? Culture and
tradition. I wouldn't expect that to change, ever, and you shouldn't expect
foo, bar, baz, etc. to change, either.

> Cheers,
> Jules.
--Greg
P.S. Sorry to be grumpy, but I now understand how many Parisians feel about
     most American tourists.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to