photography by Kristel van Beek
posted by: martijn, at 21 May 2009 8:02 GMT+1, 21 May 2009 8:17 GMT+1
Why are developers sloppy with this? Is it because I’m original a designer that I care about this? Code should look clean and tidy as far as the language permits (eg. php code can look messy because of the dollar sign). Code that is clean and tidy is far more readable, even when it is missing comments in opposite of code that is messy with a lot of comments.
I wonder if a messy developer is proud of his work, and what he thinks if he sees work of himself that is more than 6 months old.
I don’t pretend that all my code is clean as it should be it cam always be better, and I’m much happier that I’m currently surrounded with developers that do care more than I ever saw.
function a ($d){
if (is_null ($d) {
$d = 0;
} else {
$d ++;
}
return $d;
}
function IncreaseVar ($DataInput){
/*
INPUT: $DataInput - the var to increase in size.
DESCRIPTION: We increase it by one, or we init the variable.
RETURN: Modified $DataInput*/
if (is_null ($DataInput)
$DataInput = 0;
else
$DataInput ++
return ($DataInput);
}