Snippets – your friend and mine

“Snippet”: definition

To say “a small piece snipped off; a small bit, scrap, or fragment” is selling snippets short. All developers since the beginning of time (well, after the first line of code was created) have copied from existing code, creating a snippet. Why do we do this?

The rule of thumb is – ‘be lazy’. That’s the truth … developers are inherently lazy. To be fair, it is not truly laziness, but the desire to reduce the mundane, low brow, pain staking effort of typing the same thing over and over until our fingers go numb. So, we copy and paste – and that is more efficient, quicker and ideologically, gets to the finish line faster.

But … be sure of what you are copying, as an error in a snippet, pasted, will increase technical debt, cost and in the end … WE WILL HAVE TO TYPE THINGS IN ANYWAY – therefore, just be careful of what snippets you craft !

— Pete (landlord)