Best way to learn the built-in functions of a language?

Discussion in 'Programming' started by mqs1000, Feb 27, 2014.

  1. #1
    I have jumped around to several different languages over the past few years, in and outside of school. I regret not focusing on one language the entire time and becoming an expert. Instead, I just know all the syntax and basics of each language. I seem to always follow the same pattern where whenever I try to learn a new language, whatever guide or book or video I read always talks about the programming elements themselves like if/else, loops, functions, classes, inheritance, abstraction, etc.

    I always finish reading whatever it is and grasp the basics of the language, and then I start looking at already built code and see that much of the code is based on already made functions that are in the programming languages library (for example substr() in Java.) So then I go and search of the list of built in functions for the language and see lists of like over 1,000 functions, and I don't know where to start... Should I just start from "A" and work my way down trying to memorize each function? I feel like I won't ever use or need to know at least 75% of these built-in functions. Any recommendation? I'm trying to master PHP.
     
    mqs1000, Feb 27, 2014 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    I spend an hour or two every night going through the function library on php.net -- I don't try to remember the exact details of every little function, I just try to remember "hey, there's a function to do that"... you then search for it when you need it.

    A good language reference is always handy -- it's one of the things I really like about PHP is the easily searchable online manual that beats the ever living tar out of the reference provided for just about every other language of the past two decades; I've not seen manuals this good since the old Borland print ones for the various 'turbo' languages.

    In that same way though, PHP can be a bit overwhelming -- 99% of the time you try to do something there's already a function for that. It does help that a LOT of the functions share similar names to their C library counterparts, but it is indeed a hell of a lot to take in. Mastering search and research skills whenever you try to do ANYTHING is often more important when dealing with PHP than memorization is.
     
    deathshadow, Feb 28, 2014 IP
  3. mqs1000

    mqs1000 Greenhorn

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    8
    #3
    That is good advice - thank you
     
    mqs1000, Feb 28, 2014 IP
  4. SamLink22

    SamLink22 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    I agree with deathsadows point. Definitely don't try to learn every function, that would be a waste of time.
    In the OP you state that you've jumped around a lot with different languages, I'm sure if you stuck to just php, made some mock websites, just use the language as much as you can you'll start to pick stuff up. Then when you create a new function before you do, just give it a quick Google and research to see if there is already an inbuilt function. That will save you a lot of time.
    Also maybe look at open source libraries that may have functions that you use in your project, this too will save you time plus you can learn how others code.
     
    SamLink22, Mar 1, 2014 IP