View Single Post
Old 09-01-2007, 10:41 PM  
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
Hahaha...

I'm not a school-taught anything (well, journalism / creative writing), but I hate that shit myself; putting in triple equals sometimes to test a false is retarded compared to double equal.

I only deal with building websites. Personally, I find it difficult, sometimes, to try and find the right "framework" for my task at hand. There's PHP frameworks to help make my duties more efficient (smarty, off the top of my head) and there's Java ones ( spring, off the top of my head). Plus a bazillion others, such as Ruby on Rails -- one I've played with a little and though I hate saying the moniker of "R.O.R", I do dig how quick a website can be prototyped with it.

Anyway, all that shit aside, I think there's a disconnect between how laymen refer to those who do work by using terms like "programmer" / "coder" / "whatever".

In the end of my babble .... Grouchy, thanks for hooking up Wolfy.

Quote:
Originally Posted by GrouchyAdmin View Post
It really depends on the task at hand. I do use and support PHP, but I don't pretend that it always does things intelligently. For instance, PHP uses literals (as does C) for defines, such as:

TRUE = 1
FALSE = 0

This creates problems when it doesn't define (or care) about the data, wether it's a string, or a numeric. For instance: strpos.

If you have:

Code:
$data="hello";
$testfor="h";
$test=strpos($data, $testfor);
echo ($test) ? "'$testfor' found in '$data'.\n" : "'$testfor' not found in '$data'.\n";
It would say 'h' not found in 'hello', because the 'h' is at the beginning, or offset 0, which also means FALSE to PHP.

In C you get around this by declaring data types, but with PHP you have to use the '===' test directive, which is basically a really lame way of saying 'if this literally means the same as that'.

There's plenty of strange things with different functions as libraries, and PHP have grown over the years - sometimes a function is binary safe, so you can pass anything, other times, you can only use strings. It's messy, but it's getting better.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote