I don't know what it does, except that you need it to load watir when
using irb :-)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: 18 May 2007 03:14 PM
To: [email protected]
Subject: Re: [Wtr-general] New Watir User Guide (beta)

Walter Kruse wrote:
>
> require 'watir'
> include Watir (it's magic anyway, it won't hurt)
> ie = IE.new (let people see a blank browser)
> ie.goto("http://www.google.com <http://www.google.com>")
>
> Show people the steps and show them later how to abbreviate it with a 
> small explanation of the Ruby idiom. It's also important to explain 
> each line. What, I believe, it will result in is a deeper 
> understanding as opposed to just knowing how to do tasks with canned 
> food. A problem I have as a relative latecomer to programming is that 
> I know how to do certain things, but not why. It makes problem solving

> difficult.
>
My experience is that the "include Watir" line is never understood and 
in fact people end up thinking that it is some kind of magic. That, to 
me, is a reason to avoid it. The reality is that it is a shortcut that 
ends up being longer than what it abbreviates. I'm not going to explain 
right now what it does. But if you aren't perfectly clear on what it 
does and how you can explain it to people (who easily get it confused 
with "require 'watir'", then you should omit it.

On the other hand, it is obvious what IE.new and ie.goto each do, and 
therefore it works just as well for me to break them out as it does to 
replace them with a "start".

Bret
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
**************************************************************************************************************************
Everything in this e-mail and attachments relating to the official business of 
MultiChoice Africa is proprietary to 
the company. Any view or opinion expressed in this message may be the view of 
the individual and should not automatically 
be ascribed to the company.  If you are not the intended recipient, you may not 
peruse, use, disseminate, distribute or 
copy this message. If you have received this message in error, please notify 
the sender immediately by email, facsimile 
or telephone and destroy the original message.
**************************************************************************************************************************
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to