Tuesday, 26 February 2013

Interpreter vs Compiler

By Raul Bernardino

Introduction:
[1] In the computing field, the commands or instructions which are given by the users are normally use a high level language, whereas the computer machines will only  understand the instructions in the binary formats.  The computer language is known as machine language. The sole purpose of the compiler and interpreter is to convert the user high level language into a machine level language so that it makes the computer understand and executed users’ instructions.

 [2] The translation from high level to a low level machine language calls translator. The translator will be translating all identifier of high level collection into the machine language. The translator act similar to secondary generation of assembler, however, it does not do a compiling.

The assembler uses to compile the machine instructions into short sequence of activities in one single file. The assembler is compiling the instructions, calls compilers.
The other translator calls interpreter. This interpreter is doing an execution of the instructions of the program from high level generation without translating into the machine language.

There would be more delay on interpreting instructions from high level and executing compare to transiting or compiling into low level of programming and execute.

[3] Below diagram shows the compilation and interpretation:


By implementing these two distinctions of the interpreting and compiling, it has its own merits and weakness. If we are using an interpreting mode e.g. the web animation, it will be taking further delay of displaying in other end of the machine. It is because the source codes are in different location. Meanwhile, compiling web animation the source code will be going with the web site, however developer have to think of how it can be display in the far end machine while he or she have no idea what type machine is in the far end. Maybe she or he the developer has some assumption of the type machines. But it is unrealistic. Therefore, more developer are using interpreting mode today.

[4] Why is that most of developer are using interpreter mode in design compare to compiler? There are several reasons as follow:

The Interpreter:
  1. Easier to build an interactive development of the environments
  2. Easy to execute the instructions codes which are they are executed statement by statement
  3. Become a port to different the OSs and processor.
  4. The bytecode is portable to any system with an interpreter port.
  5. Bytecodes are tightly packed   
  6. The only weakness is boring performance
 The compiler:
  1. Compiling whole program in to the machine language
  2. Run in the specific operating system an processor
  3. Machine codes are not dense
  4. Run more faster

References:

[1] What are the differences between Compiler and Interpreter? [Internet]. Available from: http://readanddigest.com/what-are-the-differences-between-compiler-and-interpreter/ (Accessed:  6 November 2010)

[2] J. Glenn Brookshear, (2009) Computer science: An Overview. 10th Edition, Boston: Pearson Addison Wesley, Ch 6, P.282 and P.312

[3] What is the difference between compiler and interpreter? [Internet]. Available from:

http://stackoverflow.com/questions/3618074/what-is-the-difference-between-compiler-and-interpreter (Accessed:  6 November 2010)

[4] The difference between compiler and interpreter [internet].Available from: http://www.antlr.org/wiki/display/ANTLR3/The+difference+between+compilers+and+interpreters (Accessed:  6 November 2010)

 

Monday, 25 February 2013

Object Oriented Programming Languages


By Raul Bernardino

In the general, when we are developing system applications or computer programs with the object oriented or structured programming languages, we will meet several advantages and disadvantages. [1] Pascal and Assembler are examples of structured programming languages. Pascal is most popular uses to teach and helping students in the formal education. The structured programming language depends on the series of statements of the commands in which they are straight and cannot redirect to execute the statements in other area of the programming.

[2] If we compare the structured of the programming to the object oriented programming languages, the object oriented contains of the modular, which are can be reusable. As it’s a modular, it can be executed at several points, through-out the program. Moreover, it means, we do not need to rewrite the complexity of classes or functions. What we need to do, is to reuse them (modular). The popular object oriented languages are Java and C++.

The advantage of using structured programming:  It does not need to classes and complex functions. It is simply writing a straight forward piece of code, and totally depends on the purpose of having the program or application. We have to define program with a flexibility of creating function and procedures.

The disadvantage of using structure programming:  It will be taking up more time and energy to developing codes. We have to rewrite similar procedures or functions during programming code because it is not a reusable section. The procedure, function, and code are executing sequential. Therefore, you may found several similar codes repeatedly in the program. In short, we have to recreate same functions or procedures for same program.

The advantages to using object oriented programming languages: It consists of modular. It allows us to write a reusable piece of codes such as a function or a class, and it can be reuse multiple times in one program without to rewrite the whole process. This can save the developer much more time and effort in the development process. It can be distribute among the applications in the same platform which calls Application Program Interface (API). Some functions can be recalling from another program without recreate them.  In the short, create a program as an object oriented naturally comes with events, function, method or modular, procedures, and property.

The disadvantages of using an object oriented programming language: Probably one the disadvantage is full of complexity.

It is not recommended to use object oriented languages when developer is developing smaller or less complex programs or programs that are built to run on low powered computers, however it is recommend to use object oriented when it is more complex and programs or applications that runs in more powered computers.

[3] The object oriented language paradigm is reflecting to the human way of thinking and conceptualizing. Why is that, it is because in the object oriented language often use the exiting modular to it owns purposes of programming.
Talking about some keys concept of object oriented language, I can analogy them as a book.  

[4] Object: Gray Booch, (1991) define the object as “something you can do things to”. In this case, book is an object for us to read or write. Car is an object for us to use or drive.

[5] Function: the book can give us an answer or give us a reference of knowledge. The function in the object oriented is a program unit whereas we can call. It will be processing the inputs according to the function and it will return or giving an output or an answer to calling program unit.

Procedure: Who allow having or can read the book. How you get the book (buys it or borrows it). The book (control) is transferred to you to take over once you finished the reading you return to the owner. In this case procedure takes over the control and will return the result to the calling program unit once it processed.  

Event: It is a processing of reading and writing a book. An event is away for class to provide notification when something interest come about. 

Method: How you would like open or close the book. The Method is a collection of procedures in which contains a series of statements whereas to describe how the object is respond to the range on various event.

References:
[1] Janea Tyalor, Computers are Fun [internet].Available from: http://janeataylor.wordpress.com/2005/12/02/structured-vs-object-oriented-programming/ (Accessed: 5 November 2010)
[2] J. Glenn Brookshear, (2009) Computer science: An Overview. 10th Edition, Boston: Pearson Addison Wesley, Ch 6, P.281
[4] Booch, Grady. Object-Oriented Design with Applications. The Benjamin/Cummings Publishing Company, Inc. Redwood City, CA. 1991, P. 516 [internet]. Available from: http://www.umsl.edu/~sauterv/analysis/ooa.html#REF_1  (Accessed: 5 November 2010)
[5] Key Object-Oriented Concepts and how to use them in Visual C# [Internet]. Available from:

Thursday, 21 February 2013

Computer Language and Algorithm

By Raul Bernardino

Introduction: The nature of the algorithm is how details of the algorithm are represented. Brookshear, J. Glenn, (2009) “It is important to emphasize the distinction between an algorithm and its representation this is analogous to the distinction between a story and a book”. Every story by nature is an abstract and concept and book is a physical representation of the story itself. The book can be translated in to several different languages and format however, the story will be remaining the same.

[1]The distinction between algorithm and representation become a problem when we are trying to communicate the algorithms. For example converts the temperature of Celsius (C) into Fahrenheit (F). It is sufficient for a meteorologist that is F should be (9/5) C + 32, however for a layperson will be arguing that is uncertainty. Therefore, the layperson needs more details information of the description. The layperson may question on why is F= (9/5) C+32 and where this 9/5 and 32 are coming from?

[2] The description should be explained that there are five different meteorologists; they are Celsius(C), Reaumur(R), Kevin(K), Rankine(RK), and Fahrenheit(F).  They had different approach of scale range of measurement of the temperature degrees. In the case of Celsius was using 5 in scale range, Reaumur’s (R) 4 and Fahrenheit’s 9 and plus 32. In the short the differences of those three individuals are C: R: F equals to 5:4:9. On the zero degree point of view C=0o, R=0o, and F=32o

Brookshear,
J. Glenn, (2009) “The representation of an algorithm requires form of language”. Computer science approaches the problems by using well define set of building block. By setting up the precise definition during the building a block can remove the uncertainty. In this case the algorithm requires details, specifics, and establishes level of uniform. The primitive also have its own syntax and semantic. Syntax refer to a symbolic while semantic refer to the meaning of the build block. If an algorithm is expressed at the details level, the certainty have a program that suitable for machine. However it is boring to the high level language. 

[3] A pseudo-code is and algorithm system notation in which ideas is expressed informally. This pseudo-code is using at the early stage of program development in which is consist of syntax and semantic. The goal is to develop algorithm consistent and concise notation for representing semantic structure. While a formal programming language is one selective programming language to program the algorithms for solution. The examples of a formal programming language are program language C, program language assembler, program language Turbo Pascal etc. 

As any form of language is a set of valid sentences in which, we can also break into two valid things: syntax and semantics. The term syntax refers to grammatical structure while the term semantics refers to the meaning of the vocabulary and symbols which is arranging within that structure. In some cases, we can see that is the grammatical or syntactically valid does not mean sensible or semantically valid too.

[4] John R. Anderson (1995) defines this syntax and semantic in his book “Cognitive psychology and its implications" as, ‘Semantics- Grammatical rules for assigning meaning to a sentence. Syntax- grammatical rules for specifying correct word order and inflectional structure in a sentence’.
However, the semantics are an individual’s own interpretation of the meaning of a "sentence" based on their prior knowledge. For example sentence "Baby milk drinks" does not have a syntactic meaning, but through semantics most people would interpret it as meaning “Baby drinks milk

Four people have to walk through the bridge with several conditions: Andrew needs one minute (1’) to cross the bridge, Blake needs two minutes (2’), Johnson needs four minutes (4’), and Kelly needs eight minutes (8’), total time need in this exercise is fifteen minutes (15’) for all of them to cross the bridge, maximum number of people to walk through together is two, and every trip must with lantern.

The solution as follows:
1.     Andrew and Johnson go first  with lantern and result of time used 4’
2.     Andrew go back with lantern needs 1’ and result of time used 5’
3.     Andrew and Blake go with lantern need 2’ and result of time used 7’
4.     Andrew go back with lantern and result of time used 8’
5.     Andrew and Kelly last go with lantern need 8’ and result of time used for last movement is15’
6.     end;

Within a time period of 15 minutes all of them are managed to get their destination. Above steps is a pseudo-code to prepare code writings into any computer languages.

References:
[1 ] J. Glenn Brookshear, (2009) Computer science: An Overview. 10th Edition, Boston: Pearson Addison Wesley, Ch 5, P.224
[2] Celsius, Fahrenheit, Kelvin, Réaumur, and Rankine Temperature Conversion [Internet]. Available from:
 http://www.csgnetwork.com/tempconv.html (Accessed:  3 November 2010)
[3]  J. Glenn Brookshear, (2009) Computer science: An Overview. 10th Edition, Boston: Pearson Addison Wesley, Ch 5, P.228

[4] Syntax Vs. Semantics [Internet]. Available from: http://users.ecs.soton.ac.uk/harnad/Hypermail/Explaining.Mind96/0238.html (Accessed:  3 November 2010)




Wednesday, 20 February 2013

Program or Software Verification, Validation, and Tuning

By Raul Bernardino

Introduction:
Any electronic devices such as starting from refrigerators to electric shavers, ever-greater numbers of consumer goods are being computerized to provide additional benefits to the user. In the products lines, for instance cars, watches, mobile phones, Air Conditioners, and TV-sets, are now increasing their functionality in order to gain and fulfill the market demands. It is also has increased the complexity of the products. The software that powers these features is embedded and has to react in real-time to events from outside (e.g. activating a car air bag in case of an accident, auto drive cars, etc.).

An embedded system is a combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function as part of a larger system or product. Embedded software is software designed to perform a dedicated function as part of a larger (software) system. A real-time system is able to response to an external event within a given time.

Embedded systems form the by far the largest part of presently used computer systems. The class of embedded systems includes both, systems which are similar to the present Personal Computer (PC), and smallest systems with a minimal memory and calculator capacity. The development of software systems for such platforms makes by far higher demands than the development of general purpose systems for the use on PC and workstations. However, in this very area, progressive development techniques such as object-oriented design and implementation are only slowly gaining ground. Moreover, the common machine language is to enable machines or parts to work as it is designed can use Assembler the low level machine language, Turbo Pascal, turbo C, and most recently C++. The resulting deficits mainly affect the area of re-usability of existing solutions, and the verification and validation of embedded systems, respectively.

In my own opinion the program or software verification, validation, and tuning will be continuing exist in the future. Why is that, it is because there will be a lot of software applications and programs to be developed wherein to meet to the demands from the customers and business entities in particular. Therefore, system application in this case software needs to have a standard of validation, verification of the system in order to meet the customer needs or including satisfying business requirements. No matter in what approaches it would be, either it is manual approach or automatic approach.

[1]The modeling of Artificial Intelligent can be replaced all manual software testing. At this moment, the automatics algorithm test will be cost effective rather than manuals check in which inspects one by one steps of coding, logic, software development standard, errors detection and etc. [2],[3] The manual testing will be harder and time consuming. It will be using lot recourses (programmers and system analysts, -man power) and at the end it’s becoming an expensive cost.

In some cases, the manual approach of verification and validation still needed as far as those businesses are not on real-time decision making or real-time solution needs. Because the program will be taking a time to solve the problem by his/her owns algorithm and logic. Furthermore, it needs verification and validation test.

In the case above, I am thinking that, there would be no more work of art. What would happen is that, there will be having a lot of system analyst in which is to determine what model is precisely closer to the problem solution that the customer requires.

One of many examples is in Europe the [4]  ‘ESA PSS-05-0 describes the software engineering standards to be applied for all deliverable software implemented for the European Space Agency (ESA), either in-house or by industry’.

The Verification of the software
These are [5] ‘act of reviewing, inspecting, testing, checking, auditing, or otherwise establishing and documenting whether items, processes, services or documents conform to specified requirements’.
The verifier reviews, checks, and tests or audits all relate documents to conform all specified needs. If it is not meet according to what planned, then rework the whole process.

The Validation of the software
These are a processing of the [6] ‘system evaluation or component during, at the end of the development processes in which to determine whether they are satisfying the specified requirements’.
This is a part of appraiser to sign off the project of software development if the software is satisfying the needs otherwise reworks the parts that need to be fixed.

The Walkthrough of the software
[6] ‘A static analysis technique in which a designer or programmer leads members of the development team and other’. This is to allow the designer to check and recheck during developing code, make a comparator to the development standards, find internal errors or defects, and etc.


[7] Picture

The objective of verification and validation are to test the life-cycle of application in which to discover system defects and assess whether or not the system is usable in the operational environment.

REFERENCES:
  1. Shuvendu K. Lahiri and Shaz Qadeer (2007) Back to the Future Revisiting Precise Program Verification using SMT Solvers, Microsoft Research [internet]. Available from: http://research.microsoft.com/pubs/70462/tr-2007-88.pdf (Accessed: 30 October  2010)
  2.  Frank Hutter, Domagoj Babi´c, Holger H. Hoos, and Alan J. Hu, Department of Computer Science, University of British Columbia, Boosting Verification by Automatic Tuning of Decision Procedures [internet]. Available from: http://www.computer.org/portal/web/csdl/doi/10.1109/FAMCAD.2007.9 (Accessed: 30 October  2010)
  3.  Arthur Chargueraud, (2009), Formal Software Verification Through Characteristic Formulae [internet]. Available from: http://www.chargueraud.org/arthur/research/2009/cfg/cfg.pdf  (Accessed: 30 October  2010)
  4.  ESA Software Engineering Standards, ESA PSS-05-0 Issue 2, February 1991, [Internet]. Available from: ftp://ftp.estec.esa.nl/pub/wm/wme/bssc/PSS0510.pdf  (Accessed: 30 October  2010)
  5.  ANSI/ASQC A3-1978, Quality Systems Terminology [Internet]. Available from: ftp://ftp.estec.esa.nl/pub/wm/wme/bssc/PSS0510.pdf (Accessed: 30 October  2010)
  6.  IEEE Standard Glossary of Software Engineering Terminology, ANSI/IEEE Std 610.12-1990, [Internet]. Available from:  ftp://ftp.estec.esa.nl/pub/wm/wme/bssc/PSS0510.pdf (Accessed: 30 October  2010)
  7.  Software Engineering, Edition 6th, Chapter 19



Tuesday, 19 February 2013

Five Major Responsibilities for any OS


By Raul Bernardino
Introduction:
An operating system is a group of computer programs that coordinates all the activities among computer hardware devices. It is the first program loaded into the computer by a boot program and remains in memory at all times.  The operating system is a vital component of the system software in a computer system. Application programs usually require an operating system to function.  The three major OS responsibility are:
Boot a computer:  It is responsible to process the start or the restart the computer machine.
Device Management:  The management of devices is to control all peripheral devices which are plugged in the computer system and operating by giving them instructions into its own proper-language or interface. The soft application which knows how to operate each of the interfaces that is attached and integrated in the personal computer machine calls driver. The OS requires drivers for each of devices that are plugged into the computer machine.
Any new peripheral devices that are going to add or to plug, these devices drivers are required to install into the operating system in order to operate normally.  In other word, without soft application/drives, the operating system itself cannot communicate or operate the peripheral devices.  
The management of device is an essential part of operating system, because it is organizing all system devices on computer machine.
Provide user Interface: This can be a command lines or graphical user interface (GUI)
Job Management:  Any executing of the program in the computer system calls Job. The job management controls every orders and locking the time for each of programs to run. To simplifying in the operating system, it will begin with a program setup as a transition between the jobs. It can be a collection of the job in on a single batch without an interaction with the user. The batch processing systems, reads base on the First In First Out (FIFO). FIFO will be executing job in the queuing line.  
Far before today sophisticate OS, the IBM's job control language had developed in a decades. In a personal computer situation, batch file can be written to perform a sequence of jobs that can be scheduled to start at a given time. It’s also an essential part of operating system, simply because organize all application and program that are running on the system and it is including orders from user to execute.
Data Management: The management of the Data or file keeps track and retrieve of the information on the hard-disk, in the memory, and on the optical-storage devices. These files can be distinct by names or been grouped in the folders. The OS's file system knows where those data are located or stored physically on sectors of magnetic - disk and interact among soft - application and OS are through programming interface.  

This is a very good example of shells and kernel in the operating system. In Window very much use Graphic User Interface (GUI) to interact with user and Application Program Interface to interact with kernel.
No
OS Category
Criteria
Supported
Windows XP
Windows 7
1
Input / Output
To organize, execute devices and drivers and including files
Microsoft
 Intel Pentium III 600 MHz or higher processor
256 MB of RAM
15 GB hard drive
SVGA display adapter and Plug and Play monitor
Keyboard, mouse, or other pointing device
CD-ROM 12x of faster
Network adapter


Architecture:   32 bit      64 bit
Processor     :  1 GHz    1 GHz
Memory      :   1 GB      2 GB
Graphic       :  Directx9
HDD use     :     16 GB   20 GB
Optical        :       DVD media
2
Program Execution
Execute  and  terminate program and loaded to memory
Microsoft
Office 2007
Office 2007
3
Error Detection
Detect error, from keyboard, printers, while processing request from user
Microsoft
yes
yes
4
Resource Allocation
Manage the available recourses 
Microsoft
yes
yes
5
File Management
Hierarchical Filing SystemsNTFS,  FAT32,  FAT,  Ext2
MetadataPermissions, Size, Location, Attributes including Read, write, modify, rename, or even delete
Microsoft
Windows Explorer, Hard to search
Powerful Searching engine, easy to view and organize
6
Accounting
Setup profile for each users
Microsoft
One user  per log in
Multiple users log in at once
7
Security
Authentication, firewall, etc
Microsoft
Weak
Strong including Bit locker

Reference List: