Re:On Secretly Terrible Engineers
by mattmanser on Monday March 09, 2015 @05:52PM
(#9174430)
No, because for most of those problems there's an easy alternative, declare another counter variable and you can just go:
z++;
if(z>100000) {
print x;
z=0;
}
When I was taught maths there was no emphasis on remainders and it certainly wasn't denoted with a % sign. I vaguely remember writing something like 12r3 in primary school. The r meaning remainder.A brief search on SO and lo and behold:
http://stackoverflow.com/questions/1504420/c-what-does-the-p...
Viewed 38,000 times. Every language probably has a similar question.
And every dev should have hit the remainder operator at bare minimum when they had a long running loop and wanted to print a status every kth operation, eg
or when processing a big file, printing every k lines; or when running a slow operation, printing every k seconds; or ...