Reply to comment

Consider the need for concise examples

I agree with your point that authors should demonstrate best practices as much as possible. Unfortunately, many of those best practices introduce other complexities that the author may not want to delve into, or they add so much additional complexity to the example that their original point is likely to get lost.

The best writing is concise and accurate. This is not always true of the best code: consider the amount of boilerplate code involved in a chain of responsibility pattern coupled with singleton commands, then follow the best practice of using dependency injection to configure and instantiate the chain. If all you are trying to demonstrate is how to implement an HTTP filter to ZIP and encode a little data, should you really include all of this extracurricular activity?

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.