re: What is the simplest code to explain a loop? VIEW POST


Counting is the most fundamental thing most humans understand.

counter = 0
while (counter < 10) {
   counter = counter + 1
   print('count', counter)

Yep, I realized all programming tutorials use this way to explain a loop.

But simple people would say, hmm what's the point of showing 1 to 10 in the screen :D


Well, when they ask, tell them it is similar to a kid is learning to count till 10.

My point is — these weird real world examples donot translate well to computers. Sure it sounds fancy to talk about Gas or book pages, but it doesn’t really communicate that computers are dry, dumb and boring.

In my humble opinion certain aspects of computers are best learnt without real life examples and thinking in terms of just computer-y stuff.

You've got a point

But after I watched courses on both Treehouse and Pluralsight, oh man Treehouse makes the points drill into your brain cuz they illustrate first with real examples with animations / motion graphic, and then they go in the tech nerdy way.

For example, they explain containers in a very interesting way: teamtreehouse.com/library/what-is-...

code of conduct - report abuse