Archive

Archive for August, 2008

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: , , ,

Beginning Freelancing

August 22nd, 2008 No comments

1. Choose a skill

Different people are good at different things, I am an expert programmer but cant design for the life of me. I know excellent designers who cant program for the life of them, then I know people who can do both. The only way you can find out what you are good at is to try them both. If you are good at both, you are gifted. Having both is a skill I wish I had. I can’t give good advice for design since I don’t do it, so this guide will be mainly for a programmer, but the tips should apply for both.

2. Start:

If you are a programmer, start with learning HTML, you wont be able to complete anything well without a basic knowledge of HTML. When you learn HTML you need to start a programming language, I would recommend PHP since its easy, widely supported and there are tons of resources for it. When you learn one well (and I mean really well), move on to something else. Javascript/AJAX is a valuable skill these days.

Read more…

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