गीत लिखता हूँ कलम से वार करता हूँ

A poem devoted to the Motherland, encouraging the youth to work for the country, to consider their responsibilities for the nation.

गीत लिखता हूँ कलम से वार करता हूँ
दुश्मनों के कफ़न भी तयार करता हूँ 
मौत को मेरी कलम की नोक चुभती है 
जिंदगी ललकार सुन कर कांप उठती है
मैं वतन की आबरुह से प्यार करता हूँ
गीत लिखता हूँ कलम से वार करता हूँ 

एक दिन चितोढ़ की तकदीर डोली थी 
तब कलम मेरी राणा से बोली थी 
आज माँ को है ज़रूरत ऊन सपूतों की 
जो बनादे खाक में कब्रें कमीनो की 
और तब खेली गयी थी खून की होली 
लाल रंग में रंग गयी थी मौत की चोली 
नौजवान जागो तुम्हे होशियार करता हूँ
गीत लिखता हूँ कलम से वार करता हूँ

हे कसम तुमको जवान तुम्हारी जवानी की 
राम ईसा की मोहमद की और भवानी की 
बर्बाद कर दो दुश्मनों के सर कुचल दो तुम 
गदार के सीने में छिपे अरमान मसल दो तुम 
मैं चलूँगा साथ कब इंकार करता हूँ 
गीत लिखता हूँ कलम से वार करता हूँ

गीत लिखता हूँ कलम से वार करता हूँ

New Version of ExpressionOasis-3-0 Released

We are happy to announce release of new version of ExpressionOasis.

Version No: 3.0
Changes and new features with this new release are:
  • License changed from GPL to LGPLv3, so that more people can be benefited by using this free software
  • Major change in root packages name
    • package name is changed from org.ganges.expressionengine to org.vedantatree.expressionoasis
  • Introduced Maven build system, earlier it was based on Ant
  • Dynamic function support
    • Now custom functions can be defined in xml file, customfunctions.xml. System will pick these functions at runtime and make these available
  • Merged configurations in single config.xml file to some extent
  • In memory cache for Compiled Expressions
    • In memory cache may be useful for performance reasons. It can be turned on/off from config by setting value of 'cacheCompiledExpressions' element
  • Issue #2, #3 are fixed listed at Google Code
  • New test cases have been added
It can be downloaded from:

What is Project Scope Management

Project Scope Management is a very important topic in Project Management and probably one of the most ignored topic as well. As per a recent survey in last years, the successfully completed projects are only 34% of the total projects, and the major reason of failure is the scope creep. Most of the Project Managers knows the taste of grief which is caused by Scope Creep. Still we get stuck into this trap, as we mostly have to work on assumptions, but we skip to define these assumptions properly or communication gap creates a huge gap in expectation as well.

Scope is bound to change in most of the cases, however that is not the reason of grief if we manage the scope properly. We need to understand the importance of Scope Definition and Scope Control.

Project Scope Management Plan: Scope Management Plan is a plan about, how Scope will be managed throughout the life of project. It defines:

  • How and where the scope will be defined
  • What approach will be followed to decompose the functionalities.
  • What will be the process to accept/reject any new change coming in the scope
  • How a new accepted change will be managed and integrated with other part of the project

तुम मुझसे दूर कैसी हो, में तुमसे दूर कैसा हूँ

These lines are trying to express the pain and confusion of people who migrated to other regions or countries for better work opportunities. This is assumed to be recited by a person who is living away from his 'motherland' and wish to come back, but struggling for the decision.

कोई दीवाना कहता है, कोई पागल समझता है
पर इस दिल की बेचनी तौ, बस ये दीवाना समझता है 
तुम मुझसे दूर कैसी हो, में तुमसे दूर कैसा हूँ
ये तेरा दिल समझता है, या मेरा दिल समझता है

कभी US दीखता है, कभी UK है नुरानी
और ये में भूल ही बैठा, की मेरी गलिया है वीरानी
मैंने पैसे और सोहरत को ही जिंदगी बना डाला
और जिंदगी छोर आये कहाँ, वो बन गयी बेमानी

कभी आज़ाद दीवाना था, कभी रानी झाँसी थी दीवानी
कभी कलाम दीवाना था, या वो फिजा ही थी दीवानी
इस पागलपन को में भी जान लूँ, तौ बात ही क्या है
फिर क्या तौ ढेर पैसे का, और ये माया है बेगानी

की मेरा दिल जो आने पर, आ जाये तौ हंगामा 
मेरे दिल में ये ख्वाब जो पल बैठा, तौ हंगामा
अभी तक झूम कर कहते थे सब, की तेरी याद आती है
में याद को हकीकुँत में बदल बैठा, तौ हंगामा

तेरी माँ यूँ ही हसती है, पर छिप छिप कर वो रोती है
होली बेरंग होती है, दिवाली वीरानी सी जाती है
पैसा फोर्टिस का Bed तौ दिलवा देगा मरते को
पर उस जिंदगी का क्या, जो खाली सी जाती है

तेरे घर में भी सब कुछ है, यहाँ भी दिल धरकते है
धरती की बेचनी को जैसे बादल समझते है
तू भी छोर दे पैसे की दुनिया, थोडा बरस ले तू
ये छोटी से जिंदगी है, दिल भी कब तक धरकते है

तुम मुझसे दूर कैसी हो, में तुमसे दूर कैसा हूँ
ये तेरा दिल समझता है, या मेरा दिल समझता है

This is based on another Poem which was originally based on 'Love' written by someone else. However here the new wordings have been introduced.

An Introduction to SQL Joins

There are various kind of joins available in SQL. Joins means, joining the data of multiple tables based on some given criteria in a way, that we can get the related data from multiple tables by one query only. However think that how these joins work. Ultimately joins also need to fetch the data from database storage system itself. So how database system manages it. Here is a brief overview for it. 

  • Database System identifies the queries which will retrieve the base data, and may have conditional clause.  
  • It executes those query by using its existing query (and condition) mechanism.
  • It also uses index here, if these are available for corresponding table and columns. 
  • This way, database system filter the amount of data to next smaller level (as much as possible). After this process, now database system has a smaller set of data where it needs to find the required data. 
  • Now Database System need to apply various optimized logic to iterate over the rest of the data and to filter these to have desired set of data. This process, of course, could be very heavy as we need to traverse over a large amount of data and need to find the right combination in other table data. This is the reason that every database system tries to have best optimized execution plan so that every base query can be executed first with required condition. This will enable it to have smallest possible set of data for further operation. So having an best optimized execution plan is the major feature of any database system, as it will affect the speed of all the queries.  
  • It also indicates that we should index the data which is frequently used in queries (as conditions), so that database system can use it to filter the data. 

What is Strong, Soft, Weak and Phantom Memory References in Java

Understanding various available reference objects in Java is quite important to develop memory sensitive applications, and for memory optimization. Java has four type of memory references which are
  • Strong References,
  • Soft References,
  • Weak References and 
  • Phantom References
However to understand the use of these reference objects, we need to understand in brief that how Java manage the memory, and how it manage the garbage. Please refer to other post at 'How does Java Manage the Memory' to understand that. Now if you are clear with the Java Memory Management Concept, understanding various kind of memory references in Java would be easy for you. The description below is given considering that the readers have read the other post as given above (How does Java Manage the Memory).

Strong Reference: The objects in memory which are referenced from memory stack (without a reference through any other kind of reference) are called strongly referenced. These objects are strongly held by program i.e. in use and hence can not be claimed by GC (Garbage Collector) for memory requirement.

How does Java Manage the Memory

Understanding the Java memory management system is quite important to develop the memory sensitive applications. It also helps us to optimize the usage of memory in our programs. Java maintains a stack to store all object references whichever are being in use by program. Objects actually stores in memory heap and their references are maintained on memory stack.  

Let us try to understand it with some example description. This is not what exactly JVM does, but an example only to simplify the definitions. 

As soon as we create an object in program, its information is being saved to memory with some fixed byte pattern. Now we can use the start of memory location as reference id for this object. In program, there are various kind of scopes defined by Java. These are like code block scope, method level scope, class level scope, package scope and whole program level scope etc.  These scopes generally has parent <> child <> sibling relations with each other. Now as soon as the program scope initialize, a corresponding scope data storage structure (data structure to save the scope variable and other data which will have the memory references of the actual objects in memory) can be made and pushed to memory stack. Similarly other scope structures can be made as soon as they come in existence and can be stored with their parent scope. These scope data structures remain on stack till the corresponding scope is active in program. As soon as, it gets deactivated; the corresponding data structure will be removed from stack. Take it like as program thread enters into a method, we create a scope data structure for method scope and push it to stack with its parent scope which should be class scope. Now as program thread leaves the method, we remove the corresponding scope data from the stack. Scope can interact with each other as per the language protocol because they have parent <> child relationship. This is a simplified version of memory stack with JVM. Now you can visualize scope data structures used to be created or destroyed with the activation or deactivation of corresponding program scope. 

What It means to be a Project Manager

Working as a Project Manager brought a big change in the thinking and work responsibilities. Earlier the focus was on performing any work in best possible manner as an individual, and now the focus is on getting the work done from team in best possible manner. It is a complete shift in paradigm in term of work, daily routine, work planning and thinking. This experience is not entirely new. Everyone used to manage many things while working with a team (even while working as individual contributor). As you gather more experience, you usually manage other junior members of team for their work either technically or from delivery point of view. But the major difference is that now you are focusing more on management and your are liable for work of a group of people, not only for your work. You focus shift from being an individual contributor, to a team mentor or manager (or both), from core development to more broader terms like:
  • Project Planning and Execution
  • Project Scope Management 
  • Project Time and Cost Management
  • Delivery Management 
  • Risk Management
  • Communication Management
  • Resource Planning
  • People Management 
  • Team Building, Mentoring and Recruitment
  • And sometime Procurement Management
These are the traditional work which comes by default in responsibility set of a Project Manager and hence I got these as gift with new job responsibilities. But there are more to add in this list, which is specific to work place requirement and are giving more enriching experience, these are:

Singleton Design Pattern

It is a special class, for which we can not have more than one instance in system at a time. It provides a single global point of access to that instance. Hence it ensures that only one instance can be created for this class and every user is forced to use only that single instance for any operation.


  • Any Utility Class: Generally utility classes do not have states with these and so a single instance of that class can serve the whole system.
  • Memory Manager: An object which is responsible to manage the memory in system. Obviously only there should be only one instance of this object so that it can update the objects with the current memory availability and other objects can update its state for expected memory requirement. 

Factory Design Pattern

It is responsible for creating the objects. As name depicts, it is a factory for creating any specific kind of objects. It abstracts the user from the details of creation mechanism, and also abstracts the actual implementation class of instantiated object. The only requirement is that the ‘object to create’ should be of some already defined type. The actual implementation may differ based on the current scenario.


  • Maruti Car Factory Object: We can ask this object to return us a Maruti car based on any runtime parameter which defines its model like Wagon R, or Esteem. It is the responsibility of this factory object to return us required car implementation based on specific parameters.
  • Row Renderer Factory Object: We can ask it to return the renderer like structured row renderer, or a designable row renderer.

Builder Design Pattern

It separates the construction of complex object from its representation, so that number of different representations can be build based on the requirement. It is similar to factory pattern, but it does not return simple descendant of base class. The factory is concerned with what is made and the builder with how it is made. Factory simply returns an instance of related class of base type, but builder returns a composition of various classes depending on the specified state. 


  • Editor Builder: Suppose you are creating a UI for workflow where a number of different types of nodes can exist. We need different editors to edit these nodes, which can be very complex in structure. Here we can use builder which can build the desired editor.  Even editors can vary in structure based on current state of system.

Prototype Design Pattern

It suggests, instead of creating a new instance of any object, make a copy of existing object and modify its properties as required. Generally cloning is used to create the copy of an existing object. 


  • Drag ‘n Drop: While implementing drag and drop functionality in a UI, we need to show the shadow of items under dragging operation so that user can decide the place to drop the dragged item. Here instead of creating a new instance of item and setting the required properties, best way is to create a prototype of existing object and modify the required properties.
  • Filtered data set using same result set – We retrieved a large data as result set from database. Now we want to show different views on UI based on specified filter criteria. One way is to fetch the same data for every filter criteria, another way is to make the prototype of result set and apply filter to it. It will be less costly than repetitive database access. 

Adapter Design Pattern

Adapter is used to adapt the behavior/functionalities of an existing class but with a different interface.
It can be implemented by two ways, by inheritance (also called class adapter) or by composition (also called object adapter). Either we can extend the existing class and use its functionalities in new interface method, or we can use a reference of existing class in new object for using existing functionalities. 


  • We are making data bound UI components, which are implementing some of our proprietary interface to support the data loading/unloading. But UI components are already defined with Swing library so we want to use these and just want to bind them with data sources. Here we can extend our new components from existing Swing component and implement our data binding interface to it.
  • Use of Window Adapter while intercepting the window closing event. 

Composite Design Pattern

It is a collection of objects, anyone of which can be either a composite or just a primitive object. It enables us to represent a single object or a collection of objects using the same interface.


  • If we are designing a runtime system structure for java program, we can implement it in a tree form where every node can be a executable piece of statement and it may have other nodes in it (which should be executed before it) or may be a leaf node, which just need to execute itself and return the result to the parent (or makes the changes in shared state cache).
  • If we are designing a system to display the employee structuring of an organization. It could be in tree form or in any other form. But designing the data structure using composite pattern can easily manage the requirements for hierarchy structure, where any employee work as individual or may have a number of other employees as sub-ordinates. 

Bridge Design Pattern

It is used to separate the interface from its implementation and enables us to change either interface or implementation easily. Generally it is used to keep the client interface constant and even if we change the implementation.

It seems quite similar to adapter pattern, where we can adapt the functionalities of any other class and expose this with a separate interface. But the difference is in purpose, Adapter is implemented to use the existing implementation with a new interface but Bridge is used to separate the implementation from interface to user so that user won’t be affected by any change in implementation.


  • We want to present some data to user. Based on the user profile, the data can be either in simple list form having names only or in a table having complete details. Here we can implement the logic to fetch the data and arranging it in required format in a separate class which can be accessed from user interface which could be a list, table or tree. 

Proxy Design Pattern

It enables us to avoid the creation of resource consuming object until its actual need in the system. A complex and heavy object can be represented by a simple proxy object which creates the illusion of actual object till the actual requirement of that object. The proxy object initializes the actual object whenever it gets the first request from client. So it delays the initialization of heavy states until these are actually required.


  • In ORM tools, collections having a large number of items used to be initialized lazily using proxy pattern. Before actual initialization, only a proxy object creates the illusion of actual object.

Flyweight Design Pattern

Flyweight Pattern

Sometimes in system, a number of instances are required to represent the data even when all the instances are similar in structure and basic composition but with a few different parameters. Here using flyweight pattern, one instance can be used to represent the data by identifying the variable data and make the object configurable for this before every method call.


  • In JTable, a column renderer serve the purpose to paint every cell on the table only table configures this renderer for its position, data and other variable attributes before using it for painting the next cell.
  • While painting a word on the screen, the same character instance is being used to paint complete word by just changing its location and data value.

Facade Design Pattern

Façade Pattern

It is used to hide the complexities of system behind a simple interface. Generally with time, the simple system grows to complex systems having a number of different APIs and objects to interact with. It happens especially if we are following the design patterns. Due to this increased complexities, it becomes very difficult for client to remember the exact flow of API and the right way to use it. Façade comes here and provides a simple interface to user, thus hides the complete complexity behind it. 


  • One way to access database is to use the raw API of JDBC which may not be very convenient for every user or user may need to repeat same code again and again to access the database. Other alternative is to create a ‘Data Access Object’ which can hide the complexities of JDBC API and can provide a simple and convenient interfaced to user for most of the required operations. So we can define a SQL Data Access Manager which can provide methods like execute query, get table names etc. Here SQL Data Access Manager is working as façade.
  • Any session bean on server most of the time works as façade.
  • An Object Manager on server which allows the user to save any object and fire the relevant events in a single call.

What is the Use of Ant Build Tool

Ant is a build tool and is used in build process of softwares.

Now the question is that what is a build process? Build process is used to build the software, which comprises a list of tasks items  required to deploy the software application and make it runnable. A few task items are as:

  • Creating the basic structure for project, which is required for deployment. The structure may vary from project to project or depending upon the type of application
  • Taking the latest checkout of the project files from any source code version system
  • Copying the required set of files to the desired directories. This may include filtering of the files which are not required in deployment, but are required only for development. 
  • Compiling the source code to generate output runnable files
  • Copying the required non-source code files to output folders
  • Generating the documentation by using various tools like Java Doc or PHP Documenter. 
  • Running the test cases on the compiled source code
  • Package the output in required format, like jar, war, ear etc
  • Copy the packaged output to the target directory, like in application directory of web servers
  • Generate the schema in database
  • Run scripts for entering sample data in database
  • Starting/Restarting the server
  • And so on