Why Quality Code Commenting Matters for your eCommerce Site
As a retailer, you want an attractive and well-functioning site that makes it easy for you to manage your product and increase orders online. And to get your site working well and looking good, you have to have well-crafted code—the core of every site.
Code Commenting is Like Footnotes
While code is an area of your eCommerce site that you may rarely see, it is something that you should make sure is handled with care, especially when it comes to how people comment the code on your site. Commenting on code is an important practice that gives a great insight to the quality of work going into the codebase of a website.
Website Lifecycle: Good Code Commenting Saves Time
When it comes to the life cycle of a website, it makes sense to take advantage of code commenting. Anyone who’s ever worked on a website knows that projects can often be passed around to multiple developers multiple times. The initial build out phase of a site is usually done by a handful of programmers or more depending on the size of the project, all adding and changing code.
Once the project is complete, it usually moves into a support/maintenance phase where a different team of programmers needs to be able to fix bugs or make new changes or additions to the code. Often times a more complex addition will be requested that the support team cannot complete, and this new addition is completed by another small team of developers. Once complete, the new addition now needs to be supported by the support team. Should the client decide to move the project to an internal team or to another agency, then there may be yet another set of programmers working on the code.
Because of the potential for so many different developers to be working on a project, a built-in guide explaining the code that saves new developers from having to figure it out on their own is incredibly helpful. The time-saving benefits, and in turn cost saving benefits, of utilizing code commenting are also great. The easier it is for each developer to understand how the code is functioning, the less time it will take to debug or add new functionality to it, and the quicker your site is up and ready to drive your sales.
Think Ahead with Good Code Commenting
Nearly every programmer I know has had to work on code inherited by another developer or agency. Many times the code is unorganized and has little or no comments explaining the details behind how it works. Sometimes it can take a very long time to fully grasp what the code is doing, or if it is isn’t working properly, to figure out what it was supposed to do. By making sure good code commenting is incorporated into your codebase, the explanations and notes on the code will ensure your site is built clearly and properly.
Josh Pratt is a Senior Applications Engineer at LYONSCG. Josh has been in the eCommerce industry for seven years, and has been working with Magento full-time since 2008. In his free time, Josh enjoys disc golf and reading.