You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Teaching the concurrency course it sticks out as strange that many of the example loops start at 1 and continue to (exclusively) a round number, such as 1..5 or 1..10. This means we're comparing, for example, a loop in main that counts 1 2 3 4 with a loop in a background thread that counts 1 2 3 4 5 6 7 8 9: 4 and 9 iterations, respectively. I think it would be less distracting to loop for round numbers of iterations like 5 or 10, whether we start at 1 or 0. When I see a loop that starts 1 and has a non-inclusive end bound, my bug sense tingles, and I figure the same is probably true for a number of students; it's less distracting to do something more idiomatic as looping is not the focus here.
The text was updated successfully, but these errors were encountered:
Teaching the concurrency course it sticks out as strange that many of the example loops start at 1 and continue to (exclusively) a round number, such as
1..5
or1..10
. This means we're comparing, for example, a loop in main that counts 1 2 3 4 with a loop in a background thread that counts 1 2 3 4 5 6 7 8 9: 4 and 9 iterations, respectively. I think it would be less distracting to loop for round numbers of iterations like 5 or 10, whether we start at 1 or 0. When I see a loop that starts 1 and has a non-inclusive end bound, my bug sense tingles, and I figure the same is probably true for a number of students; it's less distracting to do something more idiomatic as looping is not the focus here.The text was updated successfully, but these errors were encountered: