At 22:10 28-6-2003, you wrote:
I have been writing PHP for almost a year now and someone on phpfreaks told me the other day that my code was very sloppy.
Some people can be pretty rude on the net, so don't take it too hard.


Since I want to more more into programming than design, can anyone recommend where to learn how to make sure your code is clean, optimized and as error-free as it can get? Even if it is the style of how to write the code, please let me know....I know noone can be the perfect programmer, but I would at least like to be a decent programmer :)

On ZEND are some articles that you could read, but always keep in mind these are _opinions_ , and even though they are very _educated_ opinions, you may have a reason to do it your way anyway. Think independent. (this goes for all mentioned links)
Top 21 PHP Programming Mistakes:
Part I: Seven Textbook Mistakes: http://www.zend.com/zend/art/mistake.php
Part 2: Seven Serious Mistakes: http://www.zend.com/zend/art/mistake1.php
Part 3: Seven Deadly Mistakes: http://www.zend.com/zend/art/mistake2.php



Some basic PHP guidelines, very basic but still often forgotten, e.g. with the single and double quotes:
http://www.evolt.org/article/PHP_Guidelines/17/26440/?format=print



An example of a strict coding style, very important when more people work together, so variables names are consistent, indents look the same on everybodies editor, and so on:
http://pear.php.net/manual/en/standards.php (pretty strict)


http://www.phpbuilder.com/columns/tim20010101.php3 (with a lot of explanations)

Just another one on coding style: http://www.developer.com/lang/php/article.php/2193341

Google has 129.000 hits on 'coding style php'.

Then there are off course also helpful pages on how to organize a larger PHP project. But i lost them links... which shows in my code :(

Chris











--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to