SitePoint Sponsor

User Tag List

Results 1 to 22 of 22
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Going About Explaining PHP

    Hi I want to know how should I should go about explaining PHP to my peers.

    My situation:
    • I am still a student (about 3 Years self-taught PHP experience).
    • In the course I enrolled we are suppose to do PHP, but due to some reasons, the lecturer is unable to present PHP to us, the class.
    • Since I have the most experience in PHP, I now have to help the class, explaining PHP and helping them solve their problems.
    • We only have a limited time to do the PHP, then have to move on.
    • We all received the book: "Beginning PHP5, Apache, MySQL Web Development" from "WROX", but the rest of the class feel overwhelmed by it.
    • The most of the class are Designers and not Coders.


    Please help and Thank you in advance for any help

    Jacotheron

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    How many hours have been allocated to learning PHP?

    Do these hours this include Mysql and Apache as well?

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We have about 2-3 weeks to do PHP, MySQL and Apache (I figure that this is not enough) if we do not get extension for the projects.
    In this time we also have to do 2 PHP websites (the 1 I have already done, busy helping the others with theirs). The peers does not understand PHP so they can't go on without me (at this stage).

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Does that time include installing the 3 on their pcs?

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We use xampp so that we do not have to do advanced installing and set-up of the 3.

  6. #6
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    First of all, make sure that you'll be getting some sort of extra credit for teaching this class. Lecturers are paid for teaching hours, and if they're not living up to that and you're paying for your course you should get either a replacement lecturer, an extension or compensation for having to step up.

    Secondly, without extensive commercial experience with PHP and programming in general (or, at the very least, teaching) you may end up hurting the class more than helping. With that in mind I would probably just teach them the very basic underlying concepts behind the language and teach solely through code.

  7. #7
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    When does the class start?

  8. #8
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The most of the class are Designers and not Coders.
    Yes, but are they digital designers - is everyone quite computer savvy? They know their way round their own computers?

  9. #9
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can do some advanced PHP (I have created the Post Office WordPress plugin myself and are still maintaining it) and I create client websites.
    What principles/concepts do you suggest I teach them and how far advanced should I go?

  10. #10
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @cups The classes have already started. We are all trained in website Design (using Photoshop) and we all know our way around computers.

  11. #11
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    How many of the class know some html, css, js - would you say? What is the average age? (as if that makes much difference)

  12. #12
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The whole class know some basic HTML, CSS and Javascript (Javascript was a module earlier this year) and the erst were modules for last year. The avarage age is 20-21Years (2nd year students)

  13. #13
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    On Twitter I am linked into a stream which contains a couple of uk education and hack-tivist types - would you like me to widen your request out to try and get their input? I could try and point them here and you would need to post your twitter account, is that OK?

  14. #14
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, you may do that.
    My Twitter is @jacotheron (or my business' Twitter @starsites)

  15. #15
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Ok - I have asked - something might come of it, who knows...

    Now I will chip in with my 2c.

  16. #16
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @cups Thank you

  17. #17
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The trick with any good teacher is to make the task at hand relevant to peoples lives.

    If you are using an *AMP installer, then leave Apache and Mysql on the back burner to start with - explain it off as magic for the time being.

    Associate clearly in their minds that PHP acts like a wrapper over the operating system - anything the computer can do, PHP can do (OK, its not Photoshop...)

    ie open files, create directories, add files together, get the time, delete files, append to files, read from them and so on.

    The file system of the computer can be PHPs playground.

    To enforce that, have them make something useful you have to dream up a task which flexes all these skills - doing this then brings in :

    echo, print, print_r, var_dump, glob, is_dir - jump into the online manual and at the foot of each function page are links into "related functions" - and they should be explored - because there are always so many ways to do the same thing.

    Challenge them to do the same task using at least 2 other different functions, say.

    Make sure everyone has an easy-in to the online manual eg:

    php . net / <function_name>

    Next massive task is arrays.

    These are the key to programming - if you don't get arrays you don't ever really get programming.

    Again, create a challenge - bearing in mind two very distinct methods you have to understand fully. That is arrays as Stacks and arrays as Queues (FIFO, LIFO).

    Use a queue of people in a post office as an example. Use names as array elements.

    How do you get Bob to join the end of the queue? How does Mary get served (removed from the front of the queue?) How do you split the queue in 2 when a new window opens?

    Real life easy to understand examples, vs abstract ideas.

    There are 80 different PHP array functions. Spend at least 3 days on arrays.

    Take arrays from the file system (fopen read csv etc) write them back, have the arrays create html lists, menus, dropdowns, tables.

    Manipulate the arrays in PHPs memory - resorting tables and so on.

    Move to multidimensional arrays, give people in the Post office queue an age.

    Add people to the queue via a form...

    Is this getting you going?

    Show them how to ask good questions on a forum

  18. #18
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    What is the name of this course? Maybe the course is only meant to give a very brief overview of the language, going in-depth (just because you can) could do more harm than good.

    If the other students feel out of their depth, that's potentially a good sign that they're going to learn something new if they persevere.

    Is there somewhere we can look at the course outline/goals so we can help you stay on-track with its intent?
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  19. #19
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The course name is Multimedia, and it is from CTU, ctutraining.co.za. The career campus section.

    Thank you all. Will keep this in mind.

  20. #20
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    If you need help with examples then ask away.

  21. #21
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    Pretoria, South Africa
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well after the first day, I asked a few of my peers whether they now understand php better, and they said they do.

    Thank you all for your help.

  22. #22
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The best resource I found for arrays is the book "PHP 5 Zend PHP Certification Guide". It's explanation of arrays does little more than summarize, and but then prompts the user to dig into the manual to find out more.

    But essentially, it breaks that mind boggling 80+ array functions into bite-sized blocks - all that is needed is some imagination and a fairly consistent sample data set to work on.

    Creation.
    How to create arrays - all the different ways.

    Old School
    To be able to traverse an array using old school functions - should ring a bell for those with JS experience
    while, reset, key, current, next

    Newer traversal
    foreach, array_walk,

    Peek inside;
    While we can build and follow arrays in our minds, sometimes its better to see the proof of the pudding
    print_r, var_dump

    Flipping and reversing
    array_flip, array_reverse,

    Sorting arrays
    There are 11 to choose from, just make sure everyone knows they exist.
    sort, (and optional parameters like SORT_NUMERIC)
    rsort, natsort, ksort, krsort natsort and shuffle() leave the arsort and kasort till you address functions later.

    Arrays as Stacks Queues
    Adding and removing items from the start and end of arrays.
    array_push, array_pop vs array_shift, array_unshift

    Sets
    array_diff, array_intersect, array_intersect_key and the like

    HTH


Tags for this Thread

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
  •