ProgrammerHumor

CPUs

CPUs

A PC is just stuff doing stuff.

not to oversimplify: you have to teach the stuff stuff and then you have to give it stuff to do

Sand basically just is a lot of tiny rocks though.

Is it me or is this the 82637162816291th time this has been posted here ?

My biggest achievement

My biggest achievement

Just ask a good question.

I really don't get the hate for Stack Overflow on Reddit. If they wouldn't be so strict about quality of questions and answers, you'd end up with yet another useless forum, full of unhelpful messages, instead of this truly great resource for all kinds of programmers.

Yeah, stack overflow complaining about duplicates is very rare IMO and even when they do its valid. Its much better than any other site.

Probably because Google doesn't rank by votes.

If you're actively participating in a community via the "front page" (like Reddit), then most of the posts you see will be upvoted - by design. But if you're coming at SO via Google, you're just as likely to see downvotes as upvotes. By comparison, SO questions seem to cop a lot more downvotes.

Everyone uses it, so in a sense I think these posts are meant to be light spirited.

But if you haven't happened across a thread that was exactly your problem that was closed with a link to another question that was not your problem and didn't help... You haven't used SO long enough yet.

Defrag

Defrag

That’s the recovery partition

You missed the tail

Don’t forget to wipe free space ;)

"php is good"

"php is good"

"No, it doesn't affect my baby" 12 years later: "Arrays starts at 1"

Could anyone jumping on this"php is horrible" bandwagon give 10 good reasons as to why it's a bad programming language?

Guess wine and smoking is good then.

I love PHP!

What's wrong with an inconsistent gloried CGI-bin scripting language with runtime file compilation, unless you use an overly cumbersome and bloated framework with dodgy caching?

But then again, I am sort of a masochist...

I just don't like it.

I just don't like it.

Combine them for ultimate power:

//* code_a(); /*/ code_b(); //*/

Removing the first slash decides if "a" or "b" is executed.

<!-- no entiendo, solo hablo HTML -->

/sub/atbge

OK I know this is /sub/programmerhumor, but I'm using comments in this fashion - is this good practice or should I stick to just one method?

Eol Comments:

callFunction() // to get data needed

Longer comments, for loops or stuff like that:

/* Transforms data to push to furtter functions etc */ for( ... ){ ... }

Before Classes, Methods or Functions:

/** * Returns Stuff * @param int a Parameter to add up */ function( a = 0 ){ ... }

No more crashes!

No more crashes!
if __name__ == "__main__": try: main() except: pass

"Try except" masterrace. None of this "Try catch" nonsense.

i saw this shit so much TAing highschool classes. wondered why a program didnt crash, thought wow this guy actually added an exception where this input is? nope. wrapped the whole function in a try except.

I’m not sure how this would work

I’m not sure how this would work
$A=array(); $A[M_PI]=6; $A[M_PI+1]=8; echo $A[M_PI]+$A[M_PI+1]; 14

It works in PHP...

Not just you mate....

Not just you mate....

maintain it for the rest of your life

One of my old bosses still gets a call every few years about a piece of software he wrote in the 90's when he was self-employed.

Wrote it in his 20's and still supporting it in his 40's.

Software is like sex.

One mistake, and you gotta support it for the rest of your life.

He could make additional money on those calls. Extended Support charges ;)

Documentation is like sex. When it's good, it's great. When it's bad, it's still better than nothing.

This sub if we turned it into a book

This sub if we turned it into a book

"I could go without Ctrl+C, Ctrl+V"

I’m on a Mac! I could!

I've found a new use for stack overflow, if you find shady code without any documentation and tests in a legacy system, try pasting parts of it directly into google, and there is a decent chance (looking at 4/28 hits so far) it will take you to a stack overflow question with what the code is supposed to achieve. And then half the job is done.

Does any programmer in existence ever even pretend this is the case?

Try one of these subthreads