Principles of Software Engineering

software_principles_techhyme

The following are some of the major principles in the software engineering discipline that should be used to develop software;

1. PRINCIPLE OF QUALITY

The first and foremost principle of software engineering is principle of high quality. The software Team should try to make high quality software. Quality depends upon the reliability of software.

2. PRINCIPLE OF MODULARITY

A big problem must be divided into smaller sub problems called as modules. These modules must be separate from each other. There should be provision to later on interconnect these modules.

Modular = composed of modules (simpler pieces)

Benefit of modularity: allows one to deal with details of each module in isolation and to ignore details when looking at all modules and their relationships.

Goals of modularity:

The major goals of modularity are:

Decomposability: divide and conquer: break into sub problems and tackle each part separately.

Composability: starting bottom up from elementary components and composing the full system, e.g. automobile manufacture. Modules must have high cohesion and low coupling.

  • Cohesion-an internal property of a module. All the elements of a module must be related strongly. They should be good reasons that they are all together in the same module.
  • coupling-a characteristic of the module’s relationships to other modules.

This is the measure of interdependence of 2 modules. If 2 modules depend on each other heavily, they have high coupling. We would like modules to be more self contained (to have low coupling). High cohesion and low coupling means we can look at modules as black boxes in a big picture view is an Example of separation of concerns.

3. PRINCIPLE OF RIGOR AND FORMALITY

Software development is a creative activity. But structure is needed as well. Rigor means being very thorough, paying attention to detail. Formality is the highest degree of rigor.

Formality requires the software process to be driven and evaluated by mathematical laws. Obviously programming is an activity requiring both creativity and rigor. The software development process also needs to be controlled rigorously.

4. PRINCIPLE OF SEPARATION OF CONCERNS

Separation of concerns means to deal with different aspects of a problem separately. There are several ways that concerns may be separated. First, you can separate them in time. Let’s say that a program must accomplish 4 things sequentially. One might separate the project into 4 pieces.

Another way to separate concerns is through qualities. Suppose that a software project must  possess the qualities of correctness and efficiency. You could first deal with the issue of correctness and establish that the code is correct. Then you could restructure that code to improve its efficiency.

Another way to separate concerns is with different views. One view of how a piece of software works is to examine the flow of data from one component to another. Another view is to concentrate on the flow of control that governs how different activities are synchronized. Both views help us to understand the system, although neither one gives a complete picture of what is going on by itself. Lastly, we may decide to separate our concerns by parts. Dividing a complex system into simpler pieces called modules.

5. PRINCIPLE OF ABSTRACTION

Abstraction is a process where we identify important aspects of a phenomenon and ignore its details. This is a powerful technique for mastering complexity. Programming is full of abstractions. We ignore the details of how numbers are represented as bits in the hardware. We ignore the details of the machine language when we use higher level languages such as Java. We use classes in Java and deal with the important behaviors of the class and ignore how the individual methods work.

6. PRINCIPLE OF ANTICIPATION OF CHANGE

This is the ability of software to evolve. What causes software to change? Changed/updated requirements user feedback. When software is written to be reusable, it is easier to adapt to change.

7. PRINCIPLE OF GENERALITY

Generality: solve the problem behind the apparent problem if you make your code more general, perhaps you can reuse it in another project. Generality could be costly: the general problem may be harder to solve (algorithm, speed of execution, memory requirements, development time) than special case at hand.

8. PRINCIPLE OF INCREMENTALITY

Incrementality describes a process that proceeds in a stepwise fashion, in increments. The desired goal is reached by successively closer approximations to it. One way of applying the incrementality principle is to identify subsets of an application that may be developed and delivered to customers to get early feedback. We can also add performance incrementally. Many beginning programmers write too much code before getting any of it to work. They do not follow the incrementality principle.

9. PRINCIPLE OF ENCAPSULATION

The idea behind encapsulation is to hide the data and functionality within a single entity so as to cover the implementation details. This concept is mostly supported by data centric and object oriented kind of programming languages.

10. PRINCIPLE OF UNIFORMITY

Try to make all the modules similar to each other. Similar in the sense of size and total functionality. Try to use same variable names every time you make use of a data element in different modules.

11. PRINCIPLE OF COMPLETENESS

The software engineering must keep the track of all the requirements of user. The software should be complete in itself that is it should convert all the functional and non functional requirements to coded form.

Leave a Reply