Programming... what peeves you off?

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.

Other urls found in this thread:

en.wikipedia.org/wiki/Linus_Sebastian
en.wikipedia.org/wiki/Linus_Torvalds
twitter.com/SFWRedditImages

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

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.

>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

>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.

> 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?

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.

i hate people. that's what annoys me the most

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;
}

not that thing per se, but people

>o
Never have I agreed with someone more than you.

you and I are total opposites. Those are things I love about programming

other than OOP, fuck that shit

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

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.

en.wikipedia.org/wiki/Linus_Sebastian
en.wikipedia.org/wiki/Linus_Torvalds

>can I get the api documentation?
>no
>just ask me
and then you spend a week implementing the web api in the mobile app

not sure if trolling or small screen.

Who does this?

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.

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

>C N U A O
>N
>U
>A
>O

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


Set keySet = someMap.keySet( );
String[ ] keys = keySet.toArray(new String[keySet.size( )]);

for(int i = 0; i < keys.length; ++i) {
int value = someMap.get(keys[i]);
}

I'm a beginner and I can't understand other peoples code

> Has been coding since he was 13
> Is now 20
> Reads a standard library header file for C++
> nope.jpg

>
cringed

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

>Anything that is CamelCase.
My peeve is people who don't know what camelCase is.

>e.
>My peeve is people who d

We all know what CC is.


#define CAMEL 42

...
switch(someInt) {
case CAMEL:
// camelCase here
...
}

Made my day/10

Doesn't i++ compile down to a single asm instruction requiring less registers vs i = i+1;?

I agree with the rest though.

>not writing your code all on one line

literally kill yourself

>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

>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

>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 ?

++i; is what i prefer

Ah, that's good to know. Now I won't feel bad for avoiding those garbage short snippets.

Then you are an idiot.