Brutal honesty -
How many of you can genuinely read your code 6 months later and make use of it?
Hard mode: read it six months later and immediately start adding to it
If so: which language do you use and how comment dense is your stuff?
>>59123569
Make use of it? Yes.
Immediately start adding to it? No, that would take a few minutes to get my shit together and figure out what I was doing. Not more than 15 minutes though.
The language is SQL - which is also why I can do it. You don't define your own behavior in SQL, so everything you see comes from a pretty limited set of possible key words and the structure is the same every time, although maybe nested inside itself. Figuring out what I was thinking is then just a matter of seeing what each subquery produces, what the whole query produces, what the tables being used look like and what's calling the query. Queries tend to not be more than a few hundred lines at most, so yea... pick it back up in a few minutes.
Zero comments usually.
Yes to both. I use AutoIt as my primary language. I comment everything that isn't brain-dead obvious specifically for this reason.
I don't comment anything when I come back to see my code after not looking at it for a while I often see straightaway improvements I can make to it
>>59123569
thanks for this thread OP I always thought I was just retarded
not that I'm not
>>59123569
best way to comment your code
>write code
>don't look at it for 6+ months
>add comments as you figure out how it works
I use Ada and I can read code from 1984 and immediately start adding to it without problems.
Yes to both, but only because of how autistically detailed my comments are. I'd estimated that 70% of the text in all of my programming is comments and notes.
>>59123569
I use the comment feature so I know what is going on.
>>59123851
Same.
>>59123874
This too.
>>59123569
Yes to both, if you can't read your own code you fucked up. As for comments, I just comment whenever what I'm doing isn't immediately obvious through variable/method names. Once in a while I tell a little joke to lighten the mood.
I can read and add to my code years later and I barely use comments because I'm not a fucking idiot
>>59123569
six months is nothing when you've worked on the same thing for four years
going back to work on "old" stuff is pretty common in my job
we use c++14 and don't make a lot of comments (and don't need them, we're kinda obsessive about readability and cleanliness)