I agree that the shape of the code is what I start with too: the syntax-highlighted keywords stick out as anchor points when scrolling, and I know from indentation where sections start and end.
Example:
if (...)
{
...
}
else
{
...
}
or
loop
{
...
}
After I home in on the words then yes I will generally read left to right, top to bottom. But another part of imperative style is code is usually split into separate paragraphs of related functionality - so I can usually jump down whole paragraphs too.
The only other obvious variation I can think of is I will read bottom up when tracing the path a variable took to get to where I am currently looking.
Example:
or After I home in on the words then yes I will generally read left to right, top to bottom. But another part of imperative style is code is usually split into separate paragraphs of related functionality - so I can usually jump down whole paragraphs too.The only other obvious variation I can think of is I will read bottom up when tracing the path a variable took to get to where I am currently looking.