lonestar-lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 6 months ago

Debugging

lemmy.ml

message-square
26
link
fedilink
109

Debugging

lemmy.ml

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

    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
      ·
      6 months ago

      Thank god

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      6
      ·
      6 months ago

      haha nice work, that is an improvement :)

  • 7eter@feddit.org
    link
    fedilink
    arrow-up
    16
    ·
    6 months ago

    There might be a bug in the labeling code here

  • Gregor@gregtech.eu
    link
    fedilink
    arrow-up
    13
    ·
    6 months ago

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

    • magic_lobster_party@fedia.io
      link
      fedilink
      arrow-up
      6
      ·
      6 months ago

      Do you know why?

      • Gregor@gregtech.eu
        link
        fedilink
        arrow-up
        2
        ·
        6 months ago

        I, in fact, don’t

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      4
      ·
      6 months ago

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

      • Imnebuddy@lemmy.ml
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        6 months ago

        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
          ·
          6 months ago

          oh haha oops

  • autoexec@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    13
    ·
    6 months ago

    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
      ·
      6 months ago

      haha can’t believe I forgot that gem

  • TheDoctor [they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    10
    ·
    6 months ago

    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
      ·
      6 months ago

      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
        ·
        6 months ago

        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
          ·
          6 months ago

          lol yeah that sounds like a nightmare

    • jollyrogue@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      6 months ago

      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
        ·
        6 months ago

        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
    ·
    6 months ago

    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
      ·
      6 months ago

      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
    ·
    6 months ago

    Brain clot inducing labeling job here

  • headerfile@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    4
    ·
    6 months ago

    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
      ·
      6 months ago

      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
        ·
        6 months ago

        Fork the meme

      • headerfile@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        2
        ·
        6 months ago

        fair point

  • bazingabrain [comrade/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    6 months ago

    deleted by creator

  • Blessthisimmunity@lemmy.zip
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 months ago

    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.

  • 217 users / day
  • 636 users / week
  • 1.71K users / month
  • 10.5K users / 6 months
  • 3 local subscribers
  • 35.6K subscribers
  • 1.68K Posts
  • 35.1K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org