SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Thread: Getting Help

Threaded View

  1. #1
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting Help

    EDIT: This thread is no longer maintained.

    Hi everyone! Often times people are told to look over the manual, or more bluntly RTFM (If you don't know what that is, you haven't been around long enough ). However, this strange and exotic manual is sometimes hard to work with. That said, here are a few ways to help get what you're looking for:

    PHP

    The PHP website has the most friendly documentation system I've seen. If you know a function name, and simply want to look up syntax, you can use the following format:

    http://www.php.net/[function_name]

    for example, to look up the syntax for preg_match:

    http://www.php.net/preg_match

    This will give you the manual for preg match. If you're only certain of a certain part (let's say you know it's preg something), you can enter that in as well:

    http://www.php.net/preg

    and you will be shown a list of functions that much. Each function page will give you 3 additional pieces of information. This includes:

    1) The category of the function, which starts with a ^ and is in a larger font (for example, preg_match is under the PCRE [Perl Compatible Regular Expressions] category)
    2) Additional functions/topics for that category, located underneat where #1 is
    3) Functions that provide similiar functionality, or used in conjunction with that particular function (fopen would point to frwite and fread, as they work together to deal with files).

    Once you know the category, you can also enter it in the url to give you a general overview of functions/topics in that category:

    www.php.net/pcre
    www.php.net/mysql

    Also don't forget to read the user comments (and I mean all of them), as they will contain valuable gotchas and scripts that provide additional functionality. If you're looking for a general topic, such as php security, you can simply go to php.net, select the dropdown list that says "functions" and choose "online documentation", then enter your search item there.

    Perl

    Perl has a documentation system called perldoc. Perldoc has 3 different ways to get help. The first is general category. For example, to get a list of perl operators, you can type:

    perldoc perlop

    and it will bring up the page for it. Now how do you know to enter perlop? That information can be obtained by looking at the table of contents, which can be found by entering:

    perldoc perltoc

    this table of contents contains essential documentation for core perl. If you're looking for function specific documentation, you can find it by doing:

    perldoc -f [function_name]

    for example, to see the documentation for open:

    perldoc -f open

    and the page for open will display. The last way to look things up is by modules. For example, to get documentation for LWP::Simple, all you have to do is:

    perldoc LWP::Simple

    and the documentation will come up. Alternatively, you can visit the CPAN module page and either lookup by category, or do a search.

    MySQL

    MySQL documentation can get a bit tricky, and can be somewhat frustrating at times. The first way I recommend searching is by general usage. For example, if something is usually done in a SELECT, try searching for SELECT first, and if that fails, search by the name. If you're looking for the syntax for something, add the term "Syntax" to filter out any unwanted results. For example, to retrieve the CREATE TABLE syntax, you'd use:

    CREATE TABLE Syntax

    and the entry you want is the very first item. MySQL also has a similiar system to php's url based search. For example, if you enter:

    http://www.mysql.com/create%20table

    It will take you to the create table syntax page. This will try and give the best possible search result. If it fails, sometimes the actual mysql search results page is given with a list of possible results.

    CSS/HTML

    This are a bit more straightforward imho. I recommend 2 sources for this. The first is w3schools.com, and the other is, of course, the w3.org site. Here are some recommended pages:

    a) W3schools.com CSS Reference - A nice overview of CSS by category, as well as what browsers are supported
    b) W3schools.com HTML/XHTML tag list - A listing of valid tags you can use

    Note that both a and b have additional references on the left hand side under "References". This includes additional information such as color listings and attributes.

    c) CSS 2.0 specification
    d) HTML 4.01 specification
    e) XHTML 1.0 specification
    f) XHTML 1.1 specification

    JavaScript

    One of the nice resources I can recommend is the mozilla dev center javascript documentation:

    http://developer.mozilla.org/en/docs..._1.5_Reference

    One of the nice things is.. if you know the Global object you want, you can enter it like so:

    http://developer.mozilla.org/en/docs...1.5_Reference:[Object]

    For example, to see information on the Math object:

    http://developer.mozilla.org/en/docs...Reference:Math

    and more specifically, you can even pull up functions this way as well:

    http://developer.mozilla.org/en/docs...ce:RegExp:exec

    will give you the RegExp.exec() documentation. If you're really interested in the whole of JavaScript, the ECMA-262 standard (from which JavaScript implementations are based) can be found at:

    http://www.ecma-international.org/pu...s/Ecma-262.htm

    It's a 188 page pdf, so be warned .

    Conclusion

    That's about it for now. Any other pieces are welcome as always! And for people that want to know what hell to expect from browser issues:

    www.quirksmode.org

    is your friendly guide to html/css/javascript and other oddities that you may hit accross browsers!
    Last edited by Mittineague; Dec 21, 2010 at 18:10. Reason: Added notes on url based searching for mysql


Bookmarks

Posting Permissions

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