Another day at the office
-
Today I looked into a section of our custom made framework that I've been avoiding for a long time because of the sheer amount of fail nested within. This is what I found:
$db = new Database;
$db->submit($sql);
if ($db) {
commonUtils::updateUserLog('Delete',$recID);
commonUtils::showMessage("Record deleted");
}
else
commonUtils::showMessage("Record could not be deleted");I don't know what depresses me most... the fact that it's checking whether $db... what, exists?... to see if a method was successfull, the fact that we have a commonUtils class or the fact that this snippet is copy-pasted in about 100-150 files throughout the codebase.
-
I would say that three of them are really depressing and knowing that the people who made that are probably doing the same someplace else.
-
@ltouroumov said:
I would say that three of them are really depressing and knowing that the people who made that are probably doing the same someplace else.
Depressing Fact #4: He's still here.
-
@DOA said:
@ltouroumov said:
I would say that three of them are really depressing and knowing that the people who made that are probably doing the same someplace else.
Depressing Fact #4: He's still here.Depressing for you, not for us.