5 Ways To Make Your PHP Life Easier!
PHP is a great language if you treat it right. I find that the lack of PHP’s strictness hurts the quality and development speed of lots of great apps. The “harmless errors” myth is what hinders developers from finding the root cause of a serious problem. A harmless error + another harmless error can cause a major error. ALL errors are harmful!
Here are some tips on how to make life easier when your using PHP:
- Organize your code. This means giving each class, no matter how small or how large, a separate file. Keeping file names, class names, variables and function names consistent and easy to find.
- Turn on PHP Notices and Warnings – This helps a whole lot. Identifying the root cause of a bug relies on the notices and warnings telling you whats wrong. Just because a fatal error isn’t being thrown doesn’t mean you should over look it.
- Simplify – It’s an art in it’s self. If you can keep your code simple you’ve made a big difference already.
- Learn The Right Methods. A butter knife is for buttering and a sword is for slaughtering. The right tool for the job is the one that was built for the job.
- Consult the Documentation – If you go to PHP.net theres lots of detailed information on many, if not all, of the PHP functions and libraries. It’s important to stay informed on changes made to new versions.
These are a few things that I do regularily to speed up PHP development as much as possible. If you have some to share please feel free to post them:)
Hopefully you found this helpful!
June 19, 2009 at 12:13 am
[...] It Right The First Time! Doing it right the first time will decrease the chance of stupid bugs later on in the project when you need to focus on other [...]
July 1, 2009 at 2:16 pm
s