Emacs kaizen: helm-swoop and editing

Continuing on this quest to focus on one tiny little workflow change at a time, so that I can get even better at using Emacs…

One of those packages I installed but never got around to trying out was all, which lets you interactively edit all lines matching a given regular expression. It’s like an editable occur, sorta.

It turns out that helm-swoop lets you use C-c C-e to edit matching lines interactively (so you can use keyboard macros or replace-regexp or whatever). You can type C-x C-s to save it back to the buffer.

On a related note, I’m still tickled pink every time I use dired-toggle-read-only (C-x C-q) to make a Dired buffer editable so that I can batch-rename filenames.

Sketchnote Hangout: Playing with colour

The recent Sketchnote Hangout organized by Makayla Lewis was a good kick in the colour palette.

2015-01-17 Thoughts from Sketchnote Hangout - colour -- index card #color #drawing

 

Before the hangout, I’d settled into a pattern of black-text-with-a-little-accent (although blue ink isn’t much of an accent colour). This, despite an almost embarrassing number of recent attempts to break out of the colouring rut:

Exploring sketchnote colour styles (December 2014)

2014-12-01 Colouring inspiration guide - drawing

2014-12-01 Colouring inspiration guide – drawing

 

Building a habit of drawing with colours (January 2014)

2014-01-02-What-would-it-take-to-make-colour-part-of-my-workflow.png

 

Sketchnote Lesson: Adding color (September 2013)

2014-01-03 Exploring colours

This time! Really! It helps that I’ve added a red pen and a green pen to the ones I carry around in my vest, and that I make myself use them when I use index cards. Digitally, I’m forcing myself to expand my colour vocabulary. Since Adobe Color CC (formerly Kuler) lets you pick a pleasing colour scheme (you can also trust in the gods of randomness or popularity), I’m less likely to have the angry-fruit-salad effect, and I can push myself by using arbitrary colours until I develop a sense of what feels better. Next time I sketch on my computer, if my colour scheme isn’t already set based on a book, I might grab a screenshot and use the eyedropper to pick out colours from that.

Someday I might get back to that sheer primary-colour exuberance of my Nintendo DS sketches. Someday.

In the meantime, you may want to check out other people’s colour experiments:

Filling in the occupational blanks

Following up on an interview, a journalist asked:

If I were to say that you freelance as [blank] consultant, what would be the word that fills that blank?

2015-01-14 Filling in the occupational blanks -- index card #experiment #occupation

2015-01-14 Filling in the occupational blanks – index card #experiment #occupation

Tricky question. “Freelance” is definitely the wrong word for it, since I doubt I’ll be taking on any more clients and the word obscures my current fascination with a self-directed life. It might make sense to use the word “independent” if we really need to contrast this with stable employment.

Technically, I spend a fraction of my time consulting, and I can define the kind of consulting that I do in a compact phrase. But based on my 2014 numbers, that’s only 12% of my time. This is much less than the 37% of the time I spend sleeping, or even the 18% of the time I spend on discretionary projects or the 15% of the time I spend taking care of myself (not including the 7% of the time I spend on chores, errands, and other things).

Since no one gets introduced as a sleeper even though that’s what we mostly do with our lives, maybe my discretionary projects will yield a neat occupational description for people who need to have that introductory phrase.

  • Am I a writer (3%)? (“Author” is a smidge more self-directed and respectable, maybe, but I still don’t feel like I’ve written Real Books since all my resources are compilations of blog posts). A blogger? This is a category so large, it could mean anything.
  • A sketchnoter (3%)? Alternatively: a sketchnote artist or a doodler, depending on whether I’m making it sound more respectable or more approachable. But the popular understanding of sketchnotes (if there is one) is that of recording other people’s thoughts, and I’m focusing on exploring my own questions.
  • An Emacs geek (2%)? Too obscure; it doesn’t provide useful information for most people. Maybe an open source developer, which also includes the 1% of the time I spend coding – but I do more writing about software than writing actual software or contributing to projects. An open source advocate? But I don’t push it on people or try to change people’s minds.

In the rare meetups I go to, I usually mention a bunch of my interests (drawing, writing, coding, experimenting), and people pick whatever they’re curious about. But most times, I try to preempt the “What do you do?” question with something more interesting for me, like what people are learning about or interested in. It’s so much easier when someone recognizes me from my blog, because then we can jump straight to the interests we have in common.

From time to time, I come across people who persistently ask, “But what do you do? What’s your day job?” I confess it’s a bit fun to tweak the box they want to put me in. One approach I’ve heard other people use is to playfully acknowledge the difficulty of categorization. “On Mondays, I _. On Tuesdays, I _. On Wednesdays, I___. …” Others gleefully embrace descriptions like “I’m unemployed.”

But I’m missing the purpose of that introductory phrase or that short bio here. It’s not about shaking up the other person’s worldview. At its best, that occupational association helps the listener or reader quickly grasp an idea of the other person’s life and where the other person is coming from. An accountant probably has a different way of looking at things than a primary school teacher does. One’s occupation provides the other person with the ability to contextualize what one says (“Oh, of course she thinks of things as systems and processes; she works with code all day.”). During small talk, it gives people easy things to talk about while they’re waiting for a more interesting topic of conversation to appear: “What kinds of things do you write?”

Let’s say, then, that my goals for this phrase would be:

  • to help people understand my context quickly, and how that might differ from their perspective
  • to make the other person more comfortable by:
    • being able to associate me with a stereotype that adds information, possibly fleshing out this mental profile with differences later on
    • in conversation, letting them easily think of questions to ask, addressing the phatic nature of small talk (we’re not actually talking, we’re making polite noises)
  • to branch off into more interesting conversations, avoiding the dead-end that often comes up after the ritualistic exchange of “What do you do?”

Of these goals, I like the third (interesting conversations) the most.

Here are a few of my options:

  • I can accept convention and pick one aspect of what I do, especially if I tailor it to their interests. For example, at a business event, I might introduce myself as a social business consultant who helps really large companies improve internal collaboration through analytics and custom development for enterprise social network platforms (well, isn’t that a mouthful). At visual thinking events, I might introduce myself as a sketchnoter focusing on exploring my own ideas.
  • I can waffle by introducing several aspects, still within the vocabulary of regular occupations: a consultant and a writer, for example.
  • I can say, “It’s complicated!” and explain my 5-year experiment, self-directed living, and learning/coding/writing/drawing/sharing.

Anyway, circling back to this writer and his likely use of some kind of occupation as a way to introduce and contextualize me:

  • It might be interesting to play with no occupational categorization. Some context may be provided by age (31) – it’s common enough in newspapers and books. The editor might send it back with a question, “Yes, but what does she do?”, but there it is.
  • It might also be interesting to play with my difficulty of categorization. “Sacha Chua, who couldn’t come up with a single phrase to describe her occupation, …”
  • Or, since it’s no skin off my back if this is not fully representative, I could just let him write whatever he wants to write. Freelance consultant. Blogger. Sketchnoter. Amateur experimenter. Independent developer. “Consultant” is a very small part of my identity, actually, so developer or blogger might be interesting. A possible missed opportunity here is that the wrong frame might result in people not being able to identify with and learn from stuff (“Of course she can deal with this, she’s a coder”; “Bah, another blogger, is that all she does?”; “Why should I listen to her? Freelance is just a fancy word for unemployed.”). But it’ll do under time pressure. =)

I’m writing this on January 14 and posting this in the future (because I limit posts to one a day), so the article will likely be out by now. If I remember, I’ll update this with what he actually used. =) But I needed to think about it out loud, and I’m sure the situation will come up again in the future. Perhaps by then I’ll have a more compact way to describe myself.

Since other people have figured this out before, I can learn from them. (And possibly from you!) After all, I’m nowhere near as interesting as Benjamin Franklin or Leonardo da Vinci, and somehow they managed to settle down into a sequence of nouns. Here’s the one from Wikipedia’s entry for Leonardo da Vinci:

Leonardo di ser Piero da Vinci (15 April 1452 – 2 May 1519) was an Italian painter, sculptor, architect, musician, mathematician, engineer, inventor, anatomist, geologist, cartographer, botanist, and writer.

Three or four nouns should be a good thing for me to strive for, eh? Even one or two nouns, if I can get to some level of distinction.

As for introductions – people can pick whatever aspect they want. I am multi-faceted and growing. =)

Weekly review: Week ending January 23, 2015

I posted nine blog posts this week, relaxing that once-a-day bottleneck that I’ve been using for the past few years. Mainly, it’s because I want to talk about Emacs more than once a week while still keeping lots of variety so that I can talk about non-tech topics too. Daily readers: Is the volume unmanageable? How can I make this better for you?

On my consulting gig, I leveled up in terms of using Tableau. I think I’ve gotten the hang of dashboard actions now, and I’m more comfortable using calculated fields for attributes and aggregates. Whee!

This has been a good week for planning ahead and learning from others. The Quantified Self Toronto meetup on Monday got me thinking about an Epic Quest of Awesome, and that spun off a long, thoughtful conversation about questions. I’m looking forward to fleshing that out a bit more over the next few weeks.

Oh, and I finally applied for my passport, picked up my Cultural Access Pass, and took care of a number of other errands. Have day pass, will Get Stuff Done.

The Emacs microhabit I’m going to focus on this week is selecting multiple things in Helm, since that’s one of its key features. =)

Blog posts

  1. Weekly review: Week ending January 16, 2015
  2. Minimizing upward or downward skew in your sketchnotes
  3. Improving my evil plans for Emacs
  4. Breaking down the skill of outlining
  5. Developing Emacs micro-habits: Abbreviations and templates
  6. Move your goalposts to get around an inability to finish projects How redefining your projects can help you satisfy a novelty-seeking brain, and how you can deal with interests or experiments that don’t have clear ends
  7. Emacs Chat with Steve Purcell
  8. Visualizing the internal citation network of my blog
  9. Filling in the occupational blanks

Sketches

  1. 2015.01.17 Evening tweaks – index card #routines
  2. 2015.01.17 My Evil Plans for Emacs are yielding results – index card #emacs #sharing
  3. 2015.01.17 Playing with the index card format – index card #drawing
  4. 2015.01.17 Thoughts from Sketchnote Hangout – colour – index card #color #drawing
  5. 2015.01.17 Weekend routines – index card #life #routines
  6. 2015.01.18 Digging into my thoughts about emptying one’s cup – #emacs #writing
  7. 2015.01.18 Emacs microhabit – Switching windows – index card #emacs #microhabit
  8. 2015.01.18 Journey to Emacs – Beginnings – index card #emacs #beginner
  9. 2015.01.18 Journey to Emacs – stages – index card #emacs
  10. 2015.01.18 Narratives – index card #storytelling #perspective
  11. 2015.01.18 The Sense of Style – index card #book #writing
  12. 2015.01.18 Thinking about evil-mode and Emacs – index card #emacs
  13. 2015.01.19 A good way to track writing revisions – index card #editing #tech
  14. 2015.01.19 Deeper outlines – index card #writing
  15. 2015.01.19 How can I get better at research – index card #learning
  16. 2015.01.19 Imagining an editing experiment – index card #delegation #writing #editing
  17. 2015.01.19 Improving my sharing – index card #writing #sharing
  18. 2015.01.19 Quantified Self Toronto – epic quests, kids, stopwatches, art projects
  19. 2015.01.20 Asking better questions – index card #asking
  20. 2015.01.20 Skill trees – asking questions – index card #skill
  21. 2015.01.20 Skill trees – web – index card #skill #coding
  22. 2015.01.20 Skill trees – writing – index card #skill
  23. 2015.01.20 What do I want from this quest list and skill tree visualization – index card
  24. 2015.01.21 Goal strategies – index card #popular-goals
  25. 2015.01.21 Playing with popular goals – Happiness – index card #popular-goals
  26. 2015.01.21 Popular goals – Fame – index card #popular-goals
  27. 2015.01.21 Popular goals – Health – index card #popular-goals
  28. 2015.01.21 Popular goals – Knowledge or experience – index card #popular-goals
  29. 2015.01.21 Popular goals – Meaning – index card #popular-goals
  30. 2015.01.21 Popular goals – Power – index card #popular-goals
  31. 2015.01.21 Popular goals – Wealth – index card #popular-goals
  32. 2015.01.21 Popular goals – tranquility, equanimity – index card #popular-goals
  33. 2015.01.21 What if I tried on common goals – index card #popular-goals
  34. 2015.01.22 Book – Leading the Life You Want – Friedman 2014 – index card #book
  35. 2015.01.22 Buffet of other goals – index card #goals
  36. 2015.01.22 Goals and skills – index card #goals
  37. 2015.01.22 Imagining a good quest or skill discussion – index card #goals #conversation
  38. 2015.01.22 Thesis projects for 2015 – ideas – index card #sharing #plans
  39. 2015.01.23 Book – Leaving a Trace – Alexandra Johnson – index card #writing #book
  40. 2015.01.23 Passport – mail or pickup – index card #decision
  41. 2015.01.23 Rough notes on goals and questions – for follow up – index card #rough #notes
  42. 2015.01.23 Tech upgrade triggers – index card #decision
  43. 2015.01.23 What would help me enjoy travel – index card

Link round-up

Focus areas and time review

  • Business (40.9h – 24%)
    • Earn (9.3h – 22% of Business)
      • Deposit cheque
      • Earn: E1: 1-2 days of consulting
    • Build (18.2h – 44% of Business)
      • Drawing (7.1h)
      • Delegation (0.0h)
      • Packaging (0.0h)
      • Paperwork (1.8h)
      • Fix cucumber for travis
      • Look into recently uploaded images
    • Connect (13.3h – 32% of Business)
      • Go to Quantified Self Toronto meetup
      • Post Quantified Self notes
      • Check out Sketchnote Hangout
      • Check out #lrnbook
  • Relationships (3.7h – 2%)
    • Call pharmacy
  • Discretionary – Productive (21.0h – 12%)
    • Emacs (5.9h – 3% of all)
      • Have Emacs Chat with Steve Purcell
      • Move my text-scale-increase binding
      • Check out speed-type
      • Figure out how to make pivot tables in Org
      • Figure out how to define abbreviations in Org Mode
      • Revise transcript for Steve Purcell
      • Look at Yasnippet doc TODOs
      • Try out Tern
    • Apply for passport – State “WAITING” from “STARTED” [2015-01-16 Fri 15:51]
    • Redeposit into TFSA
    • Invest in bonds in TFSA
    • Analyze index cards so far
    • Make Epic Quest of Awesome sheet
    • Pick up cultural access pass from Front and Parliament
    • Reflect on asking questions
    • Apply for passport
    • Type in goals
    • Brainstorm ideas for final project
    • Start git directory for drafts
    • Writing (8.1h)
  • Discretionary – Play (6.6h – 3%)
  • Personal routines (22.8h – 13%)
  • Unpaid work (14.7h – 8%)
  • Sleep (58.3h – 34% – average of 8.3 per day)

Visualizing the internal citation network of my blog

I’m curious about the internal citation of my blog. Which thoughts have been developed over a long chain of posts? Which posts do I often link to? Where are there big jumps in time? Where have I combined threads?

2014-12-03 Internal citation network

I’ll probably need to build my own data extractor so that it can:

  • ignore weekly and monthly reviews, since I link to everything in those,
  • reconcile short and long permalinks, redirection, and sneak previews,
  • and maybe even index my sketches and look at follow-ups

and I’ll probably want to create something that I could eventually plot as an SVG or imagemap using Graphviz, or maybe analyze using Gephi.

It would be super-interesting to create some kind of output that I could fold into my blog outline or into individual posts. I would need a static dump for that one, I think.

How would I build something like this? One time, I used Ruby to analyze the text of my blog. That might work. I might be able to pull out all the link hrefs, do lookups…

As of Dec 3, 2014, there are 87 posts in 2014 that link to previous posts, out of 259 non-review posts (so roughly 34%). I used this SQL query to get that:

SELECT post_title FROM wp_posts WHERE post_content LIKE ‘%<a href=”http://sachachua.com/blog/20%’ AND post_date >= ‘2014-01-01′ AND post_title NOT LIKE ‘%review:%’ AND post_state=’publish';

Hmm. I might even be able to do some preliminary explorations with Emacs and text processing instead of writing a script to analyze this, if I focus on 2014 and ignore the special cases (short permalinks, redirection, and sneak previews), just to see what the data looks like. Rough technical notes:

perl -i -p -e s/href/\nhref/gi 2014-manip.html
grep http://sachachua.com/blog/20 2013-manip.html > list-2013
perl -i -p -e "s/(<\/a>(<\/h2>)?).*/$1/gi" list-2013
(defun sacha/misc-clean-up-reviews ()
  (interactive)
  (while (re-search-forward "\\(Monthly\\|Weekly\\) review: .*</h2>" nil t)
    (let ((start (line-beginning-position)))
      (re-search-forward "</h2>")
      (delete-region start (line-beginning-position))
      (goto-char (line-beginning-position)))))

(defun sacha/org-tabulate-links ()
  (interactive)
  (goto-char (point-min))
  (let (main-link edges nodes)
    (while (not (eobp))
      (if (looking-at "^href=\"\\(.*?\\)\".*?</a></h2>")
          ;; Main entry
          (progn
            (setq nodes (cons (match-string 1) nodes))
            (setq main-link (match-string 1)))
        (if (looking-at "^href=\"\\(.*?\\)\"")
            (setq edges (cons (concat 
                               main-link  ;; from
                               "\t"
                               (match-string 1)   ;; to 
                               ) edges))))
      (forward-line 1))
    (kill-new (mapconcat 'identity edges "\n"))))

Ooooh. Pretty. Gephi visualization of the edge list formed by links, using the Yifan Hu layout. That big thread in the middle, that’s the one about taskmasters and choice and productivity, which is indeed the core theme running through this year of the experiment. The cluster on the right is a year in review. We see lots of little links too.

Internal links for entries posted in 2014

Internal links for entries posted in 2014

Now I’m curious about what happens when we add the posts and links from 2013 and 2012, too. I’ve colour-coded this by year, with It ties together posts on sketchnoting, blogging, choice, learning, writing, plans… Neat.

blog-graph

 

What does this say? It says that even though I write about lots of different things, there are connections between the different topics, and the biggest tangle in the middle has more than 320 nodes. I have lots of blog posts that build on an idea for three or four posts, sometimes spanning several years, even if I don’t think about it in advance. There are 90 such clumps, and it might be good to revisit some of these 2- and 3-post chains to see if I can link them up even further.

Also, it could be interesting to do this analysis with tags, not just year. Hmm… Also, I should dust off my data structures and algorithms, and make my own connected-component analyzer so that I can get a list of the clumps of topics. Good ideas to save for another day!

Emacs Chat with Steve Purcell

In this Emacs Chat, Steve Purcell shares how he got started with Emacs by using a Vim emulation mode, what it’s like to give hundreds of package authors feedback on Emacs Lisp style, and how he’s eventually replacing himself with Emacs Lisp (flycheck-package). He also highlights useful packages for managing buffers of version-controlled files (ibuffer-vc), working with lines if the region isn’t active (whole-line-or-region), or maximizing certain buffers (full-frame).

http://youtu.be/Gq0hG_om9xY

Quick video table of contents (times are approximate):

0:04 From Vim to Emacs with Viper
0:11 Packages
0:18 Feedback
0:20 Lisp style
0:21 Flycheck
0:28 Versioning
0:32 Config
0:40 ibuffer-vc
0:41 whole-line-or-region
0:44 full-frame
0:47 Not using Emacs for everything
0:48 Auto-complete, hippie-expand
0:51 Graceful degradation with maybe-require-package
0:57 Making sense

Transcript will follow. In the meantime, you can check out Steve’s config at https://github.com/purcell/emacs.d, follow him on Twitter at @sanityinc, or go to his website at http://sanityinc.com/. You can find other Emacs Chats at http://sachachua.com/emacs-chat .

Got a nifty Emacs workflow or story that you think other people might find useful? I’d love to set up an Emacs Chat episode with you. Please feel free to comment below or e-mail me at [email protected]!