Capacity = 0.5
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
Senior engineer: the glass is self documenting.
It’s not a glass, it’s the
hydrationContainerManagerObjectFactory
Not to be confused with the
hydrationContainerManagerTypeFactory
Which is the template
you mean
glass Glass;which is almost worse than stringing together random fancy words.
(Edit: added backticks for that nice mono font)
You forgot the AbstractHydrationManager
Do developers still code in such a manner?
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.
/** * @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 {Unless it is in a vacuum, the glass is full.
50% water, 50% gas mixture.
Topologist: The glass is full of glass. Everything else is on the outside.
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
no, I actually wanted it empty
If it were a vacuum the water would quickly boil away with any remaining turning to ice.
It wouldn’t freeze unless you drop the temperature as well.
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.
Who are you who are so wise in the ways of science?
Just some jerkface.
Username checks out
//don’t remove this comment or else
Load bearing comment
//what if I remove this comment and else?
//Then line 368 that checks if the comment exists will fail and will be sad
No :(
Birb: How the fuck is water doing that °v°
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 rainsAnd in 5 years you will wonder why the glass is under the rain because someone didn’t put that in the specifications.
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.
Inevitably whatever is under the glass gets wet anyway… because it’s raining.
// This might be a glass Glass* glass = dynamic_cast<Glass*>(container);Engineer: this glass is twice as big as it needs to be.
- comedian Gallagher
deleted by creator
Opportunist… “It’s an empty glass. I drank it while you were arguing.”
Scientist… “it’s half empty because the water is slowly evaporating.”
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
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?
IllegalStateException
The current legacy code I’m dealing with is full of these:
// TODO: Class description here to satisfy linter// I’m paid by the line
That sounds horribe, actually.
deleted by creator
""" only one line for your comment? fucking amateur this comment uses five lines """/* * this five line comment * is formatted C plus plus * and is a haiku */A haiku has to use elements of the natural world in a symbolic manner.
elements of the natural world in a symbolic manner
What about elements of HTML? It also has symbols.
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
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.
Don’t you have stuff like
// NOLINTNEXTLINEto explicitely disable some lints?
// This is a Glass class class Glass { filled(halfFull, halfEmpty) { this.halfFull; this.halfEmpty; } }What the hell kind of glass is this?














