# recording: tried recording my computer usage but i didn't learn much out of it.

lately i'm feeling quite productive. but i wondered if there's a way to get even more productive. i found a few posts online that claim that recording their screen during work and then subsequently analyzing them helped them become a bit better:

i was quite intrigued by this idea. i wanted to try it too to see if there are some low hanging fruits in my case too. i also liked the aspect that if i ever doubt why i did something, i could simply go back in time to rewatch how i implemented said work item. this should jolt my memory just like how looking at old photos can jolt my memory.

# implementation

recording my screen would quite resource expensive on my old crappy machines though. as an alternative i decided to record timelapses. basically grab a frame every 4 seconds and append it pretty much uncompressed into a movie file. i went for not compressing in the first pass so that the cpu hit from this is absolutely minimal. i'd simply recompress in the evening or some other time when i'm not using the computer (my current computer overheats way too quickly - within seconds - and then throttles itself to near unusability; the fans are probably full of dust and i should really get that cleaned some day.)

anyway, this is what i came up for recording the timelapses:

  #!/bin/bash
  # srec: screen recorder.
  resolution="$(xrandr | fgrep \* | awk '{print $1}')"
  fname="$(date -u +%F.%H%M)s.mkv"
  ffmpeg -f x11grab -video_size "$resolution" -framerate 0.25 -i :0 -vcodec libx264 -preset ultrafast -qp 0 -pix_fmt yuv444p "$fname"

it basically writes a timestamped videofile into the current directory. and this is how i recompress all the not-yet-compressed videos into smaller files:

  #!/bin/bash
  # compress my recordings.
  cd "$HOME/rec"
  for f in *s.mkv; do
    if fuser -s $f 2>/dev/null; then
      echo "$f might be still being recorded, skipping."
      continue
    fi
    h="${f%s.mkv}.mkv"
    echo -e "\e[32mgenerating $h\e[0m"
    if ! test -f "$h"; then
      ffmpeg -i $f -r 30 -filter:v "setpts=PTS/120" $h
    fi
  done

sure, maybe i could do all this better, but i thought that's a good enough starting point for my experiment.

# tracking

one thing immediately annoyed me. when you are watching a timelapse, everything happens very fast. it's very hard to grok what am i working on or thinking at any given moment.

so now i wanted that my statusbar displays a small comment that i can edit at all times. the idea would be that whenever i start working on something, then i simply update the comment so that in the video i can see what i'm doing.

i managed to get that working well but there was one problem: i often forgot to update the comment when i started to work on something else or when i got an interrupt.

to address the forgetfulness problem, i made it to nag me every 20 minutes to update the comment. at this point the whole thing started to feel like a variant of the pomodoro technique.

oh, one more thing: i made sure that every comment change would be logged to a timestamped append-only logfile. this would let me text-search my activities and then thanks to the timestamps, i could very quickly jump to the right moment in my videos. it also allows me to answer the "what the hell did i do last week?" type of questions quite easily.

here's the timestamped logger/nagger utility for reference: https://raw.githubusercontent.com/ypsu/cfg/5c299133/utils/tlog.go. it must run from a terminal and it starts a vim editor that autosaves after every edit. the nagging is done with the terminal bell (echo -e '\a').

# results

i have to admit, i didn't learn much from my timelapses. i found that watching the videos through is time consuming. but nevertheless i watched them through but it was pretty much just noise. maybe for the actual progress you would need near real time recordings where you would have better insight on the small inefficiencies you are making.

or even better, maybe have someone watch you work. in this case verbal commentary would be enough, no need for the above tracking hacks. almost like doing a coding interview. and then you listen to their feedback and see if you can learn from them.

on the upside, the explicit current focus tracking made me more focused on work. i could resist interruptions better. i'd feel less concerned about simply closing the chat windows during focused work. and the timestamped commentlog turned out quite handy when writing my weekly work summary at work.

but i feel all this tracking exhausting and annoying. there are days when my work consists of many interruptions and small tickets (e.g. during oncall hours). on those days all this tracking feels pure toil. but even on normal days i'm not sure i like the extra work this setup needs for me.

it also made me realize that i don't actually care too much about my productivity. nor did i ever felt the desire to "rewatch my past self" to see why i did something. i just want to have fun and not feel annoyed when using the computers. who cares if i do things slowly or if i'm not prioritizing correctly or that i don't know what i did last week. as long as i feel i achieved something by the end of the day, i think i'm pretty happy.

so i won't continue this recording experiment. maybe i'll retry now and then but for now it's a meh for me.

published on 2022-02-09


posting a comment requires javascript.

to the frontpage