Drained
The last portion of this year has been draining on many fronts. It's not a complaint -- just a statement. I was grading two classes, taking another and working full time. It was too much. I worked through everything, but at different times had to neglect things that I would have preferred to focus on.
I am slowly recovering. Now in this slow, happy time of Christmas and New Year's I find myself without my normal drive. I feel empty and light; it's disturbing after the harried pace of the past 4 months. There are so many side projects that I want to work on, but simply can't find the energy or desire to focus on them.
Over the years I've come to realize that the creative expenditure of creating software comes at a price. I have a fixed capacity for creating software -- if I expend that capacity it requires time to refuel. In the interim, I can still create but at a much diminished pace, and typically with a much lower quality than what I am accustomed to. The best thing to do, typically, is NOT create. Wait, pause and be patient. Permit focus to drift until it's ready to snap back to laser precision for the next Push.
This post probably sounds like nonsense -- perhaps it is.
GTD and clarity
I've recently been bitten by the "GTD":http://en.wikipedia.org/wiki/Getting_Things_Done bug. I'm not exactly a disorganized person -- I generally do get stuff done. What attracted me to the system is the core idea of striving for clarity of thought by eliminating (brain) clutter.
I've always loved the feeling that I get when I lose myself to a particularly challenging or fun piece of coding. It's that state of mind where you lose track of the passage of time and focus all your energies on turning ephemeral ideas into billions of electronic pulses. There is a clarity of thought in that state, and I would love to experience it more often.
The problem is, there is always clutter and noise. So, the logical question is, how does one eliminate these things and encourage a more constant state of clarity?
For myself, I've found that GTD is at least a starting point. It provides a framework on which to capture actions and ideas in a way that shunts the responsibility for tracking stuff from my brain to a more reliable store. As I've been consistently doing this for the past week, my list of actions/projects has grown far more rapidly than I would have ever thought. The amount of stuff that we juggle in our heads is truly prodigious -- no wonder the average attention span in our society is under 3 minutes.
An emacs mini-hack
There's been a whole host of changes in my life since my last blog post. I left "Ping":http://www.pingidentity.com back in August and am now working at "The Hive":http://thehive.com. My wife and I also welcomed our first child into the world a few weeks ago.
At any rate, I'm now using emacs on a regular basis for editing C/C++ code and got tired of switching buffers manually between header (.h/.hpp) and implementation (.c/.cpp) files. So I hacked a little lisp for my .emacs to make life better. Maybe someone else will find this useful too..
;; Association list of extension -> inverse extension
(setq exts '(("cpp" . ("hpp" "h"))
("hpp" . ("cpp" "c"))
("h" . ("cpp" "c"))))
;; Process the association list of extensions and find the last file
;; that exists
(defun find-other-file (fname fext)
(dolist (value (cdr (assoc fext exts)) result)
(if (file-exists-p (concat fname "." value))
(setq result (concat fname "." value)))))
;; Toggle function that uses the current buffer name to open/find the
;; other file
(defun toggle-header-buffer()
(interactive)
(let ((ext (file-name-extension buffer-file-name))
(fname (file-name-sans-extension buffer-file-name)))
(find-file (find-other-file fname ext))))
;; Bind the toggle function to a global key
(global-set-key "\M-t" 'toggle-header-buffer)