697
you are viewing a single comment's thread
view the rest of the comments
[-] vrighter@discuss.tchncs.de 29 points 6 days ago

I LOVE finding bugs.

I HATE looking for them

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?

[-] meowMix2525@lemm.ee 6 points 6 days ago

You're not desperate enough for them to reveal themselves to you yet

[-] Iron_Lynx@lemmy.world 3 points 6 days ago* (last edited 5 days 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]);
  //looks like I missed a bit, lemme fix
  if(bug_found)
  {
    break;
  }
  i++;
}
bug_fix(lines[i]);
// Who'd've thought that I'd need to fix a bug in a joke about fixing bugs
// Now that's some tasty irony ^-^'

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@discuss.tchncs.de 3 points 5 days ago

shouldn't b loop until it's <a instead of <=a ?

[-] Rubanski@lemm.ee 3 points 6 days ago
[-] vrighter@discuss.tchncs.de 3 points 6 days ago

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

this post was submitted on 11 Dec 2024
697 points (97.8% liked)

Science Memes

11399 readers
553 users here now

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Rules

  1. Don't throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.

This is a science community. We use the Dawkins definition of meme.



Research Committee

Other Mander Communities

Science and Research

Biology and Life Sciences

Physical Sciences

Humanities and Social Sciences

Practical and Applied Sciences

Memes

Miscellaneous

founded 2 years ago
MODERATORS