Reading coworkers code

>reading coworkers code
>it's either "// what the fuck?" or no comments at all

why people do this?

...

because the code is self-explanatory OP :^)

dumb makiposter

Or at least, that's what every motherfucker who's too lazy to comment pretends. If code captured your intentions perfectly, then you wouldn't ever have bugs in the first place.

It's what ever motherfucker who codes for themselves thinks.

The, one day in a few years time, they'll go back to their code which has stopped working for some reason and wonder what the fuck it's doing and what they were thinking.

Cool people use "documentation by intimidation"
>// What the next 30 lines do is so obvious that you'd have to be retarded not to understand it :^)

>clear kode

comments are a bad habits. There are only few exceptions.

>muh comments

The fact that women think coding needs to look like a tumblr blog...

Also if they slowly take their time explaining what an integer is on every function then let's just keep this to guys.

>be electrical engineering student
>have to do senior year design project, decide to work on an automation project for a large defense contractor
>find out this week that they're completely shifting the project
>now almost entirely electrical engineering/programming based
>main design problem implementing a protocol
>mfw I'm going to have to spend the rest of the year correcting mechanical engineers' beyond shitty code

it was hard to write/code
it should be hard to read

It's fake

Fixing other people's code is like drinking their cum.

Comments are the road to losing your job.
Not commenting is among the things you should do to have a bright career.

The right one cannot even be read because of its length.
The left one as practice usually doesn't make sense after a while.

T H I S

The weak like OP should get used to it. Good code should need documentation

>found the coder

The left one was created for ultra optimization of a game engine ( though now we have SIMD making that bithack 2.2x slower and less precise)

*shouldn't

Only pussies need comments, if you understand the language of the code you should be able to understand the fucking program.

As you said hack. Some times is necessary (eg good optimization) but others just leads to unreadable code for insignifigant gains (eg that smartass way of swapping two numbers without a third variable).

I was ready to punch somebody after reading comment for 200 lines of code inside if statement
comment was
// added by the request of

why are women so fucking shalow? i bet the only reason 'karlie' uploaded that shit was to get validation. why do these brain dead females who use social media always need validation for everything they do

>that smartass way of swapping two numbers without a third variable
seems easy to recognize that
you should be using std::swap or equivalent anyway, but still

In extremely memory-limited escenarios (mostly embeded shit), XOR swaps can be very, very useful.

>>it's either "// what the fuck?" or no comments at all
This is what happens when you copy from stackoverflow and remove all the comments. The what the fuck is from whenever he didn't understand what he copied.

Also slower and gives rise to potential errors. Besides that a good compiler shall optimize a temp variable if memory is sparse.

>he hasn't seen kode with klossy

A xor swap is not slower than storing a value in the stack and retrieving it. Both values would be loaded in the cache so processing is swifter than the rediculous amount of cycles it takes to pull from memory.

wait a sec did she actually tweet this?

>read co-workers comments
What the fuck? that makes no sense.

>read his code
Oh, so that's what me meant

>in college for cs meme major
>professor requires comments on assignments
>if you don't put enough comments you get points off
>all my code ends up being twice as long just so I can meet the comment minimum

Out of spite write an essays worth of comment for one function including its main use, popular reasons its been used in the past and why its so important to the language. Assert dominance.

Also your prof is retarded unless its 1st year and the comments are just there to prove you didn't copy paste from stackoverflow.

Which year are you? My adv data structures class doesn't even require comments

>see you guys later XD
every time

Reading that gives me heart palpitations from the idiocy

>can barely write Hello World
>can't even cd into the fucking code folder
>claims to be a coder and wants to teach kids
No wonder why we have more and more shitty """"code artisans"""" every year.

Isn't this satire?