Creating a map-based iPhone app

The day word went out that OS 3.0 would finally include access to the google MapKit was the tipping point that finally got me to shell out the $99 to join the iPhone developer program. Unfortunately, at the time, documentation was sparse, and although the back end was in place, I couldn’t figure out how to display my annotations.

So I put my map-based projects on hold… until yesterday, that is, when I came across this easy-to-understand 3-part tutorial with sample code that very clearly shows how all the pieces are put together. A simple “Dude, where’s my car” app shows how to gets your current location, then allows you to place a marker at your current location.

Now, the original developers intent was simply to provide an example of how to use MapKit, so I’m not chiding them for lack of foresight in any way… but in its current state, it’s a bit too simplistic to be really useful as a parking app. But it could easily be tinkered with to provide additional functionality to make it useful:

  • allow you to add markers at a location you define (in case you forgot to set where you parked when you were there)
  • allow you to set a timer to let you know when your meter is about to run out (or in SF, when the two-hour period of time for people without permits has expired)
  • store location info when you exit the app (’cause as is, you lose it when you answer a phone call, etc.)
  • etc., etc.

Regardless, for whatever app you need a map, this project is a great start for learning how to get started with MapKit.

Bookmark and Share

2009/07/18 code No comments

Working with Sample Code: Rename your project in Xcode 3.x

When I’m learning how to code in a new language, I like to start off some sample code that I know works, then mutilate it until it bears no resemblance to what the original developer came up with… but making sure that it still works at each step along the way.

But my adventures with Cocoa/Obj-C present a new challenge: no stand-alone php or perl files that can easily be shuffled and renamed… when you work with a language that requires the software be compiled, there’s a much deeper structure that needs to be modified in order to assign a new identity to the project.

Sadly, Xcode doesn’t have an option that allows you to create a new project from an existing project with a new name (note to Apple: this would be a great feature to include in 3.2, *wink wink nudge nudge*).

But in the meantime, when you have some sample code you want to play around with, but still hang on to the original and not muck up your hard drive with copies of copies of duplicates of copies… try this:
Read more…

Bookmark and Share

2009/07/18 code No comments

Would you tinker with gravity?

Let’s say someone invented a device that could reduce the force of gravity from Earth’s gravitational field to, lets say, the gravity felt on the moon. Presuming we had some way to make sure our atmosphere didn’t fly away, do you think we should modify Earth’s gravitational field? Why (or why not)?

Bookmark and Share

2009/06/27 Science, Technology No comments

They tell no lies…

I saw this brilliant video about one of the most, er, interesting aspects of barnacle physiology in a course taught by the illustrious (and ever-so-interesting) Dr. Paul Dayton. And in the 12 years that have passed since then, I have been fiendishly searching for a copy of this clip, waiting for it to finally make it’s way to youtube. And doublew00t: it has finally made it!

Call it what you will: a natural history of a species ubiquitous in the marine realm; a clever way to force the retention of random facts into the knowledge bank of oversexed, overstimulated college students; a skillful juxtaposition of knowledge, music and imagery that would be quite at home in a burlesque show.

But once you hear the line at 3 mins and 22 seconds, you will never be at a loss to remember why barnacles need tell no lies.

RANDOM FACTS:
Yes, relative to their size, the barnacle penis is the largest in the animal kingdom. Sure, they might be only a few centimeters long… but that’s 40x the size of the barnacle itself. In comparison, were a 6 foot tall man to be comparatively endowed, he’d need a pretty loose-fitting pair of pants to hold all 240 feet of his manhood. (Yup, I calculated that right. Feet. Not inches. Think about it.)

Read more…

Bookmark and Share

2009/06/14 Random Facts, Science No comments

Not funny… yet so hilarious.

The joke: not so funny.

Letterman’s response: reasonable, heartfelt and honest.

But this response: hilarious.

caroline June 11th, 2009 10:42 am ET
I have one question for all the people bashing Pallin? Are you jealous? What is the reason for your hatred of her? Is she too good for you? Can’t you get past her looks and judge her on her character? She has opened her book on her life and her family’s life, finances, TAXES, etc. How about Obama and the rest of the democrats? How come it is ok to slam the right and yet when the comedians on the right make a joke, they are fired? DOUBLE STANDARD!!!!!

And ’she’ was so emphatic about it, she posted it twice! (no, although it would be a kick to work for an anti-Rovian think tank specializing in this type of material, I am not making this up. see the original here)

La la la lalala la la la la la….

Bookmark and Share

2009/06/11 Politics No comments

As if we needed another reason to love Yelp….

What a lovely fail to wake up to in my inbox…

128879122746916567jpg1

To be perfectly clear, when I contacted the staff at SF Women Against Rape to let them know about what they were have purported to have sponsored, they were unaware that their name had been used in conjunction with such a horrifically flawed attempt at crafting a catchy, clever, innuendo-filled headline.

This is the last straw in what I find to be a pattern of shortsightedness regarding user privacy and safety, questionable sales tactics, and generally tasteless conduct on the part of yelp hq, and as of today, I’m removing all of my “useful” content – I’m not willing to contribute to padding the wallets of anyone who thinks nothing of pairing innuendo with sexual assault.

Read more…

Bookmark and Share

2009/05/27 Fail 12 comments

Prop 8 upheld… but can it be enforced?

In today’s decision to uphold Proposition 8, the California Supreme Court justices were just doing their job. I can’t fault them, as they were working within the boundaries of the legislation they have been handed over the years. Remember, the California Supreme Court started this in the first place by ruling that same sex marriage was legal over a year ago.

But even though the decision upholds legalized discrimination, it’s not quite clear if it can be enforced. Why? No single legal definition – or even medical definition – exists defining what is a “man” and what is a “woman.” And it is for good reason: no one definition can apply in all possible circumstances.

While sex and gender are the most common ways to refer to male-ness and female-ness, and there are other ways as well. But when asked to define a man and a woman, most people first respond with the obvious physical traits – the biological basis of what is man and what is woman. In the following discussion, I’ll investigate what biological traits can be used to discriminate between men and women, and how they might have difficulties being applied in a discrete fashion that can be to legally determine if an individual is a man or a woman.

What it comes down to: SEX.
Read more…

Bookmark and Share

2009/05/26 Culture, Politics No comments

Car rollovers, laundry and sustainability, oh my!

I came across this gem that plays like a 1970s British mashup of Mythbusters and How Things Work when, for some reason, I was looking for info on how washing machines work today. And although it clearly explains how washing machines work, it gives you so much more.

They stage a car rollover in perhaps the clearest description of how solenoids work I’ve ever seen. In describing how the various components work they build special effects equipment, cut about 20 washing machines in half, and include various other Mythbusters-like goodies… and when the narrator gets hit in the face by water, I can’t help but imagine how hilarious it would be were there a British version of Mythbusters, with Adam’s analogue responding in that stoic British fashion…. although Jaime is stoic in his own way, it would be vastly entertaining to see a more impetuous hacker forced to deal with the outcomes of his rash actions in the stoic fashion expected in British culture.

In the historical overview of how we clean our clothes, we learn about women’s liberation – and get to see naked pirates.

The last five minutes or so address how the technology involved in producing washing machines had changed in “recent” years. They compare how And in one of the earliest discussions I’ve found surrounding gadgets/technology and sustainability, I’ve found perhaps my favorite quote thus far of the year:

“The modern engineering would probably horrify pre-war engineers who worshipped quality, not economy.”

And the reggae version of Dave Brubek’s “Take Five” at the end is a nice touch.

In all, it’s a fascinating watch – if you’re a technology geek like me who never got to take shop class or study electrical engineering but loves to figure out how things work, it’s 25 minutes well spent.

Bookmark and Share

2009/05/25 Random Facts, Sustainability, Technology No comments

You’re gonna love his nuts.

One fine afternoon a few weeks ago, I was multitasking with daytime tv on providing a background when I heard a familiar voice say “Hi… it’s Vince with SlapChop.”

Yes, folks, when I looked up, it was our good friend Vince of infomercial and prostitute battery fame – you know, the spiky-haired guy with the power leave women almost speechless, able to say nothing but “ShamWow.”

And yes, my friends, I admit – the ShamWow guy left me speechless when I watched this commercial for the first time.

Not only does he have the ability to leave women saying only “ShamWow,” but we’re “all gonna love his nuts”… and he can do it with just one finger too. And not just that… he’s “gonna make America skinny – one slap at a time.”

Yup, I was speechless for three whole days pondering what was either sheer brillance on the part of the SlapChop marketing team, or the sheer luck they had if they hired him before his arrest.

And today, while poking through the blog of fellow okonomiyaki snob Cooking With Sean, one of my new favorite foodie blogs, I came across this. And I really… just… I…

Nope, there’s nothing more I can say.

Bookmark and Share

2009/05/15 Advertising, Cooking No comments

Bring on the Bell’s.

I was recently heartened to learn that Illinois once again has access to the malty, hoppy nectar of the gods that is Bell’s beer. No longer must you cross state lines in search of your Oberon or Double Cream Stout, Illinoisians. For that I salute you… and am starting to think moving back to Chicago might not be such a bad idea.

bells_lager

But I love San Francisco. Even with the ridiculously high rents, the permafog and the crazy old ladies carrying live chickens in brown paper bags on the bus, there are very few things that could tear me away.

And Bell’s is that good. Yes, it’s so good that anytime I go back to the midwest, I take an extra suitcase to fill with 6-packs. And I always end up trying to sneak past with a bag that’s over the allowable luggage weight, so I’ve learned to force my mother to park at the airport and accompany me to the check-in counter – in the event that I need to sacrifice a few bottles from the overstuffed, oversized suitcase to make it on the flight, I know that they’ll find a good home.

So now that Bell’s has made it back to Illinois, I’ll no longer need to abscond with my mother’s car to drive in a blizzard over to Indiana and pick up my annual stash replenishment… but I’ll still be forced to hoard my stash, parceling out bottles to those I deem worthy of the rich brown elixr throughout the year.

So, in the spirit vested in me by the news of Bell’s return to Illinois, I entreat you to join me in finding a way to bring the Third Coast to the West Coast – let’s get some Bell’s Beer in our local bars and spirits retailers. And let me walk down the street to pick up a six-pack of Bell’s Amber instead of traveling halfway across the country to replenish my ever-dwindling stash.

Are you in?

Bookmark and Share

2009/05/15 Food&Drink No comments