Slashdot Mirror


Modeling How Programmers Read Code

An anonymous reader writes "Following up on an experiment from December, Michael Hansen has recorded video of programmers of varying skill levels as the read and evaluate short programs written in Python. An eye tracker checks 300 times per second to show what they look at as they mentally digest the script. You can see some interesting differences between experts and beginners: 'First, Eric's eye movements are precise and directed from the beginning. He quickly finds the first print statement and jumps back to comprehend the between function. The novice, on the other hand, spends time skimming the whole program first before tackling the first print. This is in line with expectations, of course, but it's cool to see it come out in the data. Another thing that stands out is the pronounced effect of learning in both videos. As Eric pointed out, it appears that he "compiled" the between function in his head, since his second encounter with it doesn't require a lengthy stop back at the definition. The novice received an inline version of the same program, where the functions were not present. Nevertheless, we can see a sharp transition in reading style around 1:30 when the pattern has been recognized.'"

1 of 115 comments (clear)

  1. Re:don't give PHB's any ideas we don't need metric by PolygamousRanchKid+ · · Score: 4, Insightful

    Unfortunately, this thing seems to be en vogue in the computer fashion industry. I just attended a conference where this phrase could some up a bunch of the presentations:

    "We are modeling, tapping into the power of social networks, and doing visual analytics!"

    I happen to be reading The Psychology of Computer Programming, Silver Anniversary Edition" right now. An interesting quote:

    The only thing that's changed here in twenty-five years is the fact that the funds dedicated by executive to eliminating programmers from their payrolls have become far more staggering than I imagined back then. And, now, I finally recognize in this executive desire a pattern so strong, so emotional, that it has blinded these executives to two facts:

    1. None of these schemes has succeeded in eliminating programmers . (We have now at least ten times as many as we did then.)

    2. Every one of these schemes has been concocted by programmers themselves, the very people the executives want so passionately to eliminate.

    So, although people say that programmers lack interpersonal skills, they evidently have a skill at persuasion that surpasses that of the late, great P:T: Barum, famous for his theory: "There's a sucker born every minute."

    I guess if I need some money for something from executive, I'll tell them that I need it to model, tap into the power of social networks and do visual analytics. That ought to get me my funds.

    --
    Schroedinger's Brexit: The UK is both in and out of the EU at the same time!