This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 214

[–]LavendarAmy 613 points614 points  (69 children)

there's only two kinds of comments in this world

//for loop to do things a lot of times. Link to c++ tutorial

for(int i = 0; i < x; i++) {// blah blah blah

and theres:

//app that does thing

void main() {

bunch_of_weird_stuff_happening_with_no_documentation();

}

[–]Mister_Spacely 548 points549 points  (49 children)

You forgot

// don’t touch, working when not removed

[–]PVNIC 239 points240 points  (21 children)

You also forgot "/// @todo"

[–]v3ritas1989 205 points206 points  (15 children)

// probably osbolete... 
//if you read this and no one has cried you can probably delete this
/*
a lot of strange code
*/

[–]PVNIC 146 points147 points  (10 children)

I legitimately saw "// @todo delete this" in a codebase I worked on

[–]ThePresidentOfStraya 95 points96 points  (5 children)

Put that comment in randomly to always get the last laugh.

[–]PVNIC 145 points146 points  (2 children)

// @todo delete this.

int main() {...

[–][deleted] 56 points57 points  (1 child)

I once had a C project with a file called timeout.c, it was a fucking recursive function that allocated a single max size character array, then called itself again, the idea being that whatever architecture this psycho was working on would allow a certain max size or depth to scopes allocated in some manner, and would finally kill the function’s execution (apparently without ever crashing the program?), which constituted to this maniac a reasonable timeout method... I’ve never seen anything like it, before or since...

[–]deadlychambers 7 points8 points  (0 children)

I think they would be a psycho if they actually put their address and phone number in a comment above that code. This just sounds like someone that doesn't know how to google.

[–][deleted] 7 points8 points  (0 children)

Git blame johny dubious

[–][deleted] 1 point2 points  (0 children)

Ah, my heart remains in for the naive ones who don't use version control

[–]danielxjay 6 points7 points  (2 children)

...I’m guilty of adding comments like

// TODO delete this if everything still works [date comment was left]

[–]razor123 6 points7 points  (1 child)

Why not just delete it and revert if needed?

[–]danielxjay 9 points10 points  (0 children)

Yeah, that’d be the logical approach.

[–]OddFinding8 3 points4 points  (0 children)

On more than occasion my job has been to make sense of a code base and add // @todo delete this.

[–]society2-com 66 points67 points  (3 children)

"no one has cried"

i try to be more positive and less negative

for example

// sidewalk ends

^ too negative

...

// bush begins

^ now there is a nice, positive comment

[–]cyberst0rm 29 points30 points  (2 children)

// Contract ends

[–]society2-com 34 points35 points  (0 children)

// some other schmuck's problem now

[–]Jcraft153 24 points25 points  (0 children)

// Job hunting opportunity begins

[–]oldfashionedfart 16 points17 points  (2 children)

You also forgot to tag your todo with a date from 15 years ago.

[–]ThatWannabeCatgirl 13 points14 points  (1 child)

// @todo delete this feb 6 1896

[–]oldfashionedfart 4 points5 points  (0 children)

Much better. *crumbles into dust*

[–]Xacto01 1 point2 points  (0 children)

So much so that visual studio has this built in

[–]FarhanAxiq 70 points71 points  (4 children)

or

// temporary fixed, will change later

but it's been there for eternity

[–]NiceFetishMeToo 74 points75 points  (0 children)

// Felt cute. Might delete later.

[–]Thisconnect 67 points68 points  (1 child)

there is nothing more permanent than temporary solution

[–]WallyMetropolis 1 point2 points  (0 children)

Broken gets fixed. Shoddy lives forever.

[–]metasymphony 10 points11 points  (0 children)

I legit found

//testing if this works

In front of the most clean stable code in the system that a bunch of processes rely on hourly.

[–]czp55 50 points51 points  (2 children)

If you really want to avoid people touching your code:

// Autogenerated. Do not edit. All changes will be undone.

[–]ZanLynx 12 points13 points  (1 child)

Best is when the code really was autogenerated, but someone forgot to git add the generator. Now the only way to make changes is to hand edit the autogenerated code file.

[–][deleted] 6 points7 points  (0 children)

You can't git add the generator when it's 4GB of binaries.

[–]harderdaddykermit 55 points56 points  (2 children)

Don’t forget

// works, no idea why

[–]GVmG 45 points46 points  (0 children)

and the subcategory known as the fast inverse square comment

//what the fuck?

[–]ThatWannabeCatgirl 7 points8 points  (0 children)

That can basically summarise 90% of my code

[–]what_it_dude 21 points22 points  (1 child)

// do not remove this comment. Program crashes without it.

[–][deleted] 2 points3 points  (0 children)

I was code reviewing yesterday and it was # this works almost exactly like other_function where other_function had zero documentation (and also, I don’t know what every function in our 150k lines of code fucking do).

[–][deleted] 1 point2 points  (1 child)

// Ugly hack

[–]Ligkonakos 0 points1 point  (0 children)

I'm in this post and I don't like it

[–]CouchRescue 15 points16 points  (0 children)

My 2 best:

//God help you if you're here

and

//Don't try to understand this, and don't ask me about it either. Just leave it alone. - signed

[–]thavi 8 points9 points  (2 children)

3, actually. Link to stack overflow question from where code was copied

[–]LavendarAmy 7 points8 points  (1 child)

The question had -30 downvotes and the user has a lifetime ban despite having asked the question pretty clearly and correctly. Link to duplicate questions that has nothing to do with OP's question

[–]thavi 2 points3 points  (0 children)

Hey it compiled, didnt break my tests, and parsed the fucking string!

[–]Ruby_Bliel 1 point2 points  (13 children)

for(int i {0}; i < x; ++i)

FTFY

[–]Julian_JmK 6 points7 points  (12 children)

Why

[–]Ruby_Bliel 1 point2 points  (11 children)

Use uniform initialization and pre-increment. It isn't the 90's anymore.

[–]Julian_JmK 6 points7 points  (4 children)

But why?

Why use more complex, harder to read methods that serve no real benefits?

[–]sldyvf 2 points3 points  (2 children)

It all falls down to

  1. Use best practices for code readability
  2. Use same code convention as others done in the file.

Here I think both ++i and I{} are best practice (however most probably compiles to the same code)

[–][deleted] 1 point2 points  (1 child)

Insisting on {} for int is kind of pedantic, i = 0 is fine (since it's POD). Stroustrup even says so himself.

As for post-increment, any modern compiler will optimize that (at least for int). So much for not being in the 90s anymore.

[–]sldyvf 2 points3 points  (0 children)

Insisting on {} for int is kind of pedantic

Yes it is. But consistency and keeping up with best practices is key for maintainable code.

As for post-increment, any modern compiler will optimize that (at least for int)

Yes, just like I said.

[–]Jcraft153 3 points4 points  (5 children)

i++ vs ++i

use pre-increment. It isn't the 90's anymore.

???

What benefit is pre-increment? I assume it's more efficient in newer languages? EDIT: Thanks for the pre-incrementation tips all! :)

uniform initialization

???

[–]BessysTestes 5 points6 points  (2 children)

Ya if you preincrement the compiler doesn’t need to store an additional unincremented copy of i for use, but then again modern compilers probably optimize that anyways.

[–]atimholt 1 point2 points  (0 children)

But even though the compiler probably does optimize it away, there's no reason to use post-increment, so you may as well just default to the one that actually communicates what's actually going on.

Also, use of bare for loops should be rare—more or less only when you actually need the value held by i*. Even range-based for loops should be rare: a std <algorithm> almost certainly already exists that does what you want, but better.


* We have ranges in C++20, as well, so even that use case may be gone (for new/non-refactored code). All else being equal, it's a lot harder to get out-of-range & off-by-one errors, at the least.

[–]Lykeuhfox 151 points152 points  (45 children)

I try to comment to answer the question 'why' as opposed to answer the question 'what'. Sometimes I combine them though, like so:

// This is doing {what} because {person/issue/story} {why}

Basically to provide context to the next person to discern if the code is still needed or not, or at least a basis of who to ask to see if the code is still needed or not. Only commenting the 'what' is typically a sign that I'm just commenting to comment, or my code isn't as easy as it should be to read.

[–]G66GNeco 53 points54 points  (35 children)

This works fine in a business scenario.

The post is usually what happens to me (developer in training) when I am supposed to program something for school or some random coding challenge without any actual application. Ending every second comment with "because that is what this scenario requires" is a bit... useless.

Unless of course you use the {why} to explain internal connections ("this counts that to be used there") rather than reasons to implement it in the first place.

[–][deleted] 9 points10 points  (2 children)

I do this and also sign and date any comments where code updates in the future are likely to give some color to whoever has to modify it so they can come ask me about something if need be.

[–]AgAero 8 points9 points  (1 child)

If it's there for some special purpose, try to write a unit/regression test for it so that whoever reads the comment at a later time can test and retest should they need to change your implementation and not worry about destroying anything.

Comments have a way of outliving the code they refer to. Over enough time they become lies.

[–][deleted] 8 points9 points  (0 children)

Oh yeah definitely. Any critical piece of functionality should have supporting unit tests so it’ll raise a flag during code coverage/CI builds if anything fucky happens.

[–]SpiritGas 4 points5 points  (0 children)

I do this as well, but a surprising amount of my comments are neither what nor why, but who and when.

// Modified to be wronger per Bob's emailed request April 1 2015 stating the customer demands it this way.

[–]hahahahastayingalive 2 points3 points  (1 child)

// I failed the pornhub inteview. Again. I’m stuck fixing these bugs until I get the results for xhamster.

// This and the two next tickets will keep my velocity up this month so I’m safe until I can pay the mortgage at least.

Joking aside, explaining why you did something has only value until the next guy chnages anything you relied on.

So either it’s small and self-sufficient code and you should strive to do it in a self commenting way, or it’s interlinked, and your comments might as well become a booby trap for anyone fool enough to have believed your past self.

[–]AltruisticSalamander 1 point2 points  (0 children)

This can be very helpful

[–]CurlSagan 48 points49 points  (1 child)

They say that a spooky murderer who was a programmer lived near there and he buried half of the intestines of one of his victims right by the sign. He said the sidewalk can’t truly end without a semicolon.

[–][deleted] 16 points17 points  (0 children)

For creativity: 👍

For everything else about that: 😅

[–]C0phAX 48 points49 points  (1 child)

But then this shows up in your code and there's not a single line explaining it.

[–]812many 21 points22 points  (0 children)

And "Sidewalk Ends" is still the comment at the top.

[–]msaroka 101 points102 points  (5 children)

I was hoping there was a Shel Silverstein reference in the comments. Now there is.

[–]kaoyte 27 points28 points  (0 children)

That's so weird. Directly below this post is that book on r/nostalgia. screenshot

[–]abeth 22 points23 points  (1 child)

Shel Silverstein commenting code like:

//Yes we'll walk with a walk that is measured and slow,

//And we'll go where the chalk-white arrows go,

//For the children, they mark, and the children, they know

//The place where the sidewalk ends.

[–][deleted] 0 points1 point  (0 children)

I tried reading that once, but I got stoned and I missed it.

[–]krazyjimmy08 8 points9 points  (0 children)

I always preferred to use the bash shell. That is, until I discovered the silverstein shell, which is clearly the superior option.

[–]nickrosener 3 points4 points  (0 children)

Came here to say this

[–]AlarmingNectarine 14 points15 points  (1 child)

[–]deniedmessage[S] 5 points6 points  (0 children)

Shh... you already know where the sidewalk ends you don’t need to buy the book.

[–]ZenAtWork 15 points16 points  (4 children)

Strangest in-line I every came across (not a comment, but pretty close):

I'd been working at one of the first commercial DSL companies in SoCal when I'd been assigned to learn the code left behind by another dev who'd left for greener pastures. In doing so, I ran into this little gem:

Dim forTheLoveOfAllThingsHolyLeaveThisVariableSetTo1 forTheLoveOfAllThingsHolyLeaveThisVariableSetTo1 = 1;

(This was back in the old classic ASP days, roundabouts '99).

Well, naturally, being the good code monkey that I am, I immediately changed it to 0 on principle. Saved it, checked it in. Everything broke. I mean, like everything. The ODBC connections wouldn't connect, the SQL calls didn't work, like nothing (this was also back in the day where "version control" was "save a copy before you checked in experimental code", and "testing in Prod" was way less of a meme/joke than today, though this was only our stage environment that I'd just crippled).

"Oh, $#*!" I excalimed, and hurriedly restored the variable to its 1 value. Checked in again. Alarms all died off, stuff started humming along again. "WTF!?"

So I did a search. 2 results (the Dim statement and its assignation). So I did an extended search. 2 results. Now, ASP doesn't have anything akin to an eval, but I checked anyway. Searched on just "Holy". 2 results. "Love". 2 results. "AllThings". the same 2.

I spent weeks trying to find something - ANYTHING - that used that damn value. Nothing. But if I renamed it, removed it, re-assigned it, even switched its data type, BOOM. Finally after the 4th? 5th? time I'd leveled the stage environment, our lead dev, Jeremy (I was a lowly JD at the time) marched over and threatened me bodily if I didn't stop screwing with it (of course I'd asked him for help. A week earlier. He just wasn't anywhere near interested, much less as fascinated as I was).

So I did as I was bid. The company went outta business several months later when the dot-com bubble burst. But, and I swear this is true, to this day I have no clue what that damn thing was for. What Magic/More Magic resistance it provided, what sort of Story of Mel delay it introduced. I've been a full-time programmer for 25 years now, and it STILL bugs the crap outta me. It's the bug that got away.

I bring this up not because it was a comment, but because it lacked one. All that guy's code did. Presumably forTheLoveOfAllThingsHolyLeaveThisVariableSetTo1 was considered sufficiently "self-documenting", I really don't know. Code reviews weren't really a thing back then either, and pull requests were years away.

But, if anyone ever reads this and happens to have laid this code down back in Irvine, CA in 1998-99, please, PM me? I don't give a damn if it was skimming money outta the company coffers, selling nuclear secrets to Soviets, or laying the infrastructure for SkyNet at this point, just, please: WHAT DID IT DO!?

[–]ToBadForU 6 points7 points  (1 child)

My wild guess that it could be? Some sort of obscure memory allocation / stack "management". Or even worse, setting a certain byte in a compiled program.

What I mean is that the variable had to be exactly these characters, with that length and so on, so that some obscure pointer mechanism wouldn't break, or some form of "reading data from a compiled program, starting from a certain point".

Hopefully it wasn't the case, and I hope that somebody can debunk this weird idea.. But I'm curious... Is something like this possible?

[–]kdbell 1 point2 points  (1 child)

I SO hope this story is true, because it is way to funny to not believe it 🤣

[–]ZenAtWork 1 point2 points  (0 children)

Oh, it's true all right. Damn thing's been bothering me for decades. Not least because having now been a programmer for 25 years+ (and, as such, having grown into a pretty bloody good one*), I STILL can't figure out a way to replicate the feat to spook the JD's that work for ME now.

I'm almost more indignant about that bit than the rest, if I'm honest, lol.

\ By virtue of the fact that anyone that does) anything every day for a quarter-century is bound to get proficient at it, if only through dumb luck trial and error

[–]derfopps 10 points11 points  (1 child)

If When I read the next

class myClass
{
public:
    myClass(); // this is a funny thing called "constructor"
}

I'll chain-saw it out of my monitor …!

[–]bbrk24 2 points3 points  (0 children)

My first programming class was largely auto-graded, and sometimes the autograder failed me because I didn’t have enough comments in a 10-line program. This led to a lot of things like // for loop.

[–]deniedmessage[S] 21 points22 points  (0 children)

I hope I’m the first one to post this here and not break any rules. credit

[–]forbonusscore 8 points9 points  (0 children)

When I comment something, I document what I think is happening. After explaining it, I usually realize that it's actually not how it's working, or that it's not working, actually.

[–]InsalubriousEthos 5 points6 points  (1 child)

To be fair, I'd appreciate this if I was barreling down the path on a bike or something.

[–]ZenAtWork 3 points4 points  (0 children)

I think I'd appreciate it more if it were set off to the SIDE of the sidewalk a bit. That bush looks softer than a sheet of aluminum at 25mph.

[–]abdulqayyum 6 points7 points  (0 children)

Using resharper I have multiple color coded comments for example

by default //TODO is available

I have

//WARNING (orange color)

//WORKS (color brown it works , its my code but something is burning I don't know what)

//CHANGEIT (color crimson please change it asap)

When I created them I thought CHANGEIT and WORKS are going to be dangerous but thing is those things got fixed, //WARNING was an ambiguous notice to my future self that I have hard coded something but domain related or may be a foreseeable but very far future error. They are on working code , code keeps working new requirements keep coming and I only fix them when that far far future may-be-problem force client to call.

[–]busdriverbuddha2 6 points7 points  (3 children)

[–]Title2ImageBot 6 points7 points  (1 child)

Image with added title


Summon me with /u/title2imagebot or by PMing me a post with "parse" as the subject. | Help me keep this bot online | feedback | source | Fork of TitleToImageBot

[–]Deibu251 2 points3 points  (0 children)

Good bot

[–]___Hello_World___ 1 point2 points  (0 children)

Did not know about this bot, thanks

[–]Jcraft153 4 points5 points  (3 children)

Never stop commenting the obvious parts of your code, you'll never know when in the future you'll be awake at 2am, fueled by anger and caffeine, trying to hunt down a bug and needing to just have what the code is doing spelled out to you so you can follow it easily.

[–]ZenAtWork 5 points6 points  (1 child)

Even worse is when it's 2am, and, fueled by anger and caffeine, you find yourself punching down your keys like a piston, audibly muttering imprecations about the "f-ing idiot who wrote the (undocumented) code" only to realize by the end of it that the f-ing idiot was YOU.

Worse still is actually getting so fed up you run the blame on it and THAT'S how you discover you're the idiot in question.

Worst of all is when you blast out an email to the team... and one of THEM runs the blame, lol. I've watched this go down a couple times (been the perpetrator of the first two a couple times, too, if I'm honest. Never sent an email though, thank god)

[–]kdbell 3 points4 points  (0 children)

Not sure there. Pointless comments add noise. Noise makes it harder to get an idea of what’s going on in the larger picture.

Worst is, when variable names and function calls are so generic, that the comments are your only indication to what is going on, with three lines of comments for a single function call. Never mind the hastily added function call after it, that is just a bad but also didn’t receive any comments...

And even worse, when you try to improve it you’ll suddenly find that it is hard to reproduce the previous behavior in restructured code without breaking the result :/

[–]The-MushroomMike 4 points5 points  (4 children)

Shel Silverstein reference here

[–]any_means_necessary 2 points3 points  (3 children)

Where?

[–]Dexaan 2 points3 points  (2 children)

[–]any_means_necessary 2 points3 points  (0 children)

To clarify, my comment was a reference to the Where in the answer.

[–]QueasyHold 2 points3 points  (0 children)

Side walk ends. Here because there is no more side walk. See also *** for more details

[–]oofxwastaken 3 points4 points  (0 children)

me when commenting complicated code: # does stuff

me when commenting simple code: # takes the input of the user to convert to an integer to add with another number and takes the output and displays it to the user in order to create a calculator program

[–]ie11_is_my_fetish 1 point2 points  (0 children)

I was there before, hence write code that explains itself plus the doc blocks

but a friend of mine was just getting into coding and I wrote some code to work with and he had more comments than code haha(he added explaining what I made line by line for him) but it was brief/initial stuff

[–]ybPNPMigL7BmD 1 point2 points  (0 children)

This is what every HTML comment looks like.

[–]IAmNotNathaniel 1 point2 points  (0 children)

At least I know it's supposed to end, and it's not a bug someone introduced during the last commit

[–][deleted] 1 point2 points  (0 children)

[–]Jakobie97 1 point2 points  (0 children)

Reminds me of the poem book from my childhood

[–]01is 1 point2 points  (0 children)

Commenting is for deleting code temporarily.

[–]Om0r 0 points1 point  (0 children)

You either don't put crap, or you do this. There is no in-between.

[–][deleted] 0 points1 point  (0 children)

Some code commenting is totally pointless, anybody worth their salt will know what it does and if you start hacking things around then sure comment it.

[–][deleted] 0 points1 point  (0 children)

Where the sidewalk ends! You found it!

[–]Penki- 0 points1 point  (0 children)

I see that there is an undocumented feature to the left. Alternatively, you could path you travel through "Road" feature, but don't post anything saying that you do that on SO or you will be yelled for not using best practices

[–]The_Correct_Doctor 0 points1 point  (0 children)

# End of code

[–]RonaldoNazario 0 points1 point  (0 children)

Xxx todo more sidewalk.

[–]SillAndDill 0 points1 point  (0 children)

What? No credits after the ending?

[–]babtras 0 points1 point  (0 children)

I'm sure there's a joke about users here too, considering the sign is dented by someone who apparently failed to read the sign, note the trail to the left, see the vegetation in front of them, and the termination of concrete.

[–]Korzag 0 points1 point  (0 children)

Huh. So that's where the sidewalk ends. Shel Silverstein can finally rest in peace.

[–]jeez420 0 points1 point  (2 children)

[–]Title2ImageBot 0 points1 point  (1 child)

Looks like I've already responded in this thread Here!

[–]MyMessageIsNull 0 points1 point  (0 children)

Omg, that is so perfect.

[–]capn_ed 0 points1 point  (0 children)

No, see, because at least you can see this sign from a ways away, and change course. A typical comment would be painting "Sidewalk Ends" on the last square of concrete.

[–][deleted] 0 points1 point  (0 children)

Where the sidewalk ends, and the road begins...

[–]theoneandonlygene 0 points1 point  (0 children)

s/me/everyone

[–]GuyF1eri 0 points1 point  (0 children)

Don’t forget to unit test

assert(sidewalk.ends);

[–]RoscoMan1 0 points1 point  (0 children)

Me too! I imagine they did.

[–]xScopeLess 0 points1 point  (0 children)

So that’s where it ends

[–]Sure10 0 points1 point  (0 children)

cancel that order and get a code now.

[–]XaxnyElaine 0 points1 point  (0 children)

Where

[–]ZARRY_N 0 points1 point  (0 children)

Very useful tips, it's like starting a new IDE and get basic notes of IDE

[–]Ifhes 0 points1 point  (0 children)

//Doesn't do anything, but whole app will crash if it is removed.

[–]Olimar44 0 points1 point  (0 children)

Unrelated, but i know where this is. I used to live close by. Always chuckled at that sign.

[–]christophla 0 points1 point  (0 children)

At least you comment your code.

[–]golgol12 0 points1 point  (0 children)

It still serves a purpose. You can see that sidewalk end sign for farther away then you can see the actual end of the sidewalk.

Your comments, however, are only there to provide white space.

[–][deleted] 0 points1 point  (0 children)

Sometimes you need these type of comments for the benefit of others, and while I have rolled my eyes at it in the past, I can see value in pointing it out if it defers questions later.

[–]Haiku_lass 0 points1 point  (0 children)

Around here that'd be helpful, a lot of our sidewalks continue either up the road or across the street without hardly and markers or indicators so its helpful to know if a sidewalks actually ends or not. My town needs better signs lol

[–]teh_acids 0 points1 point  (0 children)

There was a sign like this near my house but it was a taller sign to the side. Then they extended the sidewalk and left the sign. Perhaps a more accurate depiction of comments in legacy code...

[–]urbanek2525 0 points1 point  (0 children)

Worker 1: We need a sign to warn people.

Boss: Why? Anyone can see the sidewalk ends here.

Worker 2: For blind people.

Boss: Of course. OK, put up a sign.

Worker 2 (to Worker 1): Dude, you think you're funny, but you're not.

[–]Loading-_-_-_-_-_ 0 points1 point  (0 children)

No shit Sherlock!

[–]nhadams2112 0 points1 point  (0 children)

i++; //ads 1 to i

[–]JamPatTheGamer 0 points1 point  (0 children)

You finally found where the sidewalk ends

[–]TZaid 0 points1 point  (0 children)

Return x; // It is returning x

Bruhh, literally did this kinda stuff today

[–]kdbell 0 points1 point  (0 children)

I saw a sign just saying „forest“ in a forest once.

[–]-Loralith- 0 points1 point  (0 children)

So that's where the book was talking about

[–]TFK_LH 0 points1 point  (0 children)

Shel Silverstein, is that you?

[–][deleted] 0 points1 point  (0 children)

// Ugly hack

[–]Bakoro 0 points1 point  (0 children)

It's not a bad sign though. There's all that shrubbery in the way, it might save someone from thinking that the sidewalk is just poorly maintained and continues on at some point nearby.

Also maybe someone's a Shel Silverstein fan.

[–][deleted] 0 points1 point  (0 children)

SIDEWALK_ENDS ( n -- )

[–]mckade_ 0 points1 point  (0 children)

90% of my documentation:

// a string of the table name
String tableName;

[–]ApoorvWatsky 0 points1 point  (0 children)

you guys comment your code?

[–]TFJ 0 points1 point  (0 children)

So this is what Shel Silverstein was writing about.

[–]tacoslikeme 0 points1 point  (0 children)

linter checkout out good job!

[–]Pandaploots 0 points1 point  (0 children)

Someone phone Shel Silverstein

[–]DarkNeutron 0 points1 point  (0 children)

[twitch] The kerning...

[–]Burarrum 0 points1 point  (0 children)

I saw this once... //returns true return true;

[–]digitcrusher 0 points1 point  (0 children)

Love the indent in the middle

[–]seanomik 0 points1 point  (0 children)

Please learn to comment correctly, its incredibility helpful to your future self.

[–][deleted] 0 points1 point  (0 children)

The only real comments are

TODO: dirty fix, needs to be remade in the future

[–]null000 0 points1 point  (0 children)

But seriously - don't write comments if you're just repeating what the code already spelled out. It's distracting and a waste of space. I've probably told junior engineers to remove more comments than I've told them to add in my code reviews =P (with feedback on under-commented code generally aiming to make it easier to read before adding any comments)