Programming Paradigms

Following is my analysis of four different programming paradigms, recognized by the computer science: Imperative Paradigm, Declarative Paradigm, Functional Paradigm and Object-oriented paradigm. [Read more…]

OOP Complexity

Despite its many benefits, some view the OOP paradigm as often being unnecessarily complicated, with a sizeable hardware footprint, and generally requiring more elaborate preparatory planning. While I cannot offer any specific tips or techniques that may be used to minimize or eliminate some of these inherent OOP disadvantages, I strongly believe that at the end of the day, it’s the application architecture and proper planning, that may come to rescue. Let me explain… [Read more…]

Should we be over-stressing code reusability?

The greater propensity for code reusability is often put forward as a key advantage of OOP over Structured programming. Some however think that this aspect of OOP is overhyped, and that in fact a number of software design problems may arise from over-stressing code reusability. And I am sharing the sentiment. Let’s look at this issue a bit… [Read more…]

How does Object-Oriented Programming compare to Structured Programming?

In this article, I’ll compare object-oriented programming (OOP) to structured programming. I will do my best to describe the key concepts of OOP and structured programming languages and described this somewhat complex and technical topic using words and terms that the average individual (someone without professional training in the subject area) can understand so that they may comprehend the issue to some degree. [Read more…]

Metrics for assessing or comparing algorithms

Couple things come to mind when thinking about metrics and comparison of algorithms. As we all know, the efficiency of an algorithm can be deduced from the resource usage, thus comparing the scripts quantitatively as oppose to qualitatively, would probably be an easier task. And that’s natural only because quantitatively we can look at numerous data points that can provide insights into quantities of computation resources consumed during execution of an algorithm. In this article, I’ll concentrate mainly on the Quantitative Metrics

[Read more…]

Sub-optimal algorithms and program code

Some argue that achieving better programmatic and resource use efficiency requires programmers to spend time working out ways to make their algorithms, and implementations of these, more efficient. However, programmer time is expensive, so there is a tendency towards expediency and putting out non-optimal program code because no-one is willing to spend the extra time (and thus money) on optimization, as long as the current code works, albeit sub-optimally. I agree with these sentiments and following is my view on the issue… [Read more…]

Algorithm Qualities

How do you get from your home to your office, or the nearest store? If you live in a city, the answer may be complicated, and it might depend on whether you are walking, driving, riding a bicycle or taking public transportation. Even for one mode of transportation, there might be several possible ways, some of which are faster or more reliable than others. Deciding how to make this journey is analogous to deciding how to design an algorithm.

[Read more…]

Pseudocode Excercise (number division algorithm)

Recently I’ve got asked, how would I pseudocode the following number division exercise:

  • Search a string of at least five numbers (for example, 37540).
  • Identify all of the substrings that form numbers that are divisible by 3.
  • For example, applying the algorithm on the string 37540 should produce the following substrings: 0; 3; 54; 75; 375; 540

[Read more…]