All posts

Theodore Gray Interview

Originally published on macresearch.org, around 2008. Reproduced from the author's archive; some links may no longer resolve.

Theodore Gray is something of a legend in the Mac-using scientific community. You may have seen him onstage with Steve Jobs demonstrating how his company, Wolfram Research, Inc., ported its flagship product, Mathematica, to the Intel Mac in a matter of hours. Theodore founded the company with Stephen Wolfram, initially targeting NeXT systems, and later spreading to all platforms including the Mac. The following interview was conducted via email.

Q: Mathematica has a long history with the Mac, and you’ve got a long history with Mathematica. Tell us a little about the early days of Mathematica on NeXT and Apple hardware.

I’ve always preferred Macs, that’s no secret, so Mathematica has always run great on them. Here’s a little anecdote for you. When Steve Jobs, who spoke at the press conference announcing Version 1.0 of Mathematica, was putting together the software to run on his NeXT computers when they were launched, he decided Mathematica would be a good thing to have. So I went in to work inside NeXT for several months doing a port of Mathematica. Secrecy was very high and taking a machine out of the building was out of the question. There was much gnashing of teeth when I said I’d have to work at night to get the port done in time, since I would have been the only non-employee in the building. The solution in the end was to hire a special security guard to sit outside my office and make sure I didn’t leave the room. It was fun, he brought a TV and movies to watch while I slaved away making Mathematica the insanely great NeXT application it was.

Q: I noticed on your personal web page that you have a passion for creating periodic tables in Mathematica. Stephen Wolfram has expended many pages on beautiful images created with Mathematica and simple mathematical rules. Do all Wolfram employees have a Mathematica hobby? Do you have others, and what is the most unusual application of Mathematica that you are aware of?

A lot of people at the company use Mathematica every day to do interesting things, both work-related and not. An obvious example is academic papers: We invent and publish many original algorithms and the papers are almost always written using Mathematica.

In our graphic design department Mathematica is used to create the kinds of beautiful images you see on our website and packaging, but also less visibly for things like mocking up user interface designs. Mathematica is a great way of prototyping user interfaces and we frequently use it to develop both the visual appearance and the behavior of new interfaces.

In IT we use it for analytics, planning, network analysis, and through webMathematica to run sites like intergrals.com and tones.wolfram.com.

But there are also a lot of hobby uses outside company business, from a professional fabric design business (fabric patterns generated by Mathematica code) to coffee table books of mathematical art.

One of the more visible extracurricular activities involves employees Ed Pedd, Michael Trott, Eric Weisstein, and Amy Young who are the main math consultants for the NUMB3RS show on CBS (a prime time crime drama starring a mathematician). See the show’s web site (link no longer available) and note the prominent “Math Behind the Numbers” panel on the right, which goes to our site.

The fact that our employees are also heavy users of Mathematica is one of the great strengths of our development process. We care deeply about the features, stability, and power of Mathematica, because we use it every day, often all day. It’s quite unusual for a software company to use its own product so heavily for in-house projects, let alone for so many outside hobbies.

For my own account, I like to think that periodictable.com is a pretty interesting application: The site is 100% created in Mathematica, all the HTML code is written out from Mathematica, all the JavaScript plot annotations are generated automatically by exporting tagged graphics from Mathematica, all the images are scaled and annotated in Mathematica. There’s virtually no aspect of the site that isn’t done with Mathematica.

A page like this is a good example. The melting point data comes from our ElementData[] function (one of dozens of real-world data functions in Version 6). The plot was created by Mathematica, and Mathematica also generated the JavaScript event handlers that give you the mouseover behaviors in the plot.

But these purely visual pages are also done entirely in Mathematica, based on text in Notebook files.

This page has several examples of periodic table movies on it. Every frame of those movies is directly output from Mathematica, and the sound track from the video wall test was also processed through Mathematica. Generating these movies requires, for each frame, selecting and assembling the right subset of a library of 42,400 separate image files at the right resolution: It would be really quite difficult to do the zooms from full wide angle to full resolution tight shots using traditional video tools. The people at NOVA didn’t think it was practical, they were going to use a still image during zooms until I mailed them the finished product already done, directly created in Mathematica.

The 3D lenticular version of my poster was also created in Mathematica. To do it by hand would have required putting together 118 separate images, twelve times over (for the twelve separate stereo views). No thank you, I have software for that.

Q: Wolfram’s support for the Mac has always been excellent, where some of your competitors have fallen somewhat short. For example, Mathematica has always had a Mac-native interface. Does the Mac represent a niche market for Wolfram? Does the effort expended on a Mac port pay off for the company?

The Mac is more than a niche, less than a majority, and always an inspiration. It’s also very valuable to consistently develop for multiple platforms, this enforces a discipline that allows you to port to new systems rapidly as they come up (for example, new flavors of Linux, major new OS versions like OSX or Vista, etc).

The star example of that was how easy it was for us to port to OSX on Intel in a very short time, culminating with me showing up on stage with Jobs after our “crack team of emergency Mac programmers....Rob” spent just a few hours doing the port.

That was made possible by many years of cross-platform engineering: If economics hadn’t forced us to develop for Windows, we would have been much more rooted in a Motorola mindset and the port would have taken much longer.

Q: Mathematica was traditionally the ‘symbolic math’ program, and many still view it that way. Is that still true, or does Mathematica now cater more to the engineer or scientist doing numerical computing?

Mathematica has always been a very broad product that is relevant to anyone who computes: Computation is a much broader subject than math. Mathematica contains easily the world’s largest interconnected web of algorithms, many of them invented here. These algorithms build on each other in ways possible only in a system with the unique combination of symbolic and numerical capabilities of Mathematica.

For example, the numerical calculation features in Mathematica, since V5.2 the fastest in the world, are made even more efficient because in many cases the system uses a symbolic analysis of the input data or functions to select or tune algorithms to the type of data they will be processing. No other system can do that, because no other system has both efficient large-scale numerical features, and deep symbolic analysis abilities.

Using a limited tool often limits your thinking: If your tool only does numerical calculation, then everything starts looking like something to numerically integrate. If your tool only works as a spreadsheet, then every problem starts looking like a disjointed set of numerical formulas. Often there are much, much better solutions available if you have a less narrowly focused tool.

In Mathematica you have conventional “math” tools, symbolic manipulation of formulas, but you also have hundreds of features for discrete math, geometric analysis, numerical and statistic functions, visualization functions, and so on. The whole is much more than the sum of the parts.

It’s also important to remember that math is fundamental and found everywhere: Encouraging more people in more fields to use real math is one of the positive things Mathematica has done. If you see a video game character moving in a fluid, natural-looking way, that’s not because they are good 3D artists, it’s because they got the math right.

Q: When I look at the Mathematica web site, I see lots of new products, including webMathematica and gridMathematica. Mathematica seems to be more of a family of products than it once was. What are the important developments that you have seen happening to Mathematica over the last few years, and stretching into the years to come?

Version 6 is the biggest new thing we’ve ever released. The way we have done dynamic interactivity in 6 is something the world has never seen before, and we are only now starting to see just how dramatic the impact is on what people can do with their computers.

It’s not so much about what you can do as it is who can do it. Only a very small, highly specialized group of people, user interface programmers, can write Java or Flash interactive applications. Scientists, financial analysts, law professors, architects, etc, generally have no interest in learning low-level user interface programming tools, but they love Mathematica. Those people can now rapidly and easily create very nice interactive applets.

My blog post (link no longer available) on the subject describes how this is done.

And just as importantly, our new Player and Player Pro products allow people who develop solutions in Mathematica to deliver them to people who don’t own Mathematica. That opens up a world of opportunities for consultants, authors, educators, and anyone who wants to create a product that uses the power of our system.

Since it’s so new and perhaps surprising, let me say that again: If you write an interactive application in Mathematica you can distribute it free to people who do not own Mathematica and they can run it using a free downloadable player application. This fundamentally changes the kinds of things you can develop and deploy with Mathematica. Details can be found on the Wolfram site.

Just as the new dynamic interactivity features let many more people create their own interactive applications in a minimal amount of time, the gridMathematica family of products let many more people than before do distributed supercomputing. Normally this is a very hacky, ugly sort of thing to do, involving complicated software configurations and programmer-type thinking. On a grid with gridMathematica installed you write clean, simple code that is automatically distributed and executed on multiple notes with no hassle (even if the nodes are different types of computer or different operating systems).

webMathematica similarly lets you write interactive websites using the flexibility and power of the Mathematica language. Sites like integrals.com and tones.wolfram.com are good examples of sophisticated webMathematica applications. My own spell-with-elements site (link no longer available) is a much simpler example, and is a site that would have been much harder to do using any other tool.

Q: MacResearch is a web site for Mac users, and Mac users always want to know why their Mac is better. Is there anything that is only offered in the Mac version of Mathematica, or works better on the Mac than Windows or even Linux?

Isn’t everything better on a Mac?

More specifically, we support AppleScript, Automator, and the Services menu, all of which exist only on the Mac. We even support the Apple IR Remote to control applets you’ve written in Mathematica and for slide shows. (We also support lots of other things, like Spotlight searching, but since there are equivalents on other platforms I can’t list that as uniquely better on the Mac.)

Our philosophy on platforms is that Mathematica should work they way people expect it to on each platform. I love the Mac, and only people who love the Mac are allowed to have a say in how Mathematica works on Macs. I, in turn, am not allowed to say much about how it should work on Windows.

Q: There is a movement towards high-level scripting languages like Python afoot in the scientific community. Do these languages pose a threat to Mathematica, or do you see them as playing a complimentary role?

Python is primarily a string manipulation language. Fine for some things, but it’s frankly a bit nutty to do scientific programming in a language where doing an integral, solving a numerical PDE, making a complex 3D plot, or creating an interactive model are not one-line commands. (Hint: There is only one system on the planet where all of these are one-liners.)

Mathematica is an incredibly productive environment to work in, especially for the kinds of work that scientists typically do. It’s built specifically for scientists, unlike other scripting languages which are designed primarily for lower level programming tasks.

A much more detailed analysis of Mathematica vs. scripting languages can be found here.

Q: Is there a demo version of Mathematica that people can try out for free? How do they go about finding out if Mathematica is for them?

People should visit demonstrations.wolfram.com where they will find over 2500 (with more added regularly) interactive applets written in Mathematica. There’s a free downloadable Player application that lets you run all of them. Most of these examples have been submitted by our users, and they span a wide range of subjects. All of them have their source code available, and in many cases you’ll find that the Mathematica code is extremely short, sometimes just a few lines long even though the applet does quite a lot of interesting things. This site is proof that Mathematica really does let people who are experts in something other than programming create real high-grade interactive applets.

The free Player you can download from demonstrations.wolfram.com is like the Flash or QuickTime players, it just runs existing examples. The authoring environment for this Player is the full Mathematica product. You can get a trial version here, but that page also lists a number of alternatives that may be more production for learning about what it does than jumping into the trial version cold. Watching an online video presentation is good for some people, and we also have the full documentation for the entire product online.