Young people want SEX. Old people want POWER.

Each week in the mail, I get a copy of Time Out New York and a copy of New York Magazine.

The week of October 4th, I felt that the dueling cover stories were the most succinct representation yet of the two demographics the magazines cater to:

In other words, what young people (who, for you non-NYers, are the primary audience of Time Out NY) want is sex. Lots of sex. Debauchery and sex and hearing about sex and reading about weird sex. What old people want, especially old people with money (again, this is the main audience of NY Mag) want, is power. They want to know who is in power in their area and who has power in other areas. They want to read about power grabs and struggles and triumphs.

I know the predictable, utterly unexciting refrain that the olds will say: you have power, you can get all the sex you want.

Perhaps.

But do you know what I find most disconcerting about this?

Guess which magazine I spent the most time reading? Word by word?

I really am about to turn thirty.

Nerd Fight: Why use instance variables if you have properties?

So a pretty big thread has busted open on the Apple Developer Forums on “Why use instance variables if you have properties?

I thought the answer to this was pretty simple: if you rely on synthesized private instance variables, you can’t see their values when debugging! So as far as I understand, if you do synthesize properties, you had better have instance variables if you ever want to see them in the debugger.

The length and flamey-ness of the thread leads me to believe this isn’t a big enough deal. Am I missing something?

Life after Wall Street

My life after Wall Street is still very much a work in progress. But since we are coming up on the sixth month mark, I thought I would at least compile a top TWELVE list of things I no longer do/things that are different.

  1. I completely stopped reading dealbreaker
  2. I MAY look at where the S&P 500 is once every two weeks. I am far more likely to check the price of AAPL than SPX.
  3. I no longer have Sunday night dread, where I would begin getting anxious about Monday at around 4pm.
  4. Read more »

Core Data and Booleans: Newbie Edition

UPDATE!
As pointed out by Jeff LaMarche and Julio Barros, there is an easier way to deal with Booleans in Core Data, and it is using Wolf Rentzsch‘s http://rentzsch.github.com/mogenerator/

Original Post:
There are a couple of things that I had trouble with while using a boolean with Core Data. The first was how to update this attribute, and the second was how to properly test against it.

I have an attribute in one of my Core Data entities that is of type Bool in my .xcdatamodel called isDone.

When I first tried to update the value to YES, I tried to do this:

This, quite rightly, gives the warning: “makes pointer from integer without a cast.” That is because Core Data does not support a boolean type. It will create your bool attribute with a type of NSNumber, which I could see when I looked at the header file for my item:

@property (nonatomic, retain) NSNumber * isDone;

So the correct thing to do was save the NSNumber value of NO or YES (0 or 1) by using numberWithBool:

The second wrinkle was when I tried to test the value of this attribute. I first wrote:

If (toDo.isDone)

The problem? This was always returning true! Because it was testing, basically, whether or not the NSNumber stored in the isDone property was nil or not. Even if its value was 0, if (item.isDone) evaluated to true.

What I did instead? Test against the boolValue

If (toDo.isDone.boolValue)

Hurray! And now I can get on with it!

Making CoreAnimation’s explicit animations stick

In the course of creating slides for my upcoming Animation in iOS talk, I’ve been re-running through relevant WWDC talks (and docs, and sample code, and Nathan Eror’s awesome CA360 project, anything I can get my hands on about CoreAnimation).

I came across a handy illustrative example of how to fade a layer in using an explicit CoreAnimation animation from the “Building Animation Driven Interfaces” talk. In practice, you wouldn’t really do this–it’s much easier to just use UIKit animations. But, it helps as a teaching exercise, so I wanted to include it in the sample code I plan to release for my talk.

CABasicAnimation *myAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];

myAnimation.toValue = [NSNumber numberWithFloat:1.0];
myAnimation.duration = 2.0;
myAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];

[myUIImageView.layer addAnimation:myAnimation forKey:@"myAnimation"];

This animation ran fine, with one wrinkle. CoreAnimation’s explicit animations do not change the underlying model object. They animate any changes in the presentation layer, but the underlying model is unchanged. Which means, when you are done with the animation, the model’s value is still the same. For the above code, that meant the nice fade-in of a UIImageView I just created disappeared (POOF!) as soon as the animation was done; the UIImageView’s layer still had an opacity of 0.0.
Read more »

Can Games Change the World? The Founders of Gameful Think So.

I just became a backer of this project on Kickstarter. It’s called Gameful, and the idea is to build a network that will allow collaborators, programmers, artists, idealists, and others who want to make games that make a positive impact in people’s lives to come together and make big things happen.

Want some examples? Check out: EVOKE, Fold It!, The Epic Win App, Flower, Code of Everand, SuperBetter, The MP Expenses Game, Budgetball, the Pokéwalker, Quest to Learn, Little Big Planet: Gamechangers, World Without Oil, Seek ‘n Spell, Goal Mafia,and Conspiracy for Good.

Read more »

BP uses chemical BANNED in Britain to “clean” Gulf + HOW TO FIGHT BACK!

via summer burkes

This endangered baby Kemp's Ridley turtle was brought in for treatment in early August 2010. She seemed to be in terrible pain, and died six hours later.

One of the things I learned at Burning Man, thanks to the Burners Without Borders camp, is that BP has been using two kinds of Corexit, a dispersant that is BANNED IN THE UNITED KINGDOM, to dissolve the oil in the Gulf.

So not only is British Petroleum fucking up the Gulf, they are fucking it up some more with chemicals they’d never use back home.

Why?  Well, the faster the oil “dissolves,” the better PR for them and fewer fines.  Fuck the sea turtles!  Fuck the cleanup workers!

So where’s the media blitz in all this?  Well, Mother Jones has some AWESOME FUCKING COVERAGE.

Why, you might ask, was BP able to pump the Gulf full of chemicals that have never been tested for their human and environmental safety?

The answer lies, in part, in the Toxic Substances Control Act, the 34-year-old law that governs the use of tens of thousands of hazardous chemicals. Under the act, companies don’t have to prove that substances they release into the air or water are safe—or in most cases even reveal what’s in their products.
–BP’s Bad Breakup: How Toxic Is Corexit?

Read more »

On Commodities, Impermanence, and Burning Man

Tabatha and I are headed to Burning Man in less than five days. One of the things she’s looking forward to is seeing the Temple.

The Temple of Flux has a lot to live up to after last year’s Temple, The Fire of Fires, with its intricate, carved lattice walls, and its column in the middle that shot up bursts of fire every few minutes at night, illuminating the temple and filling our ear drums.

One of the things she’s worried about is seeing the Temple burn.

It is funny for me to hear her say that. I am truly a Burning Man virgin no more. Anyone who’s been to the playa knows, the Temple is like the Man: they both must burn.
Read more »

My Cat ATE a Needle, and Lived to Misbehave Another Day

To save money on a tent for Burning Man (about $250 to be exact), Tabatha and I bought a cheap Coleman Sundome instead of a Springbar canvas tent. To dust-proof it, we needed to sew up the mesh sides with nylon. We were using a HUGE needle, and thick upholstry thread. I bet you are feeling prophetic, you smartypants.

MEIMEI THE DANGER CAT

On day two of sewing, during a break for some scrambled eggs and toast, we heard MeiMei, my little orange cat, wheeze, cough, and hack while sitting underneath a dangling thread. Tab noticed the dangling string, felt the end of it, and it was wet.

A few minutes of frantic, desperate, and fruitless searching on the floor of the tent for the needle, and we were in a cab on our way to the Emergency Vet Clinic in Carroll Gardens: VERG.  THANK GOD FOR BROOKLYN and all its crazy pet owners, WE HAVE 24/7 EMERGENCY VETS!
Read more »

Anatomy of a Matisse (Copy)

Matisse's original: The Window

One of the greatest ways I’ve ever found to understand how an artist crafted a masterpiece is to try and re-create it. Think of the self-made engineers who teach themselves by disassembling and reassembling computers, radios, cars and contraptions. It is a similar process, but instead of taking apart physical objects, you are deconstructing lines, shapes, colors, negative spaces, perspective and ratios with pencil, with brushstrokes, with small studies and rough drafts, and above all, with your EYES.

This past Sunday, I attended a seven-hour painting intensive with a couple former teachers of mine over in the East Village. I started, studied, practiced, painted, repainted and finally, completed, a copy of Matisse’s “The Window” in oil, with an acrylic base layer (oil takes too long to dry for backgrounds!)

Here is the work, in all its various stages.
Read more »

LouiseBrooks theme byThemocracy