Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2008
    Thanked 0 Times in 0 Posts

    How to improve your programming skills

    Hello, my name is Jonathan. I've been programming off and on for the last few years. In that I time have learned HTML,CSS and enough PHP to get by. Although I know enough PHP to get by, I sometimes feel that my coding is still nubby coding. I'll give you example. I installed phpBB3 forums the other day, and I was looking around in the files and looked at one of their PHP files, and I was like "Huh, how does this all come together in work" I guess the parts that confused me the most is when they would have a script that would work somewhere in the range of:

    PHP Code:

    ->assign_block_vars('user_row', array(
    'USERNAME'             => $row['username'],
    'USERNAME_COLOUR'    => $row['user_colour'],
    'USERNAME_FULL'        => $username_full,
    'LASTUPDATE'        => $user->format_date($row['session_time']),
    'FORUM_LOCATION'    => $location,
    'USER_IP'            => ($auth->acl_get('a_')) ? (($mode == 'lookup' && $session_id == $row['session_id']) ? gethostbyaddr($row['session_ip']) : $row['session_ip']) : '',
    'USER_BROWSER'        => ($auth->acl_get('a_user')) ? $row['session_browser'] : '',

    'U_USER_PROFILE'    => ($row['user_type'] != USER_IGNORE) ? get_username_string('profile'$row['user_id'], '') : '',
    'U_USER_IP'            => append_sid("{$phpbb_root_path}viewonline.$phpEx"'mode=lookup' . (($mode != 'lookup' || $row['session_id'] != $session_id) ? '&s=' $row['session_id'] : '') . "&sg=$show_guests&start=$start&sk=$sort_key&sd=$sort_dir"),
    'U_WHOIS'            => append_sid("{$phpbb_root_path}viewonline.$phpEx"'mode=whois&s=' $row['session_id']),
    'U_FORUM_LOCATION'    => $location_url,
    'S_USER_HIDDEN'        => $s_user_hidden,
    'S_GUEST'            => ($row['user_id'] == ANONYMOUS) ? true false,
    'S_USER_TYPE'        => $row['user_type'], 
    That.... I guess I don't quite get what something like this is suppose to be saying...

    PHP Code:
    I understand that the template is a variable, but then he pulls this number -> And I'm like... Okay, so that means.... And I really don't know how to ask people what would -> mean in a script without showing a code using it. I understand the rest of that stuff for the most part. I guess the whole point of this post and question is how can I improve my skills and just get better at what I enjoy doing so much. Is it all about asking questions? Because if so, I sure do ask a lot of them. lol So if you can explain I'm just wondering, what was the road that you took to become and know PHP so well?

    I guess I should also mention is that I've never been to college for programming. So if you have then this question really doesn't apply to you. Although if you would like to comment then feel free.

    Jon W

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    Thats funny, I just answered an object based question. Completely different though.

    -> indicates object member or method access. $template is a variable representing an object with the assign_block_vars method.

    Learning is all about trying things out. Asking questions is good, but you can only learn so much from being told. Testing is IMO the best route, you'd be surprised what you'll find. Trial and error is how I learned PHP. I had already programmed in PHP for 6 years before I went to any computer courses, so they are not necessary either. What I did learn from school was how to program correctly, which is way more important than knowing the language (its easy to learn a new language).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


    Posting Permissions

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