Reverse Engineering Pinterest.app

Ever wanted to build an app that could open up the Pinterest app and pin something? Probably not. But here goes nothing anyway.

Instead of sleeping I got this crazy idea I should dive into some obfuscated javascript and figure out how the Pinterest bookmarklet in Safari was opening up the pinterest app. Turns out its got its own url scheme, pinit12://. Easy.

Next, figuring out what the rest of the crap is to tack on after the scheme. Turns out that wasn’t very hard either. So basically it looks like this:

pinit12://pin/create/bookmarklet/?media=<image-url>&url=<url-where-image-was-taken-from>&title=<title-of-page>&is_video=false&description=<initial-description-text-that-user-can-change>

Here’s a little example of how it might look in code. I hardcoded in the URL, but you would just throw in your own resources (url-encoded, of course).

Too bad there’s no call back API :( Then you could open your own app back up when you’re done. Like tweetbot.

On a side note, I think the engineers at pinterest have some interesting naming conventions…

Core Animation: 100% Black Magic

I’m giving a presentation this evening for the BYU Cocoaheads on Core Animation. Should be interesting, having done iOS for 3 months and all—but as they say, jumping in headfirst is the best way to learn.

Here’s the keynote: http://cl.ly/0z3K06061f0Q0m1I241b

And the XCode project for the demo where we create FeelGood, an app for combatting depression. It will make you happy and you can give yourself stars: http://cl.ly/1c1v3h2J0U441W2e3X1C

Letting Go of Goals

Goals. Goals represent the desires of our hearts. They challenge and drive us to achieve. Goals light a beacon at the end of the road and show us where to go. Goals transform our dreams into action, and actions lead to reality. By our goals and the very sweat of our brows we hope to shape the world around us.

Goals schmoals. But who knows what he or she truly desires, or what life has to offer? The best laid plans of mice and men, gang aft agley. Failed goals lead to frustration and anxiety. Broken resolutions are stowed away until the new year. And in our haste to shape the world, we fail to let the world shape us instead. We may march forward unyielding—eyes on the prize—our whole lives, only to realize that what we sought lay at every step along the way.

Perhaps having simple, underwhelming goals can be best for us, however frightening that may sound. So often we’re taught in our western culture that goals are the end-all, be-all. We even set goals to achieve our goals—our goals have goals, which in turn have their own sub-goals! We are led to believe that without them our world would crumple lifelessly to the ground in a great ball of fire, or at the very least we will fail to “achieve our full potential.”

We love to put this on our walls and desktops:

“Far better is it to dare mighty things, to win glorious triumphs, even though checked by failure…than to rank with those poor spirits who neither enjoy much nor suffer much, because they live in a gray twilight that knows not victory nor defeat.”

Teddy Roosevelt

But what makes a thing mighty? Is there anything mightier than watching the sun set after a day of hard work? What make a triumph glorious? Is there any triumph more glorious than the smile of a loved one? And who, in reality, knows neither victory or defeat? Life is riddled with plenty of both—seeking out extra does not make you greater.

Obsession with the future or preoccupation with the past will never bring us joy; to be happy is to be great. True happiness comes from fulfilling our moral obligations, and perusing our passions. True happiness comes from looking for beauty now, and trying to see the world as God does. Simplicity does not imply complacency.

All this being said, I do not believe it inappropriate to remind ourselves of what is important, or to engage in self-reflection and improvement. So, in light of the belated new years, here are my tentative resolutions:

1. Make my bed every morning.

2. Meet a new person every day.

3. Follow my passions.

4. Use the internet less.

5. Seek beauty and simplicity in all things.

And that’s it. I have no idea where I’m going or what I’m doing. I have no way of tracking my progress or measuring my growth. And I’ve never felt more free.