coding standards

Subscribe to RSS - coding standards

Don't forget about Coding Standards

In order to keep life easy, humans established some agreements called 'conventions', which could be seen as a way for simplying some common tasks.
Think about it: we live in a world made of conventions; some of them make sense, some don't, but still. In order not to get killed when we cross the street we all know it's better to wait the green light, as well as in order not to get a cold it's better to wear clothes when we go outside, etcetera etcetera.
Of course almost none of the conventions I can think about can guarantee 100% success, but in the most cases they can save us from some amount of pain and/or time.
So why not using convention when coding as well? I know it' s a topic on which a lot of documents have already been written, but every time you' ll find yourself in the situation where you have to maintain somebody else' spaghetti code, you're gonna think something like "Damm! Why going so dirty? Why didn't you follow those damn easy rules? Do you believe you're a big boy because you put 45 statements in just one line uh?".
As you can imagine this is not the best scenario, so my suggestion for keeping things a bit easier and spread friendship among developers is to read(or review once in a while) the basic coding standars.
You can finde the ones about PHP here: http://pear.php.net/manual/en/coding-standards.php

Some other interesting links: