Actually, either will do, but you need both. While that may seem to be a nearly nonsensical answer, it makes a lot of sense when you think about the characteristics of the two programming paradigms –graphical and textual.
Many younger programmers think of text-based languages as old fashioned. That paradigm has, after all been around since the1940s. Those programmers are quite adept at assembling graphical objects into an interconnected construct that can do pretty much whatever the user wants. Sometimes, they recognize, the objects simply aren’t available to do what needs to be done, at which time they might be forced to do a little text-based programming.
Many older programmers, on the other hand, are quite comfortable writing text-based code while being decidedly uncomfortable with objects. They often point out that behind all those graphical objects there’s a core of text-based code. In fact, the objects are ultimately written in a text-based code (typically C).
Another group has become comfortable in both paradigms. Yes, most of the object-oriented tools are built on a core of text-based code modules. But, they exist because in a great many circumstances they provide a more natural way to manipulate what needs to be manipulated.
The good and the bad
LabView is a graphical programming language. Programmers work with two views: a front-panel view and a schematic diagram view. Since the front panel view is a necessary part of the integrated development environment (IDE), developing human-machine interfaces (HMI) is practically automatice. In fact, it actually is automatic, but the automatically generated HMIs are badly organized. Much of the programming effort goes into “prettying up” the make it communicate better to humans.
Planning system architecture is also nearly automatic. The schematic diagram view represents concepts (such as logical operations, mathematical functions, and memory locations), and physical equipment (such as sensors, actuators, and the equipment needed to interface with them) by graphical symbols (objects) with inputs and outputs. Programming a system of unlimited complexity comes down to plonking the correct objects down on the schematic diagram and drawing “wires” to interconnect them in an appropriate way.
When it comes to implementing complex applied mathematics, however, graphical programming quickly runs out of steam. Yes, many operations, such as Fourier transforms and matrix manipulations, are available as pre-programmed operations. Yes, you can combine mathematical operations to create complex custom objects. The problem arises when you compare how much work it is compared to a text-based program.
Matlab, on the other hand, has been optimized to make higher mathematics—particularly operations with large matrices—easy. Multiplying two large vectors is as simple as “U = a * b’.” Wanna transpose a 256 x 256 x 256 tensor? Type “T = V’.” How about calculating the sensitivity matrix for a system with 6 outputs and 4 inputs? It’s no harder because mathematics is a text-based language that translates quite easily to another text-based language. It does not, however, translate as well to graphic programming.
Now, not all text-based languages handle vector analysis equally well. While C is the standard text-based language that everybody uses for everything, it gets positively clanky when asked to work with tensors.
Be able to use both
While the old adage that you can use any computer language to do anything with a computer is true, there is a corallary that says some languages are better for some tasks than others.
Software vendors recognize these difficulties. Last year, for example, National Instruments introduced a toolkit to help users write their own text-based routines, which they can then embed into LabView programs. For years, the Mathworks has offered a system called Simulink, which provides a way for users to graphically program systems that call Matlab programs to provide advanced math capabilities.
In other words, you can do anything with either type of tool, but you need to be able to use both.

No comments:

Post a Comment