Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Quality Assurance > Coding Standards

8.2. Coding Standards

Coding standards is a topic of heated debate in many development teams. Since the indentation and use of space makes no difference to how the code is executed, why do we care about making rules about formatting and adhering to them? In truth, we’ve become accustomed to one coding style or another, and when code is laid out in a way that we expect, it becomes much easier to read.

It can be tricky to keep everything laid out exactly as it should be. You read the guidelines on the project wiki for your new team, but once you get your teeth into solving a particular problem, you soon forget which bracket is supposed to go where. The first tactic for using the correct format is to set up your editor for elements like line endings, whether tabs or spaces should be used, and if spaces, how many. The second is to use a tool like PHP Code Sniffer to check all code.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial