www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 23

Thread: help us to help you

  1. #1
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551

    help us to help you

    if you follow a few simple guidlines when posting you will be more likly to recive an accurate reply quickly and with minimal fuss.
    1. Search. Click on search at the top and enter your term, the odd's are someone will already have asked your question.
    2. Describe. Tell us what it should do, how it is to do it and what's wrong if your getting an error. If your unsure how to go about something then tell us what it should do and try to tell us anything you have already tried, this provides us with more info about what will and wont work.
    3. Use the forums built in [php] tags around any and all coded sections(HTML as well as PHP). Your code will then be easier to read allowing us to be more accurate in our responses.
    4. Indent. I can't specify this enought, but often the problem could be a simple matter of a missing brace("{" or "}"), this is more common than you think.
    5. Ask a question. If you just give us information, no mater how accurate unless we know what you want we cannot help you.
    6. If you have a script from a premade souce, ask the author, they will proberly know more about it than us.
    7. Cut down. try to post only the relevent lines unless we ask for more, it ensures we will not be put of(and considering we do this for free it's not something you want) and can reply quicker.


    Thank you for reading this.

    If an admin/mod could sticky this it would be a great help.
    Feal free to add your own comments as reply's to correct me, elaborate or even just add something I've missed.
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,387
    Debug!

    For instance, if some_function($x, $y) is not working, try adding some code to verify that the variables concerned are set to what you think they should be, and see what value the function is returning:
    PHP Code:
    # DEBUG
    echo "<p>DEBUG: x = $x</p>\n";
    echo 
    "<p>DEBUG: y = $y</p>\n";
    # /DEBUG
    $result some_function($x$y);
    # DEBUG
    echo "<p>DEBUG: result of some_function($x$y): $result</p>\n";
    # /DEBUG 
    Doing this sort of basic programming technique will often answer your question for yourself.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jun 2004
    Location
    4846′36″ N 910′48″ E
    Posts
    3,747
    look, this 2 stickies might be of some use, http://www.webdeveloper.com/forum/sh...ad.php?t=68853 , wkrauss a newcomer actually use the code and php tags in his post, on the other hand the user who answered, felgall, didnt show a good example by posting his code unstructured.

    well, good post scragar

  4. #4
    Join Date
    Feb 2005
    Location
    Tauranga
    Posts
    2,062
    If you are having more trouble with your scripts refer to this article posted by NogDog. With the refering additions in this thread. It shows good ways to debug your scripts for development and deployment!


    But i argee with all in the thread, good point have been brought up and please remember to use your tags when posting!

  5. #5
    Join Date
    Apr 2005
    Location
    Bathurst, NSW, Australia
    Posts
    3,357
    I would like to add another point.

    Speak English that makes sense!

  6. #6
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,714
    If you're using a database using a numbered index, make sure the numbers agree with your PHP. This is so easy to mess up, and it won't even return an error message. And guys who answer, check for this, too! Ask if a group of files used in an array or a numbered index starts with 0!
    Last edited by Mr Initial Man; 12-11-2005 at 05:21 PM.

  7. #7
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    Quote Originally Posted by Mr Initial Man
    If you're using a database using a numbered index, make sure the numbers agree with your PHP. This is so easy to mess up, and it won't even return an error message. And guys who answer, check for this, too! Ask if a group of files used in an array or a numbered index starts with 0!
    huh?
    that's a logic error, not a programming error.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  8. #8
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,714
    It's still an error, and it happened to me. Logic errors are just as important to check as programming errors.

  9. #9
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    Quote Originally Posted by Mr Initial Man
    It's still an error, and it happened to me. Logic errors are just as important to check as programming errors.
    true.

    Then again, if you're using a database, why would it matter what the index is at all? What happens if you delete entries 1-10, the new first index is 11. If you're hard coding your first point you're going to run into trouble there.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  10. #10
    Join Date
    Jan 2005
    Location
    Illinois
    Posts
    815
    Another thing:
    When someone offers you a code revision or tells you to put something into your code and try it, do it before continuing to say it doesn't work! Just to be sure, when someone gives you a code revision, put the WHOLE thing they give you in place of what was there. Most of the time, they will give you exactly what needs to be changed, so change exactly what they say to. (Atleast give it a try!)

    --Steve
    Save The Shirts!
    Don't overuse exclamation marks!!!!!!

  11. #11
    Join Date
    Feb 2005
    Location
    BC, Canada
    Posts
    1,098
    Check the manual! I don't know how very many problems I've seen caused by people being too lazy to search the manual for the function they're working with.
    Corn is no place for a mighty warrior!

  12. #12
    Join Date
    Jun 2004
    Location
    4846′36″ N 910′48″ E
    Posts
    3,747
    yep, the manual is your friend, simply type :
    php.net/functionname

    e.g:
    php.net/mail
    php.net/setcookie

    even if you are not sure about the functions name you can type
    php.net/cookie
    and it will a bunch of links to functions

  13. #13
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    1. Always preview. Use the preview button before posting. (this option is available on the advanced post reply page)
    2. Turn off unnecessary items. Turn off "Automatically parse URLs" and enable "Disable Smilies in This Post" to avoid problems with the code you post. (These options are available on the advanced post reply page)
    3. Mark your thread as resolved. If a solution that you are happy with has been posted, using the thread tools menu at the top, mark your thread as resolved.
    4. Show some gratitude. Don't forget to thank the people that bother to try to help even if their solution wasn't perfect.
    5. Avoid story questions. Don't include stuff like this with your question: "I am new to webservices and am at a loss with this one. I have bought several books to try and help as well as countless Google searches to try and solve me problem to no avail. Maybe I am over complicating the situation based on all the different things I have attempted to read over the last couple of days.".
    Last edited by bokeh; 08-15-2006 at 03:57 AM.

  14. #14
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634

    Error Checking

    I have noticed that a lot of the questions I've seen in the past 2 weeks have very simple answers if the users did some error checking.

    • Try turning up your error reporting (maybe to E_ALL if need be)
    • If you're using a database or file, they all have errors that can be read. Typical dbms_error() exists.
    • fopen works different. it sets the resource to FALSE if it fails, so try !$resource to determine if it failed or not.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  15. #15
    Join Date
    May 2006
    Location
    North of the South Pole
    Posts
    590
    Quote Originally Posted by bokeh
    Show some gratitude. Don't forget to thank the people that bother to try to help even if their solution wasn't perfect.
    That is a very important gratitude that most people forget to do. You should thank the people that tried to help; and assuming that it is free, you should at the very least say "Thank You". People are also much less likely to help someone in the future who didn't show gratitude in the past.
    "I have no special talent. I am only passionately curious." Albert Einstein

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles