‹ BackHN Continuity

Thread

Ten lines of code that changed my world

148 points · 46 comments · dimonomid

  1. dahart · · focus · HN ↗
    The BASIC print+goto loop might have been my first ever program too (in the 80s) but one thing for sure for me: it was definitely not “Hello, World”. I and others filled the screen with any number of silly things, random words, jokes and juvenile phrases, whatever, but for some reason, “Hello, World!” was a C thing, and I remember seeing it for the first time in a C class in high school, and then much more often in college.

    I have memories of ‘poke’ as well. On the Atari 800 you could poke memory to change the keystroke repeat rate and delay before repeat started, so obviously we would turn down the delay to zero and turn up the repeat to max (it was maybe 60 characters per second), so anyone trying to type couldn’t hit the keys quickly enough to avoid repeating. You’d have to power-cycle the machine to fix it, so it was hilarious to 11 year old me.

    Similar to his description of ‘poke’, but different mechanism - using debug.com on an IBM PC jr to edit the Ultimate III save files, and give myself maximum money and lives.

    Good times!

    1. mcherm · · focus · HN ↗
      The reason that "Hello, World" is a C thing is that C is the source of the tradition around that phrase. In Kernighan and Richie's "The C Programming Language" printing "Hello, World" is the very first exercise.
      1. gabrielsroka · · focus · HN ↗
        It&#x27;s actually a B thing <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27048024">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27048024
        1. NetMageSCW · · focus · HN ↗
          I disagree as that doesn’t introduce using the B environment with a Hello, world program which is the whole point. After K&amp;R it was the canonical first program.
          1. guelo · · focus · HN ↗
            Pulling my copy of K&amp;R from the shelf, it introduces the hello world program with

              The first program to write is the same for all languages:
                Print the words   
                hello, world
            
            Suggesting that this was already an established tradition when the book was written in 1978
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.