by Nikolai V. Shokhirev
Up: Scientific programming
Next: Numerical Methods
There are some fields (e.g. science, engineering, education) where the development of ideas, concepts, models and methods is more time-consuming than the accompanying computations. In such areas tools like Mathematica (http://www.wolfram.com), MATLAB (http://www.mathworks.com) and Maple (http://www.maplesoft.com) are widely used.
There are also several free tools:
MAXIMA is a fairly complete computer algebra system. (http://sourceforge.net/projects/maxima , http://www.gnu.org/software/maxima/). Symaxx/2 is a graphical front-end for the Maxima computer algebra system (http://symaxx.sourceforge.net/). See also wxMaxima, a cross platform GUI for the computer algebra system maxima based on wxWidgets.
Clones of MATLAB: GNU Octave is a high-level language, primarily intended for numerical
Scilab is a scientific software package for numerical computations (http://scilabsoft.inria.fr/).
Freemat is a matrix-oriented development environment for engineering and scientific
Advantages of tools for doing symbolic and/or numeric calculations:
1. Abundance of built-in methods and features
2. Flexibility with a variety of supporting techniques
3. Scripting and programming abilities for further enhancement
1. Necessary to learn a lot of features
2. Restriction of flexibility by predefined approaches
3. Necessary to learn tool-specific programming methods or
4. Use of third party add-ins
The alternative approach is to use high-level programming languages. Note that, in such areas programming is usually only a tool. This approach has its advantages and disadvantages as well.
1. Relatively small number of language elements
2. Flexibility is (almost) unlimited
3. Potential high efficiency
1. Necessary to write programs from scratch
2. Relatively low productivity (for non-professional programmers)
Numerous libraries and packages help to overcome the disadvantages of the programming approach. Later I will introduce my Pascal and C++ libraries. I have been using them for several years.
The most popular platforms are
Windows software dominates in the areas of word, data, and image processing (Mac-programming is out of the scope of this tutorial). To be realistic, we should focus on Windows with the possibility of migrating to Linux.
Visual Basic (VB) is among the most popular programming languages in the world. It has an advanced development environment with a component-based Graphical User Interface (GUI) design. However VB is not designed for numeric calculations and lacks good numeric libraries. VB.Net is improved object-oriented version.
All classical scientific algorithms were developed in the 60's in Algol and Fortran (see e.g. [1, 2]). Fortran was designed specifically for numerical calculations (ForTran = Formula Translator). Later, it evolved towards Object-Oriented Programming (OOP). Fortran still beats all languages at all platforms in efficiency. Unfortunately, Fortran was completely eliminated from computer science courses and now even many engineers (!) do not know it. Despite all this, Fortran is still used and new compilers are developed .
Later the algorithms were rewritten and further developed in many other languages. In particular, a lot of numerical libraries were developed in C++ and Java.
Java is a pure OOP cross-platform language, but the development (specially GUI) is a tough task for non-professional programmers (see, however, Borland's JBuilder, currently Codegear's JBuilder).
C++ was the first successful OOP language. But actually, it is an OO extension of the low-level c-language. C++ is clamed to be for universal programming. However, programming in any particular area is not an easy task  (for a non-professional programmer, see the sub-title above).
Microsoft's C# represents the latest generation of object oriented languages. It is a part of well thought out and elaborated .Net framework. This dramatically increases development efficiency, including GUI, Databases and Web. This platform, including C#, is porting to Linux, Solaris, Mac OS X, and Unix as a part of the project Mono.
Scientific/engineering programming does not require a lot of object-oriented programming (OOP). Pure procedural languages (e.g. C and Fortran) work just fine. In my opinion the choice of language is not important for our purpose (the quick sort will beat the bubble sort in any language). More important are development and debugging tools, compilers, text and graphic support, and the performance to price ratio.
Microsoft Visual Studio has excellent visual design support both for VB.Net and C#. However Visual C++ IDE (Integrated Development Environment) is far behind of the first two. Microsoft Visual studio comes with a free Express editions for VB.Net, C# and C++ (versions 2005 is still available).
Borland products (Delphi, C++Builder, Kylix, C#Builder, JBuilder) have a unique combination of features. They traditionally are very efficient and user friendly. They all extremely simplify the graphical user interface development (Rapid Application Development - RAD). Open, personal and academic editions are free or relatively cheap. There are also free Turbo Explorer editions for Delphi (Object Pascal), Delphi.Net, C# and C++ (http://www.turboexplorer.com/ see also http://www.codegear.com/products/turbo). Object Pascal is a high-level language with the object model similar to Java. Borland's Pascal compiler is extremely fast and produces very efficient code.
The integrated development environments (IDE) for Object Pascal and C++ are available both for Windows and Linux. Unfortunately Borland discontinued Kylix, its Pascal and C++ IDE for Linux. The rest of products are now developed by Code Gear, Borland's Tool Division.
Also worth mentioning is Lazarus, a free Delphi-like IDE for Free (Object) Pascal. This is a real RAD IDE with code completion and other advanced features. It is currently available for Windows and Linux, Mac and some other platforms. This is an open-source (free) tool.
Another nice (and free) development tool for the .Net platform (C# and VB.Net) is #develop .C# was developed by Anders Hejlsberg , the author of Turbo Pascal and the chief architect of Delphi.
DevCpp (DevC++) and DevPas are the free tools from Bloodshed Software for C++ and Free Pascal. They have full-featured IDEs, although they are not RAD tools. However, there is wxDev-C++, an extension of Dev-C++ for building GUI with wxWidgets. DevCpp uses GNU g++ compiler on MinGW.
Links to the comparison of some discussed visual tools [6-12].
Up: Scientific programming
Next: Numerical Methods
©Nikolai V. Shokhirev, 2004-2008