Sciology = Science + Technology

Religious Programming (Eclipse; AJAX; SOA; Mashups; XP + SCRUM).

Archive for September, 2007

Help me with PermGen:OutOfMemoryException

Posted by sureshkrishna on September 28, 2007

I have a plugin developed for and AJAX based application with the help of Platform + EMF + WTP combination.
Many of the clients who report this out of memory have following conditions…
# Eclipse or Windows OS is not shut down for a long time; nearly for days.
# After a long time of inactivity on eclipse, Whenever a client clicks on any of the action or an editor, application just hangs.
# When a client is working on this application for a long time CPU goes 100% and except killing the eclipse application there is not other way.
Of course at this point of time i have no idea, what makes application crash with PermGen Error. There could be some thing wrong with the plugins that we made, but at the same time i dont get any error log for this PermGen:OutOfMemoryException.

I would appreciate if anyone can let me know about some of the utilities that i can use to find out the root cause.

Anykind of suggestions and solutions will be appreciated.

Posted in Eclipse, Eclipse Performance, Java, OutOfMemoryError, Plug-ins, Plugin | 10 Comments »

JSON2XML TreeViewer plugin for Eclipse

Posted by sureshkrishna on September 24, 2007

I have been working on the WEB2.0 platform from past one year. All the while i was looking out for simple plugins for eclipse to visualize and analyze the  json that either i built or got from server.

  • It is so much of a pain to really construct the JSON and then to debug to see if we have inserted the data at the right children.
  • When the complexity of the JSON grows, its difficult to see which are arrays and which are maps.
  • What if you need to test if the JSON is syntactically correct ? (of course we can send the request to  the server and get a response with a error header, but this is not what we want in most of cases)
  • When JSON is well formatted with the correct tabs it looks good else its a coffee-break time to see the JSON as formatted text

After looking at all these issues, i have written a small plugin to convert the JSON to XML and a Tree Response. This enables you to…

  • View the JSON as XML text
  • View JSON as Hierarchical Tree
  • Get immediate response if JSON is wrong.

http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-1071.html

http://sourceforge.net/project/showfiles.php?group_id=205573

I would love to get any of your feedback and response. I would be working on this plugin in the future, so your improvement request are well considered.

Posted in Eclipse, JSON, Java, Plug-ins, Plugin, TreeView, XML | 7 Comments »

Is SEI-CMM L5 better than Agile Methodologies ?

Posted by sureshkrishna on September 15, 2007

I was working with a company which moved to CMM L5 and spent lot of $ on going for appraisal. I saw how the quality department and some of the (unlucky) project managers had to run around for the CMM L5 appraisal. Till that time I was more used to XP and Scrum for almost 3.5 years. Now as everyone would expect its very very difficult to get into the CMM mindset level from Agile methodologies. Of course in the end both processes are aiding us to achieve a good Software Product. As a project Lead i had the responsibility to implement a SW Development process. My manager was reasonable enough to listen to me and see the differences between CMM L5 and Agile practices.

In this article i want to explain how i convinced my management to adapt Agile Development for my project. I moved from CMM L5 to Agile Development. The comparison shows how i achieved each process area of CMM via Agile practices.

Some how in the industry there is a misconception that the Agile practices will lead to “Code-Test-Fix” cycles. Many fears that this process would lead to non-deliverable product , etc… In any case i had to convince few stakeholders in my organization to try these practices and see if it is better and makes sense. My Manager, QA Lead, QA Manager and customer are the main stakeholders who would be interested to see what the new process would be and what would it bring to them without disturbing any of the current Organization Level Metrics/Statistics. For me i had the advantage that the customer is working with the agile practices for a long time and there is no need to explain him what it was.

Let me explain the project that i was working for, so that you get the environment where i implemented this. This was a project with 10 team members in India and 5 team members in Germany. We had a time difference of 3 hours daily and we had full access to the Phones and Video Conferences. Everyone speaks english and the entire team knew each other. We have been developing a Eclipse based IDE for automobile systems and we were using CVS as configuration management system, JIRA for the Requirements, Work break up as issues, Bugs and Enhancements processing, Release management, estimations, tracking, we also linked JIRA and CVS via fisheye so that the traceability is not missed. Hummm….i definately have used a lot of JIRA, but trust me it worked perfectly (some say that i over used it). Every one is happy that they do not have to use any other Requirements Management tool (like Clear Quest), Bugs tracking tool (like Bugzilla), Project Management tool (MS Project), Team Tracking tools (PS7 and PC Team), etc… The important thing is that the developers and leads have to use only the Eclipse, CVS and JIRA; Thats all is the environment that makes your product development happy. We do have team members with varied experiences ranging from 12 years to 1 year.

In this article i am not going to explain the agile practices that we implemented but i will limit it to the differences that i found and we tackled with Agile Methodology. For Agile Methodology i have taken few practices from XP and practiced SCRUM. Following is a overview of the comparison that i had done. Of course i finally got the approval to go ahead with the Agile process that i proposed. But it was a lot of work to convince the management. I hope some of you who had done the same would agree with me :) .

CMM and Agile.

Now its the time to look into each key process areas of the CMM and see how Agile Processes/Practices can help. Please make a note that i have mentioned Eclipse, CVS and JIRA in some of the process comparisons as tools that supports process implementation.

Project Planning & Integrated Project Management

  • Joint development with the customer
  • Life Cycle
    • No distinct phases, “Daily Development“, “Daily Integration”, “Daily Reviews”, “Daily Testing” and “Weekly Deliveries”
  • Estimation technique
    • Milestone (Sprint) planning is expected to be flexible. And customer has a knowledge of development on daily basis.
  • Tools recommended by customer
    • JIRA for planning, scheduling, tracking and OPL

Monitoring and Control

  • Team meetings, corrective actions, risk analysis is a daily ritual.
  • Agile methodology which is flexible, responsive, builds a self-managed teams
  • SVL, OTDQ have no importance. Sprints are flexible enough to accommodate various situations.

Quantitative Project Management

  • Flexibility is key. SVL (Schedule Variance) , OTDQ (Ontime Delivery Quotient) and RSI (Reqirement Stability Index) have no importance, sprints are flexible
  • JIRA will be used for scheduling, tracking and defect logging
  • DD/EPY (Delivered Defects per Person Year of effort), PYe(Productivity) , DFDQ (Defects per Delivery) will be calculated from the JIRA data

Requirements Development & Management

  • Frequent/Continuous meetings with stakeholder to get requirements - no concept of frozen Requirements. RSI has no significance.
  • JIRA is the RCMS for the project stakeholders (management, users and development team)
  • Due to the connection between the JIRA and the configuration management, code traceability is automatically maintained

Technical Solution

  • No distinct phases, “Daily Development” - Daily Integration, and weekly Deliveries
  • Not practical to check DIR (Defect Injection Rate) before each delivery
  • Impact analysis and Design is part of JIRA and is shared with Stakeholders

Product Integration

  • Due to Daily Integration and tool support, Integration is not a separate phase

Verification and Validation

  • No Distinct phase for reviews, testing. TDD - Test Driven Development.
  • Daily Reviews and Daily Tests; More efficient than a milestone based or task based reviews and testing.
  • Daily Development concept requires daily reviews and testing. Therefore no Test specification reviews.
  • No formal acceptance Test Specification, weekly Deliveries. As the customer is part of the deliveries (sprints), Acceptance test specification has no significance.

Configuration management

  • Latest code base from the development is taken and labeled.
  • Base lining is not done, as distinct phases does not exist.

Process & Product Quality Assurance

  • PDC (Pre Delivery Check) not done for Weekly deliveries. PDE is done for the major deliveries from the Customer to „End User“.

DAR & CAR

  • All major decisions taken could be documented in the JIRA tool.
    • This gives the flexibility that the entire team can view the decision basis.
  • All review & test defects are entered into the JIRA tool.
    • Informal CAR is done along with customer in the weekly reviews.

Risk Management

  • Daily meetings with the customer
  • Frequent meetings/demos to Stakeholders (also includes management, end users)

Organizational Innovation and Deployment

  • Promotes flexibility so more conducive for innovation

Hope this analysis helps you somehow. But in the end it takes a lot of time and effort to convince management who believes in the world of CMM fanatics.

Posted in Agile Methodology, CMM, CVS, Eclipse, Process, SEI, estimation, incremental development, scheduling | 10 Comments »

TOP 10 Eclipse Shortcuts

Posted by sureshkrishna on September 15, 2007

Most of us who are using eclipse for at least 1 year are familiar with the shortcuts. Its been quite challenging to know and remember all the shortcuts during the development time. And of course we dont need all of them. I have been collecting some shortcuts based on the user experiences and the way they develop software. Following TOP 10 Eclipse Shortcuts helps everyone in their happy day coding.

  1. Ctrl + Shift + O : Organize imports
  2. Ctrl + Shift + T : Open Type
  3. Ctrl + Shift + F4 : Close all Opened Editors
  4. Ctrl + O : Open declarations
  5. Ctrl + E : Open Editor
  6. Ctrl + / : Line Comment
  7. Alt + Shift + R : Rename
  8. Alt + Shift + L : extract to Local Variable
  9. Alt + Shift + M : extract to Method
  10. F3 : Open Declaration

Let me explain how i got these TOP 10 shortcuts.

  • I start developing a plugin. As the development goes i want to refactor the code with “Alt + Shift + L” and “Alt + Shift + L” and “Alt + Shift + M“.
  • And not i have many methods and probably 500+ lines of code in java file. A typical development involves commenting and uncommenting via “Ctrl + /” (Even though we have shortcuts for Block Commenting, looks like many developers use more of Ctrl + /).
  • As we comment and uncomment and many more class references, we have so many imports that need to be cleaned. We do copy very often from one class to another class, now i want to organize my imports by “Ctrl + Shift + O
  • Now i want to find variable and method declarations via “Ctrl + O“.
  • In the course of development i would like to view/analyze the declarations of the methods or classes via “F3″.
  • All well till now, i want to use an interface/class and want to search for it via “Ctrl + Shift + T“.
  • By the time we do all this we have too many editors opened and we would like to navigate among multiple open editors via “Ctrl + E“.
  • And finally you feel frustrated with so many opened editors and want to close all of them via “Ctrl + Shift + F4“.

Posted in Eclipse, Java, Plug-ins, Plugin | 27 Comments »

Eclipse + CVS + JIRA is all i need for my development team.

Posted by sureshkrishna on September 11, 2007

I have been in different sorts of organizations working in Technology Startups to huge IT Organizations. I see a kind of huge differences with the kind of infrastructure that developers normally work with. In the end everyone is trying to get the best of what they can give to the organization. From developers point of view, we need to get the maximum productivity in terms of code and features. And many of us (developers, team leaders, managers) have same daily tasks, and my team always make faces about it. Does following things sound familiar for you.

  • All the requirements should be at one place; I am happy to see the high level requirements.
  • I want to have the traceability of the code (irrespective of a feature, improvement, bug or a task)
  • I would like to have the transparency of the tasks that i am working on
  • Each time a task or on issue is taken care of, i should be able to decrease by product back log :)
  • Should be able to do all the CM related tasks (Locking, Branching, Merging, Diff, etc…)
  • Each commit that i do should be able to notify my team and managers by mail
  • Each and every piece of code that i write must be accountable via CM. Who has committed what ?
  • I don’t want to be micro-managed. My manager should be able to get all stats that he wants by tools that use
  • I want to manage my release plan in a single tool and be seen by Developers, QA, Product Team, Customers, in short all my project’s stakeholders.
  • All release cycles and trains need to be scheduled and estimated in a single tool
  • For a simple reason that SW Development deals with communication, i would like to have all the communication that happens on a requirement, features to be in a single place. I want to have a trail of all my threads or in other terms i want to have audit trail.
  • I should be able to know the load on each of my team members
  • I should be able to query how many tasks are completed in a week
  • For each release bucket, i should be able to know what % of tasks/work is completed
  • An easy integration among my CM and tracking tool so that i know the task and associated source (which i refer to as traceability; I know many of the organizations spend time in maintaining excels for this).
  • If yours is a CMM organization…. you have more requirements on the CM permissions, checkins, etc…
  • I should be able to get the release notes directly from a tools so that i can reduce my manual work in compiling the tasks, bugs, improvements and enhancements.

If you agree with most of the above tasks then you would be amazed to see the combination of Eclipse, CVS and JIRA working in a perfect sync. After a long analysis and few months of continuous testing, i have successfully implemented the following process. Few members felt that i was overusing JIRA, but at the end of the day i am happy that i have to take care of only 3 tools. I am very happy about and and my team too. My management was super happy as i did not ask them any expensive tools for requirements management, configuration management, coding, task handling, reporting, release management and finally simple product life cycle management.

My experience with the simple process was great and its worked wonders. If you actually observe all the usecases that i described in different roles, you can imagine that with the help of the great combination of tools like Eclipse, CVS and JIRA you have satisfied all the requirements.

EclipseCVSJIRA Process Flow 

 In the end Eclipse has JIRA plugins and JIRA has lots of plugins too for the project management. I would not compare JIRA and Microsoft’s Project, but… the combination that i am crazy about is very much simple and is a seamless process. No one gets hurt by having this process and many are happy that its simple….

 And finally…. “Lets make Software Development easier…“.

Posted in CVS, Eclipse, JIRA | 9 Comments »

How to position Eclipse Dialogs and Messages at ceter of screen.

Posted by sureshkrishna on September 5, 2007

I want to share a common issues that most of the UI programmers come across. When we program with lots of dialogs and messages in any kind of applications, for the usability and predictability we would want most of them to be centered to the screen. In many cases when we use constructors for Dialogs, MessageDialogs, etc… very often we pass newly constructed Shell.

e.g. MessageDialog.openInfo(new Shell(), “Hi This is a test Message Dialog.”);

In the above case remember that we have not specified any of the co-ordinates and often we see that it takes different coordinates depending on the number of times that we invoke it. And each time you invoke, you wonder where the dialog will appear. I have been using a simple solution that solves this issue… Hope some of you will be able to use this code right away. I hope the following code is self explanatory :)

I have tested this with all screen resolutions and on Windows XP and OSX.

/**
* All dialogs and messages will be passed with the centered shell.
* @return Shell
*/
public static Shell getScreenCentredShell() {
Display display = PlatformUI.getWorkbench().getDisplay();
Shell centreShell = new Shell(display);
Point size = centreShell.computeSize(-1, -1);
Rectangle screen = display.getMonitors()[0].getBounds();
centreShell.setBounds((screen.width-size.x)/2, (screen.height-size.y)/2, size.x, size.y);
return centreShell;
}

Posted in Eclipse, Java, Plug-ins, Plugin, RCP, SWT | 4 Comments »