Category: Software

Most readers will never read an entire article. More specifically, most readers will never make it more than 75 words into an article, and they will make that decision in seconds.

Boilerplate code is a code that is redundant or is implicitly understood in the context of a snippet.

Take the following class as an example: In this snippet, we are trying to show the reader a class named CorvetteZr1 that contains a single field named vin of type String, but the getters and setters take up most of the lines and clutter the snippet. To remedy this problem, we should instead add a comment that states that getters and setters are present and refrain from explicitly including them: It is much clearer from this snippet that the focus of the code is that the CorvetteZr1 class contains a String field named vin.

Related Articles