Archive

Posts Tagged ‘developer’

Another developer comic

November 9th, 2009 2 comments

Thank you Kerem.

Compiling

comic

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: General Tags: ,

Coding Guidelines For Developers

August 24th, 2008 No comments

@author andrej arn
@author sam blume
@version 4.6 updated 2005-11-24

Basically…
we’d like to have a clean and professional, bug-free code.
Most people have different coding styles. And most think that
“the other style” is ugly. We don’t want to force you changing
your style. Here is how we do it and like it:

o) We use capital letters for constants. e.g. define(‘CONSTANT’, 1).
We also use the capital form of TRUE, FALSE and NULL.
This is true for PHP, note that javascript needs lowercase.

o) If a function is described to return bool, expect to get a real bool
(TRUE/FALSE) and not an int (0/1). So please code your functions and
methods that way.

o) Don’t trust the return values from php methods. If they are stated
to return bool, they often return an int (0/1). So don’t directly
return that from your functions, convert to (bool) if necessary.

o) Never ever use echo, print and die and the like inside your methods.
Use return.

o) this applies also for white spaces. if you start your file with anything
(an empty line) before the   considered as output. This makes header() calls impossible (cookie,
session). The same applies for white spaces after the ?> tag. take care!
Even a newline is too much. This is a typical php newbie mistake.

o) Everything should be as os independant as possible. Including windows.

o) Make your code work with PHP version 4.3.0+ and 5.0.5+.
Don’t support php3.

o) Make the php exam. Repeat it from time to time.

http://www.blueshoes.org/en/developer/syntax_exam/

Read more…

VN:F [1.9.22_1171]
Rating: 9.2/10 (5 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Categories: General, Research Tags: , , ,