October 19, 2011

I was looking to split a string on case changes today, and googling that problem didn’t turn up much. Here’s my implementation via a category. I hope it helps someone.

@interface NSString (Extensions)

- (NSString*) spacify;

@end

@implementation NSString (Extensions)

- (NSString*) spacify
{
    // ignore irrelevant strings
    if (self.length < 1)
        return self;

    NSMutableString* result = [NSMutableString stringWithString:self];

    // create a range starting after the first character
    NSRange range;
    range.location = 1;
    range.length = [self length] - 1;

    // match any uppercase character
    NSRegularExpression* r = [NSRegularExpression regularExpressionWithPattern: @"[A-Z]"
                                                                       options: 0
                                                                         error: nil];

    // replace matches with the match preceded by a space
    [r replaceMatchesInString: result
                      options: 0
                        range: range
                 withTemplate: @" $0"];

    return [NSString stringWithString:result];
}

@end
September 11, 2011

Ever since I finished college and started working desk jobs, my weight has gone up gradually. For the first several years, this was a good thing. 5’10″, 145 lbs was not quite an attractive physique. When I met Amy, I was at 164 and pretty fit – exercising regularly.

By the end of last winter, six and a half years later, I was at 187. I didn’t look that good and I didn’t feel that good. When my ultimate league started up in May, I couldn’t keep up with anyone. Shortly after that, I had my annual physical. I know BMI is a rough estimate at best, but the chart on the wall had me square in the middle of the overweight classification. When my blood work came back a week later, my cholesterol was (borderline) high for the first time. I was ashamed. I was also determined to turn it around.

I’ll save the suspense and report that by this weekend I’ve successfully lost 23 lbs. I’m back to 164, and I’m at least as fit as I was 7 years ago. This is how I did it, most of it is pretty basic:

  1. Eat Less – I really think this is the most important. At every meal I would consider what portion size I would have eaten. I then ate 50-75% as much. For example, I love Indian buffets. In the past I would typically take two or three trips. Now, I only take one.
  2. Exercise More – 45 minutes or more of exercise at least 6 days a week.
  3. Eat Better – I cut down on fried foods and sweets. My snacks were almost entirely fruit and nuts. More salads, very few appetizers.
  4. Punishment – Some of my favorite foods are french fries, potato chips, and buffalo wings. I love bacon and cheese on my hamburgers. I was ashamed of how far it had gotten, and I punished myself by vowing to eat absolutely no wings, fries or potato chips until I hit my goal. I could still eat hamburgers, but they were never with bacon and cheese. This also presents a nice little reward for reaching the goal: the punishment can stop.
  5. No Cheating – I stuck to the rules no matter what. It’s easy to say something’s a special occasion or to use a vacation as an excuse to take a break, but I think that’s highly counterproductive. A lot of people use exercise as an excuse to eat more. I didn’t.

I’m really happy with my progress here. Now that I’m at my goal, I intend to maintain the exercise level and better diet, while reducing the punishment as long as I stay under 165. While I don’t think I need to lose any weight, I would like to lower my body fat percentage. I feel a lot better, and I want that to continue.

August 30, 2011

I was first introduced to sailing when my father rented a Sunfish on Lake Phalen. My faded memory doesn’t recall a successful afternoon, but who knows? After that, I spent some time on his sailboards, and I always liked that while wanting for more control that my skinny teenaged body could muster.

A couple of summers ago, I took the sailing class offered by the Minneapolis Park & Rec board. That was a lot of fun as well as a good learning experience that I’d recommend to anyone. The same summer, a friend took me out on his catamaran on Mille Lacs Lake. We were cruising along pretty well, but found ourselves turtled in the very middle of the lake. The proper righting gear was not in place, and it seemed we might be stranded there all night. Not a boat was in site, and the middle of Mille Lacs is a long way from shore – not swimmable. We eventually recovered, but I have to admit it was scary.

Recovering from scary adventures is something I evidently enjoy, as I couldn’t wait to join the sailing club. After two and a half years dominated by grad school, I was excited by a summer free from school. Even better, I hired a lawn service. Looking for a fun way to fill that time, I’m really grateful that I found the Twin Cities Sailing Club.

The club is an awesome group for learning to sail and socializing with other like minded sailing enthusiasts. I’ve gone from being pretty green to “Skipper” status in the club: I can take out any of the clubs sixteen boats whenever I’d like. In return, I help other new sailors and join the club in maintenance days on top of a very reasonable membership free. It’s been great, and I look forward to many more summers spent sailing with them.

In the meantime, I’ve been enjoying a few adventures on my own. A couple of Fridays ago, I took Amy and Jake out on a C-Scow, a larger scow that I hadn’t previously skippered. I’d sailed the smaller MC-Scow many times, and this didn’t seem fundamentally different.

We enjoyed a few passes across the lake in lighter winds. In hopes of squeaking some more speed out of those slower winds, I asked my wife and nephew to sit on the leeward side of the boat to help us heel out of the water, reducing drag and letting us move faster. This was the key mistake on my part. An experienced crew would have been fine in that position, but once there it becomes very important to watch for coming gusts and shift weight accordingly.

A large gust came along pretty soon after that, and before they knew what was happening, the boat was on its side. I checked to make sure everyone was OK, and then reassured them that things were fine and that this happens from time to time. I’d done several capsize drills with the club, and I knew what to do in general. Unfortunately, I didn’t know what to do specifically for a scow. The capsize drills were all done on Catalina Capri 16.5s. The C-Scow is a different beast, and after a few attempts to right her, it was clear that I just didn’t know how.

A lot of helpful sailors turned up to give us a hand, but despite their best efforts we ended up swamping the boat. Around this time, I noticed some commotion at the nearby beach. There were, at least, one large firetruck, two police vehicles, and two ambulances waiting on shore along with a crowd. I saw this and said, “Oh man, tell me they’re not here for me.” Someone broke the news that they were. Despite our clear safety and the plenty of boats there to help us, someone on shore called 911, and the entire cavalry showed up. A police boat came out to meet us on the water, and there was another waiting on shore. They didn’t actually help us… just added to my mounting embarrassment.

In the end, a nice family helped us tow the boat to the beach where some club members and I were able to bail it out and get it seaworthy. I’m indebted to them and also to the experience as a whole. I learned a valuable lesson in crew assessment and scow handling in general, and we all walked away from it safely if a bit wetter than intended.

December 6, 2007

After watching the fantastic An Inconvenient Truth over the weekend, it’s great to read news like this. I feel much safer knowing that the world’s scientists are leaving no stone unturned or animal’s anus unexplored in the search for global warming solutions.

October 16, 2007

I’ve said it before, but bottled water is evil. Kari sent me this link to the Carbon Concious Consumer, an organization working to reduce the usage of bottled water. Click on it and sign up!

Carbon Conscious Consumer Logo
September 4, 2007
9:23 am | news | comment Duh

It’s clearly a slow news day.

Rock stars more likely to die prematurely

July 3, 2007

Here’s an interesting article in the Strib confirming my long-held and not-at-all researched belief that bottled water is one of the biggest scams there is.

It states that Minneapolis water, which I drink and enjoy daily straight from the tap, no filter, frequently wins taste tests against the major bottled waters. Even our local radio gourmet (whom I love) thought Evian to be the tap water.

Anyway, all the petroleum, plastic and waste that accompany bottled water is ridiculous when we have perfectly good pipes under our feet. I’ll happily continue refilling my Sigg water bottle.

June 29, 2007

It’s strangely gratifying to know that when we say, “traffic sucks,” we’re absolutely right. Minnesota is proud to feature some of the worst congestion in the nation, second only to California. Woo-hoo! Way to go!

June 5, 2007

What in the hell were they thinking? That logo is so bad that I’m certain it will be discarded and completely redesigned before the London games. If it doesn’t, it will have to be remembered as one of the worst logos ever created.

March 23, 2007
11:13 am | news | comment Pass the Buck

I read this profoundly disgusting story yesterday. Seriously, it’s nasty. Safe for work but probably not safe for lunch. It’s so bad that it’s great though, you really can’t look away. When you’re done, be sure to read Scott Adams’s take on the news as well, which I somehow knew would be his topic of the day. “Pass the Buck” indeed.

March 9, 2007

Check out this story, in which one NHL player hits another in the face with his stick, supposedly in reaction to a “clean” check. My gut reaction is that the guy should never be allowed to play pro hockey again. On the other hand, as long as the NHL continues to encourage fighting, I’m not sure this is that much different than punching the guy in the face. Sure, it’s going to be more dangerous, but when I consider the violent atmosphere they create, the stick seems like a natural extension of the fist, especially for someone who lives holding it.

I know it’s ridiculous to be reading about the NHL here, as I’m the last person who would know anything about hockey, despite being born and raised in Minnesota. So it’s with that caveat that I ask the question I’ve wondered many times, “Why is fighting allowed in the NHL?” Why is a punch on the ice any different than a punch on the basketball court? Whenever there’s a fight in the NBA, you hear about it everywhere. Someone surely earns a multiple game suspension and a hefty fine. But in pro hockey, it’s a few minutes in your own, private ring-side seat. Give fights in hockey meaningful penalties, eradicating the violent atmosphere, and incidents like this one (or the other on my mind from a few years ago, where one guy swung at the back of another’s head with his stick) might just go away.

While we’re at it, make the frickin’ goals bigger and the goalies’ pads smaller. I think I’ve seen a total of 3 goals in the five NHL games I’ve been to in my life.

Update: I decided to find the video to get a better sense of the story. It’s nauseating, but judge for yourself:

March 7, 2007
10:03 am | news | comment Crazy Shower

As if I needed more reason to not attend baby showers.

January 25, 2007
10:36 am | news | comment Speechless

This story is just incredible: college kids throwing an MLK party in which they completely mock black Americans. They claim no disrespect was intended. Next they’ll claim that it was all Borat’s fault. Perhaps I’m overreacting, but this seems to flirt with “hate crime.” I hope suspensions, expulsions, or some sort of severe reprimand is in order at the school.

Update: Looks like this wasn’t an isolated incident. Here’s another at UConn Law School. Gotta love The Smoking Gun. You’d think grad students, in a law school no less, would be smarter.

January 22, 2007
4:23 pm | news | comment “Semi”

This story is absolutely amazing. Crashing through a plate-glass window and falling 17 stories… only to break a leg! Now that theater expression makes more sense. At any rate, don’t drink and horse around.

Update: While the original story listed the faller as only breaking a leg, the updated version reveals that he has two collapsed lungs and remains in critical condition in an induced coma. Fingers crossed.

In other news, here’s more reason to love Scott Adams’s blog.

Today’s IHT Online features this interesting article about the rapid improvements Colombia is making insofar as improving its image as a violent country ravaged by the drug trade. Using my trips to my mother’s homeland as a personal basis for comparison, it certainly seems that the article’s claims are true.

I was amazed by the difference in how much Medellin in particular had improved. When I traveled there in 2003, my lasting impression was how impoverished the area seemed. While the poverty is far from eradicated, I left Colombia this fall impressed by how cosmopolitan Medellin seemed. Improvements were widespread and obvious. Unfortunately, the city seemed much more polluted that during my last trip. That may have been due to the particular air quality during the time of our honeymoon.

The government’s bold stance against violence is illustrated neatly in this square. Botero’s sculpture, “The Bird of Peace” was bombed by guerrillas. Instead of removing the destroyed work, the government annoted the incident on the old installation and built a new one right next to it.

Lastly, writing this reminded me of a funny saying my cousin Nicolas told us over cocktails while were discussing music and fashion trends: “Poor Colombians wish they were Mexicans. Middle-class Colombians wish they were American. The rich wish they were European.”

January 19, 2007
9:10 am | news | comment Soylent Pink

I just heard about this guy on an old episode of Wait, Wait, Don’t Tell Me. He believes that soy makes kids gay! Check out the article, in which he makes such enlightened (cough) claims as feeding your child soy milk is like giving them “five birth control pills a day.” May he please be in the running for the world’s biggest kook.

January 17, 2007
12:35 pm | news | 5 comments YIKES!

Please, oh please, tell me that this is not part of our evolutionary future. Thanks to Patrick for sending the story, which he read here.

September 28, 2006
2:43 pm | news | comment Tomayto

The Lein Sisters have raised an interesting discussion regarding regional differences in in word selection and pronunciation. My personal point to debate is the correct elocution of the word coupon. I always say “coo-pon,” while it seems most others say “cue-pon.”

Of course, I think most others are wrong, but it could certainly be me. How do you say it? I know in college we discussed the “coo-pon” rate, which I think has been my influence, despite my mother’s tendency to cut “cue-pons.”

Update: Jen sent me an interesting report illustrating the issue. Glad to see coupon in the top ten.

September 26, 2006
8:42 am | news | comment OUCH

If you don’t want to see a gruesome photo, don’t click here. You might have already seen it if you monitor Yahoo’s most emailed photos. It’s of the track and field judge with a javelin through her foot. Oh my does it look painful.

August 25, 2006

To all younger siblings out there, mine and otherwise, listen up to this wise old man. He’s 100! He can’t possibly be wrong!

“When my brother in 1918 came home from the army, he said, ‘Ed, whenever you take a hot shower, end it with an ice cold one and count to 100.’ When your older brother tells you to do something, you do it,” Rondthaler said.

July 19, 2006
8:30 am | news | comment Wrong!

I can assure you that the answer to the question asked in this article is “yes.” Before my iPod, my PowerShot, my DS, my Nokia, and my 360, I was mired in endless sadness. Now in fact, I couldn’t get any happier, at least without a new phat laptop, video iPod, or PDA. ;)

May 12, 2006
8:36 pm | news | comment Good Coffee

Who knew such cool stuff could be done with espresso and steamed milk? Check out this video and these pics.

April 18, 2006
1:13 pm | news | comment Wonder Dog!

Deb passes this video along. I’ve seen some crazy things before, but this takes the cake!

February 24, 2006
10:23 pm | news | comment Sudan

Kevin sends along this evidence that although we might do crazy things like force a woman to bear her rapist’s child, every country has their own weird laws.

Rapists won a resounding victory in the South Dakota State Legislature today. Thanks to the efforts of South Dakotan politicians, sexual predators across the state can be grateful that they now have the right to become fathers at the expense and burden of their victims. Beginning July 1, their victims will be forced to carry their children. They will also find it satisfying to know that in addition to the overwhelming trauma they have already incurred, their prey will be obligated to nine months of pain, discomfort, and body distortion. This period will end with several hours to days of extreme pain, after which the lucky perpetrators can enjoy fatherhood (and even grandfatherhood). Those who don’t wish to become mothers are advised to not get raped in South Dakota.