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
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to