Category Archives: Tips & Tricks

7 easy ways to get your questions answered

Arghhhh – Just Help Me!

Have you ever got so frustrated when no-one answered the PHP question you posted that you just felt like giving up?

For some of us, finding the time to learn PHP (or any other language for that matter) is a downright struggle. We’ve been tasked with getting our project or assignment complete and quite frankly, we don’t have the time to learn everything we need to know about coding – that’s what forums are for right?

Well, just like you I’ve had posts without any answers – and it hurts! Many of my questions have been in desperation as I’ve been battering my head on my desk after spending several hours failing to find a solution. As if I wasn’t mad enough as it is, after posting my forum question nobody answers! And then…

Was that comment really necessary?

Worse still, some so-called expert chips in a very unhelpful comment about me not including code tags in my post. Eh, what? Its usually followed-up with “we are very happy to answer your questions if you help us by posting it correctly”… help, how do I do that?

But wait, there is love in the air…

Here’s the thing though, all the experts that answer questions on the forums do it because they love it. They absolutely love helping other people. They get their kicks from sharing what they have spent hours and hours and hours learning, experimenting with and testing, testing, testing.

Just look at how many questions they all answer, every day, every week! So many of the experts have been on the forums for years, and it doesn’t matter whether this is your very first question, whether you are a beginner, just dipping into PHP to complete that project, or a seasoned coder – they actually want to help you! That’s right, they actually do!

Erm, OK, then why….

You may now be wondering…

“So why didn’t they answer my post then?”
“English is not my first language, why do they penalise me for that?”
“I’m brand new to PHP and to forums, I just don’t know where to start”

They are banging their heads as well!

And do you know what? The experts are just as frustrated as you are! They are itching to help you but they can’t. They are also banging their heads on their desks because they just cannot even start to solve your problem.

On a forum I read regularly, one expert was so mad he said it made his “blood boil!”. Wow, he was one angry expert.

Wahoo, here’s the best bit!

The good news is that it is so easy for all that frustration to just melt away. In fact, there is no need for it to be there at all.

The even better news is that you, yes even you, can get your questions answered by the experts. And, all in good time for you to finish your project. In fact, they will be answering your questions before anybody else’s!

After trawling through hundreds and hundreds of forum posts, and reading and listening to what the experts themselves have to say, I have compiled a simple 7-point check list that you can use right now to get the answers you need. I’m sure the experts can expand on this even more, because like you I’m still learning every day. If you are an expert, I want to help you too so let me have your suggestions!

Here’s the checklist

  • Read the forum rules and guidelines
  • Give the context and be specific
  • Post the error message
  • Describe the behaviour
  • Comment your code
  • Use code tags
  • Include line numbers

Pretty simple isn’t it!

Here is a PDF version for you to download, print off and keep.

If you want a nicer looking A5 version, its here!

Please feel free to share with whoever you wish!

And here’s a bit more info on each point


Read the forum rules and guidelines
Almost every forum has a set of rules and guidelines. Often, these are in a “pinned” post and highlighted…

Forum rules
Pinned post example

Sometimes you need to choose a menu option or tab to see the rules and guidelines…

Forums rules
Menu navigation to rules

However they are shown, if you want your questions answered then you need to be following the rules.

Give the context and be specific
The more specific you are about what it is you are trying to achieve, and exactly what the nature of your issue is, the quicker your question will get answered.

At all costs, avoid phrases like “it doesn’t work”, “it won’t run”, “what’s wrong with my code”. Unless you’ve been specific and given context, these phrases mean nothing and just really makes the experts mad!

Include the error message
If you have an error message from your code, include it exactly as it is. This is a huge help to anyone trying to solve your problem.

Describe the behaviour
What behaviour do you want the code to be doing? Let them know!
What behaviour is it actually displaying? Let them know!

Comment your code
Even a couple of well chosen words to comment a line or block of code can really help with the debugging process. If the experts know what you are trying to achieve and what you think the code should be doing, they can help you faster.

Use code tags
When including your code in your forum post, it is important that everyone can read it correctly. After you have posted your question, many forums also allow the code to be shown in a separate popup or even to be printed. This is a huge help to anyone trying to solve your issue. But it probably won’t work properly if you don’t use code tags. What are code tags?

Here is an example for posting on the Dream In Code forum:

Dream In Code also accepts [php] [/php] tags around your code.

Similarly,  the PHP Freaks forum also uses [code] [/code]  and [php] [/php] tags.

The individual forum guidelines will always let you know what tags are accepted.

Include line numbers
If your IDE/coding tool displays line numbers, include these with your code fragment. Again, this is a huge help to responders, especially if the error message points to a specific line.

Here’s the link to the PDF version of the checklist again

Here is the colourful A5 version

And finally…

Although the experts love to help you, they also want to see you helping yourself. The more they see that you are thinking for yourself as the problem unravels and solutions appear, the more they are likely to continue helping. Here are some of the things they say:

“Don’t be afraid to experiment!”

“Make mistakes”

“Become a contributing part of the team”

“Take our suggestions and yes, try them, but then come up with your own”

If you are afraid that you will lose your work or break something if you experiment, then copy and paste it into a text editor before you make changes, or use source code control for this.

Here’s the link to the PDF version of the checklist again

Here is the colourful A5 version

Huge Free Bonus!

One huge added bonus that you get completely free by following the check list, is that it will start you on your way to effective debugging. Just think about how much time you will save when you can spot the errors yourself! Not only that, but your learning will be accelerated and your project will be completed that much quicker and painlessly!

 

Some Other Resources

I’ve received some really good additional resources about this subject and think its a great idea to share them:

http://blog.jondh.me.uk/2012/09/how-to-use-stack-overflow/ http://slash7.com/2006/12/22/vampires/ http://whathaveyoutried.com/


To get more of your questions answered, sign up to my newsletter now! Make sure you get all the latest PHP tips and tricks delivered directly to your inbox: