July 22, 2009 0

You live, you learn – the PHP way

By admin in php

I do not think much of a man who is not wiser today than he was yesterday. – Abraham Lincoln

Sometimes, reflecting on mistakes from the past – you wish you knew then what you know now. Here are a few of my PHP developer truths, learned the hard way by being young, stubborn and most of the times an arrogant prick, refusing to accept that others may actually know better.

  1. If you don’t know OOP and OOP design patterns, you’re not playing the same game.
  2. Code doesn’t exist unless it’s checked into a version control system. Use version control for everything you do. Any version control, SVN, Git, even CVS, master it and use it.
  3. Choose an IDE or any text editor, learn to master it and stick to it. If you have found one you like and feel comfortable with, never waste time reading about the perfect IDE again. It’s not the tool but how you use it.
  4. No matter how smart you think you are and no matter how readable you think your code is, commenting your code ought to be self-evident. Code alone only tells me what actually it does, not what it was supposed to do.
  5. The users aren’t idiots, you are. All user input without exception should be treated as if it had the plague. Quarantine it, sanitize it and stri it to the bones. PHP has an excellent and comprehensive array of filtering functions.
  6. Realizing something is “good enough” will be a major jump in your value as a programmer.
  7. Premature optimization is not the root of all evil, lack of proper planning is the root of all evil.
  8. Useful and clean high-level abstractions are significantly more important than performance.
  9. Programming actually has little to do with language and everything to do with algorithm.
  10. You should never test your own software, testing is about trying to uncover developer mistakes, find holes in their assumptions, and flaws in their logic, you simply cannot be objective about your own code.
  11. 90% of the project is completed in 10% of the time, unfortunately the remaining 10%  is completed in 90% of the scheduled time.
  12. Tools, Methodologies, Patterns, Frameworks, etc. are no substitute for a properly trained programmer.

Tags: ,

Leave a Reply

Comment Spam Protection by WP-SpamFree