Cursing adds nothing to the code. "// Stupid fucking hack" is worse than "stupid hack" (more characters while conveying no extra information) and much worse than "work around Lotus 123 leap year calculation bug"
Cursing adds nothing to the code. "// Stupid fucking hack" is worse than "stupid hack" (more characters while conveying no extra information) and much worse than "work around Lotus 123 leap year calculation bug"
//hack = I have found a way around the problem that was probably necessary to use and could even be arguably clever under the circumstances where a hack is required Example: When I suggested using data uri as source of iframe to get around domain security restrictions in FF and still allow you to click on links and scroll in iframe which using about: uri scheme did not (long story involving national security and identity platforms)
//stupid hack = somewhat ugly thing I am doing to somewhat solve problem because I am perhaps not clever enough to think my way to solution at this time. Example - when I set the center of the map to be a couple decimal points of latitude off from where the address actually was because the designer wanted the address to be not in the center of the map, because then it would be covered by the search box, but slightly above the search box. Stupid because I bet there was another way to do it, also stupid because it was not exact and so we did not know exactly where the address was going to be drawn in relation to the search box, but we knew pretty closely where and that was good enough.
//stupid fucking hack = ugly thing I am doing that must be done to get around problems even though as well as being ugly it is also less than optimal in multiple ways, requirement for this hack caused by third party who have screwed us over by their very existence which makes me incredibly angry Example: put span around any text node inside of an element rendered by React using a Ref to get around the Google translate bug and similar problems.
Your definitions are entirely arbitrary and certainly not even remotely universally understood.
I'd much rather a comment that succinctly but thoroughly describes what is going on and why a hack is necessary.
they are contextual expressions often emphasizing an abstract though equally shared reality -- emotional states. sorta like how "doch" functions in german sometimes. and i definitely will debate it being universally understood semantics, esp for native english speakers.
do you know many people who interpret the emotional weight of "that's fucking stupid" versus "that's stupid" as the same?
anecdotally everyone in my worldview would react differently to both, and further reactions will depend largely on how it is said -- not because of some ambiguous meaning collectively (mis)understood.
i have always found people who want to wipe clean the slate of language and all its slang and "offensive" words in favor of established definitions and order -- contextually or otherwise -- often lack a lot of emotional expression in their correspondence.
people emote. physically and verbally. and we have all kinds of mechanics to capture the nuances in contextual languages -- slang is one of the best features, and the nuances can run super deep, nuances a lot of formal writing or correspondence can lose in its rigor and strictness. especially not withstanding cadence and emotion.
youre going to have vastly different experience reading stevenson and then say twain, for example. even speaking it aloud -- but i encourage you to spot a common denominator.
their dialogue often reflects the character, the context, and the emotional state, and largely not formal. and there's a heft amount of literature that utilizes formal writing in its dialogue, and one of the first things lost in the narrative is cohesion, and therefore immersion, bc that's not how most people speak -- only a distinct subset talks like that culturally and even then it is still not totally real life.
humans are very rarely strictly formal in correspondence in practice -- we only established professional dialogue as a norm to separate the haves from the have-nots, and then made it a moral high-ground to keep the "peasants" in line.
express yourselves. say what you mean. stop letting people convince you that you should be scared of saying something like "that's fucking stupid" bc it means more for you to say "that's stupid" for the sake of arbitrary professional standards.
you're right, nobody that has ever written "stupid fucking hack" has ever followed that preamble with a description of why it was necessary.
There's degrees of hackyness. Tone and emphasis are important parst of clear and effective communication.
Something that's a mere "hack" might be something I don't mind, but worth being aware of and revisiting if and when the code becomes more complicated and has to do more things.
A "stupid fucking hack" indicates something that could have only come about by a whole chain of stupidity and mistakes, inflicting brain damage that we're now stuck with, to great anguish and misery.
Those things are important to highlight, if only as lessons in what not to do.
I don't agree. If I saw "stupid fucking hack" in a comment, I don't think I'd necessarily view that as a worse hack than if it just said "stupid hack". My main assumption would be that the author was in a bad mood or was feeling cheeky or something like that.
In fact, if I was reviewing a code change with "stupid fucking hack" or "stupid hack" in it, I'd ask the author to remove it and actually explain what was going on. Comments should detail the "why", not the "what". "Stupid hack" is the "what", but I want to know why the hack is necessary.
Then write that, none of that information is conveyed otherwise
And yet
Similarly, "stupid hack" adds nothing that just "hack" doesn't say. And in that case, why have a comment at all? The code is likely obviously hacky.
At least I can have a laugh while looking at the hack someone came up with...
I contend there is a significant difference between a stupid hack, and a better one. The negative adjective is meaningful in the comment.
Meaningful, perhaps, but not at all precise enough to be understood by everyone who might read your code in the future. Many people will understand the difference between "hack" (or even "clever hack") and "stupid hack" in a variety of different ways, many of them not in the way you intended.
When I was in my 20s I would write comments like that, but now what I'm in my 40s I see them as entirely useless, aside from a way for the author to blow off steam. Code that others have to read is not the place for that.
Adds some humanity and soul to it.