halubilo.social
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to Programmer [email protected] • 2 years ago

6 stages of debugging

i.imgur.com

message-square
28
fedilink
441

6 stages of debugging

i.imgur.com

@[email protected] to Programmer [email protected] • 2 years ago
message-square
28
fedilink
alert-triangle
You must log in or register to comment.
  • DonjonMaister
    link
    fedilink
    18•2 years ago

    Stage 4.5: console.log() everything.

    • @[email protected]
      link
      fedilink
      English
      11•2 years ago

      And then the logging fixes the subtle timing issue causing the problem.

      • V699
        link
        fedilink
        7•2 years ago

        Race conditions are the worst

        • @[email protected]
          link
          fedilink
          1•2 years ago

          Good ol’ Heisenbugs.

    • @[email protected]
      link
      fedilink
      7•2 years ago

      We have logging software built in, but I can never remember how to turn it on, so I just console.log

    • @[email protected]
      link
      fedilink
      4•
      edit-2
      2 years ago

      Step 4.6: Get another drive for the logs.

    • @[email protected]
      link
      fedilink
      1•2 years ago

      “Oh…that’s why it’s not working”

  • 𝘋𝘪𝘳𝘬
    link
    fedilink
    12•2 years ago

    console.log("Does it happen here?")

  • @[email protected]
    link
    fedilink
    7•2 years ago

    “I notice that I am confused, and thus that one of my beliefs is fiction.”

  • @[email protected]
    link
    fedilink
    7•2 years ago

    Everyone always skips the last step, but that’s where you learn.

  • Rhaedas
    link
    fedilink
    5•2 years ago

    I have some Excel VBA scripting that I’ve been on 1-4 for a while now, so there’s a branch off of 4 that should be “fuck it, here’s the workaround” or “that part isn’t that important anyway, ignore it”.

    (it’s actually not Excel that’s the problem, it’s the change to its call to IE that throws up a stupid security warning.)

    • @[email protected]
      link
      fedilink
      2•2 years ago

      Oh my god this comment gave me an aneurysm

  • @[email protected]
    link
    fedilink
    5•2 years ago

    How did that ever work, I’ve been there many times.

  • z500
    link
    fedilink
    5•2 years ago

    Every time that last part happens I have to check the proper spelling of Berenstain. I’ve had some that really seem like they should have been impossible lol

  • ShustOne
    link
    fedilink
    4•2 years ago

    As true as true can ever be

  • @[email protected]
    link
    fedilink
    4•2 years ago

    Get enough experience and you just have a brief moment of stage 3 as you dive straight to stage 4.

    Unless it’s a customer/that-one-guy-at-work (it’s a title, but there’s usually a handful of them) and then there’s this vast stage 0 of back and forth of “are you sure that’s happening, run these commands and paste the entire output to me” to be sure of what they are saying then you jump to stage 3/4.

    • V699
      link
      fedilink
      3•2 years ago

      I jump straight to step 6

  • PtitSerpent
    link
    fedilink
    4•2 years ago

    if (0 === 0) {
    var_dump($test); die;
    }

    • @[email protected]
      link
      fedilink
      2•2 years ago

      if ((x != x) || (x == x+1)) then it’s one of those weird numbers

    • t҉̠̙ǵ̣̞̄ͪ͜x̸̱͚̳ͫ͐̑̈ͯͣ̚n̒͌҉͉̦̜̝ͅ
      link
      fedilink
      1•2 years ago

      Ahhhhh, PHP… 😭

  • kriss0706
    link
    fedilink
    4•2 years ago

    its funny i see this now, after spending 3 hours debugging D:

  • DarthYodaX
    link
    fedilink
    4•2 years ago

    My boss does 1 <–> 2 with us over most every bug any of us has ever found. Ticking time-bomb…

    • silly goose meekah
      link
      fedilink
      1•2 years ago

      sounds like a shit boss tbh

  • RandomBit
    link
    fedilink
    2•2 years ago

    One of the best pieces of advice I have ever gotten was to build diagnostics first. The time it takes to do will pay for itself 100X over the course of development.

    • @[email protected]
      link
      fedilink
      2•2 years ago

      100% unit tests ftw

      Hate making them, love them when they are here

  • @[email protected]
    link
    fedilink
    2•
    edit-2
    2 years ago

    Stage 7: Who wrote this?

    Stage 8: Ah ok… it was me

  • @[email protected]
    link
    fedilink
    1•2 years ago

    Has it ever!?

Programmer [email protected]

[email protected]

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 400 users / day
  • 1K users / week
  • 3.14K users / month
  • 9.3K users / 6 months
  • 37K subscribers
  • 1.79K Posts
  • 38.1K Comments
  • Modlog
  • mods:
  • @[email protected]
  • @[email protected]
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org