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.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
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.
Wonderful code
Moderator: General Moderators
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
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:
And that it should be this:
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. 
Code: Select all
<input name="foo" value="<?php echo isset($_POST['foo']) ? $_POST['foo'] : '';?>" />Code: Select all
<input name="foo" value="<?=$_POST['foo']?>"- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Yay for view helperssuperdezign wrote:Code: Select all
<input name="foo" value="<?php echo isset($_POST['foo']) ? $_POST['foo'] : '';?>" />