Category Archives: Personal

Introducing 3D-o-Mat

3D-o-Mat is a simple app that creates the type of 3D photos that you view with red/cyan glasses.

I have been writing apps that do this for a while. It was one of the first things I wrote with DotImage back when I joined Atalasoft in 2006 and ported their image processing commands to WPF. Then, I wrote a simple version for iOS that I showed to middle-schoolers when I was a volunteer for DIGITS.

I was recently invited to speak at a Smith College Python programming summer program for HS girls and I decided to make this app more real.

PS: here’s a tweet sized version of the app in Python that I shared with the class the last time I spoke:

This gist shows a better way to do it that preserves the color in the original photos.

GamePlayKit Rule Systems on Smashing

I wrote a 2-part series on GamePlayKit’s Rule Systems framework for Smashing Magazine.

Part 1 is the basic idea and shows how to replace conditional logic that might be strewn around a project into a GamePlayKit rule-system.

In Part 2, I show the support for fuzzy logic rule-systems (logic values ranging from 0.0 to 1.0 instead of strictly true and false). It covers a little more of the features of rule-systems and how to implement NOT, OR, and AND for fuzzy values.

Both articles are supported by Swift Playgrounds in GitHub so that you can play with the concept and try different rules.

Handling Pluralizations Correctly in Strings

Earlier this year, Trello launched in 21 languages. I worked on the i18n effort of the iOS apps, and I have been collecting thoughts for a series of blog posts. The first one, about plurals, was published today on the Trello Tech Blog. It begins

On page 52 of my copy of K&R, in a discussion of the ?: operator, is this line of code

printf("You have %d item%s.\n", n, n==1 ? "" : "s");

And thus began my decades-long proliferation of plural-unfriendly strings.

To see why, read the rest of Lessons from Internationalizing Trello, Part I: Plurals on iOS

As a follow-up, I found a Russian translation of K&R. Here is how that line of code is translated

printf("Вы имеете %d элемент%s.\n", n, (n%10==1 && n%100 ! = 11) ?
    " " : ((n%100 < 10 || n%100 > 20) && n%10 >= 2 && n%10 <= 4) ?
    "а" : "ов");

Which is another way to do it, I guess.

Happy New Year – Favorite “Resolution” Posts

My own thinking on goals has evolved over the years to:

  1. Prefer forming processes to outcomes.
  2. Keep it simple (one physical, one mental and one social/spiritual)
  3. Monthly reassessment

So, given that, here are the two best things I read this New Year’s about resolutions:

Buster Benson’s Make Better Resolutions ends with this wonderful template:

Cultivate new or existing relationships with people who I can share my strongest interests with by doing X

My mental goal this year is to do 20 minutes of Duolingo Spanish practice every day. Per Ramit Sethi, I started 3 weeks ago.

The second “resolutions” piece I recommend is James Clear’s Forget Setting Goals. Focus on this Instead, which is a perfect introduction on why to prefer systems to outcomes.

I usually focus my physical goal around working out, but after 2.5 years of crossfit, working out is such a part of my routine, that I don’t really need to worry about stopping. This year will be about eating better, and for January I joined in our gym’s Whole 30 challenge (this is both social and physical). I will reassess in a month.

2013 Personal Goals

At the end of 2011 and this year, I gathered some lessons learned. Looking them over, I came to realize that while I had identified them, I hadn’t really learned them, in the sense that I wasn’t applying them on a regular basis.

This year, in planning 2013, I am keeping them front and center. Briefly, they were:

(1) Focus to make big gains (2) Center a goal around a purpose (3) Change tactics if the current ones are failing (4) Remove friction (5) Just Ship (6) Live the Dream

I think #3 is the most appropriate, because while I got a lot done in 2012, I fell short of my goals in a few areas. Looking at them, I can see that they weren’t focussed. So, for 2013, I am keeping things simple.

First, I am going to make quarterly resolutions, not New Year’s resolutions. This will allow me to have fewer goals to think about at one time without worrying that I am neglecting areas of my life.

Second, for at least the first quarter, I am going to concentrate on behaviors, not outcomes. So, while I am making a diet plan in order to lose fat, the goal is to stick to the plan and then reassess in April.

Like last year, I will continue to take a page out of Seven Habits and have physical, mental, social goals. I will consider having a quarterly review to be the spiritual/renewal goal.

Jan-Mar 2013 Goals

  • Physical: Exercise 5 days per week. Eat at most 3 non-Paleo meals per week (no wheat or sugar at all, but one glass of wine or tequila will be allowed)
  • Mental: Spend 10 hours per week on creation activities (art, code, writing)
  • Social: 25 hours of community service

There is more I want to do, but they will have to be in addition to these focussed activities, or somehow folded into them.

2012 Lessons Learned

This year I was somewhat more deliberate in my personal goals than I had been in past years. I tried to consciously apply what I learned last year.

  • Lesson #1: Focus allows you to make outsized gains in the area you focus on.
  • Lesson #2: A goal centered around a purpose is easier to achieve.
  • Lesson #3: Be willing to change tactics quickly if they aren’t working.

As the end of the year approaches, I am starting my post-mortem to plan for next year — here’s what I learned.

Lesson #1: Remove friction

I very rarely updated this site in 2012. I finally decided to bite the bullet and get everything into WordPress so that I could update from any machine, not just the one I had RapidWeaver installed on. I immediately got a bunch of benefits (1) the site has a mobile theme (2) I can update from my phone or iPad using WordPress apps (3) dealing with images and other media is a lot easier and (4) publishing is automatic and fast. Since the migration, I have maintained about a weekly update schedule.

Lesson #2: Just ship

I have a bias towards shipping, but sometimes I forget to apply that to my personal projects. I didn’t make my goal of three new apps, but I did ship PaleoViz after deciding it was good enough.

Lesson #3: Live the dream

I drove a 1992 Honda Civic and was often asked what my next car was going to be. My reply was “I don’t have a dream car — the dream is no car”. Well, after an unfortunate incident with a Jeep Cherokee, I decided to let the Civic get totaled and started living my dream. It’s been five months, and I don’t see going back. Now, I commute with a fifteen minute bus ride or five mile run or bike on a bike path.

It makes it easier that I have access to my wife’s car, but I’ve mostly lived without that. I’ve looked at zipcar for occasional needs, but cabs are cheaper for the ad-hoc ride not covered by our bus system. I haven’t taken a cab yet, though. My typical response to not having a car at my disposal has been to simplify my life, so that I just don’t need one.

In 2010, I cut out cable and went to Apple TV. It was a lot cheaper, and I watched less and better TV. Like that change, I also have less expense, and I prefer the result. The rides back and forth are fifteen minutes and give me a chance to prepare for the work day on the way in and decompress on the way home. On warmer days, I get extra exercise.

Like last year, I hope to apply these more consciously.

Bias towards shipping

A few weeks ago a colleague said that I had one of the stronger biases towards shipping that he had seen. I am pretty sure he meant it as a compliment, and I took it that way anyway. In my work, I am highly influenced by the Steve Jobs quote, “Real artists ship”, and I often say that our work as product developers is to ship and get better at shipping.

That being said, it’s sometimes hard for me to remember that in my personal projects. Back in January, I started an iPhone app to help me stay motivated to stick to the Paleo dietI blogged about that back then, and said:

I’ve been working on a way to do this (mostly to scratch my own itch), and will have more to say on that soon.

My plan was to ship in April. But, a trip to New Zealand and my duties at work left me with less time to devote to it. The project languished from March to about a week or two ago when I got a message from Apple that my right to the name PaleoViz would be revoked if I didn’t submit a binary.

With that kick in the pants, I went into full ship mode. Removing features, fixing bugs, finding what I hope are elegant solutions to thorny user interaction problems. The biggest decision I made in the bias to ship was to abandon having my own online photo sharing and am just using Twitter for that (for now). PaleoViz was reduced to its essence — a photo food journal app for paleo dieters.

I expect it to be approved by the end of August, if you are a paleo blogger and want a review copy, let me know.

Blogging follows doing

This year when I set my goals, I added in a monthly renewal on the last weekend of each month to reflect on how I was doing. I just completed one a few days ago.

On my physical goals related to diet and exercise, I am doing fine. My social goals like volunteering are also doing well. But, I am having a big problem on my goals related blogging/writing and personal programming projects.

I thought it would be easy to just write a blog entry to get out of the rut. When that failed, I thought, “start small — start with a tweet”. Even that was kind of difficult — I didn’t feel I had anything to write about. I could always tweet a new job opportunity in Western Mass. or link a jobs-to-be-done article, but in terms of an original tweet, I had nothing.

Looking over my previous non-linking, non-retweets, I did see a pattern — if I actually did something interesting, I usually had something to say about it. Armed with that, I decided to just tackle a couple of easy projects — the latest was upgrading my harddrive, which was worth a tweet shoutout to iFixit.

None of these things are worth a blog entry, so I have to get cracking on bigger things. The key for me is that I don’t think it’s worth opening up my CMS to blog until I have done something on one of my personal projects.

The other takeaway is that forcing myself to do some monthly reflection on my goals helped me to get out of a rut, so that’s something that has to stay.

Take a Picture of What You Eat

I recently discovered Time Management Ninja, and love the tips on it. A post from last month was about how taking photos can improve productivity:

Photos capture information that you cannot get via written notes. Taking pictures of an object or a document can provide more insight that simple notes.

The important thing is the ease of capture. Taking a photo is so easy that you’ll actually do it.

I just started keeping a fairly detailed food journal on paper. I have tried to do this on phones before, but they are just way too slow — even though the apps have access to tons of nutritional data, I really didn’t care about that — I just want to know a few things, like what it was, how much I had, and basically how healthy was it. A picture pretty much gives me the first two instantly, then I want to just tap a rating.

And, it’s effective. In 4-Hour Body, Tim Ferriss [1] cites a study that looked at photo food diaries:

Dr. Lydia Zepeda and David Deal of the University of Wisconsin–Madison enlisted 43 subjects to photograph all of their meals or snacks prior to eating. Unlike food diaries, which require time-consuming entries often written long after eating, the photographs acted as an instantaneous intervention and forced people to consider their choices before the damage was done. In the words of one participant: “I was less likely to have a jumbo bag of M&Ms. It curbed my choices. It didn’t alter them completely, but who wants to take a photo of a jumbo bag of M&Ms?”

The researchers concluded that photographs are more effective than written food diaries. This is saying something, as prior studies had confirmed that subjects who use food diaries lose three times as much weight as those who don’t.

I’ve been working on a way to do this (mostly to scratch my own itch), and will have more to say on that soon.

[1] Ferriss, Timothy (2010-12-14). The 4-Hour Body (p. 60). Crown Archetype. Kindle Edition.