D•Scribe
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 10 个月前

Debugging

lemmy.ml

message-square
26
link
fedilink
110

Debugging

lemmy.ml

☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 10 个月前
message-square
26
link
fedilink
alert-triangle
You must log in or # to comment.
  • GiorgioBoymoder [none/use name]@hexbear.net
    link
    fedilink
    English
    arrow-up
    40
    ·
    edit-2
    10 个月前

    it’s really fucking with me that neither axis follows a progressive ordering so I’m going to post a fixed (debugged) version. EDIT: lmao this is the most fucked up, inconsistent alignment chart I’ve seen. here it is fixed:

    everything -> sometimes -> nothing

    know -> not sure -> don’t know

    • TheDoctor [they/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      8
      ·
      10 个月前

      Thank god

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      6
      ·
      10 个月前

      haha nice work, that is an improvement :)

  • 7eter@feddit.org
    link
    fedilink
    arrow-up
    16
    ·
    10 个月前

    There might be a bug in the labeling code here

  • autoexec@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    13
    ·
    10 个月前

    Where does “it used to work, but now it doesn’t, and I don’t understand how it could ever have worked” fit in?

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      4
      ·
      10 个月前

      haha can’t believe I forgot that gem

  • Gregor@gregtech.eu
    link
    fedilink
    arrow-up
    13
    ·
    10 个月前

    You doubled the “everything works, and I don’t know why”

    • magic_lobster_party@fedia.io
      link
      fedilink
      arrow-up
      6
      ·
      10 个月前

      Do you know why?

      • Gregor@gregtech.eu
        link
        fedilink
        arrow-up
        2
        ·
        10 个月前

        I, in fact, don’t

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      4
      ·
      10 个月前

      one’s not sure why and the other is don’t know

      • Imnebuddy@lemmy.ml
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        10 个月前

        The center one is the same as the top right. I think the center is supposed to say “nothing works, I’m not sure why” to match the pattern with the rest.

        • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
          link
          fedilink
          arrow-up
          3
          ·
          10 个月前

          oh haha oops

  • TheDoctor [they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    10
    ·
    10 个月前

    I helped a friend debug a script last week that was working inconsistently in really weird ways. I looked at the script and it was all event hooks littered with sleep calls. I told him he was basically fuzz testing his own script and then getting surprised when he found race conditions. Shit was wild. Also, sometimes getters in Python are a mistake.

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      7
      ·
      10 个月前

      I find setters/getters are generally an antipattern because they obfuscate behavior. When you access a field you know what it looks like, but if you pass it through some implicit transformation in a getter then you have to know what that was.

      • TheDoctor [they/them]@hexbear.net
        link
        fedilink
        English
        arrow-up
        5
        ·
        10 个月前

        Yeah. I can understand the use case when it’s something relating to keeping simple state in sync by replacing it with derived state. But this particular case was flushing a cache after each get, which made each get of the property non-deterministic based on the class’s state.

        • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
          link
          fedilink
          arrow-up
          6
          ·
          10 个月前

          lol yeah that sounds like a nightmare

    • jollyrogue@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      10 个月前

      Aren’t setters and getters discouraged in Python?

      I remember reading something like, “This isn’t C++ , and Python doesn’t have private vars. Just set the var directly.”

      • TheDoctor [they/them]@hexbear.net
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 个月前

        In the way that’s common in languages like Java where you’re making a property read-only, yes. But there’s a whole protocol in Python called descriptors where you can override the . on a field. The most common form of these is class methods annotated with the @property annotation, which makes it so the method can be accessed as if it were a property.

  • BlueMagaChud [any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    7
    ·
    10 个月前

    the “sometimes works, don’t know why” is the most maddening, I love tearing my hair out just trying to get it to fail reliabily so I’ve got a single hint

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      8
      ·
      10 个月前

      Any problem that’s not repeatable is incredibly frustrating, and you’re rarely sure if you’ve truly fixed it in the end.

  • Bezier@suppo.fi
    link
    fedilink
    arrow-up
    7
    ·
    10 个月前

    Brain clot inducing labeling job here

  • headerfile@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    4
    ·
    10 个月前

    i have so may questions; why are the top right and dead center duplicates? why do they have different images? why are the phrases inconsistent? why are the images and phrases distributed at random? how did you miss this?

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      10 个月前

      the best thing about memes is that anybody can take it and remix it to make it better :)

      • IntergalacticTurtleFucker@lemmings.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        9 个月前

        Fork the meme

      • headerfile@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        2
        ·
        10 个月前

        fair point

  • bazingabrain [comrade/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 个月前

    deleted by creator

  • Blessthisimmunity@lemmy.zip
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 个月前

    One thing, I don’t know why

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

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: !programmerhumor@lemmy.ml

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.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 51 users / day
  • 900 users / week
  • 3.62K users / month
  • 8.88K users / 6 months
  • 11 local subscribers
  • 37.9K subscribers
  • 1.55K Posts
  • 23.1K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • UI: unknown version
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org