Archive for the 'Life' Category

Long hair, care and feeding of

Saturday, May 16th, 2020

As some of you know, I used to have long hair—down to my waist, kept in a ponytail. I’ve gone back and forth a couple times; currently I have short hair.

The ability to maintain short hair is kind of hard to come by right now, which is hard on people who are not used to growing/were not intending to grow their hair out.

There are a couple of solutions to that. One is to acquire a hair-clipper, even if it takes you awhile, and teach yourself how to use it, almost certainly with some hair-styling fails along the way. (There is nothing wrong with this; “sucking at something is the first step to being sort of good at something”, and you can consider this the cultivation of a skill that you will then have available to you for the rest of your life.)

This post is about the other solution.


Hair is a set of trade-offs. Short hair chooses one set; long hair chooses its complement.

Short hair Long hair
Maintenance Regular trims/haircuts Optional maintenance of bangs or sides; doing nothing at all works too
Shampoo Very little Buy it by the liter
Styling Part of the haircut itself Done by accessorizing the hair; e.g., adding things to it, curling or flattening it, putting it in a ponytail or braid
Cleanliness Can vacuum up the clippings after a trim Finding random fallen long hairs all the time

One of the best parts of long hair is not having to do anything to it. It just grows, and doesn’t need my help to do that. No regular visits to the barbershop, no having to mow my own head every few weeks. All I need to do is wash it.

On washing it: Yes, the shampoo consumption rate difference is real. As your hair grows longer, the amount of shampoo needed to wash it—and the amount of water needed to both wash and rinse it—will increase. Part of why I’m keeping up my short hair is to make my shampoo supplies last longer; if I didn’t have my hair-clipper, I might have gone back to long, and would see my shampoo consumption just starting to tick up about now.

Styling short hair consists of how you cut it—that is, how short you cut the various sections of it (front, sides, back). There’s also how you part it if the top is long enough for that, bangs/fringe, etc. Styling long hair consists of shaping it or putting things in it. I kept my long hair in a ponytail, which meant I used a ponytail band.

Cleanliness is an underappreciated benefit of short hair. All hair naturally falls out after a certain amount of time; coupled with growth rate, that means hair typically falls out at a certain length. That length is the maximum length you can grow your hair out to. It is also the length of the innumerable fallen hairs you will find on the carpet and on random things all the time, and for years after you switch (back) to short hair—I still find random long hairs occasionally, and I’ve had short hair for over a year now.


Growing your hair long happens in multiple phases.

Phase 0 is when it isn’t long yet—it’s still short, maybe out to a few inches at most.

Phase 1 is when, if maintaining short hair, you’d consider yourself overdue for a haircut.

Phase 2 is the worst part. This is when it is definitely no longer short but isn’t long enough to put into a ponytail. It hangs in front of your eyes, gets in front of your face, and is generally messy for a period of months. (This is the point at which I start wearing bobby pins above the corners of my face to keep my hair out of it.)

Phase 3 is when the hair gets long enough that you can put it into a ponytail or—after even more time—a braid.


Hair is different from one person to the next.

What everyone knows is that hair comes in different shapes. From straight, flat hair to waves to loose curls to really tight curls. My hair is naturally straight with subtle waves, so that’s where my experience is. Different shapes require different techniques, and your hair may require tools and techniques that I can’t speak to.

Less well-known is that hair also comes in different thicknesses. My hair is really thick, which is why I’ve never been able to braid it. (Or at least that’s what I blame it on.) Some people’s hair is really thin. It’s a spectrum.


There are some things you should buy while your hair is growing out (in addition to the 55-gallon drum of shampoo).

One is bobby pins. They come in different colors to match your hair; find yours and buy a big pack of it. You will lose them, and sometimes the paint wears off or a pin looses up and loses its grip.

You’ll also need a hairbrush. I recommend the Wet Brush; where most brushes get a lot harder to use on wet hair, the Wet Brush actually works more easily on wet hair.

Relatedly, buy a metal comb with widely-spaced teeth. Use this to pull hair out of your brush. Throw the clumps of hair in the compost or garbage.

Lastly, buy some ponytail bands (also called “hair elastics” but that’s a more general term). These come in different colors (including both hair colors and decorative colors), thicknesses, and cross-sectional shapes (round or flat). I buy flat black ponytail bands in packs of 15 at the dollar store, and Daiso has some neat round ones that have an ornament on them, which are a fun way to accessorize your ponytail once you have one.

Bobby pins, brushes, and ponytail bands are all consumables. I already mentioned how bobby pins wear out and become trash. Brushes lose detangling effectiveness and eventually start losing bristles; ponytail bands lose elasticity. You will need to replace your brush periodically, and you will need to replace your ponytail bands regularly.

Oh, one more thing: a metal wire brush for sweeping up fallen hairs from the carpet. Way easier to pick hairballs out of this than off of a vacuum roller. Trust me.


One thing that becomes important as hair grows out is its texture.

Hair is not a perfectly smooth cylinder; it is, essentially, barbed. These barbs will catch on each other, tying your hair in knots. These knots will happen, and you will have to remove them.

First, use shampoo with conditioner. Conditioner smooths out the barbs and makes hair less likely to tangle. I’ve always just used Pert Plus but some people prefer to use a separate shampoo and conditioner. You might also look into “dry shampoo”, which I’ve never tried but some people swear by. Use whatever works for you, and consider changing it up and finding a new favorite that may be more suitable for your long hair.

Second, brush your hair every day. (Put your comb away. Once you get to Phase 2, you won’t need it, unless you have a beard and you comb that.) If you skip a day, you will regret it. Brush it every day. If you have a Wet Brush, you can do this right after you get out of the shower, or even in the shower.

Third, sooner or later, a knot will happen. Usually you’ll find it with the brush. If the brush doesn’t pull it apart, you’ll have to do it yourself. Sometimes you can (and might need to) pull it apart piecemeal, pulling small sections of your hair out of the knot at a time; even then, you might just be working to the point where you can tear the knot open by brute force. You will develop a particular kind of strength, doing this. One way or another, the knot—or pieces of it—will come out, and you’ll throw the hair away in the compost or regular garbage.


There are flat ponytail bands that have a grippy coating on one side. These are a scam; the grip layer does nothing but act as a pivot point, and the band immediately tips over to the non-grippy side.

To put on a ponytail band, you will need hair that is sufficiently long—at least down to your lower neck/shoulders—and freshly brushed.

I’m right-handed, so the following instructions are written accordingly. Swap left and right if you’re left-handed.

  1. Put the band on your left hand, holding it taut around all of that hand’s fingers, or all but the pinky.
  2. Gather up your hair, at the base of your neck, into your right hand.
  3. With your left hand, grasp the bundle of hair. (You’re now holding your hair in both hands, one of which has a ponytail band stretched around its fingers.)
  4. Take your right hand off of your hair and pick up the band where it’s over your left fingers. Hold onto the band with your right fingers. Pull your hair through the band with your left hand, which will pull the band off your left hand and fully onto/around your hair.
  5. Still holding your hair in your left hand and the band in your right fingers, use your right fingers to put one twist in the band. Add your right thumb inside the band, and use your right index finger and thumb to expand the side of the band that has no hair in it until the twist is in the middle of the band and the band has one side with hair in it and one side without.
  6. Use your right index finger and thumb to grasp the hair just below where the band is around it. With your left hand, let go of the hair and pick up the band, and pull the hair through a second time.

You now have a double-banded ponytail.

Becoming a Democratic voter

Thursday, February 20th, 2020

This month, I did something I once thought I would never do.

Screenshot of the online voter-registration form on the California Secretary of State's website, with my party preference filled in as Democratic.

My whole adult life, I have been what’s known as a “no party preference” or NPP voter. (Sometimes called “independent”, but this is ambiguous as there is a party called the American Independent Party, and they are very much not centrist or big-tent.)

Largely this has been because I don’t like political parties. And I still don’t. In theory, they’re money and resource pools for candidates to draw on; in practice, we often see them working against insurgent candidates who are proposing change. I’d much rather have campaign finance restricted to some equal share of a publicly-funded pool, with strict laws and even stricter enforcement. (Yes, I know there are risks there, too. There are no perfect solutions.)

I also have always held a somewhat idealistic openness toward third parties, largely as a result of all of the shitty things that politicians of both major parties and the parties themselves have done—some credible competition might help keep them honest.

But now?

John Wick, from the first movie, with his lines changed to “People keep asking me if I have a party preference. And I haven't really had an answer. But now yeah… I'm thinkin' I've got a party preference!”.

On top of the significant difference between the two major parties these days, there is also some realpolitik involved.

For one, I’ve accepted the fact that as long as we have a first-past-the-post voting system, our elections will always tend toward two polar parties, with all the other parties and all the candidates and voters arrayed around them like iron filings around a bar magnet. Ranked-choice voting is a prerequisite (but not the only step by any means) to dismantling the two-party binary. And until we get there, power resides with the two major parties and power must be won and wielded to make change.

But more immediately, the current election in California, which started this month and ends March 3rd, is not only a primary—it’s also used by various Democratic Central Committees (county party organizations, basically) to elect their board members.

As a NPP voter, the Democratic Party in California would let me vote in their Presidential primary—this is called requesting a crossover ballot, and it’s done through the same form through which you request a vote-by-mail ballot. You then get a ballot for NPP voters that includes the Democratic Presidential primary.

But a NPP voter cannot vote in their county’s DCCC election. That’s for registered Democrats only.

So that’s what pushed me over the edge. In San Francisco, we have two roughly-defined slates of candidates running, one formed of current and former elected officials looking to transition from holding power in state or City government to holding power in the county Party, and the other a slate of activists who want the Party to drive progressive change.

One of those Democratic Parties sounds a lot better to me—and I want to cast my vote accordingly.

As I mentioned, the election has already begun—I had already received my crossover ballot when I made the decision. I emailed the SF Department of Elections and got confirmation that once I re-register (and check the box to receive mail-in ballots, same as I did last time), a new ballot would automatically be sent to me. So I did the thing, got my new ballot, and will discard my crossover ballot.

(If you want to do this, the deadline to register and get a Democratic mail-in ballot was February 18 here in California, but you can do Conditional Voter Registration at any polling place/voting center in your county. If you’re in another state, check with your Secretary of State or county Department of Elections.)

Leaving Apple

Wednesday, August 15th, 2018

I’m leaving the Fruit Company. My last day is August 17.

I don’t have anything else lined up yet. My immediate plan is a period of funemployment, including a trip back home to SoCal for a bit. Then, I’ll return to San Francisco, and look to begin my next chapter.

I’ll be forever grateful for the past four years. My life has changed in more ways than I can count, and I’ve made so many new friends, and done great work and learned a lot. And San Francisco is my adopted home—there is no feeling quite like returning here after being anywhere else.

Photo of 1 Infinite Loop.

Photo of Apple Park.

I don’t know what’s next, but I’m excited to find out.

Things to look for when looking for an apartment

Thursday, July 9th, 2015

Inspired by my own apartment hunt last year.

In no particular order:

  • Cell reception
  • Hot water
  • Outlets: Are they grounded? Are they ALL grounded? Are they REALLY grounded?
  • Proximity to laundry (in-building? coin-op laundry nearby?)
  • How good said laundry is
  • How expensive said laundry is
  • Window directions (east-facing: warm mornings; west-facing: warm evenings)
  • Can windows be opened?
  • Can windows be blinded?
  • Trash/recycling/compost disposal: Where? How? Capacity/limits?
  • Noise
  • Access to cable TV/internet
  • Access to transit
  • Does the building have a twin? (If so, you have a random chance of a resident of that building entering the wrong building and trying to get into what they think is their apartment.)

Alternatives to “guys”

Friday, June 19th, 2015

When you’re addressing a mixed-gender or unknown-gender group, you should not use the word “guys”.

(Everything in this post also applies to “dudes” and “fellows”, and the singulars of all three. For example, “the IT guy”.)

The word refers to people who are male. It doesn’t matter what you meant by it in a particular instance, or how you as an individual tend to use it: That is what it means. That is what it conveys. That is what people hear when you say it.

As Julia Evans found, different usages vary in how they’re received, and there’s almost always a difference by gender. You’re more likely to think “guys” is gender-neutral if you’re a guy.

When you use it to address people of mixed or unknown gender, you reinforce the idea of male-as-default: This masculine word can refer to anybody! Funny how that doesn’t work for feminine words.

When you use it to address people of mixed or unknown gender, you erase the non-male people in the audience: Everybody here is guys! There’s nobody else here, no non-guys at all, no, sir.

So stop it. Stop saying “guys”.

(Except, of course, when you really do mean a group entirely of guys, like a men’s sport team.)

You may think it’s perfectly normal. It’s common, and that’s different. “Normal” implies healthy, and this isn’t healthy.

If you start paying attention, it won’t sound so “normal” after all, once you start noticing every time somebody refers to people who aren’t all guys as guys.

You might think “OK, I’ll say ‘guys and girls’ or ‘ladies and gentlemen’ instead.” Don’t do that. That does not include everybody: There are more than two genders, and not everybody inhabits any of them.

We can do better than that. We can include everybody.

So, what should you say instead?

These are words and phrases that include rather than exclude. That acknowledge rather than erase.

If you have other alternatives to suggest, please do suggest them in the comments.

The to-do graph

Sunday, December 21st, 2014

Earlier this year, I started practicing GTD.

I’m not very good at it yet. But I’ve learned some things.

And I’ve proven that lists suck.

A list is a single, flat, ordered collection of items. In GTD, you’ll have one list per project, and each item is an action.

This makes sense if you consider the list to be a record of everything you did toward that project, in order, written before instead of after.

But who does that?

Who micromanages the order of things they’re going to do before they do it?

Who has such perfect foresight?

Who has that kind of time?

Moreover, the order of a list is implicitly transitive: Every item in the list must come after every item before it and before every item after it.

That isn’t true: Some things can be done at the same time, or in either order. For example, you can work on assets while you install Xcode, and then you can work on assets before code or code before assets.

A list is a serial queue. No work can proceed until the work before it is finished.

The alternative to that is to throw out the ordering altogether: Put items in in the order you think of/receive them, and then every time you want to start one, scan through the whole list until you find something that you haven’t done and can do.

It’s a choice between false information—order relationships that don’t really exist—and no information.

The latter seems worse: Some of the orders are true, and therefore valuable, so why throw them all out?

How can we avoid that?

What makes the true orders true? Why do those actions have to be done before those other actions?

Dependencies.

This action must be done before that other action because the other action depends on it.

Some actions depend on other actions. Some actions depend on multiple other actions.

This is a graph.

That’s what I’ve switched to. I still use OmniFocus (version 1), but only as an inbox; I migrate those items to my to-do graph, which I keep in OmniGraffle.

Example graph of two projects, “Build new app” and “Work on existing app”, with actions such as “Create Xcode project”, “Fix bug in frobulator”, and “Add BSP reticulation”.
You can tell this is a made-up example because some of these actions are not concrete enough to be proper GTD.

The graph enables me to express dependencies without making up false orderings. Items that can be done in parallel are in parallel.

I mainly edit the outline, rather than the boxes on the graph directly. You could use something like OmniOutliner or TaskPaper, but those can’t visualize the graph. OmniGraffle has an “auto layout” (no relation to the Cocoa feature) option that automatically creates and arranges boxes in the graph corresponding to items in the outline.

The top-level items in the outline, the roots of the graph, are goals. I typically write these as high-level imperative sentences such as “build initial version of app”.

All, or occasionally nearly all, of the other nodes are indivisible actions. Each is a single concrete step toward the goal.

The leaf nodes are “next actions”: At any time, I should be able to pick a next action as the next thing I’m going to do.

I also create nodes for other people’s actions that I’m waiting on. These nodes look like “So-and-so: Do such-and-such”. When that happens, I take it off; its parent—if it has no other dependencies—then becomes a next action.

I set OmniGraffle to lay the graph out as an upward tree, so that each project actually does look tree-like, with the “root” at the bottom.

To mark an action as done, I have two choices: I can set the node’s font to strike-through, or just delete it. I typically strike through my own completed actions, and delete obviated actions, completed actions by others, and completed goals.

You’ve gathered by now that OmniGraffle lacks some things for this.

  • It wasn’t designed to be used as a to-do list, so it lacks a concept of “done”. Instead of a checkbox, I have the Font Panel.
  • Similarly, there are no priority or due-date options. I generally don’t use these, but some projects do, in fact, have a due date, or greater or lesser priority than other projects, and it’d be helpful to track that.
  • The outline editor, which superficially looks like a mini OmniOutliner, lacks or changes about half of OmniOutliner’s keyboard commands. I really wish that if the keyboard focus is on the outline, that it would just respond exactly as OmniOutliner would to every possible keypress.
  • The option to have a node pinned to the far (top) row of the tree is a per-node option, so I can’t have it automatically lay out all next actions in the same row.
  • The outline structure, like OmniOutliner’s, means I cannot have multiple nodes depend on the same action—which they very well could in reality.

I have two points:

  • A graph is a much better way to express to-dos than a flat list.
  • There currently isn’t a Mac app ideally suited to this. OmniGraffle is a great graph editor, but I’m using it for a purpose it wasn’t designed for. I’d pay good money for an app of OmniGraffle’s quality and basic nature, but optimized for to-do keeping.

Updates

Saturday, October 25th, 2014

The blog’s back up. It’s been down most of the year, as rather a lot of you noticed.

Thank you, everyone who told me. Every time you told me my blog was down, you were also telling me that you missed it, or at least you needed it for something. You’re part of why I kept meaning to bring it back, and why I eventually did.

I work for Apple now.

I’m on the Foundation and Core Foundation team, which is part of Cocoa. Part of my job is reading the Radars you file about those two frameworks and making sure they go to the right people.

I live in San Francisco now.

I moved early in the year, not long after I had to change hosting providers after TextDrive breathed its last (that was why the blog went down in the first place) and shortly before I started at my job.

I moved for the job; I work in Infinite Loop.

(I also moved because I love San Francisco. I’ve been here a couple of times before, and fell in love with it when I first stepped out of Civic Center BART onto Market Street.)

I probably won’t write as much here anymore.

A big part of that is time constraints: Subtract the job, the commute, three square meals, and sleep, and I don’t have a lot of time in a day to pound out a blog post.

Then, of course, there’s the nature of the job: Being at Apple means I know some things that aren’t public. Not a lot, but enough. Better to be careful than accidentally say something here that I’m not supposed to.

The same goes for my being active on Stack Overflow.

You’re welcome to ask a question and send me the link, but somebody else will probably get to it before I will.

And, of course, MacTech. See above. (If you have a subscription, you might have noticed this already—my last article ran in August, I think.)

I won’t be at MacTech Conference this year, either. This is the first time in the conference’s history that I won’t be at it. But plenty of other fine folks will who are worth listening to and who are good company.

That’s all I have to say for now. For those of you who use Twitter, I’m still there.

Until next time.

How to read what I’ve been writing

Sunday, August 11th, 2013

You might have noticed that this blog of mine has gotten mighty quiet on the sort of programming-related (especially Cocoa-related) topics I historically have written about here.

There have been, and will continue to be, occasional exceptions, but, for the most part, this will remain the case for the foreseeable future.

So, where do I write about programming nowadays?

MacTech magazine.

Cover of the August 2011 issue of MacTech magazine.
The first issue with an article of mine in it.

Here’s some of what I’ve written about:

  • C and Objective-C basics
  • Introduction to NSOperationQueue
  • Uses of GCD besides dispatch_async (this one was split over two issues)
  • How Cocoa and Cocoa Touch use blocks
  • A sampling of available developer tools, both Apple and third-party (co-written with Boisy Pitre)
  • Reviews of developer documentation viewers
  • Using Quick Look
  • Practical applications of Core Image

If you want to read my previous articles, they sell old print issues for $10 each, and they sell old issues from January 2012 onward in their iPad app for $5 each.

If you want to read future articles, it’s cheaper to subscribe: iPad subscriptions are $11 (in-app) for three months, and print subscriptions are $47 for a year (or cheaper with certain coupons).

I’ve got some good stuff coming up. The immediate next thing is a two-parter on essential tools and best practices for developers. Part 1 should be in the August issue.

An insight on the construction of meals

Saturday, December 22nd, 2012

Last year, I started cooking for myself rather than depending on microwaved meals and fast food.

Earlier this year, a realization dawned on me, pertaining to the basic food groups that were drilled into every kid’s head via TV when I was growing up.

Those old PSAs talked about healthy eating, and how it was Very Important to eat something from the “four basic food groups” with every meal. As a kid who greatly preferred cookies to celery, this was no sale to me—I didn’t give a rat’s ass how healthy it was or wasn’t, I wanted food that tasted good. All the droning about “healthy eating” did nothing to make me think about it when deciding what I wanted.

Fast forward 20 or so years, and it hits me: Those “four basic food groups” (the number has varied over the years, as the aforelinked article outlines) are the framework of constructing a meal.

Nearly every single meal in the American diet is some combination of those four groups.

(This is particularly true of dinner. Numerous meals for other times of day leave out some of the groups.)

Here are the groups as I was taught them:

  • Meat (nowadays more generally classified as Protein)
  • Grains, especially bread
  • Fruit and veg
  • Dairy, such as cheese

Butter seems to often get filed under “fat” and excluded, which is technically true, but whenever it makes it to the plate, I think it makes more sense to file it under dairy. (Another reason to shun margarine, the False Butter.)

Let’s look at some example meals and how they satisfy the categories.

Note: I’m not claiming that these are all healthy meals—those healthy-eating PSAs are simply where I got the “four basic food groups” from. I’m reappropriating the groups as a framework for constructing meals. Anything that checks all four boxes is automatically a complete meal.

Also, this is mostly observation, not prescription. My epiphany is that most meals, particularly nearly all dinners, already fit this framework.

Cheeseburger
  • Bread/grains: Bun
  • Meat: Beef patty
  • Fruit/veg: Any of lettuce, tomatoes, pickles, onions
  • Dairy: Cheese
Spaghetti and meatballs
  • Bread/grains: Pasta
  • Meat: Beef meatballs
  • Fruit/veg: Marinara sauce
  • Dairy: Cheese
Pizza
  • Bread/grains: Crust
  • Meat: Toppings; often pepperoni, ham, sausage, or a combination thereof
  • Fruit/veg: Sauce, plus some toppings, such as pineapple
  • Dairy: Cheese
Sandwich
  • Bread/grains: Sliced bread, such as white, wheat, rye, or sourdough
  • Meat: Sliced turkey, roast beef, or other
  • Fruit/veg: Lettuce and/or tomato
  • Dairy: Cheese
Dinner plate
  • Bread/grains: Often potato-based, such as baked or mashed potatoes; alternatively, rice
  • Meat: Steak, chicken, sliced turkey, etc.
  • Fruit/veg: Varies
  • Dairy: Cheese and/or butter

A meal doesn’t necessarily have to hit all four categories, though. Here are some that don’t:

Hot dog
  • Bread/grains: Bun
  • Meat: Meat frank, usually either beef, turkey, pork, or a mix of turkey, chicken, and pork
  • Fruit/veg: Relish (diced pickles) and/or diced onions (often both omitted)
  • Dairy: Omitted
Chili dog
  • Bread/grains: Bun
  • Meat: See hot dog
  • Fruit/veg: Usually omitted, AFAIK
  • Dairy: Cheese (optional)
Grilled cheese sandwich
  • Bread/grains: As above for sandwich
  • Meat: N/a
  • Fruit/veg: N/a
  • Dairy: Cheese

(On the other hand, panini are basically grilled cheese sandwiches that may include meat and/or fruit/veg.)

Bowl of cereal
  • Bread/grains: Cereal
  • Meat: N/a
  • Fruit/veg: Some folks put chopped strawberries or bananas on theirs, at least in the commercials
  • Dairy: Usually milk, but I eat mine dry
Pancakes/waffles
  • Bread/grains: Pancakes/waffles
  • Meat: N/a
  • Fruit/veg: As above for cereal, but can also include blueberries or similar berries (which may be either whole as a topping or chopped and mixed into the batter)
  • Dairy: Butter (optional)
Hamburger
  • Bread/grains: Bun
  • Meat: Beef patty
  • Fruit/veg: As above for cheeseburger
  • Dairy: N/a

A few points I want to acknowledge:

  • Vegetarians will, of course, exclude the meat category. (I consider veggie meats, such as tofu burger patties, to be cheating—you don’t get to check the meat box by having fake meat.) Some vegetarians will also exclude dairy.
  • Various dietary conditions, such as celiac disease, greatly restrict what sufferers can eat. I can barely imagine the problems that the tendency of American meals to fit this framework causes to sufferers of dietary restrictions that break it. (Those with celiac disease, for example, must not eat nearly all bread items—anything with gluten.)
  • I know very little of cuisine outside of the US. I wonder how much cuisine outside the US fits this same template, and how much is radically different.

This insight leads me to two conclusions:

  1. I can “invent” other meals that I might like simply by swapping items in the four boxes.
  2. It could be a worthwhile adventure to try to break out of this framework. What would a complete meal look like that doesn’t fit into all four categories? Vegetarians will have some idea in one direction; what other possibilities are there?

How to ride a bike

Tuesday, October 2nd, 2012

For the past year (2011–2012), I’ve been teaching myself to ride a bicycle. My goal is transportation; I’d like to be able to ride at least a mile or two without burning gasoline.

I would not have been able to do this by myself without YouTube. You can learn about any bicycle-related topic you’re interested in; all you have to do is find the right video (or videos).

Background

I’m 28 as I write this; I was 26 or 27 when I started (I don’t remember which month it was). How didn’t I know how to ride a bike already?

I had a bike as a kid, with training wheels. My parents wanted to take the training wheels off. I objected on the quite reasonable grounds that the bike stayed upright just fine with the training wheels, so why did they want to make it capable of falling over?

So they gave me an ultimatum: Either we take the training wheels off, or we put the bike away and you don’t ride it again until you change your mind. Guess which one I chose.

(More recently, I found out that there’s a right and a wrong way to use training wheels. What you’re supposed to do is raise them up, a little bit at a time, so that eventually they’re nowhere near the ground, by which point the child doesn’t need them anymore and might not even notice if you take them off. That’s not what my parents did, so I never learned to ride without training wheels.)

Step 1: How to not fall over

(more…)

Writing, n.

Thursday, March 24th, 2011

Over on Tumblr (where I have also started writing), Andy Matuschak and Christopher Bowns have challenged each other:

Long story short: Andy and I threw down our respective gloves after throwing back the third glass of whiskey, and came up with this: every Tuesday, we’ll spend 20 minutes of our respective shuttle rides to work writing something. It doesn’t matter what, but when those 20 minutes are up, you publish it.

After Christopher published that, Colin Barrett entered with this piece. Discussion ensued on Twitter, as it so often does, and it included this tweet from Christopher:

@cbarrett Perfect. I think “overthinking it” can cripple your writing, but it’s hard to let go of, because it’s so useful in engineering.

I responded there, but I’d now like to expand in a somewhat different direction here.

Writing programs is writing.

Consider this: If you write a program that no human can read, you have written it badly, and may have even written an outright bad program. Switch out “program” for “manuscript” and I hope you see my point.

Don’t confuse this with literate programming. That has you write a more-or-less human-only text, and then run a program such as WEB or CWEB to translate it to source code.

The problem with literate programming is the problem with all translation from one language to another, especially automatic translation: Error.

Just as translating a human-only text from one human language to another human language can produce a garbled mash, so can translating a program from one language to another produce a nonsense, or at least broken, program.

Hence the justified suspicion of programs that “upgrade” a program even just from one version of the same language to another: It isn’t the same language; not really. Similar, but not the same. Going from Python 2 to Python 3, for example, is not much different from going from 18th-century English to 21st-century English. Do these words mean the same thing? Maybe not. This is why such translators invariably come with warnings to check the hell out of the result.

No, I’m not talking about literate programming. I’m talking about regular programming, where you write the true text of the program, the text that the interpreter interprets or the compiler converts into machine code.*

Programming is a fusion of a couple of skills. It’s often called “software engineering”, but that’s only half of it. Writing is the other half. I define “writing” here as writing text into an editor, whatever the language, and “engineering” as designing a thing to be built. Things like OOP, unit testing, and design patterns are aspects of software engineering. Things like DRY, commenting practices, naming practices, and style rules are aspects of writing.

If you write a program well, you write it not only for the interpreter or compiler, but for any humans who will read the program after you, including yourself. It is a text like any other.

Writing a program is writing. Every rule, observation, and prescription you apply to writing for humans only, apply also to programming, and vice versa. If the rule does not work, chances are it was not a good rule to begin with.


Suggested reading


* This is, itself, a form of translation; the C standard even calls it such. That’s part of why compiler bugs are possible, and why compiler authors are extremely careful about their work, which is why compiler bugs are so rare.

Another Voices That Matter conference coupon

Friday, January 28th, 2011

The next Voices That Matter iPhone developers’ conference is April 9–10 in Seattle. Early-bird pricing lasts until February 25, and the coupon code this time is SEABLOG. The total for the “core conference” with both discounts is $395 USD.

As usual, I don’t expect to be there. Have fun without me!

My Christmas playlist

Friday, December 10th, 2010

I made this for Mom and I to listen to last year on the way up to and back from my aunt and uncle’s house for Christmas. Now, I share it with you.

The order of the songs is deliberate. I ask that you listen to them in this order.

Some of these are iTunes links, some are Amazon links, and some are free songs and/or albums.

Title Artist
It’s Beginning to Look a Lot Like Christmas (iTunes) Harry Connick, Jr.
It Came Upon A Midnight Clear (Amazon) Frank Sinatra
Wizards In Winter (Instrumental) (Amazon) Trans-Siberian Orchestra
Deck The Halls (Amazon) Mannheim Steamroller
The Little Drummer Boy (iTunes) Bob Seger & The Silver Bullet Band
Christmas (Baby Please Come Home) Slow Club
Oh Come Emmanuel (Amazon) (free) Aliqua
Oh Holy Night (Amazon) Richie McDonald
Greensleeves (iTunes) Gary Hoey
The Night Before Christmas * The Smithereens
Must Be Santa (iTunes) Bob Dylan
Feliz Navidad (iTunes) José Feliciano
Jingle Bells (free, on the 2002 album) Adam Kempa
God Rest Ye Merry, Gentlemen (Amazon) Mannheim Steamroller
Silent Night (Amazon) House Of Heroes
Sleigh Ride (free, on the 2003 album) Adam Kempa
Christmas Canon (Amazon) Trans-Siberian Orchestra
Carol of the Bells (Amazon) The Bird And The Bee
O Come All Ye Faithful (iTunes) Amy Grant
Christmas (Baby Please Come Home) (free) Blue Skies for Black Hearts
The First Noel (iTunes) David Archuleta
God Rest (iTunes) Gary Hoey
Deck the Halls (Amazon) Mario Lanza;Henri René and His Orchestra
Twelve Days of Christmas (iTunes) Mexicani Marimba Band
Greensleeves (iTunes) Vince Guaraldi
O Holy Night (free, on the 2009 album) Blasé Splee
The Nutcracker, Op. 71, Act 2: Character Dances (Divertissement) – Dance of the Reed Pipes (iTunes) Kirov Orchestra & Valery Gergiev
We Three Kings (free) Blondie
Little Drummer Boy (free, on the 2005 album) Canada
Joy To The World (Amazon) Symphony Brass of Chicago
Silent Night (iTunes) Johnny Cash
Ave Maria (yes, ripped from YouTube—I’d buy it if I could) Barbara Bonney
This is the point at which the program properly ends, but it has four more tracks—
which we might call “bonus tracks”—to pad out the time to two hours.
The Little Baby Jesus (free, on the 2009 album) American Mars
El Bells (free, on the 2003 album) El Boxeo
Silent Night (free) Vandaveer
Countdown To Christmas (free) Glam Chops

The total time is 2 hours, 2 minutes, and 38 seconds.

* I actually got this one from eMusic as a free download, but it isn’t free anymore.

Helping people

Saturday, November 6th, 2010

There’s a recurring theme I keep seeing in questions on Stack Overflow.

I’ve said those words a few times now. I’ve said it twice at my recognizing-Cocoa-bugs presentation, which I’ve given at one CocoaHeads and at the MacTech Conference (just concluded yesterday). I’ve also said it a few other times at CocoaHeads, usually in preface to explaining something that’s both germane to the current conversation and the common source of confusion in the questions I’m then referring to. Plus, I’ve said it a couple of times in posts here.

In the concluding session of the conference, Edward Marczak, MacTech’s executive editor, cited a number of tweets related to various cool things that happened in the past few days. One of them was from me, inviting attendees to flag me down for one of my useful-Cocoa-links cards, which I’d previously offered up to audience members in my session. He told the audience how cool he thought it was that I’d thought ahead and made those cards.

The reason I’d made those cards was because I’d identified a pattern. In my answers on Stack Overflow, I often cite one or more of a few key documents:

or tell the questioner to listen to or turn on some warning or other and link to my warnings blog post as part of that.

My introductory document for Cocoa and Cocoa Touch, in its own introduction, identifies a similar genesis: Everything on that page is something I’d had to explain to multiple people on Stack Overflow, so I decided to put it all in one place for easy linking (by me) and easy reading (by new Cocoa or Cocoa Touch programmers). That document is also among the links on the card.

Each of the things I got praised for in that concluding session, and thanked for (besides Growl, which is mostly a lot of other people’s work) outside of sessions, I made because I’d identified a need by spotting a pattern.

There’s no reason you can’t do this, too. What have you done multiple times lately? Especially, what have you done or made or found for other people multiple times?

Somewhere on Eric Raymond’s site, there’s an explanation of the difference between newbies and wizards. It’s not that the wizards know all that much more than the newbies (though they often do have a stronger/deeper conceptual understanding); asked for the name of a function, say, the wizard will probably not know it exactly (unless it is very simple, such as CFRetain, or one they use very frequently, such as CFRetain).

The difference between them is that the wizard knows where to look stuff up. I sometimes refer to this as “swapping things in”, the analogy being virtual memory: I remember very little at any given moment, precisely because I know where I can get it from when I need to get it back into my mental working set.

The wizard knows how to help themself.

How can you enable people to help themselves?


Here’s that card, if you want one.

Dueling conferences

Thursday, August 5th, 2010

There are two four five six development conferences coming up this fall:

Here’s an iCalendar file of these events.

The cheapest conference is 360|MacDev, at $300 ($200 with early-bird pricing). The second-cheapest is Voices That Matter, costing $395 with the coupon and early-bird pricing. SecondConf is a little more expensive, at $449, and 360|iDev is a little more expensive than that, at $599. The iPhone/iPad DevCon is hard to compare; it’s either the most expensive at $1395 ($1065 with early-bird pricing) or the least expensive at free, depending on which kind of ticket you get. Ignoring the DevCon, MacTech’s conference is the most expensive at $899, but is also the broadest, consisting of development (both Mac and iOS) plus an IT track.

I will not be at the Voices That Matter conference, SecondConf, the DevCon, or 360|iDev (I’m still not an iPhone/iPad developer), nor 360|MacDev (too far), but I will be at the MacTech conference. In fact, I’ll be presenting.

My presentation, intended for new Cocoa and Cocoa Touch developers, will be a demonstration of what various kinds of bugs look like in Cocoa and Cocoa Touch applications, along with how to hunt down and fix those bugs.

Whichever conference you go to, have fun, and if you’re coming to the MacTech conference, I hope to meet you there.

UPDATE 2010-09-10: Added SecondConf and iPhone/iPad DevCon (thanks to Jeff in the comments for telling me about the latter).

UPDATE 2010-09-11: Added 360|iDev after its organizers followed me on Twitter. Five conferences in seven weeks—maybe some of you could get together and consolidate next year? And again a few minutes later: And 360|MacDev, making six in 11 weeks.

Non-obvious solutions

Sunday, May 9th, 2010

I’ve started a site cataloging non-obvious, simple, superior ways of performing everyday tasks.

The visual theme is Fluid by Andrew Wilkinson, with a custom background image I made in Pixelmator:

Feel free to use that image on your own site.

Cocoa and Cheesesteaks, March 2010

Saturday, March 6th, 2010

CocoaHeads Lake Forest is this Wednesday, the 10th, at 7 PM. If you’re attending, let’s have dinner at 6 PM at Philly’s Best in Lake Forest:


View Larger Map

Cocoa and Cheesesteaks, February 2010

Monday, February 8th, 2010

CocoaHeads Lake Forest is this Wednesday, the 10th, at 7 PM. If you’re attending, let’s have dinner at 6 PM at Philly’s Best in Lake Forest:


View Larger Map

Cocoa and Cheesesteaks 2010-01

Wednesday, January 13th, 2010

CocoaHeads Lake Forest is today, the 13th.

I don’t have any Philly’s Best coupons this time, but I could still go for half a cheesesteak. I eat a basic cheesesteak: Provolone, no onions, no other toppings. If you’re up for the other half, raise your hand in the comments, and bring $3 (your half of the price) to the restaurant.

Anyone else will, of course, have to buy their own sandwich.

The place will be the Lake Forest location and the time will be 6 PM—an hour before CocoaHeads.

Cocoa and cheesesteaks: Success!

Thursday, December 10th, 2009

With the attendance of Stuart Cracraft, Kurt Arnlund, Steve Malsam, and Johan Kool (in order of appearance), and the co-operation of the fine Philly’s Best staff, tonight’s pre-CocoaHeads cheesesteak dinner went smoothly and tastily.

I hope to make this a regular thing, especially if I get more location-agnostic buy-one-get-one-free coupons in future months. I’ll try to post the invitation a week in advance of each CocoaHeads, to give people more time to decide to attend and to confirm their attendance.

Oh, and my presentation went well, too. Video to come once it’s all ripped, edited, and uploaded.