• vrighter
    link
    fedilink
    English
    arrow-up
    15
    ·
    5 hours ago

    I LOVE finding bugs.

    I HATE looking for them

    • yetAnotherUser
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 hours ago

      And the bugs are always in the last lines of code you check. It’s so infuriating! Why can’t they be in the first?

      • Iron Lynx@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 hours ago

        Because you stop searching when you find the bug.

        You have to not execute

        lines[] = Load(file.code);
        
        bool bug_found = false;
        i=0;
        while(!bug_found)
        {
          bug_found = findBug(lines[i]);
        }
        bug_fix(lines[i]);
        

        You have to run

        lines[] = Load(file.code);
        
        def bugs[];
        a = 0;
        for(i=0;i<lines[].length();i++)
        {
          if (findBug(lines[i])
          {
            bugs[a] = lines[i];
            a++;
          }
        }
        for(b=0;b<=a;b++)
        {
          bug_fix(lines[b]);
        }
        

        /j

      • vrighter
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 hours ago

        no, but I used to have one. He didn’t like looking for them either.