Archive for March, 2013

Concepts of Programming Languages – Chapter 2

Tuesday, March 12th, 2013

Lecturer : Mr. Tri Djoko Wahjono, Ir. M.Sc

Review Questions

1. In what year was Plankalkül designed? In what year was that design published?

– It was designed in 1943 and then published in 1972.

3. What does Plankalkül means?

It basically means calculus  programs.

7. Who developed the Speedcoding system for the IBM 701?

It was developed by John Backus.

12. Which version of FORTRAN was the first to have any sort of dynamic variables?

The first version that have dynamic variables is Fortran IV.

13. Which version of Fortran was the first to have character string handling?

–  The first version that have character string handling is Fortran 77.

19. What was the goal for developing C?

The goal for developing C is to make a suitable language for a very wide variety of applications.

18. What two professional organizations together designed ALGOL 60?

The two professional organizations that designed ALGOL 60 are ACM & GAMM.

21. What language was designed to describe the syntax of ALGOL 60?

BNF (Backus-Naur form).
22. On what language was COBOL based?

It was based on ALGOL 60.

23. In what year did the COBOL design process begin?

The design process begin in 1959.

28. PL/I was designed to replace what two language?

It was designed to replace FORTRAN & COBOL languages.

33. What language introduced the “case” statement?

ALGOL-W introduced the “case” statement.

46. What is primary application for Objective-C?

The primary application for Pbjective-C is Objective-C 2.0.

47. What language designer worked on both C and Go?

Ken Thompson worked on both C and Go.

49. What was the first application for Java?

The first application for java is Sun Microsystems.

54. For what application area is JavaScript most widely used?

You will find it most widely used in a web browser.

64. What is primary platform on which C# is used?

The primary platform C# used is .NET.

Problem Sets

1. What features of FORTRAN IV do you think would have had the greatest influence on Java if the Java designers had been familiar with FORTRAN?

The logical loop control statement, and an “if” statement with optional “else” statement clause.

6. Make an educated guess as to the most common syntax error in C programs.

The most common mistake is probably the lack of a semicolon (;) and the closing bracket of a statement (}).

8. Describe in detail the two most important reasons, in your opinion, why Speedcoding did not become a very widely used language.

In my own opinion, it is mainly because the fact that Speedcoding took a lot of space on the disc, therefore make it ineffective.

13. What is the primary reason why C became more widely used than Fortran?

Mainly because C is faster than Fortran, and probably because C is more readable too.

15. Are there any non procedural programming languages other than Prolog?

Yes, four languages: Fortran, C++, COBOL, ALGOL.

16. What is your opinion of the argument that languages that are too complex are too dangerous to use, and we should therefore keep all languages small and simple?

– I think it’s up to the programmer they want to use a simple or a complex, but many will choose simple because it is more readable and more easy to spot a mistake.

25. Give a brief general description of the Java servlet.

Java servlet is a Java programming language class used to extend the capabilities of a server. Eventhought servlets can be used to respond any types of requests, they are more commonly used to extend the applications hosted by web servers, so they can be thought of as Java Applets that run on servers instead of on web browsers.

Concept of Programming Language : Chapter 1

Monday, March 4th, 2013

Lecturer: Mr. Tri Djoko Wahjono, Ir, M.Sc.

Review Questions:

1. Why is it useful for programmers to have some background in language design, even though he/she may never actually design a programming language?

Because the programmer that learn the background of language design can increase his/her capacity to express ideas, improving the programmer background for choosing appropriate language, increase the abilities to learn a new language, to have a much better understanding of the significance of implementation, better use of language that are already known by the programmer, and also overall advancement in computing.

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

FORTRAN.

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

COBOL.

6. In what language is most of UNIX written?

C language.
7. What is the disadvantages of having too many features in a languages?
Reduce the limitation in software development.
13. What does it means for a program to be reliable?
It means the program perform the specifications under all condition.
15. What is aliasing?
Having two or more distinct names that can be used to access the same memory cell.
23. What language was the first to support the three fundamental features of object-oriented programming?
Smalltalk.
26. Which produces faster program execution, a compiler or a pure interpreter?
Compiler.

30. What are the advantages of using Borland JBuilder?

Borland JBuilder is a programming environment that provides an integrated compiler, editor, debugger, and file system for Java development, where all four are accessed through a graphical interface. JBuilder is a complex and powerful system for creating Java software.

Problem Solving:

1. Do you believe that solving problem in a particular algorithmic step requires programming language skill? Support your opinion.
Nope. Everybody solved a basic or complex problem every single time in their whole life. Algorithm is almost exactly the same, the only problem is you have to learn the language. Which can be found easily in the net!. Nowadays you don’t have to be genius to be programmers, you basically just need 2 things. A computer and Internet.
2. Who is said to be the first programmer in human history?
Ada Lovelace according to Wikipedia.com.
3. What are the disadvantages of multiple programming languages?
The programmer can get confused with a lot of syntax that usually is different from one another.
6. Which characteristic of programming languages do you think are the most important and why?
SIMPLICITY, mainly because it includes all the criteria of the programming languages (READABILITY, WRITABILITY, and RELIABILITY).
7. Java uses a semicolon to mark the end of all statements. What arege the advantages for and against this design?
The advantage is helping the programmer to determine the end of the code easily. The disadvantage is an error everytime a programmer is not thorough enough.
10. Make a comparative study of the cost of software and hardware!
In early 2000’s, a single hardware cost much more higher than a software, but in 2010 up to now, a single software can cost more than some of the expensive hardware.