• ExtraMedicated@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    9 months ago

    I actually remember the teacher having us do this in high school. I tried it again a few years later and it didn’t really work anymore.

    • snaggen@programming.dev
      link
      fedilink
      arrow-up
      13
      ·
      9 months ago

      On my first programming lesson, we were taught that 1 second sleep was for i = 1 to 1000 😀, computers was not that fast back then…

      • ferret@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        9 months ago

        I mean maybe in an early interpreted language like BASIC… even the Intel 8086 could count to 1000 in a fraction of a second

        • snaggen@programming.dev
          link
          fedilink
          arrow-up
          5
          ·
          9 months ago

          This was in 1985, on a ABC80, a Swedish computer with a 3 MHz CPU. So, in theory it would be much faster, but I assume there were many performance losses (slow basic interpretor and thing like that) so that for loop got close enough to a second for us to use.

          https://en.m.wikipedia.org/wiki/ABC_80