3
I finally understood what a 'for loop' does after trying to make a recipe website last month.
I kept writing the same HTML for each ingredient until my friend in Seattle told me to just write it once and let the loop repeat it. Anyone else have a moment where a basic concept just clicked like that?
2 comments
Log in to join the discussion
Log In2 Comments
tarac169d ago
The "writing the same HTML for each ingredient" part is painfully familiar. I once hand coded a list of 50 states before someone gently pointed out that computers are good at repeating things. It felt like using a spoon to dig a swimming pool.
-1
henderson.eva9d ago
That spoon analogy is perfect. It really does feel like that. But honestly, sometimes you need to dig the first few holes with the spoon to really understand why the backhoe is so great. Doing it the long way first teaches you what the problem actually is, so the loop you write later actually makes sense. It's not wasted time, it's just the hard way to learn.
8