Best practices when writing recipes

As with any coding practice, there are some good practices that, when adopted, lead to better code quality:

  1. Don't repeat yourself. This is especially important because generally system administrators have the habit of working in silos. Every other system administrator feels some sense of pride in having a repository full of tools of trade that he/she has written himself/herself. Now, there is nothing wrong with that; however, almost 95 percent of tools are rewrites. Avoid doing so with your recipes. Reusability is a wonderful concept and rather than wasting time in writing recipes from scratch, make use of recipes that are already available within the community. If you are really feeling the itch, write a wrapper, ...

Get Mastering Chef now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.