• kinttach@lemm.ee
      link
      fedilink
      English
      arrow-up
      19
      ·
      8 个月前

      “I implemented the FizzBuzz algorithm in only 10 million lines of code!”

      • cbarrick@lemmy.world
        link
        fedilink
        English
        arrow-up
        13
        ·
        8 个月前
        char* fizzbuzz(int n) {
            switch (n) {
                case 0: return "fizzbuzz";
                case 1: return "1";
                case 2: return "2";
                case 3: return "fizz";
                case 4: return "4";
                case 5: return "buzz";
                ...
            }
        }
        
    • clearleaf@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      8 个月前

      For comparison the original StarCraft game asks for 80 uppercase megabytes of HDD (76.294 of whatever we’re calling the lowercase thing today) and for RAM it asks for 16MB/15.259mib.

      • cbarrick@lemmy.world
        link
        fedilink
        English
        arrow-up
        11
        ·
        8 个月前

        whatever we’re calling the lowercase thing

        • M: “Mega”: 1000^2
        • Mi: “Mebi”: 1024^2
        • m: “Milli”: 1000^-1