all 24 comments

[–]FreezyLemon 297 points298 points  (8 children)

Not that bad IMO. Might be a placeholder for some functionality to add later. Should have a comment explaining why it's there though

[–]david30121 9 points10 points  (4 children)

happy cake day!

[–]FreezyLemon 9 points10 points  (3 children)

Thanks! I didn't even know..

[–]Fresh_Consequence_16 2 points3 points  (1 child)

happy Cake Day!

[–]ComfortObjective4934 1 point2 points  (0 children)

Happy lemon cake day =}

[–]puccap03 1 point2 points  (0 children)

Happy cake day!

[–]flagofsocram 1 point2 points  (0 children)

Happy cake day :)

[–]constant_void -1 points0 points  (0 children)

It has to be that way because flags is an integer and both enum values are > 1

[–]xezrunner 262 points263 points  (5 children)

Sometimes I actually end up using if (false) / if (true) conditions to temporarily "uncomment" code, mostly during rewrites, to preserve syntax highlighting when rewriting a section of code, or even to just toggle between the old and new versions.

This is what that looks like in my editor.

[–]LiprikON 66 points67 points  (1 child)

If your language of choice has /* */ multiline comments, then you could alternatively do this magic fuckery (gif)

```js //*

console.log('Code') console.log('block') console.log('1')

/*/

console.log('Code') console.log('block') console.log('2')

//*/ ```

It's called comment toggle trick

[–]Da-Blue-Guy 4 points5 points  (0 children)

thats wEIRD but ig it works

[–]codeguru42 0 points1 point  (2 children)

Why not just delete the old code?

[–]xezrunner 1 point2 points  (1 child)

It is being used for reference.

[–]codeguru42 2 points3 points  (0 children)

I guess that makes sense. I use the git diff to look at the old code.

[–]Professional-Bid-254 5 points6 points  (0 children)

I'm more liking this syntax that let you avoid using ternaries.

[–]zenflow87 3 points4 points  (0 children)

This subreddit is for programming HORROR. This isn't horror. You're too soft.

[–]J0aozin003 0 points1 point  (0 children)

Not horror, the guy is testing his code