Lemmy.Lynas.ca
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
CodyIT@programming.dev to Programmer Humor@programming.devEnglish · 6 days ago

This is a glass

programming.dev

message-square
66
link
fedilink
495

This is a glass

programming.dev

CodyIT@programming.dev to Programmer Humor@programming.devEnglish · 6 days ago
message-square
66
link
fedilink
alert-triangle
You must log in or # to comment.
  • ImgurRefugee114@reddthat.com
    link
    fedilink
    arrow-up
    73
    ·
    6 days ago

    It’s not a glass, it’s the

    hydrationContainerManagerObjectFactory

    Not to be confused with the

    hydrationContainerManagerTypeFactory

    Which is the template

    • Valmond@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      28
      ·
      6 days ago

      You forgot the AbstractHydrationManager

    • Viceversa@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      6 days ago

      Do developers still code in such a manner?

      • jaybone@lemmy.zip
        link
        fedilink
        English
        arrow-up
        15
        ·
        6 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
      1
      ·
      5 days ago

      you mean

      glass Glass;

      which is almost worse than stringing together random fancy words.

      (Edit: added backticks for that nice mono font)

  • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮 @pawb.social
    link
    fedilink
    English
    arrow-up
    37
    ·
    6 days ago

    Unless it is in a vacuum, the glass is full.

    50% water, 50% gas mixture.

    • rockerface🇺🇦@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      40
      ·
      6 days ago

      Topologist: The glass is full of glass. Everything else is on the outside.

    • isolatedscotch@discuss.tchncs.de
      link
      fedilink
      arrow-up
      11
      ·
      6 days ago

      https://what-if.xkcd.com/6/

      no, I actually wanted it empty

    • rmuk@feddit.uk
      link
      fedilink
      English
      arrow-up
      6
      ·
      6 days ago

      I can’t believe no-one else has posted this yet.

      Relevant xkcd: https://what-if.xkcd.com/6/

      Also, relevant xkcd video: https://youtu.be/0EytSWiKrFg

    • surewhynotlem@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      6 days ago

      If it were a vacuum the water would quickly boil away with any remaining turning to ice.

      • cenzorrll@piefed.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 days ago

        It wouldn’t freeze unless you drop the temperature as well.

        • cockmushroom@reddthat.com
          link
          fedilink
          arrow-up
          1
          ·
          13 hours ago

          Who told you about hot vacuums? That was a secret!

        • Jerkface (any/all)@lemmy.ca
          link
          fedilink
          English
          arrow-up
          12
          ·
          6 days ago

          The phase transition from liquid to gas absorbs all the thermal energy in the remaining liquid and causes its temperature to drop to freezing point. You are familiar with this effect if you have used a tank of compressed gas; the tank gets cold as you release the gas and you might see condensation on the tank up to the liquid level.

          But then the remaining ice in the glass sublimates anyway.

          • PattyMcB@lemmy.world
            link
            fedilink
            arrow-up
            5
            ·
            6 days ago

            Who are you who are so wise in the ways of science?

            • Tlaloc_Temporal@lemmy.ca
              link
              fedilink
              arrow-up
              2
              ·
              5 days ago

              Just some jerkface.

              • PattyMcB@lemmy.world
                link
                fedilink
                arrow-up
                2
                ·
                5 days ago

                Username checks out

  • Ftumch@lemmy.today
    link
    fedilink
    arrow-up
    40
    ·
    6 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
      14
      ·
      6 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
        ·
        5 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.

      • xthexder@l.sw0.com
        link
        fedilink
        arrow-up
        3
        ·
        6 days ago

        Inevitably whatever is under the glass gets wet anyway… because it’s raining.

  • socsa@piefed.social
    link
    fedilink
    English
    arrow-up
    18
    ·
    6 days ago

    Senior engineer: the glass is self documenting.

  • Avicenna@programming.dev
    link
    fedilink
    arrow-up
    22
    ·
    6 days ago

    //don’t remove this comment or else

    • greedytacothief@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      17
      ·
      6 days ago

      Load bearing comment

    • KokusnussRitter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      8
      ·
      6 days ago

      //what if I remove this comment and else?

      • AstroLightz@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        6 days ago

        //Then line 368 that checks if the comment exists will fail and will be sad

        • KokusnussRitter@discuss.tchncs.de
          link
          fedilink
          arrow-up
          1
          ·
          6 days ago

          No :(

  • FuglyDuck@lemmy.world
    link
    fedilink
    English
    arrow-up
    26
    ·
    6 days ago

    Opportunist… “It’s an empty glass. I drank it while you were arguing.”

    • jason@discuss.online
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 days ago

      Scientist… “it’s half empty because the water is slowly evaporating.”

  • BorgDrone@feddit.nl
    link
    fedilink
    arrow-up
    22
    ·
    6 days ago

    Engineer: this glass is twice as big as it needs to be.

    • saxrussell@slrpnk.net
      link
      fedilink
      arrow-up
      3
      ·
      6 days ago

      Ha, sorry just saw your post! 😆 Wise minds and such… 😉

    • Lovable Sidekick@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      - comedian Gallagher

    • XLE@piefed.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      deleted by creator

  • Racoonwithbenefits@lemmy.zip
    link
    fedilink
    arrow-up
    20
    ·
    6 days 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
      6
      ·
      6 days 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?

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

        IllegalStateException

  • UpperBroccoli@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    10
    ·
    6 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 {
    
  • RustySharp@programming.dev
    link
    fedilink
    arrow-up
    11
    ·
    6 days ago

    The current legacy code I’m dealing with is full of these:

    // TODO: Class description here to satisfy linter

    • Valmond@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      7
      ·
      6 days ago

      // I’m paid by the line

      • Jankatarch@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        5 days ago

        That sounds horribe, actually.

      • OwOarchist@pawb.social
        link
        fedilink
        English
        arrow-up
        4
        ·
        6 days ago
        """
        only one line for your comment?
        fucking amateur
        this comment uses five lines
        """
        
        • xthexder@l.sw0.com
          link
          fedilink
          arrow-up
          5
          ·
          6 days ago
          /*
           * this five line comment
           * is formatted C plus plus
           * and is a haiku
           */
          
          • Jerkface (any/all)@lemmy.ca
            link
            fedilink
            English
            arrow-up
            3
            ·
            6 days ago

            A haiku has to use elements of the natural world in a symbolic manner.

            • RustySharp@programming.dev
              link
              fedilink
              arrow-up
              3
              ·
              5 days ago

              elements of the natural world in a symbolic manner

              What about elements of HTML? It also has symbols.

            • xthexder@l.sw0.com
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              6 days 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
                2
                ·
                6 days 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. @[email protected] is being too harsh and speaking too absolutely here. A non-traditional haiku is still a haiku.

                – Your friendly neighborhood literature major.

      • staircase@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        6 days ago

        deleted by creator

    • one_old_coder@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 days ago

      Don’t you have stuff like // NOLINTNEXTLINE to explicitely disable some lints?

  • Snot Flickerman@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    11
    ·
    6 days ago
    // This is a Glass class
    class Glass {
         filled(halfFull,  halfEmpty) {
             this.halfFull;
             this.halfEmpty;
             }
    }
    
    • jaybone@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      6 days ago

      What the hell kind of glass is this?

      • cockmushroom@reddthat.com
        link
        fedilink
        arrow-up
        1
        ·
        13 hours ago

        Quantum, obviously

  • dan@upvote.au
    link
    fedilink
    arrow-up
    8
    ·
    6 days ago

    AI loves inserting comments like this.

    Either that or 20-line comments documenting the bugs in the old code, what this code does differently, and the exact implementation.

    Comments describing the exact implementation become stale very quickly. Comments shouldn’t explain what the code does (eg “add two to rowCount”); they should explain why it does it (eg “include header and footer row in count too”). Extra details are what the commit message is for, and history is what source control is for.

    I call it out in a lot of my code reviews (“code looks good but clean up the AI slop comments before landing”) but a lot of other developers don’t care as much about code and documentation quality.

    • partofthevoice@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      5 days ago

      deleted by creator

  • saxrussell@slrpnk.net
    link
    fedilink
    arrow-up
    6
    ·
    6 days ago

    Engineer: The glass is too big!

  • TheMightyCat@ani.social
    link
    fedilink
    arrow-up
    5
    ·
    6 days ago
    // This might be a glass
    Glass* glass = dynamic_cast<Glass*>(container);
    
  • printf("%s", name);@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    6
    ·
    6 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. 😊🥛

Programmer Humor@programming.dev

programmer_humor@programming.dev

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]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 551 users / day
  • 3.96K users / week
  • 7.69K users / month
  • 11.8K users / 6 months
  • 1 local subscriber
  • 32.6K subscribers
  • 608 Posts
  • 8.2K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.15
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org