@ CB_TBL it depends on the targeted level
in your example its pretty basic and the use of x and y makes perfect sense to me and probably should to even most people. but when writing an example targeted at beginners you should never assume the reader will know what x and y is, and you should leave a comment above the forloop explaining what x and y is for.
yes for more advanced people having comments for the most basics of operations is clutter, but when trying to teach a beginner that clutter imho is a nessicary evil.
like i said in the long run i do agree with what you are saying. just not for teaching beginners, as they progress through more advanced tutorials they will understand and copy or form their own better structure and order of things.
edit:
Reactors post above mine confirms the point i'm trying to get across.
in your example its pretty basic and the use of x and y makes perfect sense to me and probably should to even most people. but when writing an example targeted at beginners you should never assume the reader will know what x and y is, and you should leave a comment above the forloop explaining what x and y is for.
yes for more advanced people having comments for the most basics of operations is clutter, but when trying to teach a beginner that clutter imho is a nessicary evil.
like i said in the long run i do agree with what you are saying. just not for teaching beginners, as they progress through more advanced tutorials they will understand and copy or form their own better structure and order of things.
edit:
Reactors post above mine confirms the point i'm trying to get across.