r/shittyprogramming • u/Monkey_Adventures • Jul 10 '20
I've been excessively commenting my code since 1970 but this is the best use of code commenting i've ever seen
https://gfycat.com/fancyexcitableindusriverdolphin
792
Upvotes
16
u/haroldjaap Jul 10 '20
Both should equal to true tbf
84
u/aflongkong Jul 10 '20
HEY, NO BIG BRAIN PLAYS HERE IN SHITTY PROGRAMMING
43
u/AltSk0P Jul 10 '20
I'm gonna have to remember this lmao
64
u/Deibu251 Jul 10 '20
This is the next level of making comments!
24
u/sim642 Jul 11 '20
Poor man's preprocessor conditional toggle
25
u/ruggfrancesco Jul 10 '20
When comments became Turing complete
8
u/jarfil Jul 11 '20 edited May 13 '21
CENSORED
7
u/UberLambda Jul 11 '20
#ifdefgo brrr5
u/[deleted] Jul 11 '20 edited Jul 11 '20
This is an old trick I used to use when I wrote code in N++.
Today I just ctrl+/ in VSC.
4
u/lucidspoon Jul 11 '20
"I heard you like comments, so I commented your comment."
4
u/usr_pls Jul 11 '20
My professor showed this to me duting a game jam about a decade ago. He called it a Toggle Comment and i loved how elegant it was to test two changes.
implementing it in industry? if it takes over an hour to compile, this neat little trick does not save you time, but it at least gives a good toggle point for "this code is fucked but will be needed to be fixed" vs "the shit that currently works"
2
u/wizzwizz4 Jul 11 '20
Direct video link: https://thumbs.gfycat.com/FancyExcitableIndusriverdolphin-mobile.mp4
1
u/[deleted] Jul 11 '20
I've seen that trick before and I honestly think it's confusing.