Pyramid of Doom — the Signs and Symptoms of a common anti-pattern

Anti-patterns. They are the bane of many developers that’s had the misfortune of meeting one. The pyramid of doom is often one that a lot of new JavaScript developers write. Most of the time, it’s written in innocence with no code janitor to tell them otherwise....

Read full original article here.

#javascript #web-development

What is GEEK

Buddha Community

Samanta  Moore

Samanta Moore


Builder Design Pattern

What is Builder Design Pattern ? Why we should care about it ?

Starting from **Creational Design Pattern, **so wikipedia says “creational design pattern are design pattern that deals with object creation mechanism, trying to create objects in manner that is suitable to the situation”.

The basic form of object creations could result in design problems and result in complex design problems, so to overcome this problem Creational Design Pattern somehow allows you to create the object.

Builder is one of the** Creational Design Pattern**.

When to consider the Builder Design Pattern ?

Builder is useful when you need to do lot of things to build an Object. Let’s imagine DOM (Document Object Model), so if we need to create the DOM, We could have to do lot of things, appending plenty of nodes and attaching attributes to them. We could also imagine about the huge XML Object creation where we will have to do lot of work to create the Object. A Factory is used basically when we could create the entire object in one shot.

As **Joshua Bloch (**He led the Design of the many library Java Collections Framework and many more) – “Builder Pattern is good choice when designing the class whose constructor or static factories would have more than handful of parameters

#java #builder #builder pattern #creational design pattern #design pattern #factory pattern #java design pattern

Pyramid of Doom — the Signs and Symptoms of a common anti-pattern

Anti-patterns. They are the bane of many developers that’s had the misfortune of meeting one. The pyramid of doom is often one that a lot of new JavaScript developers write. Most of the time, it’s written in innocence with no code janitor to tell them otherwise....

Read full original article here.

#javascript #web-development

Seamus  Quitzon

Seamus Quitzon


Confused With Java Singleton Design Pattern? Have a Look at This Article.

What Is a Singleton Design Pattern?

  1. Singleton design pattern allows us to create only one instance of a class and make sure that there exists only one Object in JVM.
  2. Singleton class must have a public static method to get the instance of the class from anywhere in the application [from different classes, different packages, etc].
  3. Singleton class must have a private constructor to instantiate the object of the class.
  4. Singleton class must have a private static variable of the same class which is the only reference of the class[basically this variable will point to only Object of class].

Image for post

Singleton Design Pattern

All these different implementation methods lead to one goal that is having a single instance of a class at any given point of time in JVM. Let’s see different implementation approaches for the Singleton design pattern

1. Eager Initialization :

  1. This is the simplest implementation of the singleton design pattern class. In this method, the private static variable of the same class [reference] is assigned the object of class at the time of loading the class into the JVM memory.
  2. This type of implementation is applicable to the scenarios when we always want the instance of the class.

Let’s see the program to understand this …

package com.vikram;

	public class EagerSingleton {
	    //Only object created when class is loaded and theInstance is private static var pointing to it.
	    private static EagerSingleton theInstance = new EagerSingleton();

	    //private constructor
	    private EagerSingleton(){

	    //public method to return single instance of class .
	    public static EagerSingleton getInstance(){
	        return theInstance;

Eager Initialization

#desing-pattern #classloading #singleton-pattern #singleton-design-pattern #java-singleton-pattern

Joseph  Murray

Joseph Murray


Overview Of Prototype Desing Pattern

What is Prototype Design pattern?

prototypes design pattern allows you to create objects by cloning an existing object instead of creating a new object from scratch. This pattern is used when the process of object creation is costly. when cloning, the newly copied object contains the same characteristics as its source object. After cloning, we can change the values of the new object’s properties as required. This pattern comes under a **creational **pattern.

For easier understanding, Assume that a database operation should be done in order to create an object. This database call is both time-consuming and costly. we need to create multiple objects. As a result, when we create a new object, each time a database call will occur, this will give a performance flop, right? As a result, initially, we create one object and clone it each time when we required a new object. This will cut down the database calls for each object creation.

#java-design-pattern #cloning #prototype-design-pattern #java #prototype-pattern #overview of prototype desing pattern

kalai selvan

kalai selvan


Rising Sign Calculator, Ascendant Sign Calculator, What is My Rising Sign

Those with Aries Rising are quick to speak and act. They are very straightforward and direct. They tend to act impulsively. They are active but not aggressive. They are go-getters and can be very competitive.

They are likely to be pioneers or self-starters and are good at initiating things and taking charge. Independent and self-reliant, their challenge is to cultivate patience and learn to collaborate with others. Their mental energies are strong; hence they love to argue and debate. They lie to push the envelope. But they should not take on challenges just for fun. They need to release their physical energy safely, so exercise and physical activity are necessary, as they will keep their nervous systems working well. They will feel restless and moody if they are inactive. Keeping themselves mentally engaged and physically active is very important for Aries Rising people. These people also have an innate sense of justice, which makes them fight for underdogs. They have a robust and athletic body and have good physical stamina. Their self-confidence and flirtatious attitude add to their sex appeal.

These people have a short temper, but they do not nurse grudges. They find it hard to sit still. They are known to stir things up if they feel bored. They lack staying power, as they are impatient and begin something new before completing their existing projects.

Aries Rising people have certain physical traits. They walk quickly, with their head leaning forward. They may suffer from headaches, migraines, sinus and eye problems, etc. They may also develop acne and rashes. They may have a ruddy complexion and tend to blush easily. When they are angry, their face may turn red. Their shoulders are broad, and their hips are slim. These people have a ready smile and retain their youthful looks even when they grow old.

Children with Aries Rising are very independent and self-reliant. Honest and fearless, they are brave and possess good leadership skills. They can be impatient and appear rude sometimes. But they have an indomitable spirit and show great courage in challenging situations. They will fight for causes they feel strongly about.

When it comes to love and romance, these people are passionate and have a roving eye. They will pursue the object of interest until they cave in. The chase is what excites them. The opposite sex will find it hard to resist their charms. They are energetic and adventurous.
Aries Ascendant natives seek success and can be quite ambitious. They will pursue their goals so single-mindedly that they will seem selfish at times. They often forget that their actions may affect other people.

Sometimes they go overboard with their enthusiasm and push themselves too hard. They love to engage in sports and other high energy activities. Socially, they are popular and have lots of friends.

Aries Rising Men
Men with Aries Rising are very active, passionate, and impetuous. They act without proper thought, and this often lands them in trouble. The influence of Mars gives them tremendous energy for which they need an outlet. As young boys, they tend to fidget often and may get into many fights. They often gravitate towards careers in sports, the army, or in the technical field. Their stormy temperament and uncompromising attitude can cause problems with higher authorities.

Aries Rising Women
Women with Aries rising are very bold and confident. They are tireless workers who know how to achieve results. They are as bold as men, due to which most men find them rather intimidating and difficult to communicate with. She loves to tease her man all the time and is hard to tame. They are likely to choose a gentle and flexible partner for marriage, as this ensures domestic harmony. She won’t be able to sit still for long and keeps herself busy with various things. She’s curious, likes learning new things, and taking off on new adventures. She lives life on the fast lane and can be very impatient. Waiting for anything can give her a nervous breakdown. She walks swiftly and has skinny legs.

Aries Rising Children
The child with Aries Rising is smart and strong-willed. He/she will have boundless energy. Even as children, they will be active in sports. Unless their energy is channelized, they may go astray, causing trouble and disappointment for their parents. They will be adored by their parents and grandparents.

#aries rising sign #aries #moon #sign