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:
Labels: mac community