Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
miahi
on Dec 18, 2012
|
parent
|
context
|
favorite
| on:
Why was Pinball removed from Windows Vista?
What's really annoying is that most of the time you see this kind of comment there is no explanation why 10 was chosen.
dhimes
on Dec 18, 2012
|
next
[–]
And that's what comments
really
need to do: tell 'why.'
Pyrodogg
on Dec 18, 2012
|
parent
|
next
[–]
http://xkcd.com/221/
MetallicCloud
on Dec 19, 2012
|
prev
|
next
[–]
That's why you should use constants. Still self documenting without the need for comments (usually).
adamzegelin
on Dec 19, 2012
|
parent
|
next
[–]
const TEN = 12;
tehwalrus
on Dec 19, 2012
|
root
|
parent
|
next
[–]
#define true false
fudged71
on Dec 20, 2012
|
prev
[–]
In our embedded systems class we were required to define all of our constants, just to add another level of description to operations. It definitely helped to navigate spaghetti code.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: