Tuesday, 5 March 2013

Chapter 1



Concept of Programming Languages by Robert W. Sebesta Answer

Review Questions

1. Why is it useful for a programmer to have some background in language design, even though he or she may never actually design a programming language ?
Having some background in language design will help a programmer to learn about new programming language easily and make the programmer be able to select the most suitable language for particular project .

2. How can knowledge of programming language characteristics benefit the whole computing community ?
By knowing the fundamentals of a programming language, a programmer will know what happen in computer underneath the hood and making the programmer  to have an ability to understand any new programming language. This will give an insight on what functionality of certain languages works well and what doesn’t work well.

3. What programming language has dominated scientific computing over the past 50 years ?
FORTRAN is the language used in past 50 years for scientific applications.

4. What programming language has dominated business applications over the past 50 years ?
COBOL is the language used in past 50 years for business applications.

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

6. In what language is most of UNIX written ?
C programming language.

7. What is the disadvantage of having too many features in a language ?
It will reduce the software development itself, since the programmers will not have a full control to the language.

8. How can user-defined operator overloading harm the readibility of a program ?
User-defined operator overloading can harm the readability in case that user doesn’t realize the difference in operands and a possible confusion between functions of an operator.

9. What is one example of a lack of orthogonality in the design of C ?
For example of the lack of orthogonality in C is that C has 2 types of structured data types, they are array and struct.

10. What language used orthogonality as a primary design criterion ?
ALGOL 68.

11. What primitive control statement is used to build more complicated control statements in languages that lack them ?
GO TO is used to build more complicated control statements such as the FOR loop statement.

12. What construct of a programming language provides process abstraction ?
The use of a subprogram to implement a sort algorithm that is required several times in a program. Without the subprogram, the algorithm would need to be copy-pasted at all places it need to be and thus making the code longer and harder to understand and read.

13. What does it mean for a program to be reliable ?
A program is said reliable if and only if it performs its normal function specified under all conditions including good memory management that means there will be no memory leak.

14. Why is type checking the parameters of a subprogram important ?
Because parameters of a subprogram is like a command-line arguments that means if the paremeter is wrong, it will make the program error or not run properly. Also it is possible for a subprogram to receive a type of variable that is different from what is expected that can make an error too.

15. What is aliasing ?
Aliasing is having two or more distinct name to access the same memory cell. It is considered dangerous feature. For example, assigning two pointers with different name into one variable. In some languages, aliasing is used to overcome deficiencies in the language’s data abstraction facilities.

Monday, 28 January 2013

Zen of Doing

"Move and the way will open."
- Zen and The Art of Happiness

You know that you should exercise, and eat lots of veggies and less fried, salty and sweet foods.
But knowing something and actually doing it are two very different things.

You know you should stop procrastinating. You know you should watch less TV or go to social sites (or news sites, or your email program) less often. You know you should be writing, or learning that language you’ve always wanted to learn, or practicing guitar, or decluttering your house. Knowing isn’t the problem. It’s the doing that gets us every time.

Wednesday, 16 January 2013

Chapter 15


Discovering Computers 2011 : Living in a Digital World Answer

True/False

1.   True
2.   False
3.   True 
4.   True
5.   True
6.   False
7.   True
8.   True
9.   True
10. True

Chapter 14


Discovering Computers 2011 : Living in a Digital World Answer

True/False

1.   True
2.   False
3.   False
4.   True
5.   False
6.   False
7.   True
8.   True
9.   True
10. True

Chapter 13


Discovering Computers 2011 : Living in a Digital World Answer

True/False

1.   True
2.   True
3.   True
4.   True
5.   True
6.   False
7.   False
8.   True
9.   False
10. False

Chapter 12


Discovering Computers 2011 : Living in a Digital World Answer

True/False


1. False
2. True 
3. False 
4. False 
5. False 
6. True
7. False
8. False
9. True
10.True
11.False


Chapter 11


Discovering Computers 2011 : Living in a Digital World Answer

True/False


1.  True 
2.  True 
3.  False 
4.  True 
5.  False 
6.  True 
7.  True
8.  True
9.  False
10.False
11.True
12.False