Live data from Hacker News

Keeping a plaintext “did” file

theptrk.com

21–30 of 202 posts

Re: Keeping a plaintext “did” file

#23
If you're using vim already for journaling, you should try Vimwiki. Out of the box, it has a diary, and typing Leader-W-Leader-W opens a buffer with today's diary file, ready to record things you've done or serve as a scratchpad for the day that you can search and refer to later.

Re: Keeping a plaintext “did” file

#24
Here's what I use for this same purpose: my fork of someone else's old and unmaintained pet project. I think it's pretty good. It creates a new entry each day, or appends to this day's diary entry.

It has a few subcommands, which are date-aware.

https://github.com/alexthehurst/Diary.py

Re: Keeping a plaintext “did” file

#25
post #5

This reminds me of the `plan` files used by John Carmack and and ID software. It's a good way to look back at things and remember how far you've gone and give some perspective on how some big problems at the time were not so big today...

The history of the .plan file goes back to way before ID or Carmack. It's been part of unix for a long time. Back when things were simpler, you could finger a user and read their .plan to see what they were up to.

Re: Keeping a plaintext “did” file

#26
Similar but not the same: most days day at work I create one or more txt files in notepad (kate to be exact) where I paste every temporary info while I work on some task. Basically everything that doesn't go to git, and you have to keep somewhere while you're working on it:

- nonobvious terminal commands or small scripts I had to write

- fixes for enviromental/configuration problems

- fragments of stacktraces

- fragments of log files

- packages that needed to be installed

- short todo lists I created while doing sth

- links to webpages I found that had a solution to my problem

- profiling results for solutions I compared

- parts of emails I copied to focus on the important fragments with stuff to check/fix

- names of temporary branches created when working on the problem

- xml fragments from some requests I copypasted to kate to prettify it

There's no structure and no plain English descriptions in these files, just bunch of copypasted stuff separated by a few empty lines in a text file.

I have to keep these things somewhere anyway while I work on them, and pasting them in one file that I later save in one directory preserves them for future. I call the file yyyymmdd_some_keywords.txt.

I don't bother to describe the task in plain English, the stuff that's copypasted there is enough for context, I can also check git from same date if something's not clear. The most important thing is - there's no overhead, just open the file when starting a new task, keep it opened while you work on sth and save it when you finish. So I have hundreds of these files after a while, and when I encounter some problem I can quickly grep to check if I seen similar stacktrace before and what it was about.

Before I started doing this I had several instances of déjà vu - I could swear I've seen this problem before but can't remember what it was about and how it was solved.

Re: Keeping a plaintext “did” file

#28
I like it. Of course I created my own note/task-taking app years ago, which I can't even find anymore. It was in Perl. The purpose was to have a user-friendly command-line interface. If I was going to grep for something, I wanted to display the results in a nice way. To list notes or tasks done, priorities, etc I wanted to sort and display in a nice way. And eventually I added a merge function if I forgot I had more than one editor open at a time. I think I abandoned it for the same reason I abandon every note-taking app I try: it's just not easy enough to use everywhere.

The note-taking app I use most often now is e-mail drafts. I write an e-mail to no one and save it as a draft. It's synced everywhere, sorted by date, has a subject (which can be edited to include tags such as "(!) ", "(plan)", "(done)"), can contain any text format (even attachments), and it works on every e-mail client and server. Maybe I should write an interface to it...

Re: Keeping a plaintext “did” file

#29
I've settled on a couple of helper functions in bash to accomplish a similar thing (daily journaling):

  #######################################
  # Normalizes date arguments            
  # Globals:                             
  #   None                               
  # Arguments:                           
  #   date (defaults to today)           
  # Returns:                             
  #   string of format 'YYYY-MM-DD'      
  #######################################
  function getDate {
      local DATE=${1:-$(date -I)};
      if [[ "${DATE}" =~ [+]+ ]]; then
          DATE=$(date -I -d" ${DATE} days");
      elif [[ "${DATE}" =~ ^- ]]; then
          DATE=$(date -I -d" ${DATE} days");
      elif [[ "${DATE}" == "tomorrow" ]]; then
          DATE=$(date -I -d" +1 days");
      elif [[ "${DATE}" == "yesterday" ]]; then
          DATE=$(date -I -d" -1 days");
      fi
      echo "${DATE}";
  }
  
  #######################################
  # Load a journal file                  
  # Globals:                             
  #   None                               
  # Arguments:                           
  #   date (defaults to today)           
  # Returns:                             
  #   None                               
  #######################################
  function journal {
      local DATE=$(getDate "$1");
      emacs ~/notes/journal/${DATE}.md;
  }
Post reply on HN