> On Jun 21, 9:50 pm, "function(phil)" <[email protected]> wrote: > > > Thanks for your reply. >
> > Regarding the while statement. The following code doesn't work as > > planned but it shows my understanding of the > > use of the "while loop". It's a real world example. I think the > > courses should use real world examples. The use of displaying names > > 20 times doesn't make much since to me. We humans generally believe that "real world" examples must somehow be better. In fact, for beginners, real world examples are not always better. The revolutionary "real world" math methods adopted in the '80s didn't make the kids of America better at math--in fact, they got worse! Computer programming is learned through repeatedly solving many problems that are quick, challenging and easy. Most good real world examples of "for loops" are too complex for beginners. Only after you have a "for loop" can you do something with it. You don't try to teach a dog to fetch by teaching him how to fetch; you must first train him to sit. It's the same with programming. You don't start by making a "for" or "while" loop to iterate through an array of email addresses, you first make an easy "for" loop to iterate through numbers. Every kid learns numbers before they learn to count. Later you use loops on real world problems--but only when you know how to send email from a java program, loading the addresses from your gmail through an API. Sorry if this message hits the wrong nerve, it's supposed to be constructive criticism, not a buzz-kill. Programming is fun; fun even when it's not about the "real" world. It's more like solving puzzles. Just work hard and keep your brain working. Nobody would try to teach you something useless, even if you can't see the reason at the onset. Tommy --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
