Tim's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sjmarf@sh.itjust.works to Programming Humor@lemmy.worldEnglish · 8 months ago

CompareBooleans

sh.itjust.works

external-link
message-square
92
fedilink
1
external-link

CompareBooleans

sh.itjust.works

Sjmarf@sh.itjust.works to Programming Humor@lemmy.worldEnglish · 8 months ago
message-square
92
fedilink
alert-triangle
You must log in or register to comment.
  • AbsoluteChicagoDog@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    “You aren’t writing enough lines of code!” - Management

    • Lovable Sidekick@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      My boss’s boss, a former Ops manager who liked to keep track of system stats, once asked her why the CPU usage on the dev box had decreased that month. Weren’t the devs doing any work?

  • zarkanian@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    If this were a Node module, I wouldn’t even be surprised.

  • angrystego@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    I misread it as CompareBolians. No more Star Trek memes for me today.

    • WhiskyTangoFoxtrot@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      Many Bolians died bringing us this information.

  • x0x7@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Don’t do OOP kids

    • some_designer_dude@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      Not even once

    • kaffiene@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      That’s not OO code

      • WhiskyTangoFoxtrot@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        Still good advice, though.

        • kaffiene@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 months ago

          Not really. Good advice would be to use the right tool for the job

  • bleistift2@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Don’t forget the invocation

    if (CompareBooleans(a, b) == true)
    
    • MyTurtleSwimsUpsideDown@fedia.io
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      elseif(CompareBooleans(b,a) != false)

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

      if (CompareBooleans(CompareBooleans(a, b), true))

      • min@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        that… actually works…

      • TriflingToad@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        I don’t like this thread anymore :(

        • Log in | Sign up@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 months ago

          No, no, this is actually the only correct code in the thread.

  • aiden@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    This is code after working 16 hours

    • Maalus@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      I’d give my right hand this is a code review problem. Someone extracted a method returning true false. Then an intern came along and was told to refactor. They saw a lot of comparisons and “extracted” them.

      • im sorry i broke the code@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        My coworker made an array of book to express a status. This is no doing of an intern but a much eviler force at play.

        • subignition@fedia.io
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          I’ve heard of shared libraries, but this is ridiculous

  • 1stTime4MeInMCU@mander.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Thanks I hate it

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    “We need to obfuscate our code to prevent reverse engineering”

    The obfuscation in question:

    • Wrench@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      We affectionately called it “subscurity” on the FE team.

      When our BE apis would not give us any information why something failed, nor would they give us access to their logs. Complete black box of undocumented doodoo, and they would proudly say “security through obscurity” every time we asked why they couldn’t make improvements to usability.

      • frezik@midwest.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        You must have been working with the Redditors who told me that avoiding the use of JavaScript’s eval() to parse JSON was a false sense of security.

  • just_an_average_joe@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Wait areBooleanEqual returns false when they are equal?

    • not_woody_shaw@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      That’s not even the worst part. What the fuck does a function named Compare_anything do? Does it return anything? It sounds like nothing but a side effect.

      • idunnololz@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        Usually comparison functions are supposed to return an integer and are usually useful for sorting. However this one returns a bool so it’s both useless and terribly named.

      • BatmanAoD@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        The unnecessary and confusing functions are horrible, yes, but I’d still say that the fact that they’re wrong is the “worst” part.

        • WoahWoah@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 months ago

          That’s enough chit-chat, nerds. Back to work.

          • Management
    • breadsmasher@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      yesn’t

      • Log in | Sign up@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        This actually made me laugh, thank you.

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

    My guess to why there’s two functions is because it was originally only internal, and the programmer realized they needed public as well, but changing internal to public is too scary so they created a new method instead.

  • thenextguy@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Where are the unit tests?

  • Elgenzay@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Reminds me of is-even

    • RogueBanana@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      I can definitely understand why they did that but it’s still very funny

    • dohpaz42@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      Shoot me now. Just get it over with. I can’t anymore.

      • bdonvr@thelemmy.club
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        GitHub page of this program:

        I created this in 2014, when I was learning how to program.

        • dohpaz42@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 months ago

          If you’re trying to suggest that it’s a nothing package that should be ignored, let me remind you that it has 641k/month in downloads, with 17m downloads total.

        • Elgenzay@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 months ago

          I always figured it was a joke. I mean, it has another package called is-odd as a dependency. That’s comedy

          • InFerNo@lemmy.ml
            link
            fedilink
            English
            arrow-up
            0
            ·
            8 months ago

            I noticed is-odd also has 1 dependency but I didn’t dare to check what it was 😂

            • Acters@lemmy.world
              link
              fedilink
              English
              arrow-up
              0
              ·
              8 months ago

              Depends on is-number because JavaScript is silly

    • Jerkface@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      Weekly downloads: 152,124

      • FourPacketsOfPeanuts@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        It’s dependent on is-odd which is dependent on is-number which has 88 million weekly downloads…

    • macniel@feddit.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      Have you seen the repository’s name (or rather the name of the owner of that repository) on github?

  • carl_dungeon@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    There’s no way, that’s so insane it has layers.

    • Ledivin@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      At first, I thought the shitty methods were the joke 😱😱😱

  • 𞋴𝛂𝛋𝛆@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    !NOT

    Who’s there?

    !!Naughty Knots

  • becausechemistry@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Management: Gee whiz, we really have no idea how to gauge productivity to decide who gets promoted. We could manage. Or, better, we could just have someone write a script that pulls info from git on how many lines of code each person has written.

    Programmers:

    • curiousaur@reddthat.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      I promote based on lines of code removed.

      • meiti@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        I love deleting code, including my own, more than writing code. That’s a killer metric imo.

      • OpenStars@discuss.online
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        Which is all the easier to do when you start off with a higher number…

        • Acters@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          8 months ago

          Add heavily verbose/redundant math equations that take up multiple lines with each operation saving to a new variable, then either decrease the number of variable declarations or condense/simplify the math occasionally. Repeat with each new function. Killing two metrics at once LOC and the removal of LOC for older functions. Guaranteed promotions. lol

      • DontRedditMyLemmy@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        I quit based on idiotic metrics

        • curiousaur@reddthat.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 months ago

          Ah, the idiotic idiotic metric metric.

          • DontRedditMyLemmy@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            8 months ago

            Are you 14?

            • ✺roguetrick✺@lemmy.world
              link
              fedilink
              English
              arrow-up
              0
              ·
              8 months ago

              I don’t know what the age metric has to do with anything.

            • Log in | Sign up@lemmy.world
              link
              fedilink
              English
              arrow-up
              0
              ·
              8 months ago

              I’m sure it was meant as a joke, not a serious criticism.

              I think we can all agree that managers who have no idea what’s important absolutely suck

Programming Humor@lemmy.world

programminghumor@lemmy.world

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]

Related Communities [email protected] [email protected] [email protected] [email protected]

Other Programming Communities [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

Visibility: Public
globe

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

  • 1 user / day
  • 1 user / week
  • 42 users / month
  • 116 users / 6 months
  • 0 local subscribers
  • 3.2K subscribers
  • 94 Posts
  • 511 Comments
  • Modlog
  • mods:
  • 2e8a9d6bb6935a54@lemmy.world
  • UI: unknown version
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org