The PHP 7 Revolution: Return Types and Removed Artifacts

Tony is right.

He doesn’t need to refactor his application. He doesn’t need to adopt the ‘best practices’ of our industry, or modern programming techniques and language features. As long as he’s happy to maintain his legacy codebase, let him continue to do so as he pleases.

As I see it, best practices ARE worthwhile for developers who:

  • Want to develop software they hope will be adopted and used by other developers
  • Want to reuse some of the many high-quality, 3rd party libraries out there to be more productive and avoid re-inventing the wheel
  • Want to be employed in some capacity where they work as part of a team, and
    will rely on these standards to be able to collaborate on code with their
    colleagues

While it’s true that best practices aren’t unbreakable rules, most (if not all) of them have been widely adopted because they minimize the likelihood of problems and mistakes.

As an analogy, imagine a skilled and experienced steelworker who works on high-rise buildings. He might think “Ha, I know what I’m doing! Any competent steel worker doesn’t need all this safety equipment and regulations, it just adds unnecessary time and complication to my work!”. The the point of these guidelines is two-fold: less experienced workers will minimize their risk of getting into trouble by following them, and even the most experienced professional can make mistakes. Following best practices reduces your need to work harder to avoid problem areas.

4 Likes