How I Take Notes Tools June 17, 2018

I always advice every programmer to take notes of their work all the time. Taking notes has throughout the years become so indispensable for me. Instead of searching for something every time I forget it, I go back to my notes. It has also become helpful when I need to study for interviews. I also use those notes as a journal to keep and organize my thoughts when I’m working on a new feature or fixing a bug.

There’s nothing better than a beautiful day at the beach, filled with sun, surf and diligent note-taking Pam Beesly, The Office

Digital notes

I started taking notes on small yellow sticky notes however, it wasn’t that efficient when I needed to access my notes when I’m not home or when I’m using my phone. Thus, I started taking digital notes on my computer and cellphone.

As I mentioned, I started with sticky notes and a pencil then I moved to digital notes. First, I tried multiple note taking apps but I couldn’t find something better than using my favorite text editor to take notes. Besides, each app has its own format to store notes. I was looking for something simple and with much control over my notes as possible.

Currently, I use a text editor, Markdown, and a small shell script to list and open notes. My text editor of choice is Vim. I use Vim in combination with ctrlp for fuzzy file finding and Ag , the silver searcher, to search across files. Of course, you can use your own text editor as most modern text editors implement these features out of the box. For tags and organizing the notes, I simply use folders to group them. Here’s the script I started with initially:

# .bashrc or .zshrc note () { local notes_dir = "/path/to/notes" case " $1 " in c ) cd " $notes_dir " ;; l ) ls " $notes_dir " ;; p ) pushd " $notes_dir " msg = "Regenerated at $( date -u '+%Y-%m-%d %H:%M:%S' ) UTC" git add . git commit -m " $msg " git push origin master popd ;; * ) vim " $notes_dir / $1 " esac }

Now, you can call the function directly in your shell using:

$ note l

or

$ note todo.md

Syncing

From the previous script, you can see that I used to use Git to keep and sync the notes between my machine and a Git repository. The issue with using Git is that I cannot sync and read the notes on my cellphone (as far as I know; I didn’t search how to use Git on my phone). To solve this issue, I moved my notes to Dropbox (you can use any other method for synchronization). Now it’s possible to sync them between my computer and my phone. Here’s the very simple script I currently use:

# .bashrc or .zshrc note () { local notes_dir = " $HOME /Dropbox/notes" case " $1 " in c ) cd " $notes_dir " ;; l ) ls " $notes_dir " ;; * ) pushd " $notes_dir " if [ $# -eq 0 ] ; then vim " $1 " else vim " $1 " .md fi popd esac }

Extras

For editing notes on the phone, there are multiple apps that I didn’t investigate. However, I’m currently using the default text editor that comes with the Dropbox app.