Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by DigitalJack on Tuesday December 10, 2013 @02:54AM
(#6879508)
I wish more programmers understood this concept. Yes, we can read the code for the what, which is why we don't need you to tell us you are adding 2 to X. Why is a different matter altogether, and that is where a comment can shine light on the scenario.
[ Parent
| on HN ]
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by eru on Tuesday December 10, 2013 @03:00AM
(#6879527)
Thanks for elaborating on my thought. The `why not' is often as important (or even more important!) then the `why'.
By `why not' I mean, briefly explain what other alternative approaches there were, and why you chose the trade-offs you went for, instead of some other set.
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by raverbashing on Tuesday December 10, 2013 @07:09AM
(#6880232)
Exactly that
Coders: don't give me any BS like x = x + 1 /* Increment x */
Rather, tell me, if it's not obvious, WHY are you doing that
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by cobrausn on Tuesday December 10, 2013 @11:55AM
(#6881790)
There should rarely be any comments on why x is being incremented unless there is something particularly clever about why. Commentary should be reserved for program blocks where something non-obvious is happening or where something obvious is happening for non-obvious reasons, IMHO.
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by kunil on Tuesday December 10, 2013 @08:39AM
(#6880602)
To increment x
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by pmelendez on Tuesday December 10, 2013 @09:58AM
(#6881023)
Why do you need to increment?
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by bluetshirt on Tuesday December 10, 2013 @10:41AM
(#6881302)
Because it needs to be bigger.
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by raverbashing on Tuesday December 10, 2013 @12:46PM
(#6882222)
Then make it times 2. Or add 5.
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by fleitz on Tuesday December 10, 2013 @03:49AM
(#6879651)
To me it ruins the surprise, uncommented code is like an uncommented novel, once you've grok'd it the whole thing starts to make sense.
Comments are like coles notes.
It's good as professional courtesy but for personal projects... seems like a waste of time.
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by zura on Tuesday December 10, 2013 @04:15AM
(#6879723)
>it ruins the surprise
Huh? In the first place, I do NOT want any surprise at all.
Re:Show HN: Minecraft clone in 2500 lines of C - even suppor...
by hobbes300 on Tuesday December 10, 2013 @04:17AM
(#6879729)
Until you go back to it in a year's time and can't remember any of the reasons for your design decisions.