Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
- When I need to explain a weird design decision
- When the code itself isn't straight forward and needs to be explained
- todos -
@alexbrooklyn yeah explaining weird design decisions so I will understand them in 6 months time
âīšâ -
- consumed api docs over each method [if docs change - methods will too]. I find this more useful than looking for docs online every time
- the WHYs that aren't and cannot be made obvious
- todos
- copyright
- if the code is to be shared - interfaces' methods. -
Most of times as a way to get over writers block. Pseudo code, and todos.
Later I remove most of them. -
Docs for future reference, todos, and when I'm bored/frustrated.
I usually mantain conversations with myself through time through comments, like:
@highlight
//maybe use that thing YEAH GOOD IDEA not anymore, that's gone -
Root797345yAnything that isn't immediately obvious, or that will help a future dev. Also, explanations of why, and sometimes section markers.
-
I comment pretty much everything, which might be excessive, but I want to make sure that the next person isn't left with too much spaghetti on their plate.
I keep my comments short and to the point, mainly to explain the algorithms as I write them in pieces.
Related Rants
How often and in which cases do you write comments in your code?
question
comments