Making Code Cheatsheets
I used to be a Google / Stack Overflow junkie for syntax issues or finding configuration/compatability issues in the vast amount of dimensions software gives us.
An approach I used to solve this problem was to document snippets once I have solved the problem (don’t forget to upvote the answer on SO). This is especially useful when you start learning a language. When you start learning a language, there are
- Syntax
- Style Guide
- Bad Practices to avoid
- Good Practices to start with
- Test cases to cover
- Libraries to use
- Libraries which are not upto date
- Highly opiniated frameworks
- The philosophy of the community
- Tooling
- Vendoring
- Advanced Syntax
- Backward compatible changes
- Where to find help instantly (when stuck)
- How to maintain, build and deploy
- The Database interaction
- The Spec (may be)
As a curious person wanting to learn everything you can with tens of open tabs, believe that once you start doing a project, you will eventually get to all these.
I started learning Elixir and it took me a while to get over syntax itself. I thought I would make a different approach while starting Go
. This is about in August 2016 that I started to write down (copy often) the code snippets and what they mean from the books I was reading.
Maintaining a cheatsheet in a 3 column layout for code snippets has been a huge time savor when I was searching on how was this done here. (well, may look better with Borders)
Example:
What | Code Snippet | Reference Link |
---|---|---|
H1 heading | # heading 1 |
Ref H1 Link |
Links | [link](text) |
Ref Link |
I use a table
structure in Evernote for now which I will have to soon move to a Git Repo in markdown. Inspired by other cheatsheets I find, I have decided to make my own so that
- Help others work like me so that they dont have to search SO
- I can reference them from any where outside my private laptop
- Try to make the development world a better place
This approach has worked well for me when I was learning the Go
language and resuming my work on Ruby has made this better.
You can track any organisation’s new open source repositories or code changes in public repos from Github or Gitlab using Gitnotify.com
GitNotify
> Sign Up with Github
> Track Organisations
> sairam