Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Toptal.com:
The Six Commandments of Good Code: Write Code that Stands the Test of Time
Sep 09, 2016 @ 14:50:44

On the Toptal.com site they've posted a guide that aims to help you write good code that stands the test of time. They provide six "commandments" that they think can help make your code better and easier to maintain in the future.

Specifically, “good code” is code that is easily and readily maintainable by an organization (not just by its author!) and will live for longer than just the sprint it was written in. The following are some things I’ve discovered in my career as an engineer at big companies and small, in the USA and abroad, that seem to correlate with maintainable, “good” software.

Their list includes suggestions like:

  • Treat Your Code the Way You Want Other’s Code to Treat You
  • Good Code Doesn’t Reinvent the Wheel, it Stands on the Shoulders of Giants
  • Don’t Cross the Streams!
  • When Possible, Let the Computer Do the Work

Each item on the list comes with a brief description with a bit more detail and how to apply it to your development. It's not focused on any one language, however, so there's no code samples here - just links to other resources and tools that can help in their application.

tagged: good code commandments better maintenance

Link: https://www.toptal.com/software/six-commandments-of-good-code

Thomas Buck:
Tom's PHP Commandments - Take heed
Apr 17, 2013 @ 17:23:20

Thomas Buck has put together what he calls "Tom's PHP Commandments" (nine of them) that developers should follow when developing applications with the language. Among his suggestions are things like:

  • ALWAYS do the simplest thing that will work
  • NEVER trust anything that comes from the user
  • NEVER use include for controlling logic
  • NEVER create a file of useful functions, even if it's called helpers.php

There's also been some discussion about this list over on Reddit - you can comment on it over there if you agree/disagree with some of his points.

tagged: commandments language usage list

Link: http://biasedphp.com/php-commandments

Antony Dovgal's Blog:
PHP Seven Commandments
Nov 14, 2007 @ 22:08:00

On the lighter side of the language, Antony Dovgal has posted ten commandments that PHP developers should follow including:

  • Thou shalt obey the Release Master.
  • Thou shalt not forget to add comments to thy code, especially if the code is tricky.
  • Thou shalt not fix a bug only in one of the branches unless it did not exist in the others.
  • Thou shalt discuss all new features in internals@.
IMO it's time to make the development process more organized. This is my version of what I would like to see as an official set of rules for PHP community.
tagged: commandments ten development process community commandments ten development process community

Link:

Antony Dovgal's Blog:
PHP Seven Commandments
Nov 14, 2007 @ 22:08:00

On the lighter side of the language, Antony Dovgal has posted ten commandments that PHP developers should follow including:

  • Thou shalt obey the Release Master.
  • Thou shalt not forget to add comments to thy code, especially if the code is tricky.
  • Thou shalt not fix a bug only in one of the branches unless it did not exist in the others.
  • Thou shalt discuss all new features in internals@.
IMO it's time to make the development process more organized. This is my version of what I would like to see as an official set of rules for PHP community.
tagged: commandments ten development process community commandments ten development process community

Link:


Trending Topics: