Skip to main content

maths for the terrified

In technical writing, one of the standard bugbears is the persistent belief - despite classic debunkings such as Gowers' The Complete Plain Words - that difficulty is a virtue in itself, even a sign of intelligence. This belief crops up in the software field too. I remember some years ago complaining of a program that required, to make a dialup connection, typing the modem command string, from memory, in hexadecimal. The maker justified this hostile interface as being 'professional', with the implication that only amateurs want software that's easy to use.

Fortunately, an ergonomic approach to software design is far more common, and designers recognise that ease-of-use is helpful even to professionals. Users may need guidance as they work with unfamiliar software or an unfamiliar branch of mathematics, and even experts don't always want to work with low-level constructs, or to deal with the full repertoire of a mathematics package. Usability, therefore, has been an important factor in the development of mathematics software.

Education is an obvious area where maths needs to show a friendly front, and LiveMath Maker, from Theorist Interactive of Cambridge, MA, is a good example of what can be done. It's actually the latest incarnation of a symbolic package that has seen various owners and names - Theorist, MathView, and Mathplus - but now is back with its creator, Allan Bonadio, and rebadged for the worldwide educational market. Cosmetic friendliness is one aspect: for instance, the cartoon control icons and a help system, introduced by the nerdy 'Sally', with RealPlayer, GIF or Quicktime animations. Another is functional friendliness: explanatory prompts inside its notebooks; 'drag and drop' controls for manipulating algebra; and the display of intermediate calculation steps. Although it was taken up for a while by Waterloo Maple, it is unfortunately one of the smaller players on the maths package market, and limited by the lack of a programming facility.

In the more mainstream market, usability features often stem from more general software developments. Many users like spreadsheets because they're appropriate to applications such as signal processing, or aren't perceived as 'maths', so Maple includes an alternative spreadsheet interface. Algebra, for those who like it, is easier to use with traditional layout. Quality displays such as the free-form worksheet of Mathcad, from Mathsoft Engineering and Education, were only made possible by the shift to graphical operating systems such as Windows. Windows similarly allowed development of the palettes and pull-down menus used for quick access to common symbols and operations. But even with the aid of the standard hypertext help browsers, most mathematics programs still have a large hidden command set to remember (a situation made worse by the inevitable 'arms race' to add more functions).

An exception is Wolfram Research's CalculationCenter (CC), a rare and welcome example of a manufacturer trimming a package - Mathematica in this case - to a useful basic function set entirely available by menu/palette access. As well as being a standalone product for mid-market technical professionals, it also aims to provide a lighter environment for users who might need to share notebooks with Mathematica users elsewhere in a company. Friendliness was at the core of the CC's design; Wolfram's key requirement was 'getting new users calculating in 10 minutes', and CC impressed me by living up to the claim.

The trick is its use of InstantCalculators, explanatory dialogue boxes that translate unskilled input into the underlying command syntax. Effectively you become a Mathematica user without necessarily knowing the language - although CC, without being explicitly educational, rapidly teaches it. CC2, launched in May, eases the transition from other packages by recognising input in Mathcad and Microsoft Excel syntax, with improved trapping of typical user errors. Other new features include statistical distributions and functions, MathML support, and the import/export of two engineering data formats, STL (stereolithography format) and Autocad's DXF Document Exchange Format.

Alongside a long-standing trend toward features that simplify access directly, many programs also serve to create usability for others through tools for creating custom applications. This has been a major recent focus for mathematics packages.

If simplicity and tamper-proofing is all that's required, in education for instance, one possibility is just to 'lock' a worksheet. But it makes programs more accessible to general users to break away from the mathematical format in favour of the well-known graphical user interface (GUI) of application software, with its sliders, menus, radio buttons, check boxes, and so on. Waterloo Maple's Java-based Maplets have been in the spotlight this year, but all the major packages offer this capacity in some form. Creating a GUI involves visual description of the device, and some form of scripting to control its interaction with the worksheet session. Mathcad has probably the friendliest system: the Insert Component menu drops a graphical device into the worksheet, where it automatically passes input (for instance, a slider position) to a variable. Pop-up dialogue boxes allow fine-tuning of the layout and the underlying VBScript. In the Mathworks' Matlab, GUIs are also easily designed using GUIDE, a GUI layout editor that generates both a .FIG file of the contents and the basic M-code to handle the calling procedure. Similarly, programming menus access the code for more detailed configuration.

Matlab's GUIDE: a GUI builder for GUI applications

Sun Microsystems' Java has moved on from its early days as a slow 'Internet language', and Maple and Mathematica both use it for calling application constructs, without the problems of compiling and linking C++ blocks. Maple 8 has a package of code elements - layout, dialog, action, and so on - for programming the custom Maplets (similarity to applets, but not limited to a Web context). Mathematica 4.2 offers a similar capacity as part of the function of its J/Link Java interface, which conversely lets Java programmers call Mathematica routines. Although J/Link isn't new, this version 2.0 - like Maple 8 - comes with a bundled runtime environment, so that no extra software (such as the unenthusiastically supported Microsoft runtime) is needed.

These two major implementations are bound to attract comparison, and the chief issues appear to be ease-of-use versus power. Maple's programming guide demands far less expertise. As an occasional programmer, I'd happily write a Maplet, but I'm very disinclined to write a J/Link application. Despite the claim that it 'requires no special programming skills', J/Link needs an understanding of Java classes to do much more than run the examples. However, the J/Link examples are superior; alongside algebra and plotting applications, they include a mouse-driven spirograph and a 400-voice keyboard, showing J/Link to be extremely versatile in the right hands.

Maplets furthermore interrupt worksheet processing and Maple's Java runtime initialised far more slowly, so I'd conclude that J/Link has the technical advantage.

Ultimately there are limits to ease of use: mathematics has conceptual walls where no interface will help users unfamiliar with the concepts. However, before that point is reached, the benefits to learning and productivity are huge. Felix Grant describes, in the panel below, situations where providing easy access to mathematics even helped overcome a potentially lethal situation.


XML focus for Mathematica 4.2
Mathematica 4.2 was launched in June by Wolfram Research, and apart from J/Link 2.0, its major publicised update is support for the XML (Extensible Markup Language) for data interchange. XML is not a precise file transfer format at the level of, say, Compuserve GIF , but an extremely general specification for tagged text data. Mathematica's XML support therefore comprises read/write functions and correspondingly general tools for manipulating it as a Mathematica (MCA) expression: for instance, to strip out unwanted tags or extract specific data fields. This is more or less equivalent to the XMLTools package in Maple 8. Unlike Maple, MCA 4.2 introduces a fairly confusing hierarchy of Wolfram-specific XML dialects - NotebookML, ExpressionML and SymbolicXML - to represent MCA constructs. On balance, Maple's XML functions seem more complex, but in my view MCA 'unnecessarily multiplies entities'. MCA 4.2 also features read/write handling of the MathML 2.0 standard (another XML dialect) for Web mathematics. This bridges the gap between the machine-to-machine communication of XML and other new MCA packages more helpful to human reading.

One of my gripes with MCA as a documentation system has been its limitation on format. However, bilateral cells - side-by-side maths and comment - are a feature of the new AuthorTools, some 60 functions for processing MCA notebooks into technical documents (for instance, creation of an index, contents table and help files). A related Slide Show style sheet links notebooks into presentations with a navigation bar, the system being used to good effect for a readable Ten Minute Tutorial. Both AuthorTools and Slide Show have the same white-on-blue palettes as CalculationCenter. It would be nice to see this developing as a Wolfram house style, as it's very aesthetic and legible. Statistics seems very popular at present; MuPAD 2.5 and CalculationCenter 2 also have stats upgrades. MCA 4.2 follows the trend with a new univariate Analysis of Variance (ANOVA) package. Other new standard packages are Combinatorica, with 450 combinatorics and graph theory functions applicable to optimisation and routing problems in networks; and NMinimize, with several global optimisation algorithms such as simulated annealing.

A mix of other updates complete the list: enhancements to linear programming, NSolve numerical solution, and simplification; planetary and musical symbols; Asian language support; XHTML export; and two new scientific data formats, SDTS (the ANSI Spatial Data Transfer Standard for geographical and satellite data) and FITS (the NASA-endorsed Flexible Image Transport System for storing astronomical metadata).

Version 4.2 centrally improves Mathematica's usefulness to programmers, either application builders or those concerned with online data storage and manipulation. It's not otherwise a radical release across the board, but Combinatorica stands out as a striking specialist addition, well-supported by its authors via www.combinatorica.com.


Swords into ploughshares

There are many occasions in real life where the joys of the mathematical journey must be sacrificed to the hard priorities of a computational destination. I frequently have to produce 'black box' calculators for people who view mathematics with either fear or impatience, and as a necessary but tedious means to an end. They range from students to technicians and other practical users.

Recently, I had to provide a client with rapid mathematical support for a Third World project to recover unusable land for agriculture. After basic training in safe use and handling, volunteers or low-paid seekers of experience needed to use explosives to clear rubble, derelict buildings, tree stumps, and so on. Due to a severe budget, the explosives were anything begged or borrowed or 'blagged', from black powder (really) to military plastique past its sell-by date. With such variability, each batch needed test detonations, the data from scattered pressure meters allowing calculation of the yield constant (k) per unit mass (w). The result provides the yield value (y=kw) for estimation of overpressure (p) at a particular distance (d).

One part of my brief was to produce a means for non-technical personnel rapidly and repeatedly to estimate blast overpressures, explosive yields, zones of probable safety or lethality, and so on, all 'on the fly'. (Although the underlying relation is a mathematically trivial inverse cubic p=y/[d^3], it doesn't seem trivial when making dozens of manual calculations at a time on a safety-critical application). The other was to expose technical staff to the means for generating such automated computational tools, in the hope that they could do it themselves in future.

The simplest options were a spreadsheet or booklet derived from it. I set up two spreadsheets on every computer available to those involved, one as a single-case calculator, the other as a what-if table. I then gave every user a waterproof plastic reckoner booklet with likely ranges of input and output values. Next up the scale came a worksheet in PowerOne's graphic calculator on a handheld device, functionally identical to the single-case spreadsheet, but more compact and user friendly.

Above this level came specialised mathematics packages. Buying these for one-off use as a calculator may seem overkill and is probably not financially feasible. But when there is a collective need for numerous similar tools, they become more economic when weighed against skilled time overheads. Such overheads rise rapidly, soon becoming ruinous, as the calculations move away from simple explicit relations to, for instance, calculus or data-heavy statistical or combinatoric manipulation.

All advanced packages offer ways to encapsulate solutions once they have been generated; Maple and Mathematica are no exception, but offer different approaches. Users comfortable with mathematical notation, but short on time, easily defined or used their worksheets. Such users, and many less confident, were also happy with LiveMath Maker: more friendly, less complex, and considerably less costly, it provides self-calculating symbolic worksheets with open variables and context sensitive pop-up help. Though a more flexible tool than the spreadsheet, it was less extensible than the two heavyweights, and would not cope with the same range of potential applications.

The consensus at the top end was that Wolfram's CalculationCenter 2 (CC2) offered the most user-friendly 'off the shelf' front end but, beyond its shelter, the help system was less helpful than in Maple or Mathematica. For instance, the words 'statistics' or 'combinatorics' are hard to find in CC2's help.

But this raw approach was psychologically off-putting to many 'computation consumers' who find mathematics daunting and need a black box calculator. A good example is the Mathematica-powered integrator at integrals.com, to which I and many others point students who must use calculus in a generally non-mathematical context.

I generated explosive force calculators in both Maple and Mathematica, then added data analysis calculators that supplied either final answers or suggested inputs for combinatoric outcome predictors. I also asked some of the client's staff to generate their own. The results were all made available to users of a single shared PC.

Both packages were capable of meeting all that was demanded of them. When a calculator was developed to the same degree of perceived sophistication in both, 'consumers' showed no overall pattern in their preferences, and both were equally efficient and accurate. Mathematica now has the edge on native statistical and combinatoric tools, although Maple has the functions to construct these. Maple leads in the intuitive quality of its help support for beginners in this sort of work, although the assistance you need is there in Mathematica if you look for it.

There were, however, clear differences in the process of generation; the pattern of these was remarkably uniform across both my own experience and that of the staff users.

At first stab and in final tuning, Mathematica was more accessible and intuitive - but the learning curve steepened considerably in the middle. Maple's Maplets provided a more rapid and easily grasped means of working in the intermediate phases, yielding a more or less straight line effort from start to finish.

In objective terms both were equally good tools, and I would consider both with equal weight for a new project.

In this case, though, a subjective preference for Maple and Maplets soon showed itself amongst those trying for the first time to generate no-brainer calculators for colleagues.
Felix Grant



Media Partners