May 7, 2005

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:

13 Comments:

Anonymous John said...

I still miss the original Graphing Calculator. Grapher lacks its best feature: draggable algebra! Rumor has it that a new Tiger-only version of Graphing Calculator is on its way...

May 07, 2005 7:02 AM

 
Anonymous Erich said...

Grapher lacks that ability because Apple just bought Grapher from another developer. Grapher really does come in handy though. I have been using it on math assignments since before Apple bought it.

May 07, 2005 11:24 AM

 
Anonymous cesar said...

I just wish Grapher was added to Pages, so you can type nice looking equations (like LaTeX) and make plots within Pages...

those would be great for all students (high school, university, graduate school), teachers, professors, researchers....

May 07, 2005 1:19 PM

 
Anonymous Karim said...

I wonder why my spotlight isn't indexing my address book. When I do a search for a contact, it searches everywhere except the address book. I checked my spotlight settings and it is set to index contacts. Any ideas?

May 07, 2005 8:35 PM

 
Anonymous Anonymous said...

Any chance of a hint as to the new mysterious app you're working on? Or at least a date as to when it'll be revealed to the world? Library isn't really my thing but you guys sure do have amazing talent and so I'm eager to see what's in the future.

May 15, 2005 4:50 PM

 
Anonymous Maarten Sneep said...

There is a link between Grapher and LaTeX: right-click/control-click on the equation and select 'Copy LaTeX Expression', and you'll get your equation as a LaTeX equation (dûh).

We're working on getting from LaTeX source to a pdf you can easily insert into Pages - there are several tools out there that will create a nice pdf for you, but it might look pretty silly, due to baseline issues.

Start looking for these tools from the MacTeX web-pages.

May 17, 2005 6:55 AM

 
Anonymous Anonymous said...

cesar said...
> I just wish Grapher was added to Pages, so you can
> type nice looking equations (like LaTeX) and make
> plots within Pages...

Maarten Sneep said...
> There is a link between Grapher and LaTeX [...]
> We're working on getting from LaTeX source to a pdf

On my system, I can copy and paste equations between Grapher and TextEdit.

May 17, 2005 1:13 PM

 
Anonymous Maarten Sneep said...

Someone said:
> On my system, I can copy and paste equations
> between Grapher and TextEdit.

And the result looks pretty much like the result from the Equation Editor that comes with word: LaTeX looks better, so there are reasons to take the extra step.

Besides: try an equation with a fraction in it (y = sin x/x is a nice one), paste it in TextEdit, and try to give it a number. You'll notice that the number is aligned with the bottom of the equation, not with the true baseline.

The current LaTeX equation tools don't do this either, but we're close to cracking the problem. Full LaTeX does the right thing of course, but when combining LaTeX material with other tools, some things may get hairy.

May 19, 2005 4:31 PM

 
Blogger Adam Behringer said...

Have you discovered Quartz Composer yet? "3D graphics programming for the rest of us " is definitely the coolest thing in Tiger..

For several years, I've been thinking about 3D user interfaces for managing large libraries of scanned documents. Unfortunately learning OpenGL hasn't made it to the top of my priority list yet. Quartz Composer allowed me to mock up some interactive three dimensional interface ideas in less than an hour. I have yet to try to put the results one of my "real" projects, but it looks very promising.

May 22, 2005 7:26 AM

 
Anonymous Chad said...

Spotlight is definitely cool, the type of thing I wish my Windows box had at work. I fear having to look for some file under Windows. I pretty much type in what I'm looking for, tell it to go search, then go do something else for awhile. So, the pretty-much-instant-search-results feature is definitely nice.

I will definitely agree with the Grapher comment, too! Some say QuarkXPress was the last Classic app to make it to OS X. I say it was Graphing Calculator. Since GC took so long to make it to OS X, I, along with several other developers ended up creating our own graphing calculators (EdenGraph, Graph-O-Matic, MathPlot). I wouldn't say any of them quite reached the level of functionality that Graphing Calculator had, but they worked as interm solutions until Graphing Calculator made it to OS X and Grapher came out for Tiger.

June 27, 2005 6:55 PM

 
Blogger paul said...

the original graphing calculator is now a native mac os x app.

so much nicer. :)

June 30, 2005 12:05 AM

 
Blogger Tailwind said...

Here is the original free Graphing Calculator 1.x for 10.3 and 10.4:

http://www.pacifict.com/FreeStuff.html

The amazing skunkworks story of GC is here:

http://www.pacifict.com/Story/

June 30, 2005 11:10 AM

 
Anonymous Anonymous said...

It's probably a good thing you don't have kids. (just kidding!)

July 06, 2005 12:28 PM

 

Post a Comment

<< Home