Huwebes, Hunyo 23, 2011

cos7 chapter 1 notes

Programming Languages

  • Programming languages are languages.
  • Hundreds of programming languages have been designed and implemented on hundreds of computer systems.
  • Most programming languages were implemented on only a small number of systems.
  • A few dozen programming languages have been implemented on most contemporary systems.
  • Almost any program can be written in almost any computer language.

Reasons for Studying Concepts of Programming Languages

  • 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 are already known.
  • Overall advancement of computing.

Programming Domains

Scientific Application

FORTRAN, one of the first high level languages, was designed for scientific work, and is still the most efficient language for scientific and engineering applications.

Business Application

COBOL, one of the first high level languages, was designed for business use, and is still widely used for business applications.

Artificial intelligence

Systems Programming

Web Software

Language Evaluation Category

readability

the quality of written language that makes it easy to read and understand.

  • COBOL programs are typically very readable: e.g.,

MULTIPLY UNIT-COST BY QUANTITY GIVING TOTAL-COST

  • APL programs are typically very unreadable: e.g.,

(?R?R?.×R)/R?1??R

(This expression, from Wikipedia, gives all the prime numbers less than R.

  • The C language is quite flexible; it can be used to write readable programs, e.g.,

· int main (void) {

· printf ("Hello, world!");

· return EXIT_SUCCESS;

· }

or unreadable programs, e.g.,

main(v,c)char**c;{for(v[c++]="Hello, world!\n)";

(!!c)[*c]&&(v--||--c&&execlp(*c,*c,c[!!c]+!!c,!c));

**c=!c)write(!!*c,*c,!!**c);}

(Both programs do the same thing - display the message "Hello, world!".)

writability

the quality of written language that makes it easy to express ideas.

reliability

An attribute of any system that consistently produces the same results, preferably meeting or exceeding its specifications.

Reliability can relate to how the language handles errors: for example, if an array is indexed out of bounds (i.e., the array contains 10 items, and item 20 is referenced),

  • C will access whatever happens to be at the corresponding location in memory - sometimes just using garbage data, and sometimes crashing the program.
  • Perl will either use NULL as the value, or extend the array.
  • Java will throw an Out Of Bounds exception.

Java is more reliable, but less efficient, than C.

COST

Influences on Language Design

1.Computer architecture

http://www.comsci.us/languages/images/vonneumann.gif

2. Program Methodologies

Language Categories

imperative language

A programming language which expresses the steps to solve a problem.

functional programming

A programming paradigm which models a computational problem as a collection of mathematical functions, each with an input (domain) and an result (range).

Tucker and Noonan, Programming Languages

logic programming

A programming paradigm which models a problem by declaring what outcome the program should accomplish, rather than how it should be accomplished.

Tucker and Noonan, Programming Languages

object-oriented programming

A style of programming that defines data as objects with attributes and methods that are applied to those objects, and which can be inherited by other objects.

  • The most common programming languages, C, Java, Pascal, FORTRAN, COBOL, PHP, Perl, etc., are all imperative languages.
  • Lisp and its dialects, such as Common Lisp and Scheme, are the most common functional languages.
  • Prolog is the most common logic programming language.

Language Design Trade-offs

Implementation Methods

Compilation

token

An atomic symbol of the source program.

compiler

A translator from a high level language to a low level language.

linker

A program which combines two or more object modules into a single object module or into an executable file.

http://www.comsci.us/languages/images/compiler.gif

http://www.comsci.us/languages/images/linker.gif

Pure interpretation

interpreter

A program expressed in one language which executes programs expressed in another language.

http://www.comsci.us/languages/images/interpreter.gif

http://www.comsci.us/languages/images/hybrid2.gif

http://www.comsci.us/languages/images/emulator.gif

Java uses this model; a program is first compiled to a disk file with the javac compiler, and then can be executed by the Java Virtual Machine (JVM emulator.

preprocessor

A language processor that is used to translate and perform other types of manipulations of a program before it is compiled or assembled.

Prof. Croker's Glossary of Object-Oriented Terms

http://www.comsci.us/languages/images/preprocessor.gif

  • A preprocessor is strictly a textual processor, incorporating text from another file, replacing textual elements with new text, or deleting passages of text.
  • C and C++ depend heavily on a preprocessor; almost all C and C++ programs make use of preprocessor statements.
  • The PL/I language also has a preprocessor.

Programming Environments

Three programming environments are in use today:

  1. The command line environment, which typically involves creating a source code file using a text editor, followed by a compiler and a linker invoked from the command console. In many cases, the compiler and linker are invoked together.
  2. An Integrated Design Environment (IDE), which combines an editor, a compiler, and linker into a single application in which a program can be written, compiled, linked, and run. A debugger is usually included.
  3. A Visual Design Environment, which extends an IDE so that GUI components can be incorporated graphically with a mouse. Blocks of code are generated automatically by the visual environment as widgets are manipulated with the mouse.

Huwebes, Hunyo 16, 2011

Dance terms PE3

DANCE TERMS
“Abrasete” - Girl at the right side, holds R arm of partner with her L hand, free hands down at the sides. This term is of Spanish origin and is used in Rigodon and in other dances.
Arms in Lateral Position - Both arms are at one side, either sideward right or left. This may be done at soulder, chest, or waist level.
“Bilao” – To turn palms of hands up and down alternately, hands at waist level in front, elbows close to waist.
“Cabeceras” – When dancers are in square formation, the couples occupying the width of the hall are called “cabeceras” or head couples. This is of Spanish origin.
“Costados” – When dancers are in square formation, the couples occupying the length of the hall are called “costados” or side pairs. This is of Spanish origin.
Crossed Arms – Partners are facing each other or standing side by side, girl at the right of boy. They join their L hands together and their R hands together; either R over L or L over R hands.
Do-si-Do (“Dos-A-Dos”) The vis-à-vis (opposites) both advance forward, pass each other’s right (or left) side, step across to the right (or left), move backward without turning around pass each other’s left (or right) side to proper places. This is of foreign origin and is used in many Philippine dances.
“Hapay” – to flourish or offer a handkerchief, hat or glass of wine to somebody as a sign of invitation.
“Hayon-hayon” – To place one forearm in front and the other at the back of the waist. This is a Visayan term.
“Jaleo” – Partners turn once around clockwise (with R elbows almost touching) or counterclockwise (with L elbows almost touching) using walking or any kind of dance step. The hands near each other are on waists. This is a Tagalog term but of Spanish origin.
“Kumintang” – Moving the hand from the wrist either in a clockwise or counterclockwise direction. This is an Ilocano term.
“Masiwak” – To turn the hand from the wrist half-way clockwise then raise and lower wrist once or twice. This is an Ibanag term.
“Patay” – To bend the head downward and to support the forehead with the R (L) forearm or with the crook of the R (L) elbow while the L (R) hand supports lightly the palm of the R (L) hand. This is usually done with the L (R) foot pointing in rear and knees slightly bent. This is an Ilocano term and the movement is commonly found in Ilocano dances.
“ Salok” – To swing the arm downward-upward passing in front of the body as if scooping, the trunk is bent forward following the movement of the arm doing the “salok”. This is a Tagalog term.
“Saludo” – Parners bow to each other, to the audience, opposite dancers, or to the neighbors with fee together. This term is of Spanish origin and is used in almost all Philippine dances.
“Sarok” (or “Saroc”) – Cross the R (or L) foot in front of the L (or R), bend the body slightly forward and cross the hands (forearms) down in front with the R (or L) hand (forearm) over the L (or R). This is a Visayan term.


I found this in the internet. Mr. Salaño didn't gave us the definitions so I tried to find it and only got few. Hope it helps.

Martes, Hunyo 14, 2011

Ae3aa blogging site

Hey, guys and gals! I'm informing you of our own site for home works, school activities and announcements. Thanks for visiting!