Small Coding Meme Dump (4)

Nov 18, 2017 8:03 PM

GIGA1OO1

Views

230958

Likes

4888

Dislikes

271

*All Memes Were Stolen

FP Edit: Thanks so much it makes me happy that people like my nerd humor :).
Send Solutions To P=NP, or P!=NP

#7 That's how you get shitcanned.

8 years ago | Likes 2 Dislikes 1

#5 Are you only 5 lines of code in or what? Nothing ever compiles on the first try, it's like a USB cable.

8 years ago | Likes 2 Dislikes 0

The MATLAB one should have actually been LAPACK under the hood

8 years ago | Likes 2 Dislikes 0

#2 purina tests animal food on animals? Thise savages!

8 years ago | Likes 5 Dislikes 0

8 years ago | Likes 3 Dislikes 1

Why do we hate Matlab now?

8 years ago | Likes 2 Dislikes 0

#22 O(n) is correct for a traversal. No way to visit every node without it being O(n). Searches and inserts are guaranteed O(log(n)) though.

8 years ago | Likes 2 Dislikes 0

If you don't comment and document your code, you are a shit developer. I don't care if you write 1,000 lines of perfect code per day. U=SHIT

8 years ago | Likes 3 Dislikes 0

The 'j' is Dijkstra isn't silent because in Dutch, 'ij' is a digraph that largely replaced the letter 'ÿ'. True story.

8 years ago | Likes 2 Dislikes 0

It took me a while to realize that the (4) didn't mean there were 4 images.

8 years ago | Likes 4 Dislikes 0

I'm only 6'3" but I got that last 2" where it counts baby.

8 years ago | Likes 5 Dislikes 0

Don't shit on MATLAB. It's an extremely powerful tool used in signal analysis, pattern recognition, and control systems

8 years ago | Likes 4 Dislikes 0

I have never seen worse documentation. At least Octave isn't a straight up cash grab

8 years ago | Likes 1 Dislikes 1

Scientist here. We use Matlab at a Fortune 500 company for least squares regression of spectral data libraries for analysis. Super helpful.

8 years ago | Likes 1 Dislikes 0

These dumps always leave me convinced that there are a lot of terrible programmers out there.

8 years ago | Likes 3 Dislikes 0

This one screams CS Sophmore

8 years ago | Likes 2 Dislikes 0

I must be out of the loop. I like Matlab for dsp and data visualization.

8 years ago | Likes 2 Dislikes 0

Most of these were lame only one or two were funny or clever.

8 years ago | Likes 4 Dislikes 1

#22 ok you'll have to explain this one because traversal means "visit every element" if you're done after O(log N) then you've skipped some

8 years ago | Likes 22 Dislikes 0

This deserves to be the top comment +1

8 years ago | Likes 2 Dislikes 0

Binary tree lookups for an element will be O(log N)...

8 years ago | Likes 7 Dislikes 1

Yes, balanced BSTs take Ο(log) to find an element, but we're talking about traversals.

8 years ago | Likes 6 Dislikes 0

yep, enumerating all items in a BST is O(n).

8 years ago | Likes 3 Dislikes 1

MATLAB is actually super useful so idk who made this dump

8 years ago | Likes 10 Dislikes 2

Useful but indexing is annoying.

8 years ago | Likes 1 Dislikes 0

Also no mention of C++ because newbs think it's dead.

8 years ago | Likes 6 Dislikes 0

*laughs from the Unreal 4 Github*

8 years ago | Likes 2 Dislikes 0

I made it

8 years ago | Likes 11 Dislikes 2

8 years ago | Likes 3 Dislikes 2

Thank you for making it :) I found it hilarous

8 years ago | Likes 2 Dislikes 0

They we're all stolen, but I'm glad I could make you smile!

8 years ago | Likes 2 Dislikes 0

#24 That beautiful bogosort.

8 years ago | Likes 4 Dislikes 0

It's the best*! (with one in a million odds)

8 years ago | Likes 3 Dislikes 0

8 years ago | Likes 2 Dislikes 0

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40... Am I doing it right?

8 years ago | Likes 2 Dislikes 0

Oh hey look at that, it sorted them!

8 years ago | Likes 2 Dislikes 0

Oh wow! I must be lucky!

8 years ago | Likes 2 Dislikes 0

Ah kid, the real world is gonna break you

8 years ago | Likes 7 Dislikes 0

I'd like to see it try, I've been dead for a long time.

8 years ago | Likes 1 Dislikes 0

I understand these, but as a Network Engineer I wish people took the time to express their suffering in memes in the networking world.

8 years ago | Likes 7 Dislikes 0

Oh, one write on a socket doesn't translate into one read from a socket? But Napster did that!

8 years ago | Likes 1 Dislikes 0

No time, must troubleshoot.

8 years ago | Likes 1 Dislikes 0

There was that meme about a spanning tree

8 years ago | Likes 1 Dislikes 0

I️ have to learn python for a new job or at least grasp the basics, any recommendations for resources to use?

8 years ago | Likes 4 Dislikes 0

I really like Learn Python the Hard Way, but...it's 2.7 from what I remember so you should find something newer - 2.7 is becoming outdated.

8 years ago | Likes 1 Dislikes 0

I recommend sentdex on YouTube. But it's a very easy, very popular language, you should have no trouble.

8 years ago | Likes 2 Dislikes 0

You can try Dive Into Python by Pilgrim if you want a book.

8 years ago | Likes 1 Dislikes 0

What else would Purina test on? I don't understand!

8 years ago | Likes 26 Dislikes 1

The way they test matters. Purina/Pedigree etc shit-companies vivisect their dogs and cats regularly to see how their products affect 'em.

8 years ago | Likes 1 Dislikes 4

I suspect this is a PETA-grade sign, if not actually made by them specifically. You know how those people are...

8 years ago | Likes 3 Dislikes 2

For those who don't know Matlab is the fifth most dreaded language to use according to the stackoverflow 2017 developer survey 1/?

8 years ago | Likes 3 Dislikes 1

(https://insights.stackoverflow.com/survey/2017#most-loved-dreaded-and-wanted) I've had to use it in school and I'm pretty sure my 2/?

8 years ago | Likes 1 Dislikes 0

A grad student I knew was finding the 2-d confidence limits of a 13-variable function using MatLab, by randomly jiggling each variable until

8 years ago | Likes 2 Dislikes 0

it triggered the confidence threshold. Each data point was taking hours to map out. His solution was to run a bunch of MatLab instances

8 years ago | Likes 2 Dislikes 0

in parallel on the supercomputer. I was, apparently, the only person to think this was a bad idea.

8 years ago | Likes 2 Dislikes 0

I would agree with your assessment.

8 years ago | Likes 1 Dislikes 0

dead grandmother can compile a basic function faster. I talked to a TA and he said that ran a simulation in Matlab and it took 2 hours, 3/?

8 years ago | Likes 3 Dislikes 0

he ran the EXACT SAME simulation in Python and it took 1 minute. Matlab is an awful abomination that 4/?

8 years ago | Likes 3 Dislikes 0

diserves to die a slow painful death alongside the person who made it. 5/5

8 years ago | Likes 3 Dislikes 0

Matlab doesn’t compile... And if his code was that slow, he probably used for loops instead of vectorization.

8 years ago | Likes 1 Dislikes 0

My professor claims writing comments to document your code makes you a shitty programmer. -Proceeds to not understand his code in lecture.-

8 years ago | Likes 14 Dislikes 0

Programmers need to learn how to type. Should be a required part of the curriculum. So useful for everything. Commenting becomes much easier

8 years ago | Likes 2 Dislikes 0

Depends on your coding style. If you keep your functions short and well documented, you'll rarely need to explain specific lines of code.

8 years ago | Likes 3 Dislikes 0

It depends on how big your code is, for a big program you need a proper document.

8 years ago | Likes 2 Dislikes 0

By comparison, I start major projects with a huge comment block explaining what I want to do and how I plan to do it. 1/2

8 years ago | Likes 2 Dislikes 1

Then reference that explanation in more detail with each function or complicated line. Not the most efficient, but simple to maintain. 2/2

8 years ago | Likes 2 Dislikes 1

You are gonna love the "Cleanroom" methodology

8 years ago | Likes 1 Dislikes 0

I don't work on anything particularly huge, so it works for me. I think my largest project was only around 10K lines excluding comments.

8 years ago | Likes 1 Dislikes 0

This must be dump of CS student. You'll be surprised how often you'll need to write sorting algo in actual job: likely once, in interview.

8 years ago | Likes 209 Dislikes 0

Thank you for this. Yes let’s be best at rewriting code!

8 years ago | Likes 1 Dislikes 0

Maybe there'll be a guy who writes one once, sticks it into a library, then imports that library in the future, and forgets how it works.

8 years ago | Likes 4 Dislikes 0

Came here to type almost this exactly.

8 years ago | Likes 2 Dislikes 0

I'm glad I paid 45k to get most of these jokes

8 years ago | Likes 6 Dislikes 0

An accountant will never need to add up a column of figures by hand, but it's nice to know they've passed that skill gate.

8 years ago | Likes 11 Dislikes 2

The only times I've written sorts were on really reduced platforms, standard languages always have solutions faster than yours

8 years ago | Likes 1 Dislikes 0

I was thinking this. In my experience such reinventing of the wheel has been rare. abstraction, abstraction everywhere!

8 years ago | Likes 21 Dislikes 0

but sooo many comparators to use other people's sorting algorithms.

8 years ago | Likes 2 Dislikes 0

I unfortunately may have to write one, to speed up adding randomly arranged data into an array. Only has to make cache happy.

8 years ago | Likes 1 Dislikes 0

I've never had to actually implement one, I just had to prove that I understood the time complexity and could pick the appropriate algorithm

8 years ago | Likes 6 Dislikes 1

Ya like somehow the add remove on lists isn't good enough and also probably out of your scope for your actual programing job unless ur Intel

8 years ago | Likes 2 Dislikes 0

I just started a job with a lot of coding, and for the most part: getting it done correctly, quickly >>>>>>>>>>> getting it done elegantly.

8 years ago | Likes 1 Dislikes 0

std::sort() for most cases. Some handwritten trickery for gpus. No reinventing in actual code.

8 years ago | Likes 2 Dislikes 0

However it helps to understand the complexity of them and if they are stable

8 years ago | Likes 1 Dislikes 0

After ten years of working in the industry, I can report having written sorting algorithms zero times.

8 years ago | Likes 82 Dislikes 0

Right, 99% of the time you can just use a sort from an existing library. No need to reinvent the wheel, as they say.

8 years ago | Likes 1 Dislikes 0

Agreed. I recognize the references... But I don't find them applicable in any of my post-school experiences.

8 years ago | Likes 19 Dislikes 0

Why rewrite the std library when std::sort works just fine?

8 years ago | Likes 2 Dislikes 0

I write my sorting algorithms by doing the smart thing and calling list.sort(), because the compiler is smarter than I am.

8 years ago | Likes 21 Dislikes 2

Right. No need to reinvent the wheel.

8 years ago | Likes 1 Dislikes 0

That's the thing. Sorting is a solved problem.

8 years ago | Likes 8 Dislikes 0

Most of our sorting is via SQL (ORDER BY), I had to sort one of our logs that we audit, but it wasn't sorting, it was more like... 1/2

8 years ago | Likes 2 Dislikes 0

Find the log where the user logs in, and logs out, and associate every action in between to that user.. I didnt develop the log func (2/2)

8 years ago | Likes 1 Dislikes 0

8 years ago | Likes 81 Dislikes 1

Lmoo

8 years ago | Likes 2 Dislikes 0

I know enough about coding to know these are funny, but not enough to know why.

8 years ago | Likes 5 Dislikes 0

This is undergrad CS minutiae that a handful of people actually work with in their professional lives.

8 years ago | Likes 17 Dislikes 2

I peed in a horse once.

8 years ago | Likes 1 Dislikes 2

O(n) notation looks impressive, though! I KNOW MY SORTS! RED-BLACK TREE! RESPECT MEEEEEEEEEEE I’M SMRT BAZINGO

8 years ago | Likes 3 Dislikes 1

You just need to be able to tell if an algorithm is O(n) or O(n^x) and if you can modify it to be as close to O(n) or O(log n) as possible.

8 years ago | Likes 2 Dislikes 0

TIL nothing from this dump.

8 years ago | Likes 22 Dislikes 0

I learned that one guy is 6'5"

8 years ago | Likes 6 Dislikes 0

Its all I understood from the whole dump

8 years ago | Likes 3 Dislikes 0

Hey now, how's matlab trash?

8 years ago | Likes 24 Dislikes 6

Because it isn't opensource/open standard and requires an expensive license to use.

8 years ago | Likes 1 Dislikes 0

Too many people can't do functional programming.

8 years ago | Likes 1 Dislikes 3

Because it's shit unless you're working in machines with severe hardware limitations. Even then, procedural is better sometimes.

8 years ago | Likes 4 Dislikes 1

Why is hardware an issue here? After all, byte code is procedural.

8 years ago | Likes 1 Dislikes 0

It causes a lot of overhead

8 years ago | Likes 1 Dislikes 0

We solved that by making support for jumps and return in CPUs.

8 years ago | Likes 1 Dislikes 0

Too many people actually do functional programming.

8 years ago | Likes 3 Dislikes 0

It should have actually just been LAPACK under the hood. But I agree it sucks :p

8 years ago | Likes 3 Dislikes 0

In addition to this, because it's not a "prioritized" program, so most people don't really teach it, so it's just a headache to work with.

8 years ago | Likes 1 Dislikes 0

starts at index 1... doesn't make a big deal to me but some ppl like to cry

8 years ago | Likes 4 Dislikes 0

Whenever I have to use Matlab for school this always fucks me up because I'm used to the first index being 0.

8 years ago | Likes 1 Dislikes 0

Its not made for coders to code on, it's made for math majors to code on. So it doesn't follow normal coding conventions.

8 years ago | Likes 31 Dislikes 3

Sure but do you really want to piss off Andrew Ng

8 years ago | Likes 1 Dislikes 0

Completely. Takes me 5min to switch to MATLAB code thinking

8 years ago | Likes 10 Dislikes 2

MATLAB, GNU OCTAVE, etc are great if you spend hours generating a theory on paper and need to quickly have the pc do the heavy lifting.

8 years ago | Likes 5 Dislikes 0

Speaking as a non-programmer of course.

8 years ago | Likes 2 Dislikes 0

I agree, I am using it right now 4 loop stability checks. That doesn't refute the style of the script is rubbish & I am a hardware engineer

8 years ago | Likes 2 Dislikes 0

Hey how did u learn to code? I’m interested in trying to learn but don’t know where to begin

8 years ago | Likes 1 Dislikes 0

Quite a few free/inexpensive code sites out there. I use datacamp, but:

8 years ago | Likes 2 Dislikes 0

I started in high school and am currently in college, I'd recommend reading building Java programs 4th edition. It's a textbook but a good 1

8 years ago | Likes 2 Dislikes 0

Thank you

8 years ago | Likes 1 Dislikes 0

Thank you, srry just saw this

8 years ago | Likes 1 Dislikes 0

No prob

8 years ago | Likes 2 Dislikes 0

Most people either teach themselves or take classes in high school/college.

8 years ago | Likes 2 Dislikes 0

Thank you

8 years ago | Likes 1 Dislikes 0

#1 if you're 6'5", you can code on a Lite-Brite; it doesn't matter.

8 years ago | Likes 74 Dislikes 5

I'm 6'5 and I write in vba. One of these features is what keeps me interesting

8 years ago | Likes 1 Dislikes 0

I'm 6'7" it does not matter....

8 years ago | Likes 1 Dislikes 0

I mean my height, not coding on a Lite-Brite, just thought I should clear that up.

8 years ago | Likes 1 Dislikes 0

But if you can't sort you'll take too long to give her a big O.

8 years ago | Likes 16 Dislikes 1

Searching for constant big O.

8 years ago | Likes 2 Dislikes 0

So.. Big O (n)? ;D

8 years ago | Likes 1 Dislikes 0

and what's wrong with Visual Basic!?

8 years ago | Likes 3 Dislikes 0

The funny answer is everything, but if you never have to run on anything other than windows machines then ¯\_(ツ)_/¯

8 years ago | Likes 1 Dislikes 3

VB or VB.Net? VB .Net is a CLR-targeted language which, with the open-sourcing of .Net, will run on any device you please.

8 years ago | Likes 3 Dislikes 0

It's a good learning code for kids but its not really useful because it can only be used to create simple applications for windows.

8 years ago | Likes 1 Dislikes 3

You definitely don't know what you're talking about.

8 years ago | Likes 1 Dislikes 0

You were right, it's been a while but I now actually use it at work

6 years ago | Likes 1 Dislikes 0

I'm 6'5" and a coder, I wish women loved me as much as people on the internet think they should.

8 years ago | Likes 21 Dislikes 0

Lol, imgur seems to think being tall actually helps you get women. For me it just means I can't fit into a lot of the cars I want to own.

8 years ago | Likes 5 Dislikes 0

I know what you mean. I'm 6'5" as well with a good job as an electrician. Height itself hasn't really done that much for me with the ladies

8 years ago | Likes 7 Dislikes 0

Yeah, though the taller women I've been with (~5'10") do seem to appreciate it.

8 years ago | Likes 1 Dislikes 1

Maybe you’re just ugly

8 years ago | Likes 9 Dislikes 0

Oh snap! Haha! I didn't say I didn't have luck with the ladies, just that height alone hasn't seemed to make a difference

8 years ago | Likes 3 Dislikes 4

Considering height and $ are in the top 3 of what women look for, have you considered growing a beard perhaps?

8 years ago | Likes 1 Dislikes 0

Yeah try being below average height for a year. Then tell me your height makes no difference. Fuck. You.

8 years ago | Likes 2 Dislikes 0

Fair enough. I was thinking more my height vs average height, and how there didn't seem to be a noticeable difference...

8 years ago | Likes 1 Dislikes 0

Even if there is no documentation, text notes in the code is super helpful ------dont remove this because shit will break-----

8 years ago | Likes 294 Dislikes 2

Yes, @OP, where's the doco for this dump?

8 years ago | Likes 1 Dislikes 0

Treat names and types as documentation. int foo(void *o)

8 years ago | Likes 4 Dislikes 0

Clean Code dictates that the code should describe itself. Little to no comments needed. That's different than documentation.

8 years ago | Likes 2 Dislikes 1

Please comment your code. Even self-describing variables don't explain why that code block is needed in the first place, what it returns etc

8 years ago | Likes 3 Dislikes 0

My linr of thinking on this subject as well. Can get into long disagreements with my best friend over it tho.

8 years ago | Likes 1 Dislikes 0

/* Beyond here there be dragons */ /* I am very sorry about the following regex, please don't tell QA */ /* Spares -> ;;;;;; ;;;;; ;; */

8 years ago | Likes 22 Dislikes 0

//I Have no idea what this does and why I called it "WhyWontYouFuckingWork"

8 years ago | Likes 6 Dislikes 0

//No idea why this line is required, but it is

8 years ago | Likes 1 Dislikes 0

The most infuriating I've come across is "It's self documenting code" and then they go out of the way to make it as obfuscated as they can.

8 years ago | Likes 2 Dislikes 1

i may barely remember the little bit of C++ i had to take, but COMMENT FUCKING EVERYTHING was rule #1.

8 years ago | Likes 1 Dislikes 0

// I'm just fixing what the last guy broke when he fixed what the guy before HIM broke. I have no idea what 85% of this does.

8 years ago | Likes 4 Dislikes 0

# I dont fully understand how this works. I grabbed it from [site], and it works as described.

8 years ago | Likes 17 Dislikes 0

Unless the comments don't age well and fall out of sync with what the code actually does :D

8 years ago | Likes 1 Dislikes 0

//I DON'T KNOW WHY THIS WORKS BUT DO NOT REMOVE

8 years ago | Likes 5 Dislikes 0

// hard coded array, do not remove unless planning to kill yourself

8 years ago | Likes 1 Dislikes 0

//This works and I don't know why. If you try to fix this code, increment following counter as a warning to the next coder that tries: 12

8 years ago | Likes 10 Dislikes 0

I'm going to use this! Or possibly //number of times I've reverted this code after someone thought they "fixed" it and broke all my tests: 9

8 years ago | Likes 6 Dislikes 1

I don't know where I saw it, I didn't come up with it, but i literally LOLed when I read it the first time.

8 years ago | Likes 2 Dislikes 0

While I never had to keep any documentation (still student) I do like to comment every few blocks of code and important lines.

8 years ago | Likes 2 Dislikes 0

Bless you. Never lose that.

8 years ago | Likes 1 Dislikes 0

It's as simple as writing a comment above every function and confusingly named variables.

8 years ago | Likes 2 Dislikes 0

I was in charge of translating a piece of Java code over to Javascript. It had tons of math and was entirely undocumented. I didn't (0/1)

8 years ago | Likes 9 Dislikes 0

know what it did, I was just in charge of translating it. There was one comment that I put in: //good luck

8 years ago | Likes 9 Dislikes 0

I once wrote at the top of a file: BEWARE ALL WHO ENTER BEYOND

8 years ago | Likes 5 Dislikes 0

i've done that for myself before to know where things are particularly fucky. "#BEWARE: TURN BACK NOW!" etc

8 years ago | Likes 1 Dislikes 0

At that point you should look for a cross compiler and put all the crap in a black box.

8 years ago | Likes 5 Dislikes 0

Due to certain project requirements that is not allowed for security's sake. I also didn't think of doing that.

8 years ago | Likes 2 Dislikes 0

Can depend on the contract and what chance there is of being caught. If it's $5M for being late but $5 for ignoring security reqs... :D

8 years ago | Likes 1 Dislikes 0

You can write your own cross compiler.

8 years ago | Likes 1 Dislikes 0

Documentation is a miracle time saver, but a pain to write.

8 years ago | Likes 108 Dislikes 1

It might not seem like a time saver at the time, but when you come back to something three years later it sure is.

8 years ago | Likes 5 Dislikes 0

[deleted]

[deleted]

8 years ago (deleted Dec 17, 2017 7:16 AM) | Likes 0 Dislikes 0

A little of each. Understanding code without documentation is a skill you'll need, and if you hate it enough maybe you'll fix that problem.

8 years ago | Likes 1 Dislikes 0

I write it cos otherwise I'll forget what the fuck the code is supposed to do, and I kinda suck at code.

8 years ago | Likes 1 Dislikes 0

Amen

8 years ago | Likes 6 Dislikes 0

You're fired.

8 years ago | Likes 1 Dislikes 0

Updating 10y old undocumented code : "Let's see what this part does". 2 days later : "Wait a min, it actually doesn't do shit ?!"

8 years ago | Likes 2 Dislikes 0

And now you have to justify to your incompetent project manager (but I repeat myself) why you spent 2 days on code that doesn't do anything.

8 years ago | Likes 1 Dislikes 0

That's why technical writers exist

8 years ago | Likes 1 Dislikes 0

I was never a great coder, but damn could I document what the fuck was going through my head that lead to it

8 years ago | Likes 1 Dislikes 0

A list of dictionaries is usually a dictHolder. Never fails to make me laugh

8 years ago | Likes 1 Dislikes 0

Needed by test though

8 years ago | Likes 1 Dislikes 0

Actuall documentation "I've read i named the encryption function the encryptkeeper because it made me laugh"

8 years ago | Likes 26 Dislikes 0

"If you adjust this module, you deserve what you get"

8 years ago | Likes 1 Dislikes 0

Once we ran into a function call named "cornedbeef" and it took weeks before anyone could figure out exactly what the hash terms were.

8 years ago | Likes 14 Dislikes 0

I use mindmaps when planning features, and each branc terminates with a test statement. The test statements are used for TDD. The doc is >>

8 years ago | Likes 1 Dislikes 0

<< generated by the process, with no gaps.

8 years ago | Likes 1 Dislikes 0

*branch! Frig!

8 years ago | Likes 1 Dislikes 0

You can save time in documentation by writing self explanatory code. The .NET team in C# is very good about highly descriptive method (1)

8 years ago | Likes 1 Dislikes 0

and property names, and honestly other communities should learn from it. Save comments for low level stuff that can be hard to follow (2)

8 years ago | Likes 1 Dislikes 0

such as crazy unsafe code, pointers, memory allocation, and so forth. Or shenanigans about the OS.

8 years ago | Likes 1 Dislikes 0

You should write code in a way that's self descriptive. Read Clean Code by Robert Martin. Well readable code, self descriptive variables, >

8 years ago | Likes 3 Dislikes 1

and code that follows proper guidelines. Don't use go-tos, refactor. Don't use regex to parse HTML, use an HTML parser. If you do this, >

8 years ago | Likes 2 Dislikes 1

you won't need comments and you won't ever have to worry about silly stereotypes like your code breaking if you sneeze.

8 years ago | Likes 2 Dislikes 1

Comments aren't just to explain what the code does, they're also for why, how to use, etc. Comment yr code, even if you think it's readable.

8 years ago | Likes 1 Dislikes 0

All of those things can be self explanatory. Save it for asm, c, or c++ and for low level implementations. Clean Code is a good book on why.

8 years ago | Likes 1 Dislikes 0

As somebody who has had to troubleshoot "clean code" out in the field, fuck you and the shit horse you rode in on. Document your shit.

8 years ago | Likes 2 Dislikes 1

It wasn't clean enough if you had trouble. And documentation doesn't necessarily need to be in code comments. It can be in a spec document.

8 years ago | Likes 1 Dislikes 0

If your method is called GetEmployees() instead of E () then the comment //Gets the employees becomes immediately superfluous. I highly (1)

8 years ago | Likes 1 Dislikes 0