Page 3 of 3

Posted: Mon Jul 30, 2007 7:59 am
by MrPotatoes
Hockey wrote:I hate:

1) Functions longer than 80-100 lines
2) Classes with more than half a dozen (or dozen at most) functions
3) Stupid comments like (Initialize variable)
4) Non-existant conventions (MyClass mized with My_Class)
5) Complicated code
6) Inconsistent file naming conventions (Smarty.php, mysmarty.class.php, etc)
7) HTML mixed with PHP - excluding template specific logic
8) JavaScript mashed with PHP or AJAX hell
9) Cross frame scripting
10) Monolithic applications, poor separation of concerns, etc
11) Poor file structures

Although I usually get at least one thing (an 'oh good idea' moment) on every peice of code I work on, so I guess it's not a total loss.
This plu sthe lack of corprate structure is what i have to deal with at my job. i'm taking in ALOT from here and learning so much. even in the absense of the things that i want, need, love. so, when i launch my own company (hopefully within the next 1.5 years) i'll have all of this when i get the venture capital to back up the launch and hire people. lets cross our fingers.

Posted: Mon Jul 30, 2007 8:36 am
by superdezign
Yeah, my last job had no structure whatsoever, and since I was just learning PHP, I took the advice of a woker there who had more experience than I did. He actally sent me an email once saying that this was a wasted call:

Code: Select all

<input name="foo" value="<?php echo isset($_POST['foo']) ? $_POST['foo'] : '';?>" />
And that it should be this:

Code: Select all

<input name="foo" value="<?=$_POST['foo']?>"
Because "PHP doesn't care if variables are set before you use them." Naturally, that's when I stopped taking his advice and taking the advice of the DevNetwork. I'd say it was a better choice. ;)

Posted: Mon Jul 30, 2007 9:08 am
by Chris Corbyn
superdezign wrote:

Code: Select all

<input name="foo" value="<?php echo isset($_POST['foo']) ? $_POST['foo'] : '';?>" />
Yay for view helpers :)