Page 211 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 211

Exposure to Computer Disciplines



                   Notes         A manager can say the same thing any number of ways. For example, “Get me tennis racket
                                 sales for January” works just as well as “I want January tennis racket revenues.” Such a request
                                 may contain misspelled words, lack articles and verbs, and even use slang. The natural language
                                 translates human instructions-bad grammar, slang, and all-into code the computer understands.
                                 If it is not sure what the user has in mind, it politely asks for further explanation.
                                 Natural languages are sometimes referred to as knowledge-based languages, because natural
                                 languages are used to interact with a base of knowledge on some subject. The use of a natural
                                 language to access a knowledge base is called a knowledge-based system.
                                 Consider this request that could be given in the 4GL Focus: “SUM ORDERS BY DATE BY
                                 REGION.” If we alter the request and, still in Focus, say something like “Give me the dates and
                                 the regions after you’ve added up the orders,” the computer will spit back the user-friendly
                                 version of “You’ve got to be kidding” and give up. But some natural languages can handle
                                 such a request. Users can relax the structure of their requests and increase the freedom of their
                                 interaction with the data.
                                 Here is a typical natural language request:
                                         REPORT THE BASE SALARY, COMMISSIONS AND YEARS OF
                                         SERVICE BROKEN DOWN BY STATE AND CITY FOR SALESCLERKS
                                         IN NEW JERSEY AND MASSACHUSETTS.

                                 10.2.7 Choosing a Language

                                 How do you choose the language with which to write your program?

                                 There are several possibilities:
                                     In a work environment, your manager may decree that everyone on your project will use
                                      a certain language.
                                     You may use a certain language, particularly in a business environment, based on the need
                                      to interface with other programs; if two programs are to work together, it is easiest if they
                                      are written in the same language.
                                     You may choose a language based on its suitability for the task. For example, a business
                                      program that handles large files may be best written in the business language COBOL.
                                     If a program is to be run on different computers, it must be written in a language that is
                                      portable-suitable on each type of computer-so that the program need be written only once.

                                     You may be limited by the availability of the language. Not all languages are available in
                                      all installations or on all computers.

                                     The language may be limited to the expertise of the programmer; that is, the program may
                                      have to be written in a language the available programmer knows.
                                     Perhaps the simplest reason, one that applies to many amateur programmers, is that they
                                      know the language called BASIC because it came with-or was inexpensively purchased
                                      with-their personal computers.









        204                               LOVELY PROFESSIONAL UNIVERSITY
   206   207   208   209   210   211   212   213   214   215   216