[UPHPU] 40 signs of a lousy PHP programmer

Scott Mattocks scott at crisscott.com
Tue Feb 12 11:37:53 MST 2008


Rusty Keele wrote:
> For example: using __autoload, 

__autoload has it uses, but in general I try to stay away from it. I 
find that it causes people to be lazy. If you don't have to include the 
file when you need it, you never take the time to open the file and see 
what is inside. Therefore, you don't become as familiar with the code as 
you can/should. Being familiar with the code means you will be able to 
write "better" (whatever that means to you) code.

 > optimizing my code with design patterns

Using design patterns does not optimize your code. It makes your code 
easier to understand and incorporates some time tested techniques. You 
should use design patterns where appropriate. If you don't know when a 
particular design pattern is appropriate, you need to research that 
design pattern more. Regardless of what pattern you decide to (not) use, 
the main objective is not to optimize your code.

 > or looking to PHP frameworks for coding ideas

Instead of trying to copy ideas from frameworks, you should look for 
code you can reuse that solves the same problem you are trying to solve. 
PEAR is a great place to start.

-- 
Scott Mattocks
Author: Pro PHP-GTK
http://www.crisscott.com


More information about the UPHPU mailing list