• UpperBroccoli@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    5
    ·
    3 hours 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 {
    
  • ImgurRefugee114@reddthat.com
    link
    fedilink
    arrow-up
    53
    ·
    edit-2
    12 hours 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
        8
        ·
        7 hours 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.

  • Ftumch@lemmy.today
    link
    fedilink
    arrow-up
    25
    ·
    edit-2
    12 hours 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
      7
      ·
      11 hours ago

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

  • printf("%s", name);@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    5
    ·
    9 hours 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. 😊🥛

  • Racoonwithbenefits@lemmy.zip
    link
    fedilink
    arrow-up
    16
    ·
    edit-2
    11 hours ago

    While filling the glass: glass is half full

    While emptying the glass: glass is half empty

    Context matters

    Comment would be whether glass is being emptied or filled

    • OwOarchist@pawb.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      10 hours ago

      Comment would be whether glass is being emptied or filled

      What if it’s neither (and unknown which it was previously), and the glass is just sitting there?

  • kalapala@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    9 hours 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.

  • amio@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    10 hours ago
    Glass _glass = new Glass(); //make variable glass of type glass and make a new glass
    ///<captainusefuldoc>Gets the glass</captainusefuldoc>
    Glass getGlass() => _glass; //get the glass in _glass
    
            • xthexder@l.sw0.com
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              4 hours ago

              Eh, my bad. I figured that was somewhat optional given it’s English and already kind of an adaptation. Fixing it is more effort than I’m willing to put in tho

              The whole Wikipedia page on English Haiku makes it seem like there’s a lot of room for interpretation

              • OwOarchist@pawb.social
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 hour ago

                I figured that was somewhat optional

                It is somewhat optional.

                While there are certain elements that are traditionally included in a ‘proper’ haiku, those elements are not universal, even in very old, traditional haiku. @jerkface@lemmy.ca is being too harsh and speaking too absolutely here. A non-traditional haiku is still a haiku.

                – Your friendly neighborhood literature major.