Experimental Emacs Hangout 2014-11-05

Event page has some comments: https://plus.google.com/events/cib5nqidkg6mpurtfuq60i2quik

YouTube page: http://www.youtube.com/watch?v=rmGTNzfit2A

Links:

Apologies for the recording weirdness – I was experimenting with the feature that lets you occasionally focus the video feed on a specific person instead of letting it switch based on volume, and sometimes I forgot that I had that on while other people were talking. Also, I was having screensharing weirdness. And I was writing down notes on a Post-It somewhere in order to minimize typing noises, but I seem to have made the note vanish (yay nerves). But hey, zeroth episode, and we’ll keep on making it better! =) If you want to add notes/highlights in the comments for this blog post, that would be awesome.

Next one Nov 19 Wed 1-3 PM EST – I’ll redirect http://sach.ac/live to it, so you should be able to find it there at that time. =)

Cooking at Hacklab: Coconut barfi

It took me an hour to get from downtown to Hacklab on a stop-and-go Queen streetcar. Next time, I should probably take the King streetcar instead, or even go all the way north to Bloor and then south on the Dufferin bus. Anyway, I’d given myself enough of a buffer to not feel horribly guilty about being late meeting people who were expecting me there around 6-ish anyway, and that was when I made it. Max was already there when I arrived, and Gabriel joined us when we were at the supermarket picking up groceries.

Chris and Alaina were busy making two courses (korma and hot-and-sour soup), so I figured we’d go with an Indian vegan dessert to accompany the korma. Some rapid Googling turned up this Coconut Barfi recipe from Diwali Sweets (by way of Veg Recipes of India’s review). We made a triple batch of the following recipe:

  • 1/2 cup semolina flour (we used medium, but this might be better with fine)
  • 1/2 cup dry coconut flakes (we used shredded)
  • 1 tablespoon coconut oil
  • 2 tablespoons chopped cashew pieces (got roasted cashews from the bulk bin so that we could snack on them while cooking)
  • pinch of salt

For the sugar syrup:

  • 1/2 cup ground raw sugar (we used turbinado sugar, couldn’t find anything raw)
  • 3 tablespoons water
  • 1/8 to 1/4 teaspoon cardamom powder (we ended up grinding our own, since the nearby supermarket doesn’t stock powdered cardamom)

It took longer to make the sugar syrup than expected, but then again, I’m pretty new to syrup making, so I wasn’t quite sure what “one thread consistency” meant. Anyway, it still turned out as nicely cardamom-scented nibble, crunchy without being jaw-breaking.

Gabriel generously remarked that the amount of salt I added made it remind him of salted caramels. I think perhaps a smaller pinch would do next time.

It was lots of fun cooking with both old friends and new acquaintances, and the kitchen at Hacklab supports having multiple people quite nicely (aside from a bit of stove coordination when we had three things on the go). Yay cooking!

Coconut Barfi recipe

Emacs, coaching, and unknowns: Figuring out what I want to learn

I’ve been playing around with the idea of hiring an Emacs coach, since Steve Purcell, Christopher Wellons, and Bastien Guerry all offer this service. It helps to go in with a clear idea of what I want to learn, though, so let me figure this stuff out.

Here are some general topics, sketching out an order for learning the subtopics:

  • Thinking syntactically, so that I can work faster and more reliably
    1. Expand-region: Faster selection.
    2. Smartparens: Logical manipulation. This is probably the biggest chunk.
    3. Erefactor, redshank: Other tools for working with Lisp.
    4. Magit: Thinking of changes in terms of commits; low priority because I rarely need to coordinate with others, although I can bump this up if working on community code
    5. In general, working with larger chunks – so also projectile and other cool tools
  • Web development workflow, so I can work more professionally and handle more complexity. Focusing on Rails, NodeJS, and AngularJS
    • Rails workflow
      1. Testing
      2. Constant testing with guard, better interaction with browsers, etc.
      3. Navigating between files in a project with Rinari or Projectile
      4. Code navigation and documentation lookup with Robe
      5. Working with things like HAML, Sass/Less, CoffeeScript
      6. Refactoring Ruby code
    • Javascript workflow
      1. Testing frameworks, running tests
      2. Getting autocomplete sorted out
      3. Integrating Skewer into the way I work
      4. Working with things like HAML, Sass/Less, CoffeeScript
      5. Rapid prototyping: Grunt, Yeoman, etc.
    • General-purpose tools
      1. Folding/overview, imenu?
      2. Jumping to specific points quickly – ace-window, ace-jump, helm-swoop
  • Integration, so that I can take advantage of Emacs in more parts of my life
    1. Organizing my journal
    2. Trying out Elnode so that I can expose Emacs information to Javascript
    3. Getting back to doing mail in Gnus
    4. Using MobileOrg to review Org on the go?
  • Internals, debugging, and contributing to the community so that I can help out, and so that I can customize and debug more extensively
    • Emacs core, Org internals, syntax, font-locking, indentation, macros, Helm, …

Coaches are also good for pointing out what you don’t even know you don’t know, which is a lot when it comes to Emacs. That’s another nice benefit of having someone look over your shoulder – they can catch you doing something in a round-about way even if you don’t even know that a more efficient way exists. But even with the stuff I know I don’t know (and that I have a reasonable plan for learning), there’s plenty to keep me occupied for the next few years. =) Besides, helping out on IRC and in mailing lists/newsgroups will expose me to stuff I don’t know too.

So instead of turning up on one of these people’s (virtual) doorstops and asking, “Can you teach me all the stuff I don’t know?”, maybe this is what I can do instead:

  • Lay the groundwork by writing about and demonstrating the things I do know, so that I explore my limits, help other people learn, possibly get suggestions from random passers-by, and help potential mentors/coaches quickly get a sense of what I might be missing
  • Double-check my plans for learning different things with more experienced people who can give me feedback on sequence, exercises, and things I should include
  • Develop plans for deliberate practice of different components; slow down and notice opportunities to try things out
  • Share what I’m learning and my plans for what to learn next
  • Touch base once in a while

So much to learn! =)

Monthly review: October 2014

I wrote last month that in October, I was planning to:

  • Help with the last big milestone for my consulting client
  • Turn over all of my responsibilities and document things I’ve learned
  • Cook at the new Hacklab and explore more recipes at home
  • Do my corporate books: this year, I added dividends and HST quick method!

Big milestone successfully passed, hooray! There are still a few minor hiccups that the team’s working through, but that’s normal. In other news, I signed a new contract, and we have a new team member too. That means I don’t actually have to disappear abruptly, and I can gradually document and transfer what I know.

I’ve been having a lot of fun cooking at the new Hacklab. We invested a lot in kitting out the new kitchen, and that’s really paid off. It’s more comfortable cooking with all those tools and all that counter space. Whee! You can check out our notes in the public wiki.

I’m waiting to hear back from the bookkeeper I hired through oDesk before submitting my corporate tax return and my HST return this year, but even if I have to do it on my own, I feel reasonably confident about my numbers.

In November, I plan to:

Sketches:

  1. 2014.10.06 Sometimes – often – I don’t feel like making conversation
  2. 2014.10.11 Considering winter coats
  3. 2014.10.21 Exploring my current motives
  4. 2014.10.21 Reflecting on my primary motives
  5. 2014.10.22 On Hell Yeah and other approaches
  6. 2014.10.22 People who follow similar motivations well
  7. 2014.10.22 What kinds of activities do I want to fully enjoy
  8. 2014.10.22 What would I like to be able to do with sustained motivation
  9. 2014.10.31 How do I want to become a better developer
  10. 2014.10.31 What do I want from this phase of my experiment
  11. 2014.10.31 What do I want the rhythm to feel like

Weekly review: Week ending October 31, 2014

I signed a new consulting contract, so there’s going to be web development and social business consulting (analytics, etc.) in my near future. I’m planning to work fewer hours, though, so that should free up more time for writing, cooking, and other forms of improvement. =)

Along those lines, I’ve been investing time into improving my development tools and workflow. Yay Emacs! I think I’m getting the hang of working with skewer-mode now. expand-region is probably next on my list of things to get used to.

Next week, I’m looking forward to tweaking my workflow further, and sketching out some plans for the kind of functionality that might be good to build over the next year. We have a developer ramping up, so if I spend more time on the design phase for both prototypes and reporting, that should help her get going faster. I’m also looking forward to experimenting with Emacs hangouts and spending some time working on Quantified Awesome.

In other news, it snowed today in Toronto. Very light snow and still bike-able, but officially snow. And I also finished my first pass reading The Art of Slow Writing – plenty of notes to take from this book, I think. Onwards!

Blog posts

Sketches

Link round-up

Focus areas and time review

  • Business (57.0h – 33%)
    • Earn (33.8h – 59% of Business)
      • E1: Update analytics
      • E1: Wrap up neatly
      • E1: Brainstorm prototypes I want to propose
      • Earn: E1: 2.5-3.5 days of consulting
    • Build (19.3h – 33% of Business)
      • Drawing (0.0h)
      • Delegation (0.0h)
        • Plan business and delegation for this phase
      • Packaging (0.0h)
      • Paperwork (0.0h)
        • Hire accountant and assemble information
        • Send trial balance and general ledger to accountant
        • Sort out invoice/deposit thing
    • Connect (3.8h – 6% of Business)
      • Attend QS meetup
      • Prepare for Hacklab open house
      • Coach Lucas on programming
      • Organize Emacs Hangout
      • Process Quantified Self videos
  • Relationships (2.4h – 1%)
  • Discretionary – Productive (10.5h – 6%)
    • Emacs (7.4h – 4% of all)
      • Emacs: Evaluating Javascript and CSS in Chrome using Skewer Mode
      • Emacs: Limiting Magit status to a directory
      • How we keep (financial) score
      • Publishing WordPress thumbnail images using Emacs and Org2Blog
    • Quantified Awesome
      • Fix forms and bootstrap 3
      • Fix token authentication
      • I can add an item
      • I can organize items by aisle/category
      • Items have a price history
      • Start working on kitchen organizer
      • Update to Bootstrap 3
      • Upgrade Rails 3 to Rails 4
      • We can cross items off
      • Update to Rails 4.1
    • Bike to work
    • Get passport pictures
    • Draw a cat
    • Pick up exercise ladder again for three straight days
    • Writing (2.7h)
      • Organize a journal section in my notes
  • Discretionary – Play (6.6h – 3%)
  • Personal routines (21.7h – 12%)
  • Unpaid work (12.4h – 7%)
  • Sleep (57.4h – 34% – average of 8.2 per day)

Publishing WordPress thumbnail images using Emacs and Org2Blog

I often include large images in my blog posts since I use sketches as another way to think out loud. I’d gotten used to using the WordPress web interface to drag and drop them into the relevant section of the page. I write most text in Emacs/Org Mode/Org2Blog because of the better outlining and writing tools, and then I used sacha/org-copy-region-as-html (which you can grab from my Emacs configuration) to copy the HTML markup and paste it into WordPress. Of course, I use Emacs for source-code heavy posts that make the most of its syntax formatting support.

Someone asked me recently about how to post and update blog posts with images through Org2blog, and if I had any recommendations for workflow. I’d dropped Windows Live Writer since it was flaking out on me and the WordPress web interface had improved a lot, but before recommending just using WordPress to add images, I was curious about whether I could improve my blogging workflow by digging into Org Mode and Org2Blog further.

It turns out (like it usually does in the Emacs world) that someone had already solved the problem, and I just didn’t have the updated version. Although the upstream version of Org2Blog didn’t yet have the thumbnail code, searching for “org2blog wordpress thumbnail” led me to cpbotha’s Github issue and pull request. Punchagan’s version had some changes that were a little bit ahead of cpbotha’s, so I dusted off my ancient org2blog repository, cloned it onto my computer, and issued the following commands:

git remote add upstream https://github.com/punchagan/org2blog
git pull upstream master
git remote add cpbotha https://github.com/cpbotha/org2blog.git
git pull cpbotha image-thumbnail

and tested it out on a blog post I’d already drafted in Org. It took me a little while to remember that the file URLs didn’t like ~, so I specified a relative path to the image instead. But then it all worked, yay! A quick git push later, and my Github repository was up to date again.

So now I’m back to running a Git version of org2blog instead of the one that I had installed using the built-in packaging system. The way I make it work is that I have this near the beginning of my Emacs configuration:

;; This sets up the load path so that we can override it
(package-initialize nil)
;; Override the packages with the git version of Org and other packages
(add-to-list 'load-path "~/elisp/org-mode/lisp")
(add-to-list 'load-path "~/elisp/org-mode/contrib/lisp")
(add-to-list 'load-path "~/code/org2blog")
(add-to-list 'load-path "~/Dropbox/2014/presentations/org-reveal")
;; Load the rest of the packages
(package-initialize t)
(setq package-enable-at-startup nil)

This allows me to mostly use the packages and to satisfy dependencies, but override some of the load paths as needed.

Hope that helps someone else!