Skip to content

5 comments

Tabs have the same size as four spaces. Tabs are stored as tabs, not as spaces.

NOOOOO

5 points

Add loads of comments to code.

Was this list copied from a coding standard you guys use? If so, this could use some expansion. In my experience, all this rule is going to get you is lots of worthless comments like:

// initialize x to 4
// int x = 4;
2 points

What I posted is the literal text of our coding standard, so yes, this is what we use.

As far the example you give: it didn't say "add loads of useless comments". ;) I agree that those kinds of comments shouldn't be added and I indeed sometimes have interns remove comments that are too much like that. Comments should be about context and intent, not just describe what you can read in C++. Good comments is a topic by itself, I plan on writing a blogpost about that. In practice however, my experience is that even good programmers often don't write enough comments so I'd rather emphasise writing more comments than writing less comments. Not useless comments though. ;)

1 points

I'd suggest using the thought detector to check for useless commenting, but it's doing important work watching for gotos. :)

1 points

All code and comments are in Great Britain English.

Noooooooooo :D

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.