Timeline for What is a good way to comment if-else-clauses? [closed]
Current License: CC BY-SA 3.0
22 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 28, 2014 at 13:05 | comment | added | acme | As a (late) note to some comments: this question was about "How should I comment a if/else block if I need to" and not "Should I write comments instead of readable code". | |
| Apr 10, 2012 at 6:51 | vote | accept | acme | ||
| Apr 8, 2012 at 23:16 | comment | added | kba | Comments aren't meant for explaining what your code does, but why. The code itself should be enough for future developers to understand what is being done. There are exceptions for long regular expressions, bit twiddling etc. | |
| Apr 5, 2012 at 17:25 | history | closed | CommunityBot Walter gnat Steven Evers yannis | not constructive | |
| Apr 5, 2012 at 10:37 | comment | added | Dawood ibn Kareem | At the top of the method or function, please, not in the middle. I don't want to have to switch back and forth between PHP and English as I read through a single method. And don't forget to comment WHY the code does what it does, in preference to WHAT it does. | |
| Apr 5, 2012 at 8:33 | answer | added | S.Robins | timeline score: 1 | |
| Apr 4, 2012 at 19:53 | answer | added | CSA | timeline score: 4 | |
| Apr 4, 2012 at 16:27 | comment | added | canisrufus | @caleb Oops! That makes sense. | |
| Apr 4, 2012 at 16:24 | comment | added | Caleb | @canisrufus It only looks that way to you because the down votes offset the up votes. At this moment, there are 6 up and 4 down votes for a net +2. | |
| Apr 4, 2012 at 16:19 | comment | added | canisrufus | I find it interesting that so many people have have felt that this question was worth their answering, but not worth upvoting. While I'm interested in the answers (mine is the sole +1), the question does seem to be a quintessential example of a bike-shedding problem. | |
| Apr 4, 2012 at 16:13 | answer | added | Nathan Long | timeline score: 13 | |
| Apr 4, 2012 at 16:12 | comment | added | Independent | Is this a subject for question or argue? Even if the question is well-meant, those are war-starters. | |
| Apr 4, 2012 at 15:35 | answer | added | Jake Berger | timeline score: 2 | |
| Apr 4, 2012 at 13:40 | answer | added | AProgrammer | timeline score: 4 | |
| Apr 4, 2012 at 13:33 | answer | added | asfallows | timeline score: 2 | |
| Apr 4, 2012 at 13:31 | comment | added | JeffO | Why is Bigger better/preferable/different? See, I don't know. | |
| Apr 4, 2012 at 13:08 | answer | added | dodgy_coder | timeline score: 0 | |
| Apr 4, 2012 at 11:52 | history | tweeted | twitter.com/#!/StackProgrammer/status/187507909708611585 | ||
| Apr 4, 2012 at 11:27 | comment | added | gnat | else { // for future reader: sorry, at the moment of writing this I did not have time and skills to come up with a better way to express my logic | |
| Apr 4, 2012 at 10:55 | answer | added | Deanna | timeline score: 1 | |
| Apr 4, 2012 at 10:39 | answer | added | Caleb | timeline score: 38 | |
| Apr 4, 2012 at 10:25 | history | asked | acme | CC BY-SA 3.0 |