Comment

Comment by chromatin

The author makes the following assertion:

    Let me illustrate a common code organization issue some programmers run into on their first day. The novice writes

    terminal.print("Hello world")

    Then they decide they want to make the text red, so they edit their program to

    
    terminal.print("Hello world")

    terminal.setPrintColor("red")
        
    And then they're confused that it didn't come out red. They haven't internalized that the first line of code happens before the second. They just get a soup of code on the screen that kind of has the ingredients for a program, and expect the computer to do what they want.

I find this _extremely_ surprising???
parent chromatin 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton