March 4, 2013

KBP Chapter 1

Rickvian Aldi / 01PBT / 1601253441
Assignment By Mr. Tri Djoko Wahjono
1. Why is useful for a programmer to have some background in language design,  even though her or she may never actually design a programming language?

-Increased capacity to express ideas
-improved background for choosing appropriate languages
-Increased ability to learn new languages
-better understanding of the significance of implementation
-better use of languages that already known
-overall advancement of computing.

2. How can knowledge of programming language characteristic benefit the whole
computer community?

-If those who choose languages were better informed, perhaps better languages would squeeze out poorer ones.

3. What programming language has dominated scientific computing over the past 50 years?


4. What programming language has dominated business applications over the past 50 years?


5. What programming language has dominate artificial intelligence over the past 50 years?


6. In what language is UNIX written?


7. What is the disadvantage of having too many features in a language?

-Programmers who must use a large language often learn a subset of the language and ignore its other features.

8. How can user-defined operator overloading harm the readability of a program?

-In which a single operator symbol has more than one meaning, this simplicity
makes assembly language programs less readable because they lack more complex control statements, program structure is less obvious

9. What is one example of a lack of orthogonality in the design of C?

-C has 2 structured data types, arrays and records (structs), records can be returned from functions but arrays cannot.

10. What language used orthogonality as a primary design choice?


11. What primitive control statement is used to build more complicate control statements in languages that lack them?

-selection statement plus GOTO is used to build more complicated control statements such as FOR loop.

12. What construct of a programming language provides process abstraction?


13. What does it mean for a program to be reliable?

-A program is said to be reliable if it performs to its specifications under all conditions.

14. Why is type checking the parameter of a subprogram important?

-to avoid bugs and syntax error, the earlier errors in program detected, the less cost it is to make the required repairs.

15. What is aliasing?

-is having two or more distinct names that can be used to access the same memory cell.

16. What is exception handling?

-The ability of a program to intercept run time errors.

17. Why is readability important to writability?

-Both readability and writability influence reliability. Programs that are difficult to read are difficult both to write and to modify.


1. Do you believe that solving a problem in a particular algorithmic step requires programming language skills? Support your opinion.

solving problem don't require programming language skills, algorithmic steps are steps that procedurely done, which usually has different case depending on the condition. For example you have problem to make instant cereal. First step is preparing glass and the cereal sachet. Second, open the cereal sachet. Next pour the cereal into the glass. If you have boiled water / hot water dispenser, pour hot water into the glass, else boil water until boiled then pour it into the glass. This problem doesn't require programming language skills.

2. Who is said to be the first programmer in human history? use the Internet for help.

Augusta Ada Byron and now commonly known as Ada Lovelace, born 10 December 1815 was an English mathematician and writer. Her notes on the engine include what is recognized as the first algorithm intended to be processed by a machine.
Because of this, she is often considered the world's first computer programmer.

3. What are the disadvantages of multiple programming languages?

Programmers will needed to know each programming language they need, diffrent
syntax and diffrent system cause programmers need to study other way to code,
which is take more time to study each of programming language.

4. In what way do the languages for scientific applications differ from the languages for business applications? Support your view.

Languages for scientific applications uses relatively simple data structures, but require large numbers of floating-point arithmetic computations. The most common data structures were arrays and matrices; the most common control , structures were counting loops and  selections.
But in languages for business applications is typically used for producing elaborate reports, precise ways of describing and storing decimal numbers and character data, and the ability to specify decimal arithmetic operations.

5. In what way do the languages for artificial intelligence differ from the languages for web software ? Support your view.

In languages for artificial intelligence is characterized by the use of symbolic computations rather than numeric computations. Symbolic computation means that  symbols, consisting of names rather than numbers, are manipulated. Also, symbolic computation is more conveniently done with linked lists of data rather than arrays. languages for web software supported by an eclectic collection of languages,
Because of the pervasive need for dynamic Web content, some computation capability is often included in the technology of content presentation provided by such as HTML, JavaScript, or PHP. There also some markup-languages that have been extended to include constructs that control document processing.

6. Which characteristics of programming languages do you think are the most important and why?

The most important is Reliability. Reliability consists of Type Checking, Exception Handling, Aliasing and Readability and Writability. A programming language needs to check whether the type of the parameters passed and expected are compatible or not. If it is not compatible and it is not checked, the output will be a nonsense. On the other hand, if a program meets a run-time error, it needs to be able to correct the error and resume its work (exception handling). A Language also need to be simple but at the same time orthogonal on a balanced scale. This is so that a program written in a certain language will be easy to maintain in case if there’s an error and also not confusing to other programmers in manners of education.

7. Java uses a semicolon to mark the end of all statements. What are the advantages for and against this design?

advantage of it is semicolon to mark the end of all statements is one good way to increase program readability, to end each statements and decrease program ambigous. the disadvantage of it is without this semicolon, the compiler will be error. and adding extra semicolon unintentionally will terminate a unfinished statement and doesn't showing syntax error, which in large program cause programmer need to difficultly find out what cause the logical problem.

10. Make a comparative study of the cost of software and hardware!

software and hardware cost are now variative depending on
manufacturing cost

the use (for personal, or bussines company use)
development cost
brand of the software

there are a lot of hardware that sold cheap nowdays, large number of manufacturer and brands cause brands to compete each other. But some of hardware are exclusive and expensive for example database server for large worldwide company.
Some personal software sold cheap nowdays, easy access and purchasing lower the
cost, but some expensive software are for spesific purpose and developed by

15. Name some languages which use preprocessor directives and some which don’t.

What are the advantages and disadvantages of preprocessor directives ?
Some languages that use preprocessor directives : C, C++ and C#
Advantages of preprocessor directives :

1. Reduces length of the code and time spent for writing the codes
2. Increases execution speed of the program
3. Increases Readability and Writability of the program
Disadvantages :
1. Increases size of the program
2. Unlike functions, macros can only return the last value processed
3. Causes an error since there’s no variable type check, unlike functions