I am primarily interested in peoples reasoning here, but when writing code, what are the top things that annoy you about other peoples code and what is the reason behind it? This is for any language. I am just curious.
imho, I think it is lack of decent documentation, screwed up indentation (including anything that is NOT a makefile that uses tab indentation), and crappy identifiers that make you have to spend ages trying to work out what the hell something is doing.
Community Not everyone is a good programmer U google ur error All results lead to pajeeth websites Or stack exchange answer which are answered by pajeeths
Christopher Taylor
People who use anything other than tabs for indentation. People who do shit like if(condition) do_thing(); People who use OOP at all. People who write C89 in 2017. People who typedef too much. Anything that is CamelCase.
Chase Moore
>minimal code is good code >writes something that runs once every frame that takes 30+ ms
>serializes everything in a xml wrapper >including packets
>doesnt know what delete [] means >uses C functions that can null without saving pointer to delete pointer if it fails >checking for null before delete >not nulling after deleting
>commits a translation update that makes what i just had working perfectly now need changes >have to now compile in debug to figure out where this translation update made a crash >less than 1% of userbase is german
>uses python to do what cmake does >with a working cmake project in directory
Nathan Richardson
>Programming... what peeves you off?
Pajeets and San Francisco, sjw, young liberal "developers" with their offices fully of dyed hair women and the scrawny, flannelette wearing nerds that orbit them.
It's hard to say which group is worse but I'd say pajeets are worse.
Without these two groups of people the hobby and career of software development would 1000x more enjoyable.
Levi Baker
> People who do shit like if(condition) do_thing();
Are you referring to the use of conditionals, the use of conditionals without braces, the use of conditionals and their only statement on a single line, or the fact that there is an underscore in the function name?
Grayson Brooks
Putting the if statement body on the same line. if (condition) do_thing(); is fine. I just find putting it on the same line is very inconsistent and just hides information.
Michael Rogers
i hate people. that's what annoys me the most
Isaiah Jones
Fucking non-indexed lookups. Every time I find a function that collapses under load, there's a fucking for loop iterating an array to search for shit. Sometimes nested.
foreach (var item in items) { if (item.key == string) return item; }
Isaiah Scott
not that thing per se, but people
Zachary Nelson
>o Never have I agreed with someone more than you.
Caleb Wilson
you and I are total opposites. Those are things I love about programming
other than OOP, fuck that shit
Josiah Diaz
I find 1 line short if statements that is less than 80 chars long a lot better than a mountain of if, else if, else if ... else
Eli Lewis
Wrong Linus. The person you have pictured is Linus Sebastian who runs a YouTube channel called Linus Tech Tips which often talks about computer hardware, does build guides, reviews, etc. The creator of the Linux kernel is Linus Torvalds. A Finnish man who wrote Linux while attending the University of Helsinki before later moving to the United States.
>can I get the api documentation? >no >just ask me and then you spend a week implementing the web api in the mobile app
Adrian White
not sure if trolling or small screen.
Kayden Anderson
Who does this?
Dominic Foster
Conversely, people using indexes to iterate/search over a nonindexed collection like a list, or somewhere where a enumeration implementation makes a non-load working piece of code 100 times cleaner to understand. Usually not as bad but still really activates my Allmans.
Grayson Green
just the small stuff i++; while (1){} int a = 0, b, c; //also single-letter variables that arent iterators
also includes placing private before public in class def
Andrew Gomez
>C N U A O >N >U >A >O
Elijah Peterson
Do I get the feeling you don't like functional programming?
import java.util.HashMap;
...
HashMap someMap = new HashMap( );
// Fill the hash map with some crap here
... as in Java, it would result in cleaner code imho, when we iterate over it.
someMap.forEach((k, v) -> { // do some stuff with key "k" // and value "v" here });
// as opposed to for(Entry kvpair : someMap.entrySet( )) { final String key = kvpair.getKey( ); final int value = kvpair.getValue( ); // Do stuff here }
I am not sure there is any way to avoid using iterators here either... the only way I can think of doing an indexed lookup would be
for(int i = 0; i < keys.length; ++i) { int value = someMap.get(keys[i]); }
Lucas Martinez
I'm a beginner and I can't understand other peoples code
Blake Perry
> Has been coding since he was 13 > Is now 20 > Reads a standard library header file for C++ > nope.jpg
Chase Wilson
> cringed
David Mitchell
People using GNU extensions People writing code with implementation defined or undefined behaviour People who think compiler warnings can be ignored People who submit code where valgrind reports 1394 memleaks and conditionals on uninitialized memory People using 27 integer variables as booleans, flags, etc instead or enums with bitmasks
Kevin Jones
>Anything that is CamelCase. My peeve is people who don't know what camelCase is.
Joshua Wood
>e. >My peeve is people who d
We all know what CC is.
#define CAMEL 42
... switch(someInt) { case CAMEL: // camelCase here ... }
Aaron Martin
Made my day/10
James Powell
Doesn't i++ compile down to a single asm instruction requiring less registers vs i = i+1;?
I agree with the rest though.
Nicholas Perez
>not writing your code all on one line
Christopher Reed
literally kill yourself
Eli Rogers
>have coding assignment for sorting algorithm >run literally a million tests with randomly generated arrays, all work properly >turn it in >doesn't work >have to talk to supervising professor >turns out the documentation on the task is wrong and i have to hardcode everything from scratch
t. CSfag
Camden Mitchell
>Doesn't i++ compile down to a single asm instruction requiring less registers vs i = i+1;? depends on the context. if the value of i before increasing i by 1 isn't needed anywhere every compiler optimizes it to ++i . but if the value is needed the compiler actually copys the value of i to a temporary variable (or in some special case maybe a register ?) before increasing it
Adrian Young
>turns out the documentation on the task is wrong and i have to hardcode everything from scratch wth did you do ? hardcode every border case and heuristiks that only work for one specific task ?
Brayden Cox
++i; is what i prefer
Mason Allen
Ah, that's good to know. Now I won't feel bad for avoiding those garbage short snippets.