General Workflow of Issue in Project Management (Tool)

Here we are giving a general workflow for a support/maintenance/development project. It is quite elaborative process considering the scenario, when a product is in production and team is working on support/maintenance and for new development also. Of course it does not suit to everybody requirement, however it can be amended to suit the requirements.

  • New Issue as a Feature or Enhancement
    • Users will initiate the new requirements or defects for existing functionality in the system
      • Alternatively Business Analysis team can log this on behalf of users, till user get familiar with the system.
    • Business Analysis Team will also generate new requirements based on various requests from the users and log these in the system with the details. 
    • BA team will discuss the requirements, put all of their views in the system
    • Once requirements are freeze, the status will be changed to Finalized and the issue will be assigned to Development Team manager
  • New Issue as Defect
    • End user or UAT team can log any defect they found in the system with all the details, set it status to Finalized and can assign it to Development Team Manager.
  • Development Manager will review the new assignment.
    • She may come back to end user or Business Team for more clarifications
    • She will set the status as Analysis Scheduled if it is a requirement or to Implementation Scheduled if it is a bug and schedule it for the team as per the discussed priorities in roadmap
    • The issue will be assigned to any team member
  • Developer will pick the issue as per the schedule and update the status as In Analysis
    • She may assign this issue to Business team or users for more details
    • She will put all her understanding for the requirement in system to avoid any gap
    • Once she is done, she will update the status as Analyzed and assign it to concerned Business Analyst for Confirmation
  • Business Analyst will review the understanding and will update its status as Confirmed, and assigned it to Development Manager
  • Development Manager will schedule the activity with developer as per priorities and update the status as Implementation Scheduled
  • Developer picks the issues as per the schedule and updates their status with their progress as in Progress. Once the issue is fixed, the status will be marked as Resolved.
  • Development Quality team (developers currently) will test the solution and update the status as QA Approved.
  • UAT team will pick the issues in QA Approved state and perform their testing on these.
    • If there is any issue, defect can be logged and issues can be rejected with the status as Reopened
    • If everything is fine, issue can be approved as QA Approved
  • Now with the next release to production, this issue will be deployed to live server and the status will be updated by the concerned authority (Project Coordinator/Owner) as Deployed.
  • Later if end user or UAT team found any issue, the process can be started again from first point.
This is just a sample process flow, however can be modified to fit to any requirement.

Use of Project Management Tool and Redmine

Welcome to the Project Management Tool. Project management tools help us in managing the projects for various important activities. Although these activities can be managed without tools, like on paper or in mind, however that is not a convenient and optimum way. Keeping things on paper are outdated, where no report is available and we need to manage the papers. Keeping everything in mind is not good for mind, as then it won’t get time to process other more important data. Hence to manage any project, we need to have a Project Management Tool in place which can contribute to overall development and output, like

  • Facilitate to define the requirements as features and enhancements with all the details
  • Help in finalizing the requirements around these features by facilitating the discussions online, involving as much users as required and capture every point of discussion for reference
  • Roll out the final requirement specification to development team for their action with the required User Acceptance Test cases, so that functionality can be tested with same scenarios by Development team also.
  • Help development team to discuss the requirements and design internally, and involve business experts/analysts also for any doubt or improvement
  • Development team can finalize the design and estimate the efforts required for complete development
  • Define a Roadmap for the development team considering the priorities of Users/Product Owners and efforts required for the activities.
  • Help development managers to assign and track the work activities progress up to completion and to have a live status for the progress anytime. 
  • Enable Project Manager to implement the good management methodology like SCRUM, which is an agile product development process and is good for such developments. Refer to following links for SCRUM
    • http://en.wikipedia.org/wiki/Scrum_(development)
    • http://www.vedantatree.com/2010/01/practical-scrum.html
  • Help QA team to test the solution and ask to proceed for the release.
  • Release the features to UAT team for UAT
  • Help UAT team to log any defect in the system for existing feature or for any missing functionality and track their status
  • Finalize the UAT and approve the solution for production release.
  • Help the end users to log any defect or missing functionality they want in the system, and give them a live updated for their request.
  • Help the key stakeholders to track the status of development anytime, anywhere.


How to Install Redmine - A Project Management Tool

Installing Redmine could be a bit typical if you haven’t already worked with “Ruby on Rails”. It is not because it needs knowledge of Ruby on Rails, but it has dependency on some of the related software. Installation of these software make take some basic knowledge or ‘hit ‘n try’. We are trying to summarize the steps in sequence here (tried for windows only):
  • Visit to Redmine WIKI for installation instructions. These are useful, but a bit confusing for a new user to Ruby. Still you will get some good information from here, almost complete. 
    • http://www.redmine.org/wiki/redmine/RedmineInstall 
  • Download the latest stable version of Redmine from the SVN.
    • http://www.redmine.org/wiki/redmine/Download 
  • You need to download a few other softwares which are given below with corresponding website. Make sure to follow the version compatibility matrix given on RedmineInstall page at WIKI. Also please note that installing "Rails" may install Rake and Rack automatically. You can check that from the log on screen. If it is installing these, you are done with these installations and hence can skip the steps for their installation and directly go to installation of mysql using gem
    • Rake - http://rake.rubyforge.org/ 
    • RubyGems - http://rubygems.org/pages/download 
    • Ruby – Ruby Installer - http://www.ruby-lang.org/en/downloads/ 
    • Rack - http://rack.rubyforge.org/ 
    • MySql – http://dev.mysql.com/downloads/mysql/ 
  • If you are downloading the Stable Version of Redmine, then you will find the rails in the vendor directory of Redmine root folder.
  • Now at first, install the Ruby using Ruby Installer. Enable the option to include it in system path

Key Principles for Software Architecture and Design

Defining the Architecture is a challenging job. However by focusing on few Key Design Principles, we can make it easy and even interesting. Here are few Key Principles for Architecture and Design:
  • Separation of concerns: Each component in the system should be assigned a specific responsibility. It means that features should not be overlapped among the components and the users should be very clear about where to go for a certain feature. It avoids interdependency of system components, and make the system easy to maintain. Suppose in future, you find scope of improvement for this feature, then you need not to make the changes at multiple places. But you will make the changes in the specific component, owner of the feature, and all other components will get the benefits as they must already be using this for that specific feature. This approach also makes the application easier to understand for a user.
  • Principle of Single Responsibility: Every component should own one specific and distinguished feature. It helps in defining the responsibilities clearly, helps the user to understand the system easily and also help in integration of component with other components. 
  • Don't Repeat Yourself: This principle states that one functionality and hence the piece of code should be implemented in one component only. It should not be repeated across the components. Uses are that the code will be very maintainable. If you find any error, or you want to optimize the code, there is always one place where you can do it. Otherwise there will be a search in whole code to find out the places where similar code has been done for a feature.

Application Architecture and Design

Application Architecture is the structure of the whole system which describes the important component/objects of a system, various interfaces and that how these interact with each other. It also defines how system will be accessible to external world and how it will integrate with other third party services. So it is a high level structuring of the system, which might not have the detailing at object level; but will describes various layers, what kind of components/objects these layers will have and how these different layers will interact with each other.

Now if we need detailing at next level i.e. objects and their relations then we should proceed for designing of the system. To understand the difference between architecture and design, consider the Architecture may define a layer where all request processor/handlers should resides. Further design can describes various kind of actual request processors based on system and business need.

New Version of ExpressionOasis-3-0-1 Released

This is a micro release with few but important bugs fixes. The new 3.0.1 version should be used to have bug free solution. Fixed issues are:

GoogleCode: #1, #2, #3, #4

Importance of WBS for a Project and Project Manager

WBS means Work Breakdown Structure, where we break the work in small doable work units to the extent when the requirements of every work unit can be understood easily. This level of work unit is called 'Work Package'. These may further be divided to a level, when these become assignable to one resource. Eventually it grows in a tree like structure where each leaf is a reasonably small and manageable work items. WBS is an essential part of Project Management and Execution. Project Managers uses it for managing the project efficiently. Good Project Managers keep breaking the work in smaller units till they feel a control over the requirements and find the small assignable units of work. And as they get comfortable with requirements, they can estimate the efforts reasonably. This division further help them in task planning and assignment, and network diagram also. The general structure of WBS is like

  • S. No. 
    • Feature
      • Sub Feature
        • Sub feature (Generally can be divided from 2 to 5 levels)
          • Task (Not very common, mostly we go till sub-features in WBS)
  • S. No
    • Feature
      • Sub Feature
  • ..... 

There are a few points which we should consider while defining the WBS, these are:

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

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.


Example

  • 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.


Example

  • 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. 


Example

  • 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. 

Example

  • 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. 

Example

  • 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.

Example

  • 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.

Example

  • 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.

Example

  • 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.

Example

  • 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. 

Example

  • 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

How to file the Income Tax Return

Disclaimer: This information is only for knowledge purpose and may not be correct at all places. So after initial understanding from this article, it is good to refer to authenticated sources like Income Tax Department web site (http://www.incometaxindia.gov.in/) for various rules and procedures.

It is the time to file the income tax return again and we again need someone who can help us in filing the return. Here we are discussing that we can do it ourselves, if we have all the documents available with us for the income and deductions and if the sources of income are not very discrete and complex, like it can be in case of business income. Filing return is not that complex now. To file the return, we just need to understand the flow of filing the return. Once you understand it, it would be much simpler. So let us start to make some understanding of the process.

At first we need to remember the due date of filing the return. It is 31st July of every year. It is recommended that we should not wait till last week to file the return. There can be various unpredicted road blocks on the way, like you forgot to collect any document required for return, or the online sites are down due to heavy traffic and so on. So it is always good to be early.

Next is to collect all the information for your income and deductions. For income, you need to be aware about all heads of income which are defined by IT act. Here is the list of all income heads and the documents required for these

Wings of Fire - Agni ki Udan

'Agni ki Udan' is the autobiography of Dr. Avul Pakir Jainulabdeen Abdul Kalam. This is a wonderful book for the professionals who want to read some literature to have a direction in their profession, and in the life that how to utilize their knowledge and skills for social good and the country and for the Organization for which they are working. He is among one of few great scientist who have devoted their whole life for the progress of science and technology in country. Dr Kalam has shared their experience in this book which may not be able to describe his complete personality, however gives us a brief about him

  • As an innocent boy in the streets of 'Rameshwaram Ji', who has lived a simple life with his religious and simple family, 
  • As a student in college who came from a small town and left his home first time for studies; and then left an everlasting impression on many teachers with his sincerity, 
  • As an graduate engineer who had a dream job in mind however landed at some different job and still made a enourmous contribution everywhere with his passion, dedication and commitment to the work, 
  • As a true follower of Gurus like Dr Vikram Sarabhai, Dr Satish Dhawan, Dr Brahm Prakash, who has followed his seniors with utmost faith and respect and hence manage to change the future of country with their guidance and his efforts, 
  • As an amazing scientist who learnt from each experience and used all of his amazing intellectual power for his country without ever thinking for earning money outside the India, 
  • As a true and caring leader during PLSV and Indian Missile programme who has motivated a big big group of people across the institutions to work like a team with a single and defined mission in mind, 
  • And moreover as a good human being whose only mission was to do good for his country and even now is contributing to welfare of society in whatever mean he can do. 

How to Configure PHP Project in Eclipse for Debug Mode

Eclipse is very important tool for any developer, all due to the vast library of open source and freely available plug-ins which provides almost every required facility for development environment.

Now if we are using Eclipse, then ‘debug’ mode in Eclipse is a very useful tool to debug the code. Putting prints in the code and tracking the print-outs on the server console is very tedious job. So here we are explaining; how we can configure Eclipse and PHP web server to enable debugging of PHP applications in Eclipse using XDebug (http://www.xdebug.org/docs/).

As PHP code runs on web server, so that means, debugging can be performed only on server. So we put the debugging information in PHP code file using eclipse in IDE, however we need to install XDebug on web server for actual debugging. XDebug will sit on the server, and will generate the required debugging information like variable dump, stack traces etc and put all of this information for public use on a specific port of the server. Now any application can access this debug information by sending request to server on this port.

Eclipse works on same concept for showing debugging information for PHP application. It connects to the web server on given port, and fetches the debug information to show in a user friendly way with its UI. So to configure the debug mode in Eclipse, we need to configure XDebug on web server and also need to configure the eclipse for XDebug properties. Configuration steps are as following:

Data access by Client Pull or by Server Push

This is a design consideration between client - server interaction, i.e. whether client should call the server and pull the data from the server as and when required. Or the server should push the data to the client whenever there is some new data for the client.

Out of these two approaches, the first approach i.e. Client Pull is the most common approach where client opens a connection with the server (using any client/server protocol) and ask the server for the data. Here client pull the required data from the server as and when required.

Second approach is, where the server keep track of all its clients. Whenever server find any data which should be sent to the client, it pushes the data to the client. In this approach, there should be some provision using which server can interact to the client, like client should have some server socket open with it or client request should be hold on server for pending response for a long time. Now server keep track of all its clients. If we are working with server socket at the client, then it should be opened for all the time, so that server can connect to it anytime for pushing the data to client.

Sometime we find a need where server need to update the client for any latest data, like share trading software or weather information software. Here server keep getting updated data from multiple sources and now same data should be updated to all client terminals of the server. Now above mentioned both approaches can be used here as mentioned below:

Simplifying the Locking Mechanism in Threads

synchronized(lockObject)
{
    // do the job
}

This is one of the ways to acquire a lock on an object and then do the work in a code block with exclusive rights. Synchronization is already explained with another blog 'Mystery of Synchronized Keyword'. 

Here the question is that why we take the lock on an Object, not on current thread. Answer is fairly simple. Whenever you want to secure the admission to any premises, you never apply a lock on yourselves but you will put a lock on some other object, like on door. So the thread is the 'actor' (you) who want to perform some work in a code block (premises). Here the thread want a exclusive access on a code block where it want to work. Now procedure to have exclusive access is to have a lock for code block, so that only the current thread can have access rights to it. Here thread needs any object (door), like lockObject in above example, to have lock on the code block. 

Further we need to understand that how thread get lock using an object. To understand the story under the hood, consider that every Object is having a state within it which shows that whether any thread has lock on this object or not. Whenever any thread request the lock on any object, object checks whether its lock property is already set or not. If not, it set its property for current thread otherwise it refuse to give the lock, ask the current thread to wait till previous thread release the lock and put the thread in queue. Once the previous thread release the lock, and hence unset the property, Object picks the next thread from queue and set the lock property for it. As soon as thread get the object property set for it, it get the rights to enter in code block and to execute it.

Another example is like more than one painters are painting an house. Now painting of one room needs that only one painter works in it at a time for good output. Like first one painter should apply the putty on the wall, then the next one should apply the primer and paint and so on. To ensure that everyone follow this, painter decide to lock the door of the room whenever anyone enter inside for the work. So as soon as putty man enters the room, he locks the door from inside. When other come for the work, they find the door locked and hence wait for their turn. As soon as, first man finishes his work, he opens the door and the next painter waiting in the queue gets the access to room. 

Runtime environment of Java ensure all of this processing i.e. it puts the current thread to wait state till it gets access on current object lock property and put it back to execution after getting the property set for it. 


Mystery of Synchronized Keyword

'Synchronized' keyword is used to ensure that only one thread access a code block or a method at a time. It is very important keyword in multi-threaded programming. In multi-threaded programming, multiple threads work on the same code blocks simultaneously. But there can be some code blocks which manipulate shared data. So if multiple threads executes the same code and try to manipulate the same data, it can results in inconsistent result. For example:

public class TestSynchronized {

private int i;

// suppose param value is 5
public void testMethod( int param)
{
    // thread update i to 5
    // simultaneously other thread enters the block and update i to 10 before first thread would be able to            
    // execute next statement
    i = i + param;

    // result is expected to be 25
    // but result comes to 50, as second thread updates i to 10 before first thread executes the multiple
    //statement

    int result = i*5;

    System.println.out("thread[" + Thread.currentThread + "] result[" + result  + "]");
    i = 0;
}

}

How to Stop a Thread

There is no direct method to stop a thread. Earlier there used to be methods like Thread.stop(), however now these are deprecated. So how can we stop a thread if there is no 'stop' method?

To understand the answer, we first need to understand the thread and its working. For understanding the thread, please refer to other post 'What is Thread'. So one thread performs a assigned work at a time and its life is over once this work is done. Like if we take example quoted in 'What is Thread' post, then a painting work assigned to a sub-contractor is the life of relation with him. As soon as, he will complete his painting work, the sub-contracting relation will end. 

So the right way to stop a thread is to complete its work, or to make it understand that its work is over and it has to exit. For example, Painting contractor can ask the sub-contractor painter while assigning the job that please work till you finish painting in this service or till I call you to come out of this room. So the sub-contractor will start painting and will automatically exit from the relation as soon as it will finish the painting. Alternatively Painting Contractor can call him in-between and so the sub-contractor will keep on checking that whether the contractor is calling him or not. If not, he will continue with his work till its completion. If yes, he will leave the work and exit the room. 

What is Thread

A thread is a fork of a computer program in two or more concurrently running tasks. Let us try to understand it with example, 
  • Process: It is generally a single program in computer. Like, You need to get your house painted. So you hire a painting contractor and make a contract for painting your house. Now this painting contractor will get the house painted. So we can equate it with a process which, once start, will paint the home. Suppose you also want to change the flooring of your home, then you will hire some other contractor for this work. This will be another process which will do the flooring work. 
  • Threads: Now if the painting contractor paint the whole house himself single handedly, it will take him many days. But he as well as you want to get your work done ASAP. The solution is that contractor uses multiple sub-contractor under his control and use them to paint the house. These sub-contractors work simultaneously on different portion of the tasks. These sub-contractors can share the resources, i.e. will be using the resources from same pool. Now as multiple sub-contractors are working in parallel on multiple tasks, it will speed up the whole process and whole house will be painted in much lesser time. So these multiple sub-contractors are like threads in main process (painting contract).

Surya Namaskar - One of the Best and Easy Way to Ensure Good Health for Inner and Outer Body

Surya Namaskar (Salutation to Sun) is a Yogic Exercise and is a sequence of different Yoga Postures (asanas). It is used to worship the Surya (Sun) at the time of sun rise (can be done in evening when sun sets). It has diverse effect on all aspect of human body and the living of the human. It is very good for physical and mental health, and an easy way to ensure the good health of both outer and inner body. If one can be regular with Surya Namaskar, it can make a lot of difference in her life. Surya Namaskar can be done just for ensuring the physical health i.e. in the form of simple physical exercise. In this state, it will help to ensure a good health for body. However further it can be used as a medium for Sadhana by using asanas, pranayam, mantra and focusing on energy sources in body (sever energy chakra). It is very helpful in Sadhana (a mean to achieve something, mostly through spiritual practice).

Surya Pranam (Namaskar) is believed to be an exercise to gather the energy from Universe.

Initializing Parsley Framework and Dynamic Short Lived Objects

Parsley framework needs the configuration file for its initalization. This configuration can be written in tradition mxml file or using a xml file. Parsley API provides different configuration builders for initializing the configuration from these files, like FlexContextBuilder and XmlContextBuilder etc. So step to initialize the Parsley are:

  • Create configuration file either in mxml file or in xml file
  • Call appropraiate API by using the above file
    • FlexContextBuilder.build() or
    • XmlContextBuilder.build() etc
  • The build method will always return a context object. 
Generally we need  not to use the context object directly. Parsley itself manage the creation of objects and their relations through injection by using the declared configuration. However in some situations, we may need to interact with the API, like if we are extending the framework for some custom requirement, or for creating the application test environment etc.

Once we build the configuration, the Parsley environment is ready with the context and other configurations mentioned with configuration file. Now suppose if we are preparing a test case and want to fire the events from it so that respective command can be executed based on these events. Here the requirement is to attach the test case object to Parsley context, so that test case object gets the support of event mechanism from Parsley. The way to attach the object with Parsley is to add the object in context. 

Generally for short lived objects, we should use Dynamic Context. Dynamic Context should always be created from default context, so that it can be wired with the other application context. 

dynamicContext as DynamicContext = Context.createDynamicContext();

Now add the test object to this dynamic context. This can be done in setup of the test case. We should consider to remove the object from context after execution of the test methods. Code will be as:

dynamicContext.addObject(testCase);

Now the test case object is linked with Parsley and hence live for Parsley. Now it can participate in all life cycle events and operations of the Parsley like event firing and management. 

Importance of Context Object in Parsley

Context is the heart of Parsley Framework which keep every other part/object of the framework alive. So any object, which want to live in Parsley environment, should be linked with its Context. Any object which is not linked to context is not actually live for Parsley, as no body part can live without supply from heart.

Above is the artistic definition. The technical point is that, context is the object where Parsley framework keeps all the information for all linked objects. Context is the single shared object among all the components, and parts of the Parsley. So if any part of parsley needs any object, it can ask the single shared context for the object. Similarly, context is important in initialization and un-initialization of objects and manage their life cycle events as well.

So context is the storage of all the live objects in Parsley framework. Any object can be asked from the context at anytime during execution.

And the object, which is not in context, is not live for Parsley.

Now Parsley features are available to the objects only which are live i.e. if their existence is known to Parsley framework. For example, only those objects can dispatch and consume the events which are live for parsley. Similarly dependency injection will also work till the object is in context. Many a times, developers face the problem like their object is either not dispatching the event or not consuming the event, a major debug point can be to ensure that this object is still in context of Parsley. Objects can be released from Parsley context due to various reasons like

  • Dynamic commands releases from context as soon as these get the result or error from service call.
  • View objects releases from the context as soon as their parent window gets closed

So be careful for the object life cycle and always code to consume all the events before the un-initialization of the objects.

What is XML

XML is a strong and flexible language.

As soon as we read the word ‘language’, most of the persons, new to XML, consider it as some programming language and start wondering what all we can create using XML language.

But Friends, XML is not a programming language but it is a language. Language means a way of communication which can communicate the intended message to the other partners, which can make them understand what we want to say. It is like any other language which used to have a grammar to write and read the messages.

XML works in similar fashion. It does have its own protocol i.e. defined set of rules (grammar) that how one should write and read the messages using XML. 

Tips for E-Mail Communication

Here are a few points which may be helpful for mail communication:

  • Subject of the mail should be chosen wisely. 
    1. It should explain the motive of mail, i.e. receiver should understand from the subject itself that why this mail is here and what would the purpose, and even sometime, what is the expected from her.
    2. It should not be too big
    3. It should not be generic like Hi , until you don’t have any other choice after much thinking.
  • Mail should be started with formal salutation. It put the reader in good mood with the start of the letter. Like
    1. Hi/Hello - If you interact quite often
    2. Dear Mr/Ms - More formal communication
  • Writing a name directly to start the mail is not always recommended i.e.
    1. 'Name'
      1. Please do the work as discussed.

Use of Prepared Statement and Stored Procedure

What is the use of Prepared Statement or Stored Procedure? When should we use simple statement, prepared statement or stored procedure?

To understand the answer for above questions, we first need to understand that how database systems manage and execute the query. When we ask database system to execute any query, there are few steps in execution. Major steps are

  • Parsing of query
  • Compilation
  • Execution
Database system parses the supplied query; hence break it to the tokens to understand what is being supplied. Compilation step process the parsed tokens and create the execution structure which can be database specific. Mostly these are the expressions which evaluate the query tokens during execution. For example:

Flex/Parsley - Use AsyncToken to return asynchronous response from Service

In Flex application, we need to manage the asynchronous responses from the service to the commands. The approach to manage this scenario is:

  • Create a AsyncToken in Service method
  • Return it to the command
  • Retain it with service for the time when we shall get the result
  • As we get the result in result handler of service, use AsyncToken to return the result to command.
  • Get the responders form the AsyncToken responders array and hand over the result or fault to these. 
  • The result or fault will be communicated to the Command result or error handler methods.
Here point is that how AsyncToken will get the responder for command. The process under the hood is that as Service return the AsyncToken to Command, and command return the same object further. Parsley framework will capture the return value, create a Responder with Command's result and fault methods and add it to the AsyncToken. So when we are accessing the first responder from AsyncToken, this is the same responder which Parsley has added automatically.

AsyncToken.responders[0].result(resultObject);

Or

AsyncToken.responders[0].fault(faultObject);

Keep in mind, if you are not returning the AsyncToken from the service and hence from the Command, and if the command is dynamic; Parsley will remove the Command reference from the context as soon as control will return from the execute method. Otherwise it will retain it till it gets the result or fault call on AsyncToken>responder.

Another point is that any object in Parsley is not able to capture the event if it has already been removed from the context. So any object should be alive with Parsley context to be a part of framework and to be managed by Parsley, only then it will be eligible for the events and other facilities. 

Dynamic Commands with Parsley

Parsley provides dynamic commands feature where it creates a new instance of command on triggering of a matching event. Dynamic commands means the command instances which will be created dynamically by Parsley at runtime, whenever it finds any event in the system matching with 'selector' attribute of the command.

So instance of the dynamic command is dependent on the system state. If at anytime, the required event has been fired, the parsley will create the instance of corresponding Command and will handover the event to it. 

Dynamic Commands can be singleton or non-singleton. This behavior can be controlled by setting  'singleton' attribute with configuration file while defining the Dynamic Commands. In case of singleton commands, Parsley retain the instance of Dynamic Command once it is generated and always hand over the event to same instance. However for non-singleton command, Parsley creates a new instance of Command every time it gets a matching event. 

One should use 'selector', 'execute', 'error', 'result', and 'singleton' attributes while defining the dynamic commands with configuration file. Alternative approach is to write these tags in code file on the methods. We found that sometime 'error' tag specified with code file is not working properly, hence we followed the configuration file approach. 

Execute function of the command can return 'void', 'AsyncToken' or a 'Task'. We assume that command is interacting with service for some database interaction or for business logic. 
  • void - If service is not returning anything, return type can be void for command execute method. 
  • AsyncToken - If it is returning a asynchronous response, an AsyncToken should be returned. It will invoke the command result and fault handlers whenever it will get the result. 
  • Task - If we want to execute some task on command result, one can return the Task object which can perform the required task. 

MVCS Design implementation in Flex and/or Parsley - II

This is in continuation of the last blog for MVCS implementation using Flex and Parsley.

We have discussed various design for various layers in MVCS. Another approach is:

  • View are having reference of Presentation Model. Better to inject the PM using Parsley DI, however as per requirement, these can be instantiated using constructor also. 
  • Commands are having reference of Service. Services are injected using DI. 
  • Commands are dynamic and non-singleton in nature, and hence every event will result in creation of a new command. Parsley framework will automatically create a new command for every event, and hand over the event to it.
  • View can interact with commands using events, and can pass the PM to commands by putting it in Event. 
  • As commands are non-singleton and existing one per event, so now commands can retain the instance of PM till these get the response back from asynchronous service request in result handler. In result handler, command can use the retained PM and update the state of the PM and hence of the view.
  • Command can interact with view or Model using events. However Model and View need to put the check for the events to filter out the events targeted for other UI of same type.It can be done by putting a check for the PM, as command are having the instance of PM, so same can be passed to view or model with event to filter the required event. 
This design considers all the features given by Parsley and Flex and provide flexibility in terms of interaction among layers.


New version of Expression Engine Released - 2.3

  1. Support for ternary operator
  2. Support for XML expressions, using Xalan XPath
    1. XML Expressions are returning only String type value. 
    2. We can change it to some specific type like Number, String etc in future depending upon data or we should provide some type casting function
  3. Added more test cases 


For Download: http://xpressionengine.blogspot.com/p/downloads.html

New version of Expression Engine Released - 2.2


New version of 'XpressionEngine' has been released at 





Release notes: 
  • Support for more math functions
  • Bitwise operators
  • Change precendence of operators - http://en.wikipedia.org/wiki/Order_of_operations
  • Change '=' operator with '=='
 

MVCS Design implementation in Flex and/or Parsley

Here are varioius approaches to implement MVCS design using Flex and Parsley. MVCS - Model View Controller and Service. MVCS contains one more layer, called as Service. Service is used to contain business logic. It can be on client side or at server side, depending upon the application architecture. (Refer for MVC definition



Here we are defining MVCS from Flex and Parsley perspective.Following MVCS, there can be various kind of layers and interaction.

Layers and Flow of control
  • View
    • MXML and View Logic
    • Interacts with Presentation Model for data
    • May Interact with Commands for action implementation
  • Presentation Model
    • Contains data state for view, may contains data transfer object from Service
    • May interact directly with services for data related operations
    • Or can have interaction channel with Commands to have update for data 
    • Injected in View as stateless object
  • Commands
    • Contains view logic to act upon various user action from UI
    • Helps to break the UI logic in various objects which acts based on the action
    • Interact with Services for data related operations or Business Logic
    • May update the presentation model for data state
    • Can act as singleton stateless objects and linked with event mechanism 
    • Or view can have their reference as per architecture preference
  • Service
    • Contains business logic and data related operations
    • Can be on server side and may be implemented in various language like PHP or Java etc
    • Can be on client side in case of desktop application, can use assql like MySQL connector to interact with database
    • Service Delegates generally injected in Commands or Presentation Model using DI
Now there are many interaction models between these four layers depending upon overall application architecture or architect preference.