Category: Software Engineering

Little Introduction To Software Testing

Software testing used to be one of the most underrated area in software development process. Indeed, it is not even covered at the undergraduate level at university (thanks BCS). This article provides an introduction into software testing. It covers: what software testing is, types of testing as well as what and when you should test?

Continue Reading

Software Estimation - Never Underestimate

I had a chance to get my hands on the Software Estimation - Demystifying the Black Art by Steve McConnell. It is a fantastic and well-written book. I thought I would share some of the key things I learnt. This article is the 1st part of a series of relatively short articles summing up the

Continue Reading

Factory

The factory is one of the most popular design patterns out there. It is used to simply the creation of the objects of different classes that inherit from a common super-class (or interface X) depending on some condition. The Recipe In order to create a factory for a class X: Create an XFactory class Add

Continue Reading

About Cohesion

Cohesion is a measure of the degree to which the elements of a module belong together. Yourdon & Constantine in Structured Design, 1979 In essence, cohesion is a measure of ensuring that one element (one class) has a single responsibility. Measuring cohesion is tricky (as pretty much everything else in SE). The metrics tend to

Continue Reading

Singleton

Singleton is also a very popular design pattern, although when not used appropriately it does become an anti- pattern. It is used when we need an object to be unique and easily accessible from all parts of the application e.g. database handler or loggers are frequently used. It is often considered an anti-pattern because is

Continue Reading

Callback

Callback design pattern allows us to avoid "freezing" the rest of the application if a method takes too long to return. It is very useful if running computationally-expensive or time unpredictable methods. It does generally involve running in a separate thread/task. The solution involves creating IXCallback interface which contains method called whn the slow operation

Continue Reading

Command Stack

Command stack is a design pattern if we need to support for undo/redo operations. There are two aspects to this design pattern ICommand interface where we can define the behaviour of the execution and undo operation and a CommandStack which is a generic. Create an ICommand interface with methods execute() and undo() All undoable/redoable actions

Continue Reading

Listener Design Pattern

Listener design pattern (also known as Subscriber/Observer) is a 'well-proven' technique for asynchronous message passing. It is used when the client needs to be notified when 'something interesting' happens to another object (of class X) in a passive manner (i.e. the client is not checking every so often (pulling) in the state has changed). The

Continue Reading