Monday, May 30

On Being Crazy.

In movies, craziness is usually handled in a cute way. How many crazy-but-lovable characters have we seen? Remember that movie with Dudley Moore and all the crazy people who end up running an ad agency? They were all so quirky and cute, but they could see things the rest of us overlooked. Like the myth of blind people developing super-heroic hearing, these crazy people compensated for their illness by developing points-of-view that enlightened us all, and taught us what it really means to be human. Awwww.

--

My grandfather was a charismatic man, and probably a genius. The family story is, growing up on a farm, he invented a new type of tractor and naively mailed plans for it to John Deere, who came out with his idea a year later and never paid him a cent. Who knows if that's true; for me the underlying truth is that everyone in our family felt him a man capable of inventing a tractor even though he was a farmboy. And certainly his children have been successful and/or enormously talented, and his grandchildren are, by visible and traditional measures, big successes.

He also, from what I can tell, suffered from severe obsessive/compulsive disorder and depression -- the same thing that I've struggled with since I was about 12, and that most males in our family appear to struggle with as well. He had disadvantages that I don't: in his day there really wasn't such a thing as "depression" as a disease -- you sucked it up and you got on with your life, soldier. There weren't drug therapies for his malady, so he couldn't just pop an Effexsor and suddenly have his compulsions dialed down to a dull roar.

He spent the last ten years of his life mostly in bed. His craziness progressed to a point where he was afraid of every aspect of life, so he chose to just remove himself from it. I spent a few months with him during his decline -- he would venture out of bed just to wander around the house asking people if they had checked and rechecked every little thing for any activity that was being planned. Going to the airport? Well, is the gas tank full? Air in the tires? Did you recheck the arrival time? What about the gas tank? You're sure you checked it? I don't want you running out of gas. It'll kill your grandma.

He was a huge bear of a man when I'd known him as a kid -- not exactly fat, grandpas don't get "fat" -- he was just a great big grandpa. When he died he was a wisp of a man, having wasted away in bed for years, so tortured by thoughts of what might go wrong that he'd rather be dead than have to keep worrying.

--

I've written about him before. But I've been thinking about him a lot recently, because I have his problem, too. I'm always fighting depression. It's there, waiting for me. Some months I'm great and I function like a normal person, and I think, "Yay, I'm done! Thank goodness that's over!" Then I'll have a week so dark that simply taking mail out of the mailbox seems like an epic struggle. And I remember, oh yes, right, you aren't going away. Because you're my brain. You're my chemistry. You're me.

I've been very successful in my career, and I honestly feel incredibly blessed in this. But here's my thesis, and possibly "the rub," in all this: I think the same things that make me crazy also make me successful. I have the ability to sit down and write code for 12 hours straight. Because I cannot get up until it's finished. I have to have every line of code be absolutely perfect; I will continue tweaking things long after they work, because for me, it's not finished until it's beautiful, as well. I can tell you what method to use out of the thousands available on the system, because they're all up in my head, ordered and stacked and sorted so neatly. This is clearly obsessive/compulsive behavior. This is the work of a crazy man.

So, is genius linked with craziness? Is this why we aren't all geniuses? Is mankind only so smart because if we get any smarter, we cease to function correctly? Maybe it's just not evolutionarily advantageous to be smarter than we are; it makes us mopey, and we end up cutting our ears off when we're trying to woo girls, which rarely results in offspring.

--

Depression is not glamorous. It's not like a movie. You don't get to get cured of it. You don't wake up one day and realize that life's tough, but there it is, so slap a smile on your face and keep on trucking. Some people have never dealt with depression, and they can't figure out how it's different from "being sad." "I've been sad! I don't whine about it! I just get over it." Yes, that's nice. Also, not the same.

Depression completely robs you of hope. You don't believe things can get better, and you don't believe anything is OK. You look around you and realize that everyone and everything you love is going to go away, sooner or later, and you don't believe anything good will replace them. Sometimes you just want to self-destruct: you get so tired of waiting for the things you love to abandon you, waiting for that shoe to drop, that you push them away pre-emptorily . Take that, you thing I love, now you can't hurt me, now I don't have to live in fear.

If I just stay in bed, and pull the covers around me; if I just unplug the phone, if I don't answer the mail, then whatever bad news is waiting for me can't get to me. If I can just sleep, and then just sleep some more, then I won't have to deal with it. Not now. I can't deal with it now. Maybe it'll go away on its own. Maybe I'll die and I won't ever have to deal with it.

Labels:

Saturday, May 7

What's the coolest thing in Tiger?

Well, a few days ago I would have said Spotlight. Spotlight's pretty dang cool. It's going to change the way we all use computers, the way Google changed the way we used the web.

The really, really neat thing about Spotlight is you don't have to set up anything to use it. I mean, Apple's had file indexing forever (and I think Windows has as well), but you have to tell it what directories to index and how often to rebuild the index, and then it'll only index files that are essentially text files. Not really that useful, because, honestly, you usually want to find stuff that you've worked on most recently, but the index won't have been rebuilt on recent stuff, so you can't find it.

With Spotlight, the re-indexing is built in to the lowest levels of the filesystem, so no matter how you modify a file, that file will be found when you search for it. If you're a L33T H@X0r you can "ssh" into your system and use "vi" to edit a file, and when you hit "ZZ" Tiger's still going to re-index your dang file. IT KNOWS.

We already use Spotlight constantly at Delicious, and it's only been out like a week. I rewrote our store in preparation for the crush of orders from Delicious Library 1.5 (thank goodness I did) so it uses flat XML files for customers and transactions. If I want to look up all transactions for a given customer, I just do a Spotlight query where the file type is "com.delicious-monster.store.transaction" and the "customer OID" field is whatever the customer's ID is.



The amazing part of this is, that's all there is to our store's front end. Whenever a customer or transaction gets added, Tiger automatically indexes it, so I don't have to worry about it. If we go in and manually edit a transaction file, Tiger re-indexes it. If we delete a transaction, it's gone from the index. We don't have to have an explicit database for our store, because in Tiger all files are part of a giant database. We just write out a bunch of text files.

We also use Spotlight every day for customer support. If you've lost your license and you call us, we just type your name into Mail, and it searches through all our Delicious mailboxes in about two seconds. If we've ever talked with you before, we know what we said instantly. If you licensed our app, the receipt pops up. If you filed a bug report, that pops up. It's all there.

---

So, that's pretty cool. So, then, what's the coolest thing about Tiger? Grapher. Yup.



"What's Grapher," you ask? A graphing calculater, essentially. I honestly don't know much about Mathematica, but Grapher seems to me like Mathematica for people who don't like reading 2,000 page manuals and don't have degrees in math. Also, Grapher costs a thousand dollars less, in that it's free. (Obviously, there's a ton Mathematica does that Grapher doesn't do, and I mean it no insult, but I can also say with all fairness I've never been able to get into Mathematica.)

The built-in examples are phenomenal. Even if you hate math, I urge you to load them up, just to see the beauty that math unlocks. There's something so pure and organic about the curves that are the foundations of math and physics. Now, I admit that I was a math wonk in high school, but I got really bored with it in college and haven't touched it much since then.

But, for instance, today we were working on a feature (for an unnamed future program) where something flies from one point to another on the screen. We want the curve this object follows to look "natural." Initially T2 just used a sine curve (because he wrote a ton of code to get the animation fast and smooth, and didn't want to spend hours just playing with one function), but we all knew the sine wave didn't feel right. So, I started playing with Grapher, and entering curve equations to see which ones had a profile I liked.

In about 10 minutes I'd drawn a nice curve which we'll call y = cos(asin(2.0 * x - 1.0)) / 2.0 - (cos(2.0 * M_PI * x + M_PI) + 1.0) / 18.0. Graph this between 0 and 1 and you'll see that it gives a nice round start and finish but plateaus in the middle. Maybe we'll keep this curve, maybe not. The point is, this kind of thing just wasn't possible before. We've actually leaped forward in what you can visualize with computers.

Load Grapher up and try the examples. They're really stunning. Even if you don't know much math, they'll blow you away. I admit that I don't know enough math to understand a lot of them, but I'm still awestruck.

For instance, you can set up a variable as being an "animation," and then it'll get replaced by a slider, which you can drag around to watch your graph change. You can then, with a single click, make a movie that demonstrates how your graph looks for all the values of this variable (in the range you've defined).

So, in our case, we can actually enter an equation for the curve we want our object to follow, and then make a movie of how the object will look following this curve, all from within Grapher.

If that's not enough, it also has a beautiful equation editor. I wish it were built into the system as another kind of keyboard, because it's awesome.

Seriously, Grapher is worth the price of Tiger on its own. It's a little rough around the edges, but it has an amazing depth to it.

Grapher is the kind of thing you can play with for hours. If I had kids I would give them a new challenge every day to solve in Grapher. "Hey, guys, make Daddy a graph of how a ball would fall if you threw it with a velocity of 26 m/s and an angle of 30 degrees upwards!"

Ok, I don't have kids, so the first person to send me the Grapher file that solves that problem gets a free license to Delicious Library 2.0 when it comes out. You have to both draw the path the ball follows (as a dashed line) and have an animated circle actually follow that path. The "Variable Parameter" example should help a lot.

---

Well, a Mr. Lucas has already won the challenge, with this response:



Nice going!

Labels:

Monday, May 2

On the payroll of Microsoft much?

CIO Today, a "news" organization of which I somehow have never heard, had these choice words at the start of their review of Apple's new "Tiger" operating system:
The bundled Spotlight program included in Mac OS X Tiger is a deep search engine that finds information on local folders. Unfortunately, Spotlight can't "see inside" many programs other than Apple's. For example, Spotlight can search the contents of Word, Excel and PowerPoint files, but doesn't yet see the messages in the Entourage e-mail program.
Seriously, sometimes all you can say is: OMG! ROFL! LMAO! KUNGPAO!

Let's look at this: Spotlight can't "see inside" many programs, other than Apple's. Ok, let's just leave aside that most of the software you're going to use daily on a Mac is actually from Apple: the mail reader, the browser, the chat program, the address book, the calendar, the MP3 player, the photo album... these are all bundled by Apple, and they all work with Spotlight searching.

But let's say it's a concern that the third-party support is limited to Microsoft Word, Excel, and PowerPoint.

Oh, wait... that's a big fat lie. Every copy of Tiger also can "see inside" mp3s, aiffs, Microsoft WAVs, ulaw and DigiDesign SD2 sound files, VCARDs, Microsoft RTF, HTML, XML, plain text, MPEG-4, 3gpp, mpeg, Adobe PostScript and EPS, Adobe PDF, JPEG, Microsoft TIFF, PNG, Compuserve GIF, JPEG2000, radiance images, RAW images from Canon, Fuji, Olympus, Nikon, Konica and Adobe, Microsoft BMP, Truevision TGA, SGI, and Adobe Photoshop images, Adobe Fonts, Microsoft TrueType Fonts, and, finally, C, C++, and Java source and header files.

You'll notice that the author of the article didn't even bother to list all the Microsoft formats that Spotlight can use, but in fact None of those listed above are "Apple" file formats. (You could maybe argue that MPEG-4 is an "Apple" format because the MPEG standards body ratified the Apple format as their own, but that's like pretending Macs "only work with Apple drives" because Macs use FireWire / IEEE-1394.)

Oh, but wait, with a click of the browser you can also download importers for Delicious Library, OmniGraffle, and OmniOutliner (to mention some programs that my companies have written). Or any of 25 other obscure formats like Mathematica Notebooks. (Note for the sarcasm impaired: yes, I know Wolfram is a bigger company than mine. That's the joke, see.)

Essentially, "CIO Today" managed to find ONE program that you might actually run on Mac OS X that DIDN'T have a Spotlight importer THE DAY Tiger shipped, and then they open their article with that fact. Ignoring that most sane Mac users use the included Apple Mail instead of Microsoft's buggy, ugly Entourage, and, HEY, GUESS WHAT, Mail does use Spotlight, and in fact can create Smart folders using it, which Entourage, notably, can't do.

Now, when you actually read the text of the article, it seems like the writer actually liked Tiger, and it was only when it got to the editor stage that this piece became Microsoft propaganda. Note that the edited article begins with a big, bold, above-the-advertising pull-out quote from a negative comment that was the middle of the article: the business about how limited Tiger's search is. When you read the article, you find out how cool Tiger is despite this, but, hey, what busy CIO is going to read the article when there's a nice boldface summary at the top?

Of course, the more thorough CIOs of today might skip to the last paragraph if they find themselves with a few extra seconds in their go-go-go busy days, just to find out what the final verdict is on this fancy new contraption them Apple folks have put out. Hmm, let's see... is CIO Today willing to admit that Apple's great mindshare, recent increase in market share, and clear technological leadership might actually challenge Microsoft's hegemony?
"I don't think (Tiger) is enough for people who have not thought about Apple to all of a sudden buy an Apple computer," said Munster of Piper Jaffray. "But for those who have been thinking about it, sitting on the fence, this might push them over."

Labels: