December 2011

Transcript: Blogging (Part 14): Writing for yourself and writing for others

December 1, 2011 - Categories: blogging, tips, writing
This entry is part 14 of 16 in the series Discovering Yourself Through Blogging

Hat-tip to Holly Tse for organizing this interview!

Holly Tse: You mentioned you’re writing to share with other people, but you’re also writing for yourself. What’s the kind of balance there…

Sacha Chua: In terms of the stuff I post, a lot of it is for me. A lot of the things I publish on my blog are there because I want to look back at this forty, fifty, sixty years from now, and I want to be able to remember bits and pieces and build on the ideas I had before. A lot of this is me. Some of it is answering other people’s questions, or putting things out there just in case it will help somebody searching sometime later.

There’s some public stuff on my blog, but there are also bits and pieces that are a bit rough right now, or that need some filling in, or that are incomplete and need some thinking about, or that are simply private because I haven’t figured out a way… Even if you’ve got a publicly okay version of the story, there are all these interesting bits and pieces that nobody would quite figure out, and there are all these stories I wanted to tell first. So I have these private notes too. I don’t have quotas for any of them. I write in the process of figuring things out, and then I figure out what’s the widest group I can share this with.

In fact, my mom used to tell me to e-mail her more often, and I was thinking, well, most of the stories that I’d probably e-mail in a family update are things I feel comfortable sharing on my blog. Again, that push towards sharing things as widely as possible… You never know what kinds of ripples they’ll trigger, what kinds of things you’ll learn from other people. Don’t worry too much about balance. Write. Post as much as you feel comfortable with. Feel free to keep private notes. That works too, especially if that helps you remember and understand things. Have fun.

HT: You must get a quite a number of comments on your blog. Do you answer all the comments? What’s your opinion on comment etiquette?

SC: I do try to answer most of my comments, but what I really really like is when people start answering each other in comments. That’s where I get to learn something extra new. When people comment with a question, one of the great things about that… If people e-mail me, I’m the only one who gets to see that, unless I post it to my blog afterwards. When people leave a comment on my blog–maybe they’re asking a question or sharing an insight, and sometimes that doesn’t require a response, such as when they’re sharing a story–and it prompts somebody else to respond to them, then we all win. That’s something I would never have thought of, it’s outside my experience, and yet I get to learn from it because I’m listening in on this conversation, and other people are too. I really like comments.

I would love it if people kept commenting–and people do. They comment about the most surprising things, even. I’d write about something like burning my pancakes, and I’d get all these comments, including lots of tips on how not to burn pancakes. It’s surprising to see what people resonate with and what people leave comments on. I’m so glad that facility is there. If it were just me talking at people, broadcasting, I’d be limited to what I know. If it’s just me replying to people’s questions, then they’re just limited to what I know. When the conversation is in comments, then everybody can see everybody else. Even better when it’s on other people’s blog posts that link to mine… The conversation does get a little bit harder to track, but it’s so awesome. Then you get to see people’s thoughts in depth.

For example, I’m going to post notes of this on my blog. After the teleconference, you can go to If you search for lotus blossoming summit or if you look in my blogging category, you’ll find notes like this, and you can go through what other people have said. Or, ideally, if you’re going to write your own stuff, you can link to it. Then I can find your blog post or you can tell me, and I can respond to that too. There are all sorts of conversations going on at all sorts of levels.

HT: So that’s

SC: That’s an easier to remember domain name. My name is harder to spell for most people. If you want to go to that too –

HT: . It’s also on the Lotus Blossoming telesummit site.

SC: You can follow me on Twitter, too.


Upcoming decision: Considering different cellphone plans for J-

December 2, 2011 - Categories: decision

J- currently uses a prepaid cellphone with Virgin Mobile in order to coordinate with us, her mom, and her friends. She’s had it for a while and has been pretty good at using it, although we’re not happy with Virgin Mobile’s billing and credits system. We’re looking around for a better cellphone plan for her, ideally something that limits the risks of accidental charges while allowing important contacts any time.

Mobilicity’s current 50% promotion looks tempting. Their least expensive plan is $12.50/month for unlimited talk and text assuming 12 months’ preauthorized credit, although you’ll also need to add the cost of the phone (probably $99.99). That comes out to around $250 plus tax for the year.

A comparable plan would be WIND Mobile’s Smart plan ($25/month) with unlimited calls and text. The phone would be almost free (put on the Wind Tab and paid off through phone use), so we’d be looking at $300 plus tax for the year.

Like Mobilicity, WIND offers a small discount for multiple accounts. I’m occasionally tempted to check out Wind Mobile’s $29 unlimited talk/text/data plan, although (a) I’m almost always in WiFi zone, (b) the Kindle is handy for looking things up if I really, really need to, and (c) the Nexus One battery life is a bit short, so I won’t be doing a lot of mobile browsing on the rare occasions that I’m outside a wireless network. I may switch within the next year, but I don’t mind holding out until then, as the promotional rate is good for only one year.

Will network coverage be sufficient? Fortunately, we don’t have to rely on the glossy maps published by cellphone companies. Coverage Mapper shows user-generated data for Mobilicity and WIND Mobile. Our neighbourhood, J-‘s school, and her mom’s place look like they’ll mostly be okay.

Decisions, decisions…

Weekly review: Week ending December 2, 2011

December 3, 2011 - Categories: review, weekly

This week was busy because we were getting ready to launch Project O. Launch date for project O is on Tuesday, launch date for project T is on Wednesday – exciting times!

I switched to using Tap Log for Android instead of Time Recording for Android so that I could easily capture other data (mood, reading, etc.) in addition to activities. I’ve just finished writing the code to analyze the timestamps, so I’ll be able to use the week’s data in today’s review.

W- got the furnace upgraded, so that’s another thing checked off our list.

Noticed I was feeling fatigued at work, so I slept more. Now back to normal, I think.

Slow and steady wins the race!

From last week’s plans

  • Work
    • [X] Project O: Get ready for launch
    • [X] Project T: Get closer to launch
    • [-] File expenses
    • [-] Work on Connections Toolkit
    • Put together cartoon and logo for SamePlace
  • Relationships
    • [-] Clear furniture so that insulation can be installed
    • [X] Go to Quantified Self Toronto meetup
    • [X] Add memories to Quantified Awesome
    • [-] Get Quantified Awesome ready for other users
  • Life
    • [-] Take pictures of rest of clothes
    • [-] Increase test coverage to at least 60%

Plans for next week

  • Work
    • [ ] Survive launch of project O
    • [ ] Survive launch of project T
    • [ ] File expenses
    • [ ] Upload new cartoon
  • Relationships
    • [ ] Clear furniture and simplify stuff
    • [ ] Add more memories to Quantified Awesome
  • Life
    • [ ] Experiment with tracking mood more
    • [ ] Add public/private and todo/done to text notes

Time analysis

As mentioned, I rejigged my time tracking system to use Tap Log instead of Time Recording.

Activity This week Last week Delta Notes
! Discretionary 22.7 29.5 -6.8
! Personal care 27.9 14.2 13.7
! Unpaid work 11.0 11.4 -0.4
A – Sleep 64.6 59.6 5.0 More tired this week, so I slept more
A – Work 41.8 53.4 -11.6 Cut back so that I have some slack for next week’s hectic launches
D – Break 0.9 -0.9
D – Family 0.1 0.1
D – Harry Potter 0.9 0.9 Played with J-
D – Quantified Awesome 5.0 4.1 0.9 Added Tap Log analysis, memories
D – Read 3.5 3.5 I, Claudius; Claudius the God
D – Shopping 1.8 2.8 -0.9
D – Social 8.5 18.6 -10.1 Study group, Quantified Self Toronto
D – Writing 3.0 3.0 -0.1
P – Eat 9.7 2.2 7.5
P – Exercise 2.9 -2.9
P – Plan 3.7 3.7 Figured out my plan for the next year
P – Routines 6.5 9.0 -2.5
P – Walk 8.0 8.0 Separated this from P – Exercise
UW – Cook 5.7 3.5 2.2
UW – Subway 3.2 3.2 Separated this from UW – Travel
UW – Tidy up 1.9 2.4 -0.4
UW – Travel 5.6 -5.6
UW – Wait 0.2 0.2 Tried tracking waiting for a little bit, decided not to
Activity Sat Sun Mon Tue Wed Thu Fri Total Average Weekday average Weekend average
Sleep 7.8 11.8 7.9 12.3 7.5 8.5 8.8 64.6 9.2 9.0 9.8
Work 2.9 0.0 10.7 8.2 6.4 6.2 7.4 41.8 6.0 7.8 1.4
Discretionary 8.8 2.9 1.5 0.8 4.5 1.6 2.6 22.7 3.2 2.2 5.8
Unpaid work 3.9 2.7 1.1 0.6 0.9 0.5 1.4 11.0 1.6 0.9 3.3
Personal care 0.7 6.6 2.8 2.2 4.7 7.1 3.8 27.9 4.0 4.1 3.6

Clearing out the basement

December 4, 2011 - Categories: life

We spent most of yesterday afternoon reorganizing the basement. We had moved boxes out of the basement in order to make room for the water meter installation, and we decided to postpone putting them back until we finished with the furnace upgrade. In the meantime, we squeezed our way past flip-top bins and bankers’ boxes filled with who knew what.

The furnace had finally been replaced, so it was time to win our basement back. W- and I set to work, methodically going through the stacks. We kept a garbage can and a recycling bin close by, and made frequent trips to the living room in order to drop off things destined for donation.

A few things made it back into the basement or various nooks around the house, duly labeled and added to my stuff-tracker. The vast majority of the things did not. Imagine – we could have skipped all those weeks of squeezing past those stacks if we had done this kind of review in the first place!

Today we’re going to work on clearing the second floor and moving furniture around so that the insulation installers can get to wherever they need. Along the way, we’ll probably bundle up more things for donation or disposal.

We’re working on having less stuff, and progress feels liberating.

Quantified Awesome: How I’m starting to use Tap Log for Android

December 5, 2011 - Categories: android, geek, quantified

At Rails Pub Nite the other week, Andrew Louis showed me his timestamped-based self-tracker inspired by Your Flowing Data and similar semi-structured text entry systems. He had a year of data in his system, and had built a fascinating dashboard. 

Nudged by the idea, I moved from using Time Recording to capturing timestamped data, and started using Tap Log for data entry because it lets me set up categories for quick entry.

I wanted to use Tap Log to capture the following types of data:

  • activities (work, sleep, etc.) so that I can do weekly and long-term time analysis
  • meals, so that I can get a sense of what I eat and when
  • thoughts, so that I can jot quick ideas, keep track of things I need to follow up on, and copy information into other systems
  • moods / feelings

screenshot_11I’ve set up my Tap Log to start with high-level categories. From this screen, I can quickly enter text or choose an activity.

The “Text” button is in yellow, which means that the next screen will have a text entry screen. “Sleep” is in red, which means that it needs no additional input – it creates a log entry, and that’s it. Entries like “Discretionary” lead to other menus, which are set up similarly.

For example, if I’m planning to write, I’d start by tapping “Discretionary”, then “Writing”, and I’d add a note about writing for my blog. 

screenshot_20You can have up to three levels of categories. Timestamped entries can be associated with numbers, ratings (1-5), or text. You can review log entries in the application itself, or you can export the log as a CSV and process it yourself.

The CSV will give you the following data:

  • latitude, longitude, altitude, accuracy, gpstime, street, city, state, country, zip
  • samples, _id
  • timestamp, DayOfYear, DayOfMonth, DayOfWeek, TimeOfDay
  • catOne, catTwo, catThree
  • number, rating, note

For my use, I focus on _id (for updates), timestamp, catOne, catTwo, catThree, number, and note. I usually keep GPS off on my Google Nexus One in order to save battery. Besides, GPS performance on that phone isn’t very good. W- wins our GPS battles all the time thanks to his trusty N8. You might find the GPS tagging handy, though.

Because I’m interested in activity tracking, I need to infer ending timestamps from the data. Some of my records are associated with activities. Some of them capture other data, such as thoughts. Here’s the basic idea behind my code:

  • Read each timestamp and copy it into my database, updating the record if it already exists
  • Re-sort the records by timestamp
  • Delete time records for this period
  • For each timestamp in the updated period:
    • If this is an activity (based on the category)
      • Close the last activity and save it as an activity record
      • Set the last activity to the current activity

I also added some text analysis to look for notes tagged with !memory, !todo, !private, and other tags I’m starting to find handy.



and activity graphs at


Observations: I like the ability to capture text and ratings quickly, and I look forward to taking advantage of that. I’ve been tracking activities just as much as I did on Time Recording, so the lack of on-phone activity summaries hasn’t gotten in my way.

What would make this even better? I’d like built-in time tracking, although that might mean that people would need to indicate which buttons correspond to activities. I’d like to have full Tasker integration so that I can automatically create entries based on different events, but I can get around that by logging the information separately and then merging it based on time. Sometimes I wish I could have four or five levels of categories, but I can use text for now. Mostly, I just need to keep adding to the analysis tools I’ve been building on Quantified Awesome: tags, activities, summaries, paging, and so on.

So that’s where I am. Let’s see where this helps me go!

Busy, busy, busy week

December 6, 2011 - Categories: work

Tuesday, Dec 6: Launch project O. Wednesday, Dec 7: Launch project T. Thursday, Dec 8: Have insulation installed (W- taking care of coordinating with contractors). J-‘s with us too, so homework help will take up part of our evenings. There’s probably more, maybe, but we’ll see.

It’s a packed week, which means it’s even more important to slow down. Stress and hurry result in mistakes, which make things worse. Yes; slow down, write things out, follow the steps, and make time for notes, and I’ll make it through to the end of the week. Each minute will pass with or without me anyway, so I may as well make the most of it.

Writing is part of the way I keep sane. I notice that when I go for too long without writing, I feel a little fidgety, a bit unraveled, somewhat frayed around the edges. So, writing. There’s something about leaving myself these notes to mark the passage of time, punctuating the otherwise breathless stream with commas and periods and the occasional tangential paragraph.

Sleep. Sleep is important, too. I’ve been getting a decent amount of sleep.

Not stressing out is important. It’s particularly useful to remember that there isn’t that much more I can do this week to affect the way the next few days play out. We’ve prepared and prepared, and now we’ll see the results.

Oddly enough, thinking about the worst-case scenario helps. Even if both launches were toast, the contractors botched the insulation, and lots of other things happened, we’d adapt. Things would be okay.

Best case: what if things go without a hitch? Then, hypothetically looking back, I’d like to have worried just enough to improve my notes and productivity without worrying so much that the stress got in the way. Balance.

The more I get used to this, the easier it is to not get overwhelmed. =) It’s just one thing at a time. All I have to do is to do one thing well, and the next, and the next, without losing sight of my overarching priorities.

Geek tidbits: Postfix configuration for development and testing

December 7, 2011 - Categories: development, geek, ibm, rails, work

From November:

We got the mail information for our Rails site, so I reconfigured the mail server. We’re doing a lot of development, and testing mail is much easier when you can send example mail addresses to one bucket of mail. Here’s how I set up the server to redirect everything addressed to to a test mail address.

First, I set the mail server up for local delivery only, and I confirmed that I could send mail from a local user to another local user account. Then I experimented with rewriting, using virtual_alias_maps to rewrite addresses to a specific account. I confirmed that worked. Then I checked the database to make sure we didn’t have live e-mail addresses, reconfigured the mail server to deliver Internet mail, and crossed my fingers. A few quick tests showed that mail was being delivered as planned – mail routed to our temporary address, everything else delivered normally. We’ll see how this works!

Here’s our /etc/postfix/

smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =,
relayhost =
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
default_transport = smtp
relay_transport = smtp
virtual_alias_maps = hash:/etc/postfix/virtual
inet_protocols = ipv4

And /etc/postfix/virtual: [email protected]

Don’t forget to run postmap /etc/postfix/virtual; /etc/init.d/postfix reload after changing /etc/postfix/virtual and your configuration.

Transcript: Blogging (Part 15): Tools to help you get started

December 8, 2011 - Categories: blogging, tips, writing
This entry is part 15 of 16 in the series Discovering Yourself Through Blogging

Hat-tip to Holly Tse for organizing this interview!

Holly Tse: We probably have under three minutes left. We’ve got one more question here from Carla, and it seems like the most appropriate question to end this. She’s asking, “What recommendations would you give on which blogging tools to get started easily?”

Sacha Chua: Whichever you find easiest. For most people, that’s either or, or something like that. or The tools don’t really matter as much as the attitude and the ideas you bring to it. Some tools make it easier to post than others. Things like Tumblr or Posterous are also gaining in popularity. But what you really want to do is get into the habit of thinking, “What do I want to share? What do I want to learn?” Then you almost can’t help finding tools that fit the way that you work. That’s the main thing.

HT: WordPress or Blogger, but really, whatever works. Whatever works for you.

SC: I think the much more important thing there is the habit of saying, “Well, what do I want to learn? What can I share? What’s different about today? What do I want to remember?” That’s probably the best tool recommendation I can make – that mental tool of asking yourself those questions. Then writing–even if it’s boring, even if you feel awkward and gangly like a high school student trying to figure out what to put in an essay–write for yourself, and you’ll gradually figure things out.

HT: Yes. Very good. It’s not just about the technology. It’s about why you are blogging.

SC: It’s almost never about the technology. If there’s anything I can do to help you get started with that, get in touch with me. I’m @sachac on Twitter. You can follow the link from there to get to my blog if you want to, and you can leave comments on that too.

HT: Thank you very much for joining us this evening. I want to say to everyone who is listening to us or catching the audio replay (which is available for 48 hours after the broadcast), Sacha’s so enthusiastic about blogging, she convinced me to start blogging again, so… Yay! Congratulations Sacha!

SC: And this is where you repeat your blog URL so that everyone can check it out.

HT: Yes, so it’s – I have to spell it out, I have one of those names too –

SC: I look forward to finding out about all these wonderful blogs… The blogs that you, dear listeners, are going to start or continue… I’d love to learn from you and your experiences too. We’re all figuring things out. No one’s a real expert, and we’re all going to learn from each other’s stories.

HT: Okay, great! Thank you so much! I hope everyone has a good evening and we’ll connect in the blogspace.

SC: Have fun!

HT: Thank you. Good night!

Tada! You can find this 15-part series at Discovering Yourself through Blogging, including a text and PDF version.

Blog analysis for 2011: 173,363 words so far; also, using the Rails console to work with WordPress

December 9, 2011 - Categories: analysis, blogging, geek, review

How many posts did I post per month, not including this or future posts? (See the geek appendix below to find out how I got to the point of being able to run code snippets like this:)

posts = WpBlogPost.published.posts.year(2011)
posts.count(:id, :group => 'month(post_date)').sort { |a,b| a[0].to_i <=> b[0].to_i }

Result: [[“1”, 32], [“2”, 34], [“3”, 33], [“4”, 33], [“5”, 34], [“6”, 39], [“7”, 33], [“8”, 33], [“9”, 31], [“10”, 33], [“11”, 31], [“12”, 8]]

This is a straightforward SQL query to write, but ActiveRecord and scopes make it more fun, and I can easily slice the data in different ways. Becuase I’ve connected Rails with my WordPress data, I can use all sorts of other gems. For example, Lingua::EN::Readability can give me text statistics. It’s not a gem, but it’s easy to install with the provided install.rb. Code tends to throw off my word count, so let’s get rid of HTML tags and anything in pre tags, then calculate some text statistics:

include ActionView::Helpers::SanitizeHelper
require 'lingua/en/readability'
# Needs lots of memory =)
post_bodies = { |x| strip_tags(x.post_content.gsub(/<pre.+?<\/pre>/m, '')) }
all_text = post_bodies.join("\n").downcase
report =
Number of words in 2011 173,363
Flesch reading ease 65.3
Gunning Fog index 11.0
Flesch-Kincaid grade level 8.4

According to this, my writing should be readable by high school seniors, although they’ll probably have to be geeks in order to be interested in the first place.

The Readability library has other handy functions, like occurrences for finding out how frequently a word shows up in your text.

I 4375 #4 – It’s a personal blog, after all
you 1926 #9 – Not so bad
my 1555
time 933
people 897
work 710
W- 200
presentations 190
J- 133
Drupal 111
Rails 97
Emacs 77
zucchini 23 Oh, the summer of all that zucchini…

I want to get better at clear, specific descriptions. That means avoiding adjectives like ‘nice’ and hedging words like ‘really’.

really 227 Hmm, I can cut down on this
maybe 211 This one too
probably 211 Down with hedging!
awesome 88 I overuse this, but it’s a fun word
nice 15 The war on generic adjectives continues.

Let’s look at feelings:

happy / happiness / wonderful 107
busy 33
worried / anxious / worry 30
tired 20
excited / exciting 21
delighted 4
suck 4
sad 2

I recently used the N-Gram gem to analyze the text of Homestar reviews looking for recurring phrases. I suspected that one of the contractors we were considering had salted his reviews, and unusual recurring phrases or spikes in frequency might be a tip-off. I can use the same technique to identify any pet phrases of mine.

csv ='ngrams.csv', 'w')
n_gram =, :n => [2, 3])
csv << "NGRAM 2"
n_gram.ngrams_of_all_data[2].sort { |a,b| a[1] <=> b[1] }.map { |a| csv << a };
csv << "NGRAM 3"
n_gram.ngrams_of_all_data[3].sort { |a,b| a[1] <=> b[1] }.map { |a| csv << a };

The ten most common 3-word phrases on my blog tend to be related to planning and explaining. It figures. I can stop saying “a lot of”, though.

Phrase Frequency
i want to 158
a lot of 126
so that i 94
be able to 86
that i can 76
you want to 74
one of the 68
that you can 63
in order to 55
i need to 55

Some frequent two-word phrases:

i can 425
you can 408

Two-word phrases starting with “I’m…”

i’m going 52
i’m not 29
i’m looking 25
i’m working 24
i’m learning 23
i’m sure 16
i’m thinking 15
i’m glad 14
i’m getting 12

I wonder what other questions I might ask with this data…

Geek appendix: Using the Rails Console to work with WordPress data

The Rails console is awesome. You can do all sorts of things with it, like poke around your data objects or run scripts. With a little hacking, you can even use it as a smarter interface to other databases.

For example, I decided to get rid of all the syntax formatting that Org-mode tried to do with my blog posts when I published them to WordPress. Fortunately, this was the only use of span tags in my post content, so I could zap them all with a regular expression… if I could confidently do regular expressions in the MySQL console.

In the past, I might have written a Perl script to go through my database. If desperate, I might have even written a Perl script to do a regular expression replacement on my database dump file.

Rails to the rescue! I decided that since I was likely to want to use data from my WordPress blog in my Rails-based self-tracking system anyway, I might as well connect the two.

I found some code that created ActiveRecord models for WordPress posts and comments, and I modified it to connect to a different database. I added some scopes for easier queries, too.

class WpBlogPost < ActiveRecord::Base
  establish_connection Rails.configuration.database_configuration["wordpress"]

  set_table_name "wp_posts"
  set_primary_key "ID"

  has_many :comments, :class_name => "WpBlogComment", :foreign_key => "comment_post_ID"

  def self.find_by_permalink(year, month, day, title)
         :conditions => ["YEAR(post_date) = ? AND MONTH(post_date) = ? AND DAYOFMONTH(post_date) = ? AND post_name = ?",
                         year.to_i, month.to_i, day.to_i, title])

  scope :posts, where("post_type='post'")
  scope :published, where("post_status='publish'")
  scope :year, lambda { |year| where("year(post_date)=?", year) }
class WpBlogComment < ActiveRecord::Base
  establish_connection Rails.configuration.database_configuration["wordpress"]

  # if wordpress tables live in a different database (i.e. 'wordpress') change the following
  # line to set_table_name "wordpress.wp_comments"
  # don't forget to give the db user permissions to access the wordpress db
  set_table_name "wp_comments"
  set_primary_key "comment_ID"

  belongs_to :post , :class_name => "WpBlogPost", :foreign_key => "comment_post_ID"

  validates_presence_of :comment_post_ID, :comment_author, :comment_content, :comment_author_email

  def validate_on_create
    if WpBlogPost.find(comment_post_ID).comment_status != 'open'
      errors.add_to_base('Sorry, comments are closed for this post')


I specified the database configuration in config/database.yml, and granted my user access to the tables:

  adapter: mysql
  encoding: utf8
  database: wordpress_database_goes_here
  username: rails_username_goes_here

After I rigged that up, I could then run this little bit of code in Rails console to clean up all those entries.

WpBlogPost.where('post_content LIKE ?', '%<span style="color:%').each do |p|
  s = p.post_content.gsub /<span style="color:[^>]+>/, ''
  s.gsub! '</span>', ''
  p.update_attributes(:post_content => s)

Cleaning up subscripts (accidental use of underscore without escaping):

WpBlogPost.where('post_content LIKE ?', '%<sub>%').each do |p|
  s = p.post_content.gsub /<sub>/, '_'
  s.gsub! '</sub', ''
  p.update_attributes(:post_content => s)

Now I can use all sorts of other ActiveRecord goodness when generating my statistics, like the code above.

Weekly review: Week ending December 9, 2011

December 10, 2011 - Categories: review, weekly

From last week’s plans

  • Work
    • [X] Survive launch of project O
    • [X] Survive launch of project T
    • [X] File expenses
    • [X] Upload new cartoon
  • Relationships
    • [X] Clear furniture and simplify stuff
    • [-] Add more memories to Quantified Awesome
    • Helped W- with mudding and drywall repair
    • Wrote Christmas cards
  • Life
    • [X] Experiment with tracking mood more
    • [/] Add public/private and todo/done to text notes – added public/private, but not yet todo/done

Plans for next week

  • Work
    • [ ] Follow up on possible next engagements
    • [ ] Work on high-priority project O tasks
    • [ ] Follow up on project T
  • Relationships
    • [ ] Help fix up the house again
    • [ ] Add more memories
    • [ ] Send Christmas cards and packages
    • [ ] Post blog review
  • Life
    • [ ] Plan Android app for self-tracking

Time analysis

This week was pretty good, sleep- and work-wise, despite two launches and lots of household upheaval due to energy efficiency improvements. I managed to get an average of 8.8 hours of sleep, I kept work to reasonable limits (40 hours for my main project, and 7 hours for the other one), I helped out around the house, and I even had some time to work on blog reviews and Quantified Awesome hacking. Not bad at all. All crunch weeks should be like this.

Activity Sat Sun Mon Tue Wed Thu Fri Total Average Weekday average Weekend average
Sleep 9.6 7.1 9.3 8.6 9.7 8.9 8.1 61.3 8.8 8.9 8.3
Work 3.8 8.3 5.7 7.8 9.8 6.6 4.8 46.8 6.7 6.9 6.1
Discretionary 5.6 2.8 2.4 5.2 2.5 3.5 8.2 30.3 4.3 4.4 4.2
Unpaid work 4.0 5.0 1.6 0.2 0.8 1.2 0.2 13.1 1.9 0.8 4.5
Personal care 1.0 0.8 5.0 2.1 1.1 3.8 2.7 16.5 2.4 2.9 0.9

The big changes this week were:

  • more time working on Quantified Awesome – added filters and all sorts of capabilities for reporting on my Tap Log entries, did some textual analyses of my blog
  • less walking, because I worked from home two days this week
  • less socializing, because W- helped J- with homework
  • less planning, now that I’ve figured out what I want to do over the next year
  • less cooking
  • more writing – working on my yearly blog review
  • more tidying up and moving furniture around

I think the next thing that will help me improve my tracking is for me to build my own Android application. Tap Log Records is nice, but it waits for you to finish entering all the information before it records the timestamp, and it doesn’t have some reporting capabilities that I would find really handy on my phone. I could suggest improvements, or I can build something that I can eventually get to sync with my service. I’ve been meaning to learn more about app development, anyway, so this might be a good learning experience. After the letters and blog reviews, I think…

Start 12-03 11-26
End 12-09 12-02 Last week
Activity This week Last week Delta
! Discretionary 30.3 24.2 6.0
! Personal care 16.5 24.0 -7.5
! Unpaid work 13.1 11.0 2.1
A – Sleep 61.3 63.1 -1.8
A – Work 46.8 45.6 1.2
D – Family 0.1 0.1 0.1
D – Harry Potter 0.3 0.9 -0.5
D – Other 0.3 0.3
D – Quantified Awesome 11.7 5.0 6.7
D – Read 0.9 3.5 -2.6
D – Shopping 1.8 -1.8
D – Social 5.6 10.0 -4.4
D – Travel 2.0 2.0
D – Writing 9.3 3.0 6.3
P – Drink 0.4 0.4
P – Eat 8.4 9.7 -1.2
P – Plan 3.7 -3.7
P – Routines 4.9 6.5 -1.6
P – Walk 2.8 4.2 -1.3
UW – Cook 1.6 5.7 -4.1
UW – Other travel 0.1 0.1
UW – Subway 1.2 3.2 -2.0
UW – Tidy up 10.2 1.9 8.3
UW – Wait 0.2 -0.2

2011 in review

December 11, 2011 - Categories: review, sketches, yearly

2011-12-14: Oops! Forgot to make sure the linked image was the original size. Fixed! Also, added a PDF link for people who aren’t on Slideshare.

Just posted my yearly review for 2011. You can browse through the annotated pages on Slideshare. You can also download the PDF from Slideshare or from my site. View it in full screen mode for the most fun. (Mom, if you want to print this, you’ll need 182 sheets of legal-size paper…)

2011 –

View more presentations from Sacha Chua

In case the embed doesn’t work or you don’t want to go through the entire thing, you can still see this year as a sketch (click on it for a larger version):


Want to go further back in time? Check out my other yearly reviews!

Quantified Awesome: Thinking about what I want to build next

December 12, 2011 - Categories: development, geek, quantified

One of the best ways to make the most of those little pockets of time is to keep a someday list. What does my someday list for Quantified Awesome look like? What do I want to build next?

Emacs interface, so that I can add data and synchronize my Org-mode files: I’m split between Emacs and the Web right now. I love the customizability of Emacs, but I like the way my web app lets me easily share information. Solution: Build an API for Quantified Awesome, then integrate Emacs with it!

Android app: I’ll probably start with simple reports using the data exported from Tap Log Records, and maybe a synchronization tool that reuses the REST API I’ll be developing for Emacs integration anyway. After that, I can build my own tracking tools, which would make updating things like stuff locations much easier.

Shared memories: One of my projects is to collect and share family memories. It would be wonderful to organize these into a rough timeline and allow other people like my mom to add corrections or stories of their own. Maybe it will grow into a collaborative memory system someday!

100% test coverage: It’s my own project, so I might as well.

More graphs and statistics: Because slicing and visualizing data is fun!

Integrate my financial data, perhaps? Good to have my envelope-tracking system reflected in my personal dashboard, and maybe I can cross-reference this with time and feelings.

*Integrate automated tests for life.* Write more tests.

Build a web interface for tracking time, etc. That way, I can quickly jump over and enter a note.

Integrate my data from ThinkUp: I’ve been using ThinkUp to archive and analyze my tweets. Maybe I can overlay tweets onto my timeline and convert my current TapLogRecordsController into something more generic.

Learn how to use Mongo: Mongo’s freeform storage might make it much easier for me to stash all sorts of data in a rough timeline. Exploration needed!

So many good things to build. =)


Reviewing my archives

December 13, 2011 - Categories: blogging

I’ve been reviewing my posts from 2011. I remember some of the highlights, but other posts trigger memories that had slipped past. This is good. This is the archive working as it should, giving me paths back into things I’ve learned and forgotten.

So I’ve been going back further in time. It turns out that Calibre makes it easy to convert HTML to other formats, including the MOBI format that Kindle uses. I had modified my WordPress archive templates to give me a bulk view that’s useful for copying posts into my archives. I added header tags for the different months, and copied the resulting HTML files (ex: 2011). Then I converted the files and loaded them onto my Kindle.

I’ve been going through my 2010 archive, and I’m surprised by which things resonate with me after this time. I flip past pages and pages about collaboration and presentations and all of these tips. The posts I linger over are the weekly reviews, where one-line mentions expand into memories. Sometimes I come across things I’ve written about life, and they flesh out the memories more. Not often enough. I’m going to write about life more.

Many posts are about looking ahead: things I want to do, sketches of success so I get a better idea of where I’m going. Other posts are about lessons learned. Work-wise, I’m pretty okay at remembering and applying what I’ve learned, or knowing where in my notes I can find things again – configuration snippets, techniques, and so on.

Life is fuzzier. I read my blog posts and wonder how I grew into or out of interests, how my days changed. This is probably what I should write more about: things I’m learning in life, and echoes of the present.

I write about things I’m learning at work because I think that might be useful to other people. I write for myself, too. What will I want to remember five years from now, ten, fifteen, more?

A cat, circling around, settling into my lap as my computer balances on the edge of my knees. This feeling of being in between spheres.

Growing as a developer: Automated tests

December 14, 2011 - Categories: development, kaizen, work

For this project, I put a lot of time into writing tests. Now they’re paying off. User acceptance testing and beta testing is going to be limited thanks to some real-world project constraints, so we’ll have to catch more bugs ourselves.

I want to get to 100% test coverage. That will go a long way to increasing our confidence in the results.

We had neglected our tests in the beginning, so the autogenerated tests fell out of sync. A few weeks ago, I put in around six hours to get everything back into shape.

Once that was sorted out, I looked for ways to encourage us to keep the tests working. After briefly experimenting with autotest, I settled for using git precommit hooks to force us to run tests before checking code in. Fortunately, the other developer agreed with this idea, so I set up the same script on her system.

Rspec was great for detailed tests, but I missed the expressiveness of Cucumber. After a few more hours of work, I got our Cucumber tests to work again. I wrote a number of tests from different users’ perspectives, then added Cucumber to the pre-commit hook.

The next step in our testing journey was to set up code coverage analysis. It took a little hacking to get rcov to play nicely with cucumber and rspec, but I got that to work too. Now we can get a sense of what still needs to be tested, and we have clear goals: 100% of code covered by tests, and 100% of user stories matched up with tests too.

On another project, I’ve been working on automated tests with Selenium. I hate letting the clients run into bugs, and I hate breaking things I thought I’d already fixed. I also hate clicking around and doing repetitive actions. As we run into things I’ve broken and as I change things, I write tests.

For me, test-driven development is incredibly motivating: the carrot of seeing tests pass and coverage stats go up, the stick of embarrassment when things break. =) I can take advantage of that energy and change my development habits.

My next development goals related to testing:

  • behaviour-driven development and business-user-compatible test cases
  • 100% code coverage from day one
  • integrating Selenium tests into our build scripts
  • Selenium web driver screenshots to assist in keeping user documentation up to date
  • writing automated tests for life – making progress!

Learning plans and time budgets: packing things into 2012

December 15, 2011 - Categories: analysis, learning, planning, quantified, time

Nudged by @catehstn‘s recommendation of my blog to @Tending2Entropy as an example of goal planning in personal life, I updated my learning plan with the things I’m planning to learn next year.

It was easy to come up with a quick outline. There are so many interesting things I want to learn. The tough part, however, was thinking about what I might actually get to do.

What does my cognitive surplus look like? I wanted to get a sense of how much discretionary time I actually had on a regular basis. I have about 20 weeks of data since I resumed time-tracking near the end of July. So that my numbers wouldn’t be thrown off by the vacation we took, I focused on the last eight weeks (graph: 2011-10-16 to 2011-12-11).

Over the eight-week period, I got an average of 3.5 hours of discretionary time per weekday and 7 hours of discretionary time per weekend day. I can simplify that to an average of 4.5 hours per day, which comes out to 1642 hours for 2012 (not including vacations, which include more discretionary time).

Around 40% of discretionary time was used for social activities. Let’s say that another 30% is a buffer for breaks and other things that come up, leaving 30% for focused learning. That gives me a time budget of around 500 hours. I want to do more than 1,000. Hmm.

Prioritization is important. I can focus on the things I want the most, then see how the rest of the year shakes out. Plans will change anyway, and estimates are flexible. My first few priorities for personal learning:

  • Android development, so that I can save time syncing and get more of the data I want
  • Goal tracking (handy for keeping the rest of my time in line)
  • Behavioural change (trying small experiments)

Another way to deal with the gap is to shift more time. Over those eight weeks, tidying took about 0.7 hours / day, and cooking took about that much time too. Let’s say half of future tidying and all of future cooking is outsourceable at $20/hour. That’s an additional 384 hours for a trade-off of $7,680 after tax, which is a large chunk of money. I’d rather save the money and let it compound for later use, especially if I time chores so that they take advantage of low energy. Besides, cooking and other chores are partly social time too.

I can shift time in other ways. For example, I can use commuting time to learn more about Emacs, Org, and Rails, so that will help too. I can also use walking time to record life stories if I can figure out a workflow for dealing with audio or short notes.

Good to know what the size of the box is, and how much I want to pack into it! Let’s see how it all works out…

Emacs, artbollocks-mode.el, and writing more clearly

December 16, 2011 - Categories: blogging, emacs, writing

Analyzing the text of my blog showed me that I use some phrases way too much. Fortunately, Emacs can shame me into writing better, thanks to Art Bollocks Mode. (Update 2012-06-16: I’ve forked it and cleaned up the naming conventions:

Art Bollocks Mode monitors your writing and highlights words or patterns you may want to reconsider. It can detect repeated words which sometimes slip past proof-reading. It has a list of common passive verbs, making it easier for you to rewrite the sentences to use the active voice. It detects weasel words like “many” and “surprisingly”. It even comes with jargon catchers for art critics (“postmodern”, “ironic”, and so forth) – hence artbollocks-mode.el.

Whenever you use a phrase that matches its patterns, Emacs highlights it, turning it an ugly orange-on-white and underlining it for emphasis. You can still go ahead and write it, but at least the words jump out. Like this: it’s really pretty obvious…


I want to use it to write clearer notes and blog posts, so here’s how I’ve tweaked my configuration. Many of the items below are words and phrases I want to use less. Others are part of work jargon that I’m trying my best to keep out of my regular use.

(require 'artbollocks-mode)
;; Avoid these phrases
(setq weasel-words-regex
      (concat "\\b" (regexp-opt
                     '("one of the"
                       "sort of"
                       "a lot"
                       "I think"
                       "leverage") t) "\\b"))
;; Fix a bug in the regular expression to catch repeated words
(setq lexical-illusions-regex "\\b\\(\\w+\\)\\W+\\(\\1\\)\\b")
;; Don't show the art critic words, or at least until I figure
;; out my own jargon
(setq artbollocks nil)
;; Make sure keywords are case-insensitive
(defadvice search-for-keyword (around sacha activate)
  "Match in a case-insensitive way."
  (let ((case-fold-search t))

(Isn’t regexp-opt so cool?)

artbollocks-mode.el also includes some basic readability statistics like the Flesch reading ease and Flesch-Kincaid grade level. When I analyzed my blog contents without source code blocks (all the Emacs Lisp code snippets were throwing off my numbers!), it turned out that my blog hovers around 65 in terms of Flesch reading ease, or around the same as Reader’s Digest (as reported by Wikipedia). The Flesch-Kincaid grade level for my posts in 2011 was around 8.4.

I’d use artbollocks-mode.el’s tools for calculating word count and readability, except that Emacs ends up including source code blocks because Art Bollocks doesn’t know about Org Mode. I might be able to work around that by defining more advice or creating my own functions that extract the relevant text into a temporary buffer before determining the text statistics. I can leave that for another day, though.

I’ll experiment with making it part of org-capture-mode for now. If I find that getting editing feedback distracts me too much from writing, I’ll remove it from the hook and toggle it when I’m ready. Here’s the code to turn it on automatically for org-capture:

(add-hook 'org-capture-mode-hook 'artbollocks-mode)

Thanks to dotemax for tweeting about writegood and artbollocks-mode.el. Onward and upward!

Weekly review: Week ending December 16, 2011

December 17, 2011 - Categories: review, weekly

From last week’s plans

  • Work
    • [X] Follow up on possible next engagements – got next Drupal project lined up, starting Tuesday
    • [X] Work on high-priority project O tasks
    • [X] Follow up on project T
    • Helped organize a potluck at work
    • Resolved some more project T issues (next time, change fewer things at launch!)
    • Discovered that using two computers instead of two screens makes coding faster; may rejig virtual machine setup or move memory from my personal machine to see if I can get this kind of convenience on one computer
    • Agreed on next Hello Monday comic
  • Relationships
    • [/] Help fix up the house again – in progress
    • [-] Add more memories – postponed
    • [X] Send Christmas cards and packages – sent most of them
    • [X] Post blog review
  • Life
    • [X] Plan Android app for self-tracking
    • Updated learning plan: time budget, learning plan, detailed outline / updates
    • Set up my Android development environment again
    • Figured out how to receive the SEND intent from other applications – Quantified Awesome now listed as one of the send options for Tap Log Records, yay! Now to flesh that out
    • Completed story mode for LEGO Harry Potter 5-7 – awesome game
    • Emacs: Configured artbollocks-mode.el for my writing goals

Plans for next week

  • Work
    • [ ] Wrap up project O
    • [ ] Get started on project CG
    • [ ] Write about lessons learned from project O
    • [ ] Catch up on e-mail
  • Relationships
    • [ ] Tidy up house
    • [ ] Consider planning holiday or post-holiday get-together
    • [ ] Send rest of Christmas cards
  • Life
    • [ ] Reconsider outsourcing; identify possible tasks and tradeoffs
    • [ ] Parse CSV from Tap Log Records in Quantified Awesome Android app
    • [ ] See about simplifying/automating my weekly review – put data on one page, then consider Emacs integration?
    • [ ] Catch up on e-mail

Time analysis

I slept quite well this week. To my surprise, work was pretty decent too – must have been because I didn’t work on the weekends. I’ll probably do a little work this week because we want to get in more testing and bugfixes before we wrap up this project.

Activity Average Weekday average Weekend average
Sleep 8.8 8.1 10.3
Work 6.2 8.7 0.0
Discretionary 4.8 3.8 7.2
Unpaid work 2.4 1.2 5.4
Personal care 1.9 2.1 1.1

Let me see if reporting the averages will help me format this table better when it comes to making archives. =) Long tables require more work in formatting, because I have to make them span columns well. I still have the information I want – how much time I have for discretionary activities, how much I work, how much I sleep, and so on.

Hmm, I might reduce my weekend sleeping a little bit, since it’s more of an indulgence than a necessity at this point.

Activity This week Last week Delta Notes
! Discretionary 33.2 30.3 3.0
! Personal care 13.0 14.2 -1.2
! Unpaid work 16.9 13.1 3.8 Batch cooking
A – Sleep 61.2 61.3 -0.0
A – Work 43.6 49.1 -5.5
D – Emacs 1.5 1.5
D – Family 0.3 0.1 0.2
D – Harry Potter 3.6 0.3 3.2 Finished story mode =)
D – Other 0.5 0.3 0.2
D – Play 4.7 4.7
D – Quantified Awesome 6.4 11.7 -5.3 Fixing bugs, working on Android
D – Read 0.2 0.9 -0.7
D – Social 3.4 5.6 -2.2
D – Travel 2.0 -2.0
D – Writing 12.8 9.3 3.5
P – Drink 0.4 -0.4
P – Eat 4.9 6.2 -1.2
P – Plan 0.3 0.3
P – Routines 5.6 4.9 0.8
P – Walk 2.1 2.8 -0.7
UW – Cook 7.5 1.6 5.9
UW – Other 3.4 3.4 Errands
UW – Other travel 0.8 0.1 0.8
UW – Subway 1.7 1.2 0.5
UW – Tidy up 3.5 10.2 -6.8

We’ve added a night-time ritual of building with LEGO. =) It’s fun.

Monthly review: November 2011

December 18, 2011 - Categories: monthly

Halfway through December, I know, but things got busy with two launches and home improvements. =)

From my plans for November:

… I’m going to focus on having a place for everything and everything
in its place. I’m experimenting with the stuff-tracking I’ve added to
my personal dashboard. Looking forward to sharing screenshots and
experiences, and maybe even opening it up so that other people can
track their things too. I’d like to see if I can complete a month of
tracking stuff, and what I find myself needing to add to it. Let’s see
how that works out!

I built a simple stuff tracker, and it’s up there now. My stuff use has stabilized – all the locations for my frequently-moved things are in the system, and contexts make it easy enough to update. I don’t update it as often as I could, probably because the web pages are somewhat slow to load and use on my laptop. Better mobile stylesheets or a native Android app can take care of that. I’ve used it to take notes on things I’m likely to forget, and I hope that will pay off.

I’ve misplaced my keys twice after months of not losing them, though. That was more about inattentiveness than forgetting where they are.

My December experiment will be tracking my time using Tap Log Records instead of Time Recording, and gathering ideas for building my own app. I want to see if switching tools will make it easier for me to capture other data in addition to activity, such as mood and ideas, and where the rough parts are so that I can smooth them over.

Decision review: Decision review

December 19, 2011 - Categories: decision, review

In September, I wrote about how I could get better at making decisions. I switched to organizing my decisions in a separate text file for ease of review, and I planned to ask myself the following questions after a quarter:

  • How many decisions have I written about?
  • How many decisions have I reviewed?
  • How many notes have I published?
  • How have I used my notes to help improve my decision-making?

Well, that quarter has passed, so let’s see how things turned out!

Since my blog post about decisions, I’ve posted nine entries in my decision category. Here’s how that breaks down:

  • described 1 pending decision
  • described 5 current / near past decisions
  • reviewed 2 decisions from a year ago
  • reviewed 1 decision from four years ago

There are eight decisions in my file that I haven’t published. Some of them are still being fleshed out, others are small, and a few are for private reference.

I find that the most helpful time is to write about decisions while I’m considering alternatives instead of long after the decision event, although I often wait to publish my notes until I have preliminary results. Decision roundups like this nine-decision review are fun to write, too, and my text file makes it easier for me to see which decisions are current and which ones I’ve archived.

I like writing about decisions. Formally describing the alternatives I’m considering helps me identify and test more of them. The same goes for assumptions. Writing down my reasons for a decision lets me go back and review them, and it also helps me calibrate my decision-making once I figure out the results.

Many of my decision-related posts have led to conversations where I’ve either helped someone else make a better decision or I’ve received tips from other people – and often both, and often within a few days of posting. Score one for sharing decisions.

Good decision. Would make again.

Rails experiences: Things I learned from project O

December 20, 2011 - Categories: development, geek, kaizen, rails, work

Rails is awesome. We built a workflow/reporting system for ~120 users using Rails 3. My part of the project came to about 468 hours, or roughly 60 workdays (~ 3 months), and I worked with another developer who also put in around the same number of hours. We worked with a graphic designer, a CSS/HTML developer, a tester, a project manager, and the client, and we put together a surprisingly large set of functionality.

It’s amazing how quickly the site came together. I built a simple prototype to help the other developer get started with Rails, and we fleshed it out with the client’s input while waiting for the creative design. I started with web_app_theme so that we could have a decent-looking interface for starters. When the client approved the graphic design, another developer sliced it up into HTML, CSS, and images for us. I took those, converted them into HAML and ERB, and we were off and running. Every weekly sprint meant a chance to show off useful functionality and get feedback. It was awesome.

We were initially worried that building all the UIs from scratch in Ruby on Rails would mean taking up more time because we couldn’t use CCK or Views to quickly throw everything together. It turned out that HAML, partials, and semantic_form_for made the forms and reports easy to do. Filtering reports was straightforward with ActiveRecord and scopes. Because we built the screens ourselves, we didn’t have to fight with Views or CCK for the last 20% of tweaking, and I didn’t have to kludge any SQL queries (yay, no views_pre_execute!).

I was working on a Drupal project shortly before this, and I spent some time supporting the Drupal project during this one. Rails made my brain much happier. I felt that I could organize my code more cleanly, and I could test it more thoroughly, too. I didn’t have to fight so much with other people’s modules or themes. I like Drupal, and I’m still looking forward to doing more projects with it. But I wouldn’t mind working on more Rails projects, and I’m glad I’ve got Quantified Awesome as a personal project.

Drupal does many things better than Rails. Drupal modules tend to be more mature and better-documented, and it seems like there’s been more work on scaling Drupal. Internationalization is also more straightforward in Drupal, although Rails I18n is easy to use once you’ve gotten the hang of it. Drupal module dependencies seem a little easier to sort out, too. But Rails is fun!

Tests will keep you sane. This was the first project where we invested in developing a large suite of automated tests. We used Cucumber for high-level tests and RSpec for everything else. The tests caught many regression errors we might have otherwise missed. Test-driven development was fun, too, because the tests gave us tangible progress and simplified checking.

There were times when I gave in to the temptation to commit without running the tests, and I almost always regretted them. (Particularly after friendly finger-wagging from the other developer!)

Issue-tracking rocks. We’ve liked using Rational Team Concert in the past. Getting an externally-accessible instance was complicated, so I set up a Redmine issue tracker as soon as we started the project. We used Redmine to plan work, track bugs, and even collect feedback from the client. As of the time of writing, we had created 766 items and closed 683 of them (89%).

We started with story points, but didn’t end up continuing with them for the rest of the tasks. When we needed to prioritize, we estimated the hours required for each task in order to help the client decide. That worked out quite well. I haven’t tracked item-level time spent, but that seemed to be roughly around my estimates.

I now estimate more time than I used to, because I’ve started factoring in both writing and running tests. It’s a little strange being the pessimistic estimator instead of the optimistic one, but it’s good for the project.

Selenium is great for screenshots, too. Not only is Selenium good for automated browser-based testing of web pages, but it’s also a handy way to capture screenshots for documentation or demos.

Lotus Symphony and Microsoft Word don’t get along. We wasted a few hours trying to update the user guide with the new screenshots, only to find out that the PDF still got screwed up because I didn’t have the fonts the client used. Those fonts were part of Microsoft Office and weren’t on my system. The client took care of updating the user guide so that she could format it the way she wanted, and we focused on code.

Plan with the end in mind. Short projects mean that milestones can sneak up on you before you notice. Half-way through the project, we realized that the project end date was coming Really Soon Now, and we scrambled to put together a launch plan. We wanted to launch a few weeks before the end of the project, to give people time for feedback and updates. That meant that we needed to send pre-launch e-mails one week and two weeks before the launch, which meant… that we needed to start sending those e-mails within a week. Fortunately, the client, IBM PR, and everyone involved managed to get it all sorted out, and we launched.

I like launching. I would like to do more of it. We don’t do it nearly enough on short projects, but these projects are much more likely to launch if we’re around to help with the transition than if only the client is there.

On a related note, I get antsy about adding new functionality before the end of a project. This makes sense, of course. I don’t mind adding new reports and other reading-related functionality, but workflow tweaks are scary. When we’re planning future projects, we can consider similar risks for late-project tasks.

Things I want to improve for future projects:

  • More Rails! More!
  • More automated tests
  • Track time estimates and actual time in order to improve estimation accuracy
  • More launch planning
  • More blog posts about what I’m learning
  • Optimization

Things I want to reduce on future projects:

  • Avoid documentation formatting problems – I guess that means Microsoft Office when working with clients who use it
  • Must not give in to temptation to skip tests

Getting ready for the next project

December 21, 2011 - Categories: work

This project transition is smoother than the others. I’m joining another Drupal project right away. I’ve drafted estimates and documents of understanding for another Drupal project, and my manager is lining up some consulting for us to work on together. I’m not taking a vacation other than the statutory holidays. Two trips for my sister’s wedding took all of my vacation days! (Worth it, though.)

What’s working well about this transition:

  • Getting the agreements set up for my next project took much less time than I expected, even though it’s cross-border. It could be because I’m joining an existing project.
  • We’re winding down this project gracefully. It helps that we’ve focused on lower-risk items towards the end, and that we’ve scheduled in time for documentation. It also helps that we launched two weeks before project end. We’ve had time to deal with bugs and add features, and we can be more confident that the client’s set up for success.

I want to keep working on Rails at work, but I don’t think I’ll get any Rails projects in the pipeline any time soon. I’m sure the upcoming projects will be lots of fun too, though, and there are so many non-Rails techniques I want to improve on anyway. I’d like to learn how to use Selenium to test websites using multiple browsers, and I might get a chance to do that on this project. It would be good for me to learn more about consulting skills on other projects, and I’m definitely looking forward to taking advantage of my manager’s mentoring. I’ve got Quantified Awesome as a personal Rails project, and I might tinker around with Android development as well.

Now that we’re not scrambling to squeeze in as much as we can before the project end date, I’m looking forward to normal hours. More space for extracurriculars!

Comparing Plan B Organic Farms with Cooper’s Farm CSA

December 22, 2011 - Categories: cooking, decision, review

After two seasons with Plan B Organic Farms, we’ve discovered a range of new recipes and learned that we can survive an invasion of beets. This winter, we decided to experiment with a different community-supported agriculture program. We chose Cooper’s Farm because they offered delivery, which will be handy when it starts snowing.

Plan B Organic Farms has a depot a block away from our house, and offers a box of organic produce for $25 a week. Cooper’s Farm offers delivery for $24.86 (including the delivery fee).

We received our first delivery from Cooper’s Farm this morning, neatly packed in a box. In total, the produce weighed 10.19kg, for a cost of $2.44/kg. Here’s the breakdown:

carrots 1476g
cabbage 3494g
onions 1380g
potatoes 1468g
sweet potatoes 651g
tomatoes 844g
turnips 878g

In comparison, here’s today’s box from Plan B Organic Farms (total: 5.85kg, $4.27/kg):

lettuce 355g
broccoli 734g
cabbage 1923g
tortillas 270g
onions 516g
acorn squash 989g
blueberries 170g
tomatoes 393g
apples 416g
garlic 83g

During the fall season, we received an average of 6.57kg from Plan B Organic Farms (stdev = 1.12kg), composed of 11 different types of produce on average. The fall shares included some imported items (kiwi, avocado, etc.) to add variety.

Plan B Organic Farms produce was generally good, but occasionally of poor quality: squishy tomatoes, apples with soft spots, and so on. Still, it helped us get more vegetables into our diet, so it was worth it. Cooper’s Farm CSA has been okay so far (except for one potato that we ended up chucking), although the produce required a lot more scrubbing.

It looks like Cooper’s Farm CSA gives us more local produce for our buck, but with less variety. We’ll see how the rest of it goes this season!

Investing in awesomeness

December 23, 2011 - Categories: life, reflection

I’ve been thinking of what I want to learn more about when it comes to investing.

I’ve read stacks and stacks of personal finance books. I enjoy reading them, even though many books repeat the same uncontroversial advice. My ledger of income, expenses, and investments goes back to 2005, when I moved to Canada and started managing my own finances. We might never be absurdly wealthy, but if we continue to be frugal and hard-working, I think we’ll enjoy more flexibility and less stress than most people have.

2011 was a good year, despite the fluctuations in the stock market. Although it was occasionally discouraging to see my carefully-saved index funds dip below their book price, I kept plugging away. I figure that if businesses have managed to do fine despite past events like the Great Depression, things will be okay. If the rules of the game have changed and the stock markets no longer perform the way they used to, well, we’ll have bigger problems than the lack of a decent return on investment.

Investment-wise, we’re on a good path. I don’t have the time or interest to pick individual stocks, and I’m comfortable with a boring balanced portfolio made up of index funds and skewed towards equities. From here on, it’s more about time and persistence than sophistication.

What I’m curious about is this: what’s worth investing time and money in? What does investing in awesomeness look like?

I’m not the kind of person who chases bucket-list experiences in order to check off things I’d like to have done. I’ve tried it and it didn’t sit well with me. I like simple things and everyday activities. Fortunately, W- does too.

I thought about resuming my experiments with outsourcing. I don’t mind my chores that much, though. I’d rather save the time (money is time, after all) so that I can give myself a focused year instead of spending it on an hour here, an hour there that can be so easily absorbed into distractions of everyday life. I might pick up the experiment again someday, when I run into something that I don’t want to limit by my skills. We’ll see.

So here’s what I’m saving up for and investing in instead:

  • Experimenting and learning
    • Tools for working better
    • Trying a new community-supported agriculture program, because we can
  • Streamlining life
    • Multiple sets of socks that are all the same, to reduce the need for matching
    • Decluttering and the freedom to ignore sunk costs
    • Simplification and fewer frustrating things
  • A year-long sabbatical in 2014, during which I plan to focus on writing and development

It’s about striking a balance between long-term goals and shorter-term ones. I don’t want to postpone enjoyment until I’m 65 or 70. I want to test ideas earlier than later, so that I can tweak and adjust.

I’m a little envious of other people who are exploring the worlds of freelancing, entrepreneurship, or lifestyle design. Envy being mostly useless, I shift that energy into analyzing my decisions and testing some of my assumptions. It looks like IBM will still provide the best stability as I build up other experiments. I’ll continue with that for now, and I’ll trust that this preparation will give me more opportunities for interestingness over the next few years. In the meantime, I guard my evenings, weekends, and holidays more closely from the temptations of work. These are excellent times to test ideas for the next step, and they shouldn’t be wasted.

What do I want to learn about investing? I want to learn how to better test my assumptions about life. I want to learn about small and simple experiments that have good ROI for knowledge. I want to learn how to make better choices. I want to get even better at ignoring what the world tells me I should want in favour of figuring out what I truly need.

Today I read a book called I Moved Your Cheese. It reminded me of Jonathan Livingston Seagull, another book I enjoyed. In I Moved Your Cheese, the author pointed out that even if you’ve absorbed the lessons from Who Moved My Cheese? on not letting change frustrate you, you’re still chasing after cheese. I don’t want to chase after money, or time, or even happiness. (The odd thing about happiness is that once you pursue it, you can’t have it.) I want to create space for interestingness and discovery.

So we’re investing in wanting less and needing less, in enjoying life more, and in experimenting with making life better. I’d love to hear about your experiences along these lines!

Getting through the beige days

December 24, 2011 - Categories: life

Some days, I feel productive and awesome.

Some days, I feel scattered and distracted. Yesterday was one of those days.

It’s more interesting and less stressful than it used to be. I don’t feel guilty about building things more slowly than I theoretically might be able to. I’m more curious. What’s the difference between this day and another day? How can I tweak life to make the most of these beige-ish moments?

If nothing else, it’s worth writing about, because I’d like to remember and explore this even when things are sunny and vibrant. Writing helps me go back, and writing helps me go forward.

Here are some strategies that might be useful for dealing with these not-entirely-focused days:

Keep a list of small tasks with concrete results. Kickstart momentum by crossing those tasks off.

  • Go through the house and bag things for donation or disposal.
  • Write more tests.
  • Clear my inbox.
  • Balance my books.

Don’t procrastinate by working only on these tasks. Butt-in-chair time is important to writing or coding. Hands-on-keyboard time works too – sometimes I use the kitchen counter as a standing desk. I don’t wait for inspiration to strike before I work on my projects at work, and I don’t need to wait for inspiration to strike before working on my personal projects. Besides, energy and excitement have a funny way of coming when you’re neck-deep in something already.

The trick is to not burn more energy in the process of feeling guilty about not being “on” all the time. When you accept that these days are part of life, it’s easier to make them better.

Weekly review: Week ending December 23, 2011

December 25, 2011 - Categories: review, weekly

We’ve been enjoying a quiet holiday weekend with plenty of long walks and cooking. There are seventeen containers of beef bulgogi lunches in the freezer, not counting the two we had for lunch today already, and W- is cooking a large batch of chili.

I’ve made lots of progress on building tracking into my Quantified Awesome web app, although I haven’t rolled out the code yet. We’re planning to spend time with W-‘s family tomorrow, and then I might use the last free day to build an Android interface for my time tracker.

From last week’s plans

  • Work
    • [X] Wrap up project O
    • [X] Get started on project CG
    • [X] Write about lessons learned from project O
    • [X] Catch up on e-mail
  • Relationships
    • [X] Tidy up house
    • [X] Consider planning holiday or post-holiday get-together
    • [/] Send rest of Christmas cards
  • Life
    • [X] Reconsider outsourcing; identify possible tasks and tradeoffs
    • [X] Parse CSV from Tap Log Records in Quantified Awesome Android app
    • [-] See about simplifying/automating my weekly review – put data on one page, then consider Emacs integration?
    • [X] Catch up on e-mail
    • Added categories and time tracking to Quantified Awesome

Plans for next week

  • Work
    • [ ] Work on project CG (Drupal)
    • [ ] File insurance claims
  • Relationships
    • [ ] Have a massage
    • [ ] Spend time with W-‘s family
  • Life
    • [ ] Build Android interface for Quantified Awesome time tracking

Time analysis

Under construction, still logging data =)

Quantified Awesome: Building my own time tracker

December 26, 2011 - Categories: quantified

I took advantage of the holiday break to build my own time tracker into Quantified Awesome. I wanted a simple way to capture activities, thoughts, and other records, using a hierarchy to simplify entry and reporting. This involved ripping out my old code related to Time Recording and Tap Log Records, but it was worth it. Now the reports are more useful for work and life. I’m sure I’ll come up with other improvements as I use it.

After lots of digging, I found a tutorial that helped me figure out OmniAuth. I added Google Accounts and Facebook login to the web app. I still haven’t opened it up to signups, but now I can log in easily, and the site will automatically add signup entries for people who try to use Google or Facebook to sign up. I hope to open things up before the next Quantified Self Toronto meetup on January 17.

I added OAuth because I wanted to be able to synchronize with Quantified Awesome using a native Android application. The web interface for Quantified Awesome is somewhat usable on my Android, and it would be good to tweak it further for the small screen. Still, I don’t always have Internet access, so I want to build an app that can accept data offline and sync it up when ready. I still have to figure out how to use Account Manager and the sync API on the Android. I’m not sure if I can get all that in tomorrow, but there will be other weekends to work on this.

I like tracking my time. The data helps me answer questions like:

  • How much time does it really take me to finish a task?
  • Can I work a good week, getting lots of things done, while making time for personal projects?
  • What’s truly important to me, as shown by what I spend time on?

With my own time tracker, I hope to make data capture and analysis smoother. It’ll be a good excuse to get deeper into Rails 3.1 and Android development, too – skills that might come in handy over the next few years.

I’m happy with the way I used this holiday weekend. It felt like a good balance between spending time with W- and working on my personal projects. I slept more than I expected to and Friday was less productive than the other days, but it was good to take it easy. With clear tasks in front of me in terms of improving Quantified Awesome, I’m sure I’ll have fun.

How I used the 5-day holiday

December 27, 2011 - Categories: quantified, review

I took Friday off because I had worked the previous weekend, so our Christmas / Boxing Day holiday turned into a 5-day break. We had a long list of tasks we had saved for blocks of unstructured time, so there was never a dull moment.

Here’s how the break shaped up.

  • Discretionary (48%, 54:50)
    • Quantified Awesome: 25:05
    • Social: 20:42
  • Sleep (41%, 46:12, average of 9:14 per day)
  • Personal (7%, 8:17)
  • Unpaid work (4%, 4:40)
    • Cooking: 2:01
    • Tidying up: 1:51
    • Laundry: 0:48

I’ve added many features to Quantified Awesome, and have started using it as my main time tracking and reporting tool. I don’t have offline access to it yet, though, which annoys me. I can continue to use Tap Log Records for that and merge the records from time to time, but I’d rather develop an HTML5 or Android application that can make the process easier. After I get that sorted out, then I’ll work on opening it up to other people (privacy, access, documentation…) More weekend hacking.

We also spent some time this weekend decluttering. We’ve been building a habit of clearing the kitchen table and the sink every night. I figure that if we can deal with those two areas, we can use that momentum to tackle the rest of the clutter and simplify our lives.

The freezer is full of chili, beef bulgogi, and baked beans. We’re ready for the next few weeks, and for starting 2012 smoothly.

It’s odd knowing exactly where my time went, but I like it.

Next steps:

  • Prototype offline HTML5 interface for Quantified Awesome? Might take several weekends
  • Get rid of another trashbag of clutter

Reducing clutter in the kitchen

December 28, 2011 - Categories: kaizen, life, organization

I know what January’s experiment will be: reducing clutter in the kitchen.

We’ve started. The kitchen table is the hardest target. We use it everyday for so many different activities. The surface fills up quickly: laptops, power cords, mice, books, plates, glasses. We’re developing the habit of clearing it every night, keeping only the lamp, the power hub, and a bowl full of fruit. Everything else goes into cubbyholes or shelves.

Corollary: Doing one thing at a time, although it’s hard to avoid the temptation to work while eating lunch or to read through dinner.

The kitchen sink is a good target, too. We used to leave dishes there while waiting for the dishwasher to finish, and sometimes if we didn’t have the time to empty the dishwasher. It wasn’t a bad system – we cleared the dishes before they got crusty – but still, a single dish acted as a nucleus that attracted other dirty dishes, even when the dishwasher was empty and ready for another batch. Now we make a point of emptying the dishwasher before meals, filling it up as much as possible, and washing dishes by hand if needed. W- is looking into fixing the top drawer of the dishwasher so that we can streamline this too.

I’m not going to make any grand year-long resolutions. One experiment at a time, one small and concrete change each month – that’s enough.

Yay more food containers!

December 29, 2011 - Categories: cooking, organization

When we started cooking in bulk, we standardized on the Rubbermaid Takealongs Sandwich Keepers (7F58RDFCLR). The inexpensive containers were the right size for lunches. They stacked and nested well, too. I picked up 24 or so over several shopping trips, enough to handle a couple of weeks of lunches for W- and me.

Having discovered the success and convenience of this approach, we decided to scale up. Problem: Rubbermaid had apparently discontinued the product! They still sold Takealongs in different sizes, but the only way to get the shallow square containers was to buy them in a set or to pay a much higher price online. We didn’t want to buy a new system and end up with incompatible pieces. We looked all over for them throughout the year: Canadian Tire, Walmart, Zellers, Sears…

Today, W- finally found the Sandwich Keepers at Walmart while looking for some DVDs. Some were pink (cancer fundraising) and the rest were the usual red, so we guessed Walmart was clearing them out. W- brought home 13 packs of 4 pieces each. Yay! Now we can use up the other ingredients from the freezer and experiment with cooking a month of lunches in advance. Wouldn’t that be nifty!

Learning from CSS tweaking

December 30, 2011 - Categories: development, kaizen

My current project is so different from the others I’ve worked on. Instead of building logic, I’m doing front-end HTML/CSS/Javascript, working from Photoshop layers and design PDFs. I installed SASS so that I could gradually untangle the long strings of selectors my predecessor left me. Reading the code, I have a lot of sympathy for him. I imagine he felt like a fish out of water with both CSS and Drupal. I’m doing reasonably well. I’m not as fast as I am when working on Rails or Drupal back-ends, but I get stuff done. I don’t feel like I’m floundering in the land of “I don’t even know what I don’t know,” like it was when I was working with Microsoft SQL Server 2000 and IIS 5. This one I can handle. Who knows, we might even turn the project around.

I’m learning more about refactoring code, adding CSS3 styles, using Cufon for typography, and dealing with a large number of small changes. AutoHotkey scripts and Emacs macros have been amazing time-savers. On the AutoHotkey side, I’ve been taking advantage of tools like SmallMeasure and WhatColor.

Emacs makes editing lots of PHP files easy. The previous developer used dozens and dozens of node templates instead of using panels or block visibility, and there was a lot of copy-and-paste code. I started moving common parts to files that I could include, but I wanted to make sure that I didn’t accidentally overwrite something he had customized. I grepped the directory for the strings I was interested in. Then I used a keyboard macro to interactively go through each of the files and replace the common text. Win!

I’m looking forward to making my workflow even better. I’ve got a couple of weeks more in this project, and I might work on other CSS theming things in the future. (Good to encompass more of the development pipeline!) Here’s what I’m thinking of trying:

  • Use the monitor downstairs. Keep code on my laptop, and the browser/reference documents on the big screen.
  • Make my browser window translucent with WinWarden, and position it so that the browser window overlaps the reference. If I undock the Chrome developer console, that will make it even easier to work.
  • Deal with IE sooner rather than later, although IE 8 should be reasonably okay.

Looking forward to it. =)

Figuring out my CSS workflow

December 31, 2011 - Categories: development, geek, kaizen, work

Yesterday’s coding session with CSS was fantastic. I used WinWarden to make my browser translucent, and I overlaid it on my reference documents. This made it a breeze to check alignment, because I didn’t have to use any measuring tools. I used Chrome’s developer tools to manually adjust the stylesheets until things looked right, adding display: block to the parts I was working with. Then I copied the numbers into my SASS file so that it could generate the CSS.

I also found a GIMP script for exporting all layers as separate images. I had to rename a few layers, but the results made it much easier to flip through images instead of toggling visibility trying to find the logos I needed. (It turned out that the logos were not included, so I’ve asked the design firm to send them to me.)

I converted the complex front page into a Drupal panel layout, getting rid of thirteen regions that were cluttering up the main block management screen. This also makes it much easier to update the content, yay! I’m looking forward to converting other pages. The previous developer used multiple regions instead of controlling visibility through configuration, so there are a lot of templates and regions.

Dual-screen worked out great, too, although I still need to fiddle a little with my ergonomics to make sure everything works out.

I’m looking forward to making this even better. I’ve only got a few more weeks on this project, but I might take on more styling in the future if it turns out I can deal with the headaches associated with cross-browser styling.

After I get the rest of the basic requirements in place, I want to automate testing and screenshots, particularly for regression-checking and for cross-browser compatibility. Selenium and WebDriver look like the way to go if I want to simulate hover events. If I can’t figure out how to use WebDriver within the time I’ll set aside for learning this, I can use JQuery to fake toggling the classes. Automated screenshots + PDF Split and Merge + ImageMagick for compositing (maybe 50% opacity?) will make it easy to spot glaring errors.

That will have to wait for next week. In the meantime, there’s a three-day weekend ahead, so I’m going to make lots of progress on Quantified Awesome. Yay!