If we draw on our knowledge about expert-novice differences, we find empirical evidence showing that experts have better memories than novices in situations such as this one. In an experiment similar to the one described in this problem, McKeithen et al. If you think about this, it makes sense.
Experts are very familiar with clusters of lines of code that perform certain procedures.
They have this code stored in memory from using it often. Thus, when an expert looks at a novel program, he or she might need only remember, for example, that code was presented to sort a list and display it on the screen, or to generate random numbers, or to parse sentences. Because the code to perform the task is already well ingrained in long term memory, the expert does not need to remember the details of the presented code, such as where to place commas and periods, what kinds of keywords to use, when to indent lines, etc. We can expect the expert to have very good immediate memory for the code.