12 SDD‎ > ‎

Stem 4.0 Programming Paradigms

What is a Paradigm?

A philosophical or theoretical framework. A different approach under which laws, theories and generalisations are produced.

  • Theories, laws and generalisations are developed in support of the initial paradigm.
  • Eventually, practical and workable techniques emerge for operating under the new paradigm. 
  • In this chapter, we consider and investigate different programming paradigms, why they came into existence and what problems they aim to solve. 
  • We concentrate on the major features of two paradigms – the logic and object oriented paradigms. 
  • We learn to write some simple source code using languages based on each paradigm as we assess the strengths (and weaknesses) of each. We also compare the logical, object oriented and imperative paradigms in terms of appropriate use and programmer’s productivity.

Solving Problems

Many problems can be solved using a variety of different strategies. 

Some of these strategies and techniques will be useful for the solution of various other problems; some may be of little further use. 

Different paradigms provide a structure for solving problems from different angles. 

Lateral thinking involves generating new associations using seemingly unrelated areas, and using these associations in new and original ways. 

A paradigm is a description of the new association so it can be formalised and reused.



GROUP TASK Activity and Discussion

Everyone in the class is to calculate the sum of the first 1000 counting numbers e.g. 1 + 2 + 3 +… + 1000. 

Discuss all the different techniques used to accomplish this task. Is any one technique the best? What makes one technique better than another?