09 January 2013




Math: Getting it Right



Whether you’re baking Grandma’s favourite chocolate cake, or working on file encryption routines, one principle stands out- get the math right. While some jobs are satisfactory with an estimate, more often than not, it is a rigorous working out of an algorithm that is vital to the success of the work. Intuitive calculations do play a role in program design. But to get an accurate outcome one must be able to code the algorithm with precision. We’ve all heard of GIGO. And this holds true in program design and testing. Even if one has the latest digital programmable calculator, or a robust 64-bit computer, the flow of program instructions leaves no room for guesswork. For our purpose today we will talk about the importance of accuracy in application development.


Application development, or, software development holds at its core “solutions programming.” This means the process of design and writing of programs that intends to solve a particular problem or group of problems with a common purpose. This process oftentimes begins with back-of-the-envelope notes and/or diagrams. Such notes may delineate the program flow. Crucial to the flow of the program is the algorithm, input values, and output characteristics. But before actual code is written, the developer or team of developers must engage in program design. A classic tool for this is flowcharting. Whether one uses flowcharting programs, or plastic layout stencils (of previous years), the process is inherently similar. But let’s make one thing clear: at the heart of an algorithm is a mathematical formula. It may be a solution for an ordinary differential equation, or a character sorting algorithm. Therefore, the requirements for a program, based on research and/or market demand, must be well delineated before any design begins. In a competitive world we must also be able to create a better product than the competition. Of course, in a market based economy there’s room for everybody. Nevertheless we must improve continuously or lay waste by the wayside.


The choice of computer language for the application will depend on several factors. If the application is an extension of a preexisting system, the application will be written in the language of that system. The application in this scenario is usually called a module, or “add-in.” Some languages are better fit for scientific programs. In this case, the language has a large library of functions, and “calls” to the specific functions are easier to implement than writing a function from scratch. Some mathematical software packages are used by industrial, scientific, and engineering sectors. These packages are available in commercial offerings and cost a major investment to an organization. Examples of these offerings are Matlab, Maple, and Mathematica. Sometimes these programs become the lingua franca of the industry. These packages offer advantages easily adapted for a particular engineering problem.


Open-source programs have been developed for a wide array of applications as well. Like the commercial mainstream applications, these open-source applications are also extensible. These extensions may be available “off-the-shelf” or written by the particular industry team whose programmers are familiar with the engineering process.  Whether the application is a “stand alone” program, or a module, the same principles of design are applicable.


Writing the program once it is designed is a laborious process that can be undertaken by an individual, or a coding team.  If one solitary author writes the code, he may be better able to tie the pieces of code together. This may take a very long time though, since he has to check everything him- or herself.  This may be fine for small- to medium- size projects. But large-scale programs are better written by a team of developers, each responsible for a certain portion of the program. The task of syncing the program sections or components is distributed among the program writers. The project leader, or leaders, then checks and rechecks the code. The use of an IDE (Integrated Development Environment) facilitates both coding and checking your program. IDEs have been developed with the programmer in mind, and are available for specific languages and frameworks.The IDE is in itself a program for writing programs.


The integrity of the code is verified only by rigorous testing. It is not just a question of whether the program runs, but also if the code is optimized or tuned. Software testing is carried out by both, members of the programming team and the potential users. The question is then-does the program do its job and do it well? And this oftentimes differentiates between a lackluster program and a beautifully coded and optimized application. It is not a matter of adding unnecessary bells-and-whistles to a program, that in turn create bloatware. Not only that- it can differentiate between your program and that of the competition.


Both software testing and application lifecycle management (ALM) are essential activities of the software maker. In spite of the initial development of a good product, software updates and upgrades are necessary and keep the program evolving. Needs change and new needs arise.  Software development teams listen to market trends in order to deliver a relevant product. One frequently overlooked activity in software development is good documentation. This activity aims to assist the developer as well as the user. For the developer, good documentation keeps the project in focus. Also, it helps the software developer assist the user with regards to overall structure of the program as well as its functions.


Launching of the product comes only after several cycles of testing in all operating conditions. Whether one is a freelance programmer or a member of a software development team, the rules of software maintenance are the same. Some teams or companies release small frequent updates, or, upgrades  with major improvements and features, with release dates somewhat far between.  From designing to prototyping to actual coding, the software author commits himself to a tough discipline.  Whether one belongs to a Fortune 500 company, a university biomedical statistics team, or a game-programming outfit, or even an enthusiast web- or mobile- app designer, the stages of software development are essentially the same. It is a creative process, with ups and downs.  With writer’s block, and with free-flowing moments; it is a craft, and an art.

In any case: get the math right.


Work smart.

Fernando Yaakov Lalana, M.D.






No comments:

Post a Comment