• UpperBroccoli@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    10
    ·
    7 days ago
    /**
     * @brief This is the coffee cup class
     * 
     * This class describes a cup or mug that neatly integrates a
     * container for vectors of cCoffee instances with a fully
     * functional handle to carry the cup or mug around. Used for 
     * pretty much everything.
     */
    class cTallGlass : public cGlass {
    
  • printf("%s", name);@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 days ago

    IT support chatbot when the client asks how to get an empty/full glass to display: You’re absolutely right! I couldn’t have said it better myself: This is a glass. 😊🥛

  • kalapala@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    7 days ago

    Commented out glass is certainly a problem (if it’s not only a comment) as the instance of object is created elsewhere but there’s some more problems in the code:

    -Software tester removes the glass but the water still stands there in the shape of the glass.

    -QA tries to pour the water in to the glass but water doesn’t register and the glass doesn’t fill.

    -Performance testing notes that rendering the glass needs some optimization since the glass doesn’t fill over 50% before being out of memory.

    -Junior programmer can’t get the glass to run since the liquids library wasn’t locked down and got an incompatible update.

    -Automation testing results in to a crash with a screenshot and logs that point out that glass frontend use the old version of the glass backend API leading the glass to freeze.

    -External testing points out that there’s a bug in the glass but they can’t identify it.

  • sunbeam60@feddit.uk
    link
    fedilink
    arrow-up
    2
    ·
    6 days ago

    Feel like we’re missing an overflow joke here!

    Or something like: // initialise a glass using max water value as indicator that glass is unused

  • WanderingThoughts@europe.pub
    link
    fedilink
    arrow-up
    3
    ·
    7 days ago

    Marketing: the glass is perfectly dimensioned to transport that amount of water without spilling anything! Buy yours now for a discount! Terms and conditions may apply.

  • ImgurRefugee114@reddthat.com
    link
    fedilink
    arrow-up
    75
    ·
    7 days ago

    It’s not a glass, it’s the

    hydrationContainerManagerObjectFactory

    Not to be confused with the

    hydrationContainerManagerTypeFactory

    Which is the template

      • jaybone@lemmy.zip
        link
        fedilink
        English
        arrow-up
        16
        ·
        7 days ago

        Some of those patterns were actually good design, until everyone went overboard with them. Now the pendulum has swung the complete opposite way and there’s a ton of duplicate code often generated from actual templates.

    • unwarlikeExtortion@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      6 days ago

      you mean

      glass Glass;

      which is almost worse than stringing together random fancy words.

      (Edit: added backticks for that nice mono font)

  • Ftumch@lemmy.today
    link
    fedilink
    arrow-up
    41
    ·
    7 days ago

    That’s not a good comment. What it is should be clear from the naming and context. A good comment explains the why when that is not obvious:

    // This glass is at 50% capacity because we don't want it to overflow if it rains
    
    • one_old_coder@piefed.social
      link
      fedilink
      English
      arrow-up
      15
      ·
      7 days ago

      And in 5 years you will wonder why the glass is under the rain because someone didn’t put that in the specifications.

      • hakunawazo@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        6 days ago

        A software tester walks into a bar

        Runs into a bar.
        Crawls into a bar.
        Dances into a bar.
        Flies into a bar.
        Jumps into a bar.

        And orders:

        a beer.
        2 beers.
        0 beers.
        99999999 beers.
        a lizard in a beer glass.
        -1 beer.
        “qwertyuiop” beers.
        Testing complete.

        A real customer walks into the bar and asks where the bathroom is.

        The bar goes up in flames.