Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What stirs your rage, /prog/?

Name: Anonymous 2013-09-14 1:07

Mine are people who do this on C-like languages:
if(numbers==NULL)
{
numbers=temp;
numbers->next=NULL;
}
else
{
temp2=numbers;
while(temp2!=NULL)
{
var=temp2;
temp2=temp2->next;
}
temp2=temp;
var->next=temp2;
temp2->next=NULL;
}


No spaces between operators.
Opening brace on lines by themselve.
Else statement not a continuation of the if-statement it belongs to
Terse variable.
camelCase

Name: Anonymous 2013-11-18 5:20

>>99
You're describing a priority deque with lots of particularities. ``It's fine as long as it's not big'', ``maybe sorting it would be okay'' (O(n log n)[i]![/i]), ``zippers kind of work''.

My point is, it's not always possible to use the simplest data structure and still get good performance. When you simply can't use linked lists, then you explain your choice of data structures in the code using comments. Why is that so bad? It's not like I'm telling you to make /* Increments i by one */ comments.

It also helps when you're drunk/high/any other ``state'' considered lolsocoolXD by normies.

I don't agree that comments are never necessary
I agree.

commented code doesn't always give you the information you need to understand it, or what invariants you need to maintain to keep correctness if you were to add onto it.
Then you're reading some shitty comments, because IMO that's the whole point of comments. Make some good comments, Anon-kun.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List