Friday, January 07, 2005
#
Since Theoden is getting a new job that doesn't involve legacy code, I've been going through my chat logs to pick out more. This tip came in on 2/26/2004.
if you have a logical grouping of business logic, split the logic into two separate functions. Like so:
eoc_check_toxicity()
eoc_toxicity_checks()
that way if you accidentally delete one of the functions, at least some of the logic will still be there
Every now and then I get some coding pointers from my brother as he works through PHP legacy code. Here's #1:
litter your code with unused variables and assignments - if you have too few variables it'll make your application too light and it'll float away