Friday, June 26, 2009

A modest proposal on Iran

"First, do no harm." Before we start in with the strafing runs, I have a suggestion:

The US should offer citizenship to everyone in Iran. Allow anyone who wants to escape from the mess over there to come here and start a new life.

Had we done this with the Jews during WWII it would have saved a lot of lives. This policy is guaranteed to save lives and reduce human suffering and - unlike warfare - it does so without much risk of causing more suffering and loss of life. It also would constitute a huge PR win - every dissident who moves here demonstrates a lack of confidence in the existing regime.

People are suffering and we should something about that. We could give those people the right of exit. If we're going to do anything at all, summon the political will to do that first. It's cheap, it's moral, and it doesn't put any soldiers or civilians from either side in harm's way.

Monday, June 08, 2009

Why do iPhone Development Tools Suck?

So I'm finally getting started with iPhone Development and I just have one question: Is there some reason the integration between Interface Builder and XCode is so crappy? When I browse the various iPhone tutorials it seems like 90% of the coding they have to demonstrate is stuff the tools ought to automatically do for you. And did, way back in the days of the Newton Toolkit. Does Apple not use its own tools? Are the various dev teams not on speaking terms? Or does somebody at Apple just hate developers? :-)

I'm beginning to wonder if I shouldn't bother with iPhone apps but should instead write a decent Interface Builder. Something where, when I drag a button into a view, inspect the button, give it a name, notice that it has some sort of on-click event associated with it, I can double-click on the name of that event to immediately edit the code that will get called when that event happens. Without having to declare that method or name it - the stub gets created for me in an appropriate location. I'd just write the stuff that goes *inside* the stub function, thereby eliminating multiple opportunities to type something wrong or leave something off and screw it up. Also eliminating multiple context switches back and forth between IB and XC. A good tool should fade into the background; this does the opposite. I still could move the function elsewhere or call it in a different way if I wanted to, but I wouldn't have to; the base case would just work.

UPDATE: It looks like I need to check out accessorizor. It doesn't fix the problems with Interface Builder integration but it can automate away a lot of tedious and error-prone Objective C structure.

Monday, April 20, 2009

Why Torture Works in 24

I've been thinking about why the case for torture seems so compelling in 24 despite the fact that it's counterproductive in real life. At first I thought the key difference between 24 and real life was that Jack Bauer is infallible - whenever he thinks somebody knows something important, he's right - but that's only part of it. The bigger problem with 24 is a literary convention: we only get to see one investigatory thread at a time.

In real life there would be at any given time hundreds of agents following thousands of potential leads. So if any particular lead doesn't pan out, there's somewhere else the story could go. But 24 plots are carefully constructed in such a way that there's only one good lead at any given time and no other leads worth pursuing. When you only have one suspect you can question, a policy of torture seems plausible - you might get a new lead to follow faster than without it. Whereas if you have ten thousand suspects - many of whom are undoubtedly innocent or sympathetic to your cause -a policy of torture is insane. It is likely to generate false leads that consume valuable resources and to discourage the cooperation you need to find valid solutions in a timely fashion.

In real life, once you have questioned someone in a civil manner you usually have the time and ability to come back later and ask them more questions. In 24-land, as soon as somebody has given up to Jack their single and true puzzle piece, that person dies or disappears. (Sometimes he commits suicide; more often he is killed as a result of ultra-competent bad guys foiling ultra-incompetent good guys who fail to protect the witness.) So leads don't accumulate and keeping sources on your side for the future (when more evidence turns up that you might ask them about) has no value. Also, the system is so corrupt-by-design that Jack can't safely delegate in order to explore multiple leads in parallel; he can only follow his one best lead at any time.

In short, the reason torture works in 24 is that 24 is fiction.

Sunday, January 11, 2009

Validation!

I recently came across this short film from 2006. Turn off your inner cynic and watch it now; you'll be glad you did.


Sunday, August 03, 2008

Netflix mixups are fun!

"The Prisoner" is the title of a Jackie Chan movie that was released in the US in 1990.

"The Prisoner" is also the title of a 1955 movie about the inquisition of a Hungarian cardinal played by Alec Guinness.

If you put the Jackie Chan movie on your Netflix queue, what arrives in the mail is the Alec Guinness movie enclosed in a sleeve that describes the Jackie Chan movie. If you mark this as "mislabeled, please send again", they will send you another copy of the Alec Guinness movie in a sleeve describing the Jackie Chan movie. Repeat as many times as you like; I gave up after three.

The real question is: what happens if I instead put the Alec Guinness movie on my queue? Do I get Jackie Chan?

Saturday, July 26, 2008

iPhone 2.0 development woes

I really like being able to download native applications to the iPhone. Native apps are usable on the subway while web apps are not. Native apps can use all the capabilities of the device and use the full screen real estate and define their own controls and are faster to load and so on. Some of the first batch have bugs and the phone is a little more prone to crash than before, but that's to be expected and it's really easy to update them as bugs get found and fixed.

My chief complaint at the moment is that I can't get my apps on the iPhone. Even after waiting over three months for apple to approve my application to be a developer, paying Apple $100, giving Apple lots of information about myself and spending many many hours working on the problem, I can't even get a "hello world" to install. I can install to the simulator, but not to my own phone. The process one allegedly uses to accomplish installing your own code on your own phone is ridiculously convoluted, the error messages are useless, and I am stymied.

To get an app to install on the phone, one needs to generate a certificate request, use that to request a certificate, install that certificate and another one in my Keychain, use the new certificates and information about my phone to generate a "provisioning profile" (specified with an obscure and inconsistently-defined naming convention) - for "deployment" (and another one for "distribution" if I later want to send the app to Apple), install those certificates where Xcode can find them, and specify using an obscure panel within Xcode which certificate should be used when signing the application. Then just "Build and Go".

The result of this process is invariably the following bit of loveliness:
"Your mobile device has encountered an unexpected error (0xE8000001) during the install phase: Verifying application

Try disconnecting and powering off the device; then power the device on and reconnect it."

Gah!

I miss the Newton.

UPDATE: Just to be clear on this: I really don't mind that Apple has locked down the device with DRM restrictions. What I mind is that they've done it so badly. The DRM on iTunes is practically invisible most of the time. One of my favorite design rules is "Get the base case right." For an iPhone developer, the base case - the first thing anyone is going to want to try - is to just compile something simple and see it on a phone. And the process for doing that is broken.

I don't care how carefully you think you've documented the 25-step process to start using your program, the problem is that it's a 25-step process. Stop polishing the web instructions to walk people through it and instead invest more effort on simplifying it. I'd be happy to download and run a software wizard. I'd also be happy to pay more for the dev kit - a lot more - if doing so would improve my own user experience and head off some of the frustrations.

And no, it's not just me who is finding this confusing. See here and here and here and here and probably here, though I don't really read japanese...

Come to think of it, iTunes music is an excellent model. iTunes locks my music so I can only use it on certain machines yet somehow it never requires the user to look up a serial number or copy certificate requests around or even explicitly use the Keychain Access utility. It all Just Works. That's supposed to be the Apple experience.

Thursday, May 01, 2008

In case of emergency, read fafblog

I'm so glad fafblog is back. It's the perfect blend of goofy surrealism to liven up an otherwise mundane morning. Like an emergency action flowchart:

Step 1: Is there an emergency?
a. Yes!
- Quick! Break glass in case of emergency.
-- Oh no, now I'm all cut and bleeding on this broken glass!
--- Sounds like an emergency! Quick, break more glass.
- Okay, I broke the glass! Now what?
-- Oh no, what'd you do that for! You needed that glass for the emergency!
--- Oh, what do I do now!
---- Quick, glue your glass back together while there's still time! Then break it. Hurry, it's an emergency!

Remember: Appeasing the bees will only embolden future bees...

Friday, March 07, 2008

Joe Weizenbaum, R.I.P.

Joe Weizenbaum, the creator of ELIZA, died on March 3rd at the age of 85. Naturally, someone had to go interview the grieving AI program to get her thoughts on the matter.

Saturday, February 23, 2008

sci-fi character quiz

Here's my result:

Which Fantasy/SciFi Character Are You?

Monday, January 28, 2008

Juggling Update

3-ball: passing to another person is getting pretty reliable - I can pass every third, every other, or every one. Realized my Mills' Mess isn't quite symmetric, but damned if I can figure out how to fix it...I can now "claw" about 5 catches in a row and switch between that and a standard catch. Can juggle off the wall, off the floor, transition between those and normal throws. When catching on the neck, I can drop the ball behind the back.

Still working on: toss to an over-the-shoulder position, some weird V-finger small-movement stuff, and the still-impossible high-toss-with-spin-around. There are two issues: my high tosses aren't consistent and my spins aren't fast or consistent. If I could make my high tosses more consistent, it would help a lot with the 4- and 5-ball juggling effort too.

American-style clubs: I can now do around 100 throws without a drop. Starting to work on basic tricks such as under-the-leg, chin drop, and double spins.

What was new and different this time around: rope tricks. Specifically, I learned a half-dozen knot throws, which are really fun and very weird.

Monday, January 14, 2008

Juggling in New York

Today was my first juggling class at New York Circus Arts Academy. Some things I can do now that I probably couldn't have yesterday include:
  • 3-ball: "steal" from the side
  • 3-ball: catch a ball between my shoulder blades
  • 3-ball: catch a ball reliably with the back side of the hand
  • 3-club: do about 40 throws (american-style clubs) without a drop
  • diabolo: cat's cradle into suicide toss
On the other hand, some things that still need a lot of work include:
  • balls: "claw" catches
  • balls/clubs: regular passing
  • balls: the transition *after* I've caught a ball between the shoulder blades.
  • diabolo: "the whip".

Sunday, December 09, 2007

iPhone update - annoyances and tricks

Now that I've had iPhone a few months, it's time for a list of more subtle issues and a few workarounds I've found.

Calendar/Address book modality is broken - I have often lost calendar appointments I thought I created or lost new contact info in a situation where I needed to switch contexts and I assume I've finished creating a new item but the iPhone software disagrees.

Repro steps:
1) turn on the phone and hit the big button for an app list.
2) tap the calendar icon to launch calendar
3) tap month, find December 2007, tap the 15th day of the month (December 15, 2007)
4) tap the "+" icon to make a new appointment.
=>you're at the "Add Event" form
5) tap the title/location area, tap "Title", type "Big holiday party!"
6) tap "Location", type "someplace obscure"
7) tap the prominent "Save" button.
=> you've hit "save" once, and the form shows an event with a default time.
8) tap the starts/ends field, set the event to start at 8pm.
9) tap the prominent "Save" button.
=> all the details of your new appointment are correct, and you've hit "save" twice.
10) tap the "Notes" area and add a long, carefully thought-out note describing what you need to bring or wear or who you need to remind about the party. Hit "Save" again.
11) Tap the big physical button to switch to application view, then tap Calendar again.
RESULT: Your new appointment is gone. Everything you typed has been lost. The only status remembered from your prior session is that "December 15" is still selected in the month view.
EXPECTED RESULT: Either the new entry has actually been created from the first time you hit "Save" and has been modified each time thereafter, or it fully maintains your state and returns you to the Add New Appointment form (with all the fields just as you left them) the next time you launch calendar.

What happened? You forgot to hit "Done" on the new event window. You thought hitting Save three times should be sufficient to preserve all that typing, but "Save" really meant "Done" (with a temporary subform) and "Done" really meant "Save" (the whole appointment).

The address book logic is similarly broken - you can enter a lot of data and lose it because a call came in and you needed to switch contexts or the screen powered off and the next time you turned the phone on you hit the app button before noticing you were still in the middle of something. Save should mean save. Workaround: Always be sure to hit "Done" after you enter any new info on an iPhone, because "Done" really means "Save" and vice-versa. If you write a big note, hit Save and Done and then come back to it just to be safe.

Notes Reordering. A physical paper notebook is sorted by note creation time - it preserves the history of when you started to write each page entry. When you go back to review an old note you wrote a few weeks ago and make a correction, that page doesn't spontaneously leap to the front of the book, does it? It does on the iPhone! I like to take lots of notes and then go back later and delete trivial parts or fix typos. On the iPhone, that means my notes are in a random order. I can't use my temporal memory of which events came before what to find something in the sheaf.
The only way to be sure your notes stay ordered is to take notes attached to calendar appointments. Then you can find them by scrolling though the List calendar view but this is tedious and has the previously mentioned failing-to-save risk.

There's no general searching or filing. I have categories of information I want to record and then find later. The iPhone is of very little use in that regard. But I've found a limited workaround: The Contacts application sorts entries by name and lets you quickly scroll by first letter; I use that feature to simulate filing categories. When I enter a restaurant's address into my contacts, I prepend the filing category "Food:" to the name, and also append the most salient subdetail I might want to search for. So now if I'm trying to find the info for a restaurant whose name I don't recall I can scroll to "F" then browse through such names as "Food: Chanto (sushi/fusion)", "Food: L'asso (pizza)", "Food: Taim (falafel)". Better still: when I'm in "looking for a restaurant" mode I can go to the Maps application and type one of the subdetail words in the search box - it bring up a list of the names from the contact book with their addresses. If I type "food" I get all the restaurants, and if I type "sushi" I get all restaurants with sushi in the name/description area - even if it's in the parenthetical part.

Software updates are handled quite badly. What it ought to do (and what I assumed it would do) when you ask to update the software is:

(1) sync up with the phone, backing up the current state
(2) install the update.

If it did that, then when the update fails and you have to erase/restore the phone's entire memory, you wouldn't lose any data. However, in practice it skips step (1). Workaround: if you ever plug in the phone and are asked if you want to install a new version, the correct initial answer is "No" - you want to sync up first. I've installed three software updates, and I had to reboot my iPhone (losing all data since the last sync) during two of them. Once I lost over two months of notes and contact info.

There's no Copy/Paste. In practice, that means a fair bit of manual retyping - I can't write something in the notepad and then copy it later to a contact or datebook entry. Nor can I move paragraphs around in the notepad. Something as elegant as the Newton's gesture-based copy mechanism would be lovely, but at this point I'd be willing to accept any clumsy hack to get this feature in.

Safari's multi-page issues. I'm using bloglines (currently in the non-beta iphone flavor: http://i.bloglines.com ). I have it set to open a new tab when I click a link. So I click a link; a new tab opens with the new page request. This new page is taking too long to download so I give up on it, hit the bottom-right "pages" icon and hit the "x" to dismiss this new tab. One might think that would return me to where I was in bloglines, but what it actually does is return me to bloglines and immediately request the new page, the one I was trying to dismiss, in place of the page I had previously been reading.

I don't have good general-purpose repro steps on this yet, but it does seem to happen quite frequently that if I dismiss a page that is still being downloaded, I lose the prior page I was still reading. Multi-pane browsing feels fragile. Also, I'd like a general "open in a new pane" gesture. Tap-and-hold on a link would probably work.

I still love my iPhone, but it often feels tantalizingly unfinished. It needed a few more good QA people on the job.

So what's your biggest iPhone gripe?

Friday, November 02, 2007

Back on Shangri La

I've re-started the Shangri-La diet but with a few modifications based on what's been learned since the book came out. I use no sugar at all this time, sticking to oil alone. My new protocol is as follows:
  1. Pour 2 tablespoons of room-temperature oil into a cup.
  2. Add cold (refrigerated) water to the oil to bring it up to about a half cup of oil-water mixture.
  3. Drink it down - it tastes like cold, foamy water.
  4. Wipe the oil from my lips with a napkin.
  5. Drink a bit more water to wash any residual oil taste away.
The oils I use currently are soybean and (extra light tasting) olive oil. I drink my oil twice a day, once around 4pm and once before bedtime, avoiding anything with a taste (including toothpaste or Diet Coke) for an hour before and after the oil.

The result: instant major appetite suppression. I don't crave snacks or sweets any more. What seemed like normal portions before make me feel over-full; I simply have to eat less.

Oddly enough, I also immediately felt less craving for Diet Coke.

My current weight is over 190; the goal is to get below 170.

Sunday, September 30, 2007

Moved in Manhattan

Shortly after finishing my trip around the US, I got a job offer from a hedge fund in New York. Found an apartment. Moved across the country. Started work on August 6th; my stuff arrived almost a month later, and now I'm mostly moved in.

My new building has an elevator operator; if you want to use the freight elevator you are supposed to schedule at least a week in advance and the elevator guy has to push the buttons. You can't use the freight elevator on weekends or after 6pm and you aren't allowed to bring furniture up using the regular elevator.

Since my movers arrived late in the day, I ended up running out of time and the elevator guy wouldn't let them finish the job. I tried bribery; I tried pleading; nothing worked. There's a concierge, but he has no authority to make any decisions on his own. There's a management office, but they never answer the phone after hours.

Ultimately I had to pay the movers an extra $500 to come back a day later, whereupon it took maybe a half hour to finish bringing up that last load.

Thursday, July 26, 2007

iPhone sure crashes a lot!

iPhone is definitely 1.0-level software.

Safari and Maps crash regularly. Pictures crashes occasionally.

Sometimes the iPhone gets really slow and you have to reset/reboot it. One symptom that it's time to reboot is when the "slide to unlock" gesture becomes unreliable.

Sometimes syncing fails and you have to erase/restore the phone before it can be recognized again.

The Edge network often drops out. Wifi often fails to work even when you have a nearby unlocked network that worked previously. There is no pattern to when network connectivity stops working, and no cure except to wait until tomorrow.

When the Edge network works, it's fast enough for my needs. I just wish it worked more consistently.

The Notes application is nearly useless to me because there's no "search" feature, no filing categories, and no ability to copy-paste. I want someone to write a full-featured notepad application like Newton Notepad or at least like the Palm Notepad app. Sadly, this can't happen until Apple releases an SDK. because it is not acceptable for the Notepad application to be unavailable when I'm on the subway. Until that happens, I've gone back to carrying an iPhone and a pad of paper to take notes.

I love Maps when it isn't crashing and the network is available. I love having a decent browser when it isn't crashing and the network is available and the site doesn't require flash.

In his keynote intro, The Steve called this thing "a phone, a widescreen ipod, and an internet communication device"; he did not call it "a PDA". As a PDA, the iPhone sucks, but it's pretty good at that other stuff. At least, when the network works.

Tuesday, July 24, 2007

Start spreading the news, I'm leaving today...

I had a busy June/July.

Over roughly a one-month period, I recently:
  • interviewed for a job in New York
  • went on a blind date
  • held a baby alligator
  • photographed bears and old-west gunfighters and Mt. Rushmore
  • learned archery
  • explored a cave
  • spent a night in a castle
  • got bitten by a dog
  • played guitar for small audiences
  • heard some great blues bands in Austin and New Orleans
  • caught up with old friends
  • won thousands of dollars playing blackjack
  • got barred at a casino for playing too well.
The interview went well, so last week was devoted to apartment-hunting and in the first week of August I'll be moving to New York permanently to start my new job.

Wish me luck!

Tuesday, July 03, 2007

In South Dakota, moving west

Since the last entry I've been to Pittsburgh, NYC, NJ, upstate NY (Poughkeepsie and Fishkill) and Chicago

Currently in South Dakota en route to Jackson, WY with a few tourist stops along the way.

The blackjack gods are still smiling upon me.

The Corn Palace is kind of silly.

Driving into the sunset across the plains is incredibly beautiful once you get past the part where the sun keeps getting in your eyes.

Friday, June 22, 2007

Near Lexington, KY

I've got my VW bug back and am heading up north. In Alabama, I drove part of Lookout Mountain Parkway, which is sort of the Alabama equivalent of Skyline Boulevard - a road that bobs and weaves along the top of a ridge with occasional great views.



Near Chattanooga I stopped to see Ruby Falls, which claims to be the largest tourist-accessible underground waterfall in the world. I'll sort through and post pics later. For now, sleep...

Thursday, June 21, 2007

Bourbon Street reminds me of Burning Man



It's the middle of the night - 2am - and yet everyone's out partying. It's not cold - in fact, it's uncomfortably warm. There's no moon, but neon art dots the landscape as far as one can see, which isn't far because it's kind of hazy which makes everything look blurry, indistinct and mysterious. There are dark sheltered spaces featuring fire art.



There is a LOT of very loud music, chosen by people who like and know their genres. Many nearby venues have mutually incompatible themes, so you might find a cowboy bar next to a jazz club next to a hip-hop club, the sounds and styles and guests intermingling. There's a general aura of sex, music, and illicit drugs. Shock value is appreciated - a man walking his girlfriend on a dog leash elicited little interest or concern. And pictures can't do it justice - you just have to have been there.



Some partygoers look like tourists while others seem like they've found their true home and probably wouldn't fit in in the "real" world.

Even sober, the overall effect of a walk along Bourbon Street is profoundly disorienting. Like being in a dream. Or perhaps someone else's dream.

Regardless, the music is fantastic.



A key difference is that Bourbon Street allows commerce, so there's little risk of running short on drinks or pizza. Also there's no dust. And the hotels have showers and internet access and real toilets...

I like New Orleans!

In other news, my car has been fixed and I'll be picking it up tomorrow. Hurray!

Saturday, June 16, 2007

Alligators and swamps and munitions, oh my!

I've decided merely entering Florida was enough for this trip; I don't really need to go all the way down to the tip. So I stopped at Kindville, in the upper panhandle, before turning back


Baby alligators are cute and have soft bellies. Adult alligators might also have soft bellies, but I'd rather not check. If you take a boat tour through the bayou, your guide will toss them marshmellos. To get the really big ones interested, offer half a chicken. Dangle it on a string. Hand feeding an adult alligator would be A Bad Idea.

Asking your TomTom GPS to find "the shortest route" through the Florida panhandle also turns out to be A Bad Idea. You might find yourself directed onto an unmarked road that looks like this:


Which is still pretty flat and wide so you're not really worried...until the route turns into this:



Eventually you turn around, ignore all further suggestions to keep turning onto things that really don't look like roads, and only on the way out do you start seeing signs like this:

Performancing