paradigm

What is programming?

·         The designing, scheduling, or planning of a program, as in broadcasting.
·         The writing of a computer program.
·         Telling a computer how to do certain things by giving it instructions.
·         These instructions are called programs.
·         A person who writes instructions is a computer programmer.
·         These instructions come in different languages; they are called programming languages
 http://www.emocutez.com
What is paradigm?

·         One that serves as a pattern or model.
·         A set or list of all the inflectional forms of a word or of one of its grammatical categories: the paradigm of an irregular verb.
·         A set of assumptions, concepts, values, and practices that constitutes a way of viewing reality for the community that shares them, especially in an intellectual discipline.

What is programming paradigm?

·         Fundamental style of computer programming. (Compare with a methodology, which is a style of solving specific software engineering problems.)
·         Paradigms differ in the concepts and abstractions used to represent the elements of a program (such as objects, functions, variables, constraints, etc.) and the steps that compose a computation (assignment, evaluation, continuations, data flows, etc.).

Explain the languages evaluation criteria above in programming paradigm context.

Readability :  the ease with which programs can be read and understood
Writability :  the ease with which a language can be used to create programs
Reliability   :  conformance to specifications (i.e., performs to its specifications)
Cost         :  the ultimate total cost
Portability      : the ease with which programs can be moved from one implementation to
                           another

Ø  Readability
v  Overall simplicity
v  Too many features is bad (large learning curve)
v  Too few features is bad (e.g., assembly language)
v  Multiplicity of features is bad (more than one way to do something) all do (basically) the same thing.
v  Example :
ü      count = count + 1;  count += 1;  count++;  ++ count;
v  Operator Overloading
ü      can reduce readability if users overload too much
v  Regularity (rules with no exceptions) is good.

*        Orthogonality
·                A small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language.
·                every possible combination of primitives is legal and meaningful.
·                example:
§  four primitive types:  int, float, double, char
§  two type operators:  array, pointer
·                type operators can be applied to themselves and the primitives.
·                if did not allow pointers to point to arrays, would limit the possible data structures.
·                Makes the language easy to learn and read
·                Meaning is context independent
·                A relatively small set of primitive constructs can be combined in a relatively small number of ways
·                Every possible combination is legal
·                Lack of orthogonality leads to exceptions to rules

Ø  Writability
v   a measure of how easily a language can be used to create programs for a chosen problem domain.
v   must compare language writability in context of target problem domain
v   COBOL and Fortran are better for different domains
v   Factors:
§  Simplicity and orthogonality
ü large languages hard to understand and use correctly
ü better to have small number of primitive constructs and consistent set of rules (orthogonality)
ü too much orthogonality:  anything goes; hard to catch mistakes
§  Support for abstraction
ü ability to hide detail
ü two areas of abstraction:  process and data
ü process:  subprograms and modules
ü data:  struct’s, records, objects
§  Expressivity
ü shortcuts (x++ instead of x = x + 1;)

Ø  Reliability
v  A reliable program performs to its specifications under all conditions.
v  Factors:
*  Type checking
*  Exception handling
§  present in Ada, C++, Java, not in C or Fortran
*  Aliasing
§  two variables point to same memory (thing pointers). 
§  dangerous
*  Readability and writability
§  writability:  can force unnatural approach
§  readability affects maintainability
http://www.emocutez.com

Ø  Cost
v  Categories
·         Training programmers to use language (simplicity and orthogonality)
·         Writing programs (writability and appropriateness for the problem)
·         Compiling programs (speed, accuracy, etc.)
·         Executing programs (efficiency)
*      compile time vs optimization
·         Language implementation system (Java is free; Ada originally expensive)
·         Reliability
·         Maintaining programs (readability)

v  Other Categories:
·         portability
·         generality (good for many problem domains)
·         well-definedness
v  Most important Categories:
·         program development
·         maintenance
·         reliability
v  these depend on readability and writability
 http://www.emocutez.com






No comments:

Post a Comment

Don’t find love, let love find you. That’s why it’s called falling in love, because you don’t force yourself to fall, you just fall. :)

Copyright © Noor Atikah Ramli Designed by azhafizah.com