Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Please Help Me! (Rules Of The Road)

Post your goddamn code

So, here's the thing: If you want help with your code, post the goddamn code! Any by that I mean post much more code than you think is necessary. Don't be stingy, just post the goddamn code. It's not that hard.

Some basic rules for posting code:

Use a service like Gist.

There are others, but Gist allows you to post several files at once, which you will have to do.

Paste entire files

Don't think you know what parts of your code is relevant, because you probably don't. And even if you do manage to guess it, chances are the source of your problem lies somewhere else. Usually, to find the source of a problem, one must follow the stacktrace up a few levels, and then you're likely to end up in a different file altogether. And the line number in the stacktrace must correspond with the correct line in the pasted file, which it doesn't unless you paste all of it.

Paste the stacktrace

All of it, not just the top part.

Paste all relevant files

In their entirety. If you think something might be relevant, paste it. Don't be a code scrooge, it doesn't cost you anything. It's not like you're going to paste some super secret code that runs a nuclear plant. Nobody wants to steal the code to your shitty Groupon clone that doesn't even work (that's why you're asking for help, remember?).

The code you're having problems with has variables. We need to know where those come from and what type they are. If they're from a class you wrote, paste that file.

If your code deals with data, paste the data. Whether it be JSON from a Web service, an XML configuration file or a CSV customer list, just paste it.

Drop the attitude

Some people seem to think that being asked to provide more information in order to get help is an attack on their pride. WTF? Nobody gives a shit, we just want to help you figure out what the problem is, and to do that we need information. It's not complicated. So do yourself and everyone else a favor and just post the goddamn code. If getting the necessary information is like pulling teeth, chances are nobody's going to bother in the first place.

Thinking you know better than those you're asking to help you is rude, and it's not going to get you anywhere.

@radar
Copy link

radar commented Aug 30, 2012

👍

@amoose
Copy link

amoose commented Sep 25, 2012

so is it considered good practice to paste the source code?

@ddd
Copy link
Author

ddd commented Oct 7, 2012

It is if you need help with it, provided you paste to a gist and provide the url ;)

@bjeanes
Copy link

bjeanes commented Oct 26, 2012

But what if it's actual Groupon source code instead of a shitty Groupon clone? :troll:

@elight
Copy link

elight commented Oct 26, 2012

Preach on, brother!

@luislavena
Copy link

Honestly, I like this a bit more: http://yourbugreportneedsmore.info/

@ddd
Copy link
Author

ddd commented Apr 7, 2013

Mine is for those that have been told over and over, or come with attitude because we asked for information. Minimalism does NOT work, and is NOT helpful. Your's is more for those that don't have attitude and just need to be informed. The two cover two different audience types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment