Skip to main content
added 670 characters in body
Source Link
user22815
user22815

A "best practice" is just a technique or process that developers agree is the correct way to do something. ItHowever, the question is very broadrather loaded. It can cover programmingWhat makes it "best?" Why is one technique better than another, software engineering processes and procedures, even how you drive your car or instill disciplinedoes it depend on context? Of course what is "best" in your childrenone instance of a problem might not be best in another. It is very opinionated: whatIn other words, why not just ask "how do I and my development team calls asolve this problem?" instead of "what cookie-cutter technique can I apply here?" A best practice might be an embarrassment at your companyis, in essence, a popularity contest anyway. That works well for random "reality" TV shows, not so well for developing good software.

Design patterns are objective. I can draw a strategy pattern on a whiteboard and we can agree that it is, in fact, the strategy pattern.

The difference here is that while we can clearly define a design pattern, we do not necessarily agree that it is the right tool for a particular job or is the best way to approach a problem.

Of course, "pattern shopping" problems tend to exhibit similar problems to "best practice shopping" problems. The key here is "shopping." Someone heard of a buzzword and thinks it will solve a problem, so they ask a question for "I need a recommendation on which widget is the best one." Whether talking about best practices or design patterns, the correct question is to ask how to solve the problem at hand, and to be open to all constructive suggestions.

A "best practice" is just a technique or process that developers agree is the correct way to do something. It is very broad. It can cover programming, software engineering processes and procedures, even how you drive your car or instill discipline in your children. It is very opinionated: what I and my development team calls a best practice might be an embarrassment at your company.

Design patterns are objective. I can draw a strategy pattern on a whiteboard and we can agree that it is, in fact, the strategy pattern.

The difference here is that while we can clearly define a design pattern, we do not necessarily agree that it is the right tool for a particular job or is the best way to approach a problem.

A "best practice" is a technique or process that developers agree is the correct way to do something. However, the question is rather loaded. What makes it "best?" Why is one technique better than another, and does it depend on context? Of course what is "best" in one instance of a problem might not be best in another. In other words, why not just ask "how do I solve this problem?" instead of "what cookie-cutter technique can I apply here?" A best practice is, in essence, a popularity contest anyway. That works well for random "reality" TV shows, not so well for developing good software.

Design patterns are objective. I can draw a strategy pattern on a whiteboard and we can agree that it is, in fact, the strategy pattern.

The difference here is that while we can clearly define a design pattern, we do not necessarily agree that it is the right tool for a particular job or is the best way to approach a problem.

Of course, "pattern shopping" problems tend to exhibit similar problems to "best practice shopping" problems. The key here is "shopping." Someone heard of a buzzword and thinks it will solve a problem, so they ask a question for "I need a recommendation on which widget is the best one." Whether talking about best practices or design patterns, the correct question is to ask how to solve the problem at hand, and to be open to all constructive suggestions.

Source Link
user22815
user22815

A "best practice" is just a technique or process that developers agree is the correct way to do something. It is very broad. It can cover programming, software engineering processes and procedures, even how you drive your car or instill discipline in your children. It is very opinionated: what I and my development team calls a best practice might be an embarrassment at your company.

Design patterns are objective. I can draw a strategy pattern on a whiteboard and we can agree that it is, in fact, the strategy pattern.

The difference here is that while we can clearly define a design pattern, we do not necessarily agree that it is the right tool for a particular job or is the best way to approach a problem.