4: Memory pictures

The Crystal Ball - Instruction Manual I: Introduction to Data Science · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    4: Memory pictures

    Now that we’ve talked about the three important kinds of atomic variables, let’s consider the question of where they live. It might sound like a strange question. Aren’t they “in” the Jupyter Notebook cell in which they were typed?

    Actually, no. And that brings me to the first mission-critical lesson of the semester, which is a bane to all students who don’t deeply grasp it. The lesson is:

    "The code itself is only a means to an end. The purpose of the code is to read or write what’s in memory."

    Memory is the part of the computer in which variables and their values are stored. To use the terminology of Chapter 3, memory is where the environment lives. It is invisible to the programmer, but it is also very much there. The single most important trick to learning how to write correct code is being able to summon to mind what memory looks like at any point in time. The code you must write is a natural consequence of that.


    This page titled 4: Memory pictures was last modified on Sun, 18 Sep 2022 02:06:02 GMT and is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Stephen Davies (allthemath.org) via source content that was edited to the style and standards of the LibreTexts platform.