[Tutor] For Loop

Danny Yoo dyoo at hashcollision.org
Fri Oct 30 19:58:03 EDT 2015


On Fri, Oct 30, 2015 at 10:48 AM, Martin A. Brown <martin at linux-ip.net> wrote:
>
> Hello Shelby,
>
>> I was wondering if someone can complete a for loop in an array for
>> me.
>
> Your question is a bit too terse.  You don't give us too much detail
> in understanding what you want to do.


Also, we have no idea *why* you want to do what you're asking.  "Why"
is important.  The reason is because, since you're presumably a
beginner, you might not realize that you're asking is something
possibly nonsensical.

I'm being serious.  As a programmer, it's all too easy for us to
answer the wrong question because we haven't double-checked the "why"
to make sure it makes internal sense.  It's especially problematic for
programmers because there's a temptation to rush toward a problem's
solution before asking oneself: "Is this even a good idea?"


[For rest of the Tutor group:  an interesting example of this
situation is in the "Cracking the Oyster" chapter of Programming
Pearls (http://www.amazon.com/Programming-Pearls-2nd-Edition-Bentley/dp/0201657880).
It describes a scenario where the solution hinged, not directly on the
question being asked, but on why the question was asked.]


Anyway, any details about what you already know, and what you think
you might need help with, these are details that will make it easier
for us to help.  Let us know.


Good luck!


More information about the Tutor mailing list