Monday, September 29, 2014

Assignment #1 - Programming Language (Chapter 1)

Selamat datang diblog ini, saya buat blog ini karena dan atas dasar permintaan dari dosen saya yang terkeren, terkece dan ter-terlainnya "TRI DJOKO WAHJONO", yang mengajar mata kuliah Konsep Bahasa Pemrograman di Binus University di kampus yang keren dan eklusif Alam Sutera - Jakarta

Untuk kali ini saya akan menjawab :
Assignment #1 - Chapter 1 Introduction dari Sebesta

------------------------------------------------------------------------------------------------------------

6. In What Language is most of UNIX written?
  • C
7. What is the disadvantage of having to many feature in language ?
  • A disadvantage of having too many features is reduced readability. 
  • Lead to an abuse of some, disuse of others and even an accidental use of an unknown feature. 
  • Awareness of a wider variety of programming language features can reduce limitations in software development.
8. How can user-defined operator overloading harm the readability of a program?
  • because the built in operator has the precision and compiler knows all the precision so it can  works on that precision. Users can create their own operator but the compiler doesn't  come to know how to make precision of this operator. Therefore we don’t use user-defined operator because it can harm the readability
9. What is one example of a lack of orthogonality  in the design of C?
  •  A struct can be returned from a function but an array cannot.
10.What language used orthogonality as primary design critrerion?
  • LISP is a functional language is one in which computations are made primarily by applying function to given program.
------------------------------------------------------------------------------------------------------------
Problem Set :
------------------------------------------------------------------------------------------------------------
6. What common programming language statement, in your opinion, is most detrimental to readability?
  • Because i just learning how to use C programming (right now still nothing), so i still don't find any detrimental to readability
7. Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design
  • The argument for using the right brace to close all compounds is simplicity, a right brace always terminates a compound. The argument against it is that when you see a right brace in a program, the location of its matching left brace is not always obvious, in part because all multiple-statement control constructs end with a right brace.
8.Many language distinguish between uppercase and lowercase letter in user-defined names. What are the pros and cons of this design decision ?
  • the pros usually can make a really tidy program, meanwhile the cons sometimes it will create a big mistake if we didn’t thorough. Uppercase and lowercase in this case used to; (1) So that variable identifiers may look different than identifiers that are names for constants, such as the convention of using uppercase for constant names and using lowercase for variable names in C, and; (2) so that catenated words as names can have their first letter distinguished, as in TotalWords. (Some think it is better to include a connector, such as underscore.)
9. Explain the different aspects of the cost of a programming language!
  • The different aspects of the cost of programming languages lies in their complexities. The data structure and the data types is another different aspects.
10. What are the arguments for writing efficient programs even though hardware is relative inexpensive?
  • One of the main arguments is that regardless of the cost of hardware, it is not free. Why write a program that executes slower than is necessary. Furthermore, the difference between a well-written efficient program and one that is poorly written can be a factor of two or three. In many other fields of endeavor, the difference between a good job and a poor job may be 10 or 20 percent. In programming, the difference is much greater. 
------------------------------------------------------------------------------------------------------------
Bonus Question :
------------------------------------------------------------------------------------------------------------
1. Perbedaan antara imperative dan procedural language !
  • Pemrograman imperatif - mendefinisikan komputasi sebagai pernyataan yang dapat mengubah keadaan program 
  • Pemrograman prosedural - menentukan langkah-langkah program yang harus dilakukan untuk mencapai keadaan yang diinginkan.

-Dedi Sutomo-
-1801376582-