• dustyData@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    1 year ago

    A professor used to say, we don't write code for the machine. The machine doesn't need code. It would be just as happy whether we hand carve 1s and 0s on ferromagnetic disks or if we wrote a compiler for emojis. Binary is binary. We write code for the humans. So make it legible.

      • dustyData@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        I never said anything about comments. My professor advocated that the code should tell yourself and other humans what it was making the machine do. Comments should document the design and the architecture. Not explain the code. A well designed and correct code needs few comments.