Fathy AR A dev blog: journal, notes, and more...

Choosing Between Cheatsheets and Snippets Sections: They Are Redundant(?)

Posted on in Miscellaneous · 329 words · 2 minute read

I’ve been thinking about it for quite some time. That the existence of “Cheat sheets” and “Snippets” page type in this blog is redundant. It makes me feel like something is not right. I need to clear this up. So, do I need to pick one, or keep them both? I guess I’ll go for “cheat sheet” if I need to pick one. Here’s my argument. “Snippets” can be included in cheat sheets. As a “snippet” means an excerpt of something larger/bigger. And the idea of displaying a snippet is basically the same as with a cheat sheet, which is as a reminder or a reference for later use of the things you put in the cheat sheet—or the snippet. And the things you put in the cheat sheet are basically a snippet. It wouldn’t have been a cheatsheet if you put everything in there. No! Yes, it would. Cause that’s what cheatsheets are. Hmm, yeah. I think the last argument is right, too. I think I’m confusing the definition of them. Let me describe and explain these two terms in a brief:

Key pointSnippetCheat sheet
Purpose (something written as a reference)yesyes
Quantitysmallrelative
Scope (types of content included)limited to excerpts of texts or lists, not the whole thingnot limited to excerpts, but can also contain the entire thing e.g. vscode’s default hotkeys; can also be short to-the-point how-to guides or tutorials

So, I think they are basically the same thing—in terms of their purpose. But, they do differ in regards to the scope of how much types of content can be included. Cheatsheet includes content types that Snippet does. But, it is not the other way around. Snippet does include the types of content that Cheatsheet does, but not all of them, i.e. only some of them. So, this is the reasoning behind my choosing of Cheatsheet type and removing Snippet, to get rid of redundancy. Just like the DRY principle.