Design Pattern : Introduction

In our day to day lives as software engineers we encounter recurring conceptual problems, there may be many ways to solve that problem, but How do I go about finding the best  way to tackle it? The answer is Design Patterns. Design patterns are solutions to recurring problems, these are widely accepted solutions by software…

MHz GHz zzzzz…..

Whenever we discuss about any system be it a laptop, a phone, a desktop we are always concerned  about the processor. How many GigaHertz is the processor? Which is the latest in the market? The higher the better?…  But what really is MHz and Ghz? And why is it so important? HERTZ Hz in MHz…

Part I : RESTful API

In this post I will be covering: What is a Restful API Methods / verbs Implementing API calls API’s To explain API, i’ll use the Waiter analogy. Once you go to the restaurant and you are seated, the waiter comes to you with a Menu, Menu is a list of stuff you can order. So…

How efficient is your code – Processor: 32 or 64 bit

In the last post I gave a overview of what processors are, and what are they capable to do. In this post What is 32 bit or 64 bit systems? Which  is better 32 or 64? In the last post  we discussed that the processor does the following tasks: Fetch the  instruction and store it memory…

Part I: How efficient is your code?

Given a problem statement, we tend to find out ways to solve the problem – Our focus is understanding the problem statement and solving it. But are we solving the problem Efficiently is my question. As Software Engineers we don’t just write code, we write an efficient code. When I say “Efficient” I not only…

Structural Design Pattern: Decorators

As per Wiki structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships among entities. In this post we will discuss Decorators. Decorators, add additional features to object dynamically without using sub-classing Let’s consider an analogy here, our bakery needs some automation, everyday I spend few hours setting up appliances like pre-heating…

Creational Design Pattern: Prototype

Prototype Pattern is another creational pattern that clones objects as per the prototype. Basically it lets you make copies of existing object. Prototyping is important when we creating many similar objects, but this process can be expensive so the solution is ‘Cloning’ instead of making individual objects. Lets consider an analogy here, we are mass…

Creational Design Pattern – Builder Patterns

Another creations pattern that lets you construct complex objects is the builder pattern, it is the solution for Anti Pattern called Telescoping Constructor. This anti pattern occurs when developer attempts to create a complex object with excessive use of constructors, Builder pattern tries to solve this issue. Lets have an analogy here,  Our cake business…

Creational Design Patterns: Singleton

Singleton is needed when you want only one object to be instantiated from a class. Singleton ensures that class has only one instance, and that instance has global access, you can call it object oriented way of initializing global variable. An example for this would be, for our cake website we keep a cache that…

Creational Design Patterns: Abstract Factory Pattern

Another Creational Pattern is Abstract Factory Pattern, it is very much similar to Factory Pattern but with more abstraction, it works like a super factory that creates other factory, a use-case of this pattern would be that a Client is suppose to get related objects in a given time, but do not have to know which…