Tuesday, December 7, 2010

EMF - An MDSD Approach

Please find the slides for my Eclipse Democamp 2010 Presentation in Bangalore - A quick introduction into MDSD and EMF.

By the way you can find an interesting blog about MDSD at http://modeldrivensoftware.ning.com/profiles/blogs/the-evolution-of-code

Eclipse Consultant and Trainer,

Eclipse Demo Camp 2010 @ Bangalore

Its fun to spend an afternoon with eclipsers. Two weeks back, we had a fantastic Eclipse Democamp in Bangalore. I think this is the biggest eclipse demo camp ever conducted in Bangalore with around 100 attendees turning out for the event.

The demo camp was conducted at SAP Labs campus. We all got a warm welcome from the organizers. I feel the organizers have done a great job with an amazing democamp. The people behind the curtains are Ankur Sharma (Eclipse PDE Co-Lead, IBM), Ashwani Kr Sharma (Committer - EMF Query, SAP) and Saurav Sarker (Committer - EMF Query, SAP) and a handful more people from SAP Labs.

We all got a wonderful set of goodies which includes a cool hat.

Democamp Hat :)

After each demo goodies were distributed to the audience for asking the best question. T-shirts from Eclipse Foundation were distributed to the presenters.

The event started with a keynote from Mr. Harish Porval, VP, TIP Core UI and Modeling Tools, SAP Labs. SAP Labs have got big plans with Eclipse as their development platform.

Harish Porval - Keynote

I gave the first demo on behalf of http://eclipseBible.com.


I demonstrated how EMF can reduce the development time and cost of production of software applications using MDSD concepts.

Madhu Samuel - "EMF - An MDSD Approach"

Saurav Sarkar from EMF Model Query 2 Team at SAP Labs presented EMF Model Query 2. Query 2 helps to search and retrieve data from your emf models. They use an in-built indexing mechanism to make the queries faster. You can find more about Query 2 here.

Saurav Sarkar - EMF Model Query2

Ashok Pon Kumar from IBM presented the Android Toolkit based on Eclipse.

Ashok Pon Kumar - Android Toolkit

Ayushman Jain from IBM presented Xtext with an example of how to create a custom language for Android. There were a few interesting queries from the audience. Its simply amazing to see that from a grammar file how Xtext generates all the other components you need for your custom language (DSL) like parser, editor, navigator, validator, automatic code completion etc..

Ayushman Jain - Xtext

Deepak Azad (JDT UI Committer) from IBM presented EGit. EGit integrates Git with Eclipse. Git is a distributed SCM tool. Deepak first explained about cvs and svn and how life is better with EGit. Unfortunately I missed the photograph of Deepak's talk.

Lakshmi P (SWT Committer) from IBM presented the XWT Designer. XWT Designer is a next generation visual editor for SWT and JFace with XML in the background.

Lakshmi P - XWT Designer

Nayna Jain from IBM presented the embedded http server in Eclipse to create web applications.

Nayna Jain - Embedded Http Server in Eclipse

Overall a fantastic afternoon, well organized. I would like to thank Vel Ganesh from Bosch for helping me with the snaps for this blog. And did I mention about the delicious snacks!!!

Eclipse Trainer and Consultant

Thursday, July 15, 2010

The story of a Chair as a Platform!

Eclipse is a Rich Client Platform. A cozy chair is also a platform that can support 'rich' clients.

My friend Hima was kind enough to cast my chair as a hero in her story - The Chair. Take a break from your work and read a nice work of fiction.

By the way, she is in the middle of a blogathon, a blog a day for the entire month of July. Pretty tough huh!


Thursday, June 24, 2010

Eclipse Helios - A few interesting features!

An year old wait is over. Helios is out in the wild. Today morning, I downloaded Helios. Oops, my friend of eclipse download link got stuck. I went to the download link for the common public - eclipse.org/downloads. There goes the Helios Modeling Package.

Its a little annoying to see that GMF is not included part of the default bundles of modeling package. But, there is a quick way to install GMF in no time. I just hit the 'Install Modeling Components' toolbar button.

Some of the interesting features that captured my mind are,

1. Open an eclipse file from Command line

Based on SWT and the native launcher, the Eclipse Platform now supports opening a file from the command line.  If an instance of Eclipse is already running, that instance will open the file. Otherwise, a new instance will be started. 

2. A brand new OSGi console. You can watch whats under the hood of your eclipse ide. 

To open OSGi console, go to your Console View and select 'Host OSGi Console' from the view menu.

3. Eclipse Market Place Client

Thanks to the work by TaskTop, the creators of Mylyn, you can browse through all the interesting eclipse based apps quick and fast. Go to Help > Eclipse Market Place.

4. Headless Launch Support

A new headless plug-in "org.eclipse.pde.launching" is provided to launch applications without a user interface.

Thats all for now. Let me dig deep in to the Helios framework. View the other reviews on Eclipse Helios here.


Wednesday, April 28, 2010

Patterns in Eclipse

Last Friday at Eclipse Day India 2010, I talked about,
Because brain is a pattern recognition system.

We saw the problem we face during software development. 
We learned that "writing good code is not just a good will of the programmer, but a social responsibility of the programmer".

We started with the pattern story. We saw how Visitor pattern is used in Eclipse Platform.

We saw how Observer Pattern is used to track Workspace Changes.

And we talked about six other patterns and how its used in Eclipse Platform. If you are interested to look further, you can check the slides of Patterns In Eclipse.


Tuesday, April 27, 2010

A Beautiful Day - Eclipse Day India 2010

"Ubuntu is the essence of being human. Ubuntu speaks particularly about the fact that you can't exist as a human being in isolation. It speaks about our interconnectedness. You can't be human all by yourself, and when you have this quality - Ubuntu - you are known for your generosity." 

The organizers were generous, the sponsors were generous, the speakers were generous and the eclipse community was generous. And what a day it lead to! A day to share the knowledge acquired with years of experience working at Eclipse. We had excellent talks as you can see in the schedule

Holding the true spirit of FOSS we had free talks and free food - who said its not free beer ;). The organizers had put lot of effort for free - to arrange the venue, print the handouts, host the website. 

EclipseBible.com had sponsored the handouts for the event.  We offer eclipse training and consulting services. You can find the details at http://training.eclipsebible.com

The organizers were trying the best to cut the costs for the sponsors. Ankur even asked me to print the handouts (schedule + speaker bio)  in black and white to keep the cost less which I had to happily reject. The elegance of the eclipse should reflect even in the handouts distributed to the registrants. 

People from around 35 companies turned out including Bosch, IBM, Adobe, Google, Wipro, Accenture, and lot of startups.


Thursday, April 22, 2010

Eclipse Day India 2010 - 1 more day to go...

"Not only individuals and interactions, but also a Community of Professionals" 

I believe the most important point in the manifesto of software craftsmanship is the third one - "Not only individuals and interactions, but also a community of professionals". Only a community can bring awareness and spread the news of software craftsmanship among software professionals. The backing of a group will help an engineer to foster his/her imaginations into reality. A community is formed by constant gatherings and knowledge sharing sessions. Software Communities help to spread the news about good coding practices, ethical standards of engineers, responsibilities of software professionals to the society etc etc.

This is exactly what we do in Eclipse Community gatherings. I am more than excited to attend 'The Eclipse Day India 2010'. Hope to see you there.

If you are not able to make it there, don't worry, tune to this blog, I will brief about the happenings of the event soon.


Thursday, April 15, 2010

Eclipse Day India 2010 - 8 more days to go...

"Patterns help you learn from other's successes instead of your own failures" 
by Mark Johnson.

8 more days to go for Eclipse Day India 2010. What is more interesting than to talk about myself ;). Today, I would like to brief about my talk in Eclipse Day India 2010 - "Patterns in Eclipse".

My passion is to talk about better programming practices. Seeing well written code is a gift. A talk about writing good code may not go well with the 'Eclipse Plugin Development' theme. Hence I chose the topic 'Patterns in Eclipse'. Design patterns are solutions to recurring programming problems. The 'Gang of Four patterns' are used extensively in the development of eclipse platform. I will brief about some of these patterns, and how they are implemented in eclipse platform. I hope this will motivate the audience,

  • To write cleaner code.
  • To dig deep into the platform
  • Increases interest to explore the platform.
  • Help to absorb some of these patterns to his/her daily development work.
The following patterns will be covered,

  • Singleton Pattern (Accessing Platform and PlatformUI services)
  • Strategy Pattern (Customize a viewer using providers)
  • Observer Pattern (Resource Change Listener, SWT Event Handling)
  • Composite Pattern (During creation of widgets)
  • Proxy, Bridge Patterns (To access the file system)
  • Visitor Pattern (To traverse through the file system)
  • IAdaptible and Adapter Factories 
  • Memento Pattern (Persisting workbench state)
  • Virtual Proxy (Extension point mechanism)
All these patterns will be covered in 1 hour ;). I will flash the food in front and tell  "Hope you had a great lunch". ;) Just kidding!


References - Contributing to Eclipse: Principles, Patterns and Plugins, Head First Design Patterns, Design Patterns for Dummies, Object Oriented Analysis and Design with Applications, Clean Code: A Handbook of Agile Software Craftsmanship.

Tuesday, April 13, 2010

Eclipse Day India 2010 - 10 more days to go...

Ankur Sharma and Prakash GR teams up again to offer a feast of eclipse talks in the forthcoming Eclipse Day India 2010. The count down begins with just 10 more days to go.

It was great to see an idea taking shape to a concrete plan over the past few months. The event happens at the cozy Monarch Luxur Hotel, Infantry Road, Bangalore on 23rd of April, 2010. 

The agenda has lot of exciting talks. Even though I am eager to watch all the talks, few of my favourite talks are  'Dependency Injection in e4' by Chetan Kumar Kotha. I had attended Chetan's talk in last year's Eclipse Summit India and was quite impressed. My next pick is 'OSGi Tutorial' by Prakash GR. I try not to miss any talks taken by Prakash GR. Single sourcing with Rich Ajax Platform by Ankur Sharma is my next pick. RAP is a promising technology, but has less number of tutorials. A talk on RAP is a need of the time.    

From the abstract review team, we were concerned about "just one talk on e4". But, e4 1.0 is yet to release and there is enough time to gain the momentum.

As Ankur said, eclipse is getting a lot of love from Bangalore. Its interesting to see how a technology influences the imagination of masses. On Eclipse Day we will have more  insights on how eclipse is used in various firms across the city.


Friday, March 19, 2010

When the world changes...

Recently SlashDot reported the amount of information consumed by americans. It says that the americans spend more hours in front of TV than in front of computer....

Guess what happened next?

Google TV

Mitchell Pronschinske writes at Dzone "In an effort to trigger the mass adoption of web-on-television platforms, Google is creating its own TV platform based on the Android OS. Google will work with Intel and Sony to develop Google TV, which will combine television, web apps, web video, and other content on websites. Logitech is in charge of making the keyboard remote control. The final version will use Chrome ported to Android, rather than Android's WebKit browser."

It becomes more interesting in the report from NY Times …

"In addition to the makers of traditional cable and satellite set-top boxes, Cisco Systems and Motorola, many others have entered the game, including Microsoft, Apple, TiVo and start-up companies like Roku and Boxee, which already stream video from Netflix, MLB.com and other Web sites directly to television sets. Yahoo is also promoting a TV platform that uses small software programs called widgets to use certain Web services. "

Lets imagine that in the future we develop apps by connecting our keyboards to Television. Once the line between computer monitors and television sets blur, the relevance of social media apps will increase again. This will blur the line between work and play hours. Eclipse IDE may integrate more and more social media apps.

In 2015, will Eclipse IDE look like this?


Tuesday, March 9, 2010

"I have achieved Zero Defects"

"I have achieved Zero Defects",
 A dream of every software engineer.

Is it possible to achieve zero defects? Nothing is impossible. We have even reached the moon!!! But … seriously, do you think zero defects is possible? Fred Brooks, the author of The Mythical Man Month says "For each bug found during the testing phase, one hidden bug goes to the customer". These words are spoken from experience.

Now ask the same question to one of the managers who have not written a single line of code in the last 5 years. Probably, the reply would be "Defects are induced because of the carelessness of the engineers". I am not exaggerating. This happens in our everyday life, in the world around us. After all, the world is not that fair.

Ask the same question to the so called careless engineer. The reply could be "Its not possible to achieve zero defects, even though we can strive to reduce the defect count. We have even created tools to track down the bug count ...".

I am an engineer. I represent the careless engineer that you can see and feel in every software firm. When the blame for the defects are put on me, I become emotional sometimes. I scream. I shout. "Hey Manager, we engineers are careless. Because we too are human. And don't you know that to err is humane?"

Can we blame the manager for all those bad deeds? After all, the managers have to deal with the end customer who, sometimes, doesn't even know what a 'program' is. I know a customer who was not ready to accept even a single defect. He said "I am paying 10 times for your damn software than I pay for the hardware. You are so expensive. If your product is not defect free, then why should I invest such a huge amount for your service?"

That’s a reasonable question. If customer pays, can't he expect a decent product. And when he pays a huge amount, can't he expect a defect free product. After all, we engineers also live in the financial world. We also know the importance of money. In fact, we too save money to buy products.

Customers, managers and engineers. Who is the actual culprit? Who can we put the blame to? We forgot one entity… the point of our discussion. The software system which carries the burden of the defects. But one difference. Software systems are not part of our real world. They live in the virtual world. The rules and laws in the virtual world are different.

The hardware for which the customer pays live its life in the real world. You can touch it and feel it. In the real world, systems and events are more predictable. Because, the laws of physics applies here. If your mobile phone slips from your hand, your genius mind can track down the moment when it is going to hit the ground. You just need to know the weight of your mobile phone and height to the ground. Considering the dust in the atmosphere is negligible, you just need to apply the formula you learned in your school days to track when your mobile phone hits the ground. This is possible because the falling mobile phone is a continuous system. The engineers in ISRO and NASA send rockets to the outer space using the same logic. You can predict the output of continuous systems.

Take the values of all the variables in a software system along with the method stacks available in different threads, at any moment. This collection is the state of the software system at that moment. The virtual world is digital. In the digital world all systems are discrete. Means, the software system is nothing but a system which has 'n' number of states. You can test these n number of states by n number of test cases. This will ensure that the software system is defect free. Then you can make the big announcement. "I have achieved zero defects".

Consider that you have a simple java program which uses just a primitive 'int' variable. The int has a size of 4 bytes and can take values in the range of -2,147,483,648 to 2,147,483,647. These are the different states this single variable can hold. Definitely I cannot have test cases to test all these states. I will test three generic conditions. I.e., what happens to this small system, when the int takes a negative value, zero and positive value. Now I have reduced the states which I need to test from 4294967295 cases to 3 cases. Now there is a chance for a hidden bug in the rest of the 4294967292 states which I have not tested.

This example is a little exaggeration. But, …. If this is the case for a simple program with a single variable, what will be the case of a huge software system with thousands of variables and hundreds of threads? You can ensure zero defects by testing all those different states. If you are a manager, learn a bit about permutations and combinations so that you can calculate the number of test cases your test engineers should handle.

Coming back to reality, you cannot test all those states in the software systems. You need unacceptable duration of time and patience to do a complete exhaustive testing. By the time you finish your testing, years would've passed, even the need for your software system to exist will not be there. Your test engineers would've gone crazy, you would've been completely lost, depressed and wouldn't have seen day light for years. Even your family would've forgotten you. Man….

When the facts speak, the real world where we live has got strict deadlines and market pressures. The life time of products' time-to-market are getting shorter and shorter. We have to build systems in a matter of months. We need to cater to the change of requirements coming here and then. We have millions of states in the software which are not tested, but hide bugs from our reach.

Hence, I have the feeling that what others have said before me….. "Zero defects are not possible". But you can reduce the number of defects.


    • Follow Manifesto of Software Craftsmanship.
    • Recruit the right resources. Engineers who have got the passion to the craft and the attitude to improve his/her skills. They will contribute to the success of your organization without further supervision.
    • Give the best possible infrastructure to your engineers - the latest machines, uncensored internet, library, gaming facilities for his/her mind to relax. Productivity is highest when the mind is relaxed.
    • Provide flexible working hours. After all human mind has its own mood swings. Software cannot be written by just copy-pastes. You need to harness the creativity of the engineers. Creativity springs out of the mind when the time is right. You cannot ask someone to come out with a creative idea, say, in the next 1 hour.
    • A quiet place to work. The highest productivity of an engineer is achieved when he/she write programs in a meditative state, where the mind finds the best solutions to the domain problems.
    • Working from home facility.
    • If defects are found, do not blame the engineer who wrote the program or the engineer who tested the app. Face the reality.
    • Create a culture of knowledge sharing. Remember, people don't share knowledge in the absence of trust. Create a culture of trust.
    • Do not micro manage. Micro management will lead to mediocrity. Creativity is highest when the engineer is left to himself. Let the creativity of the engineer flow freely to create the best quality software systems. Remember the old management quote - "You can't manage What you can't measure".
    • Boost the motivation level of your engineers.
The above factors will help to reduce the defects in software system. The leading innovative organizations in the world have already implemented most of these items. You can definitely create software products without any of the above mentioned criteria. But, if you want to build world-class products with less defects, not the mediocre products, you need to seriously think about the above points.

References - The Mythical Man Month by Fred Brooks, Object Oriented Analysis and Design with Applications by Grady Booch and Others.

Wednesday, March 3, 2010

Basics of Eclipse Commands

I believe, technology adopters follow technologies that are easier to master. The maturity and openness of open source projects can be weighed by the number of tutorials, articles and books available to learn it.

This presentation is my first donation to eclipse community on behalf of eclipsebible.com. This presentation slides cover the basics of the eclipse commands extension point.


Sunday, January 31, 2010

A new web of life - HTML 5!

"HTML5 is not a technical achievement, its a social movement"
Doug Schepers

What is the significance of this article about HTML5 in eclipse community? Because... Web is getting 'richer' clients. HTML5 provides all of the rich client powers to a browser. HTML5 is not just another markup language, its an open 'platform' for building rich web applications.

Are you a fan of the first person shooter game 'Doom' of 1990s? Then check the game 'Gifter' in your favourite browser (oops, not IE). Its not coded using C or developed using a gaming engine. Its completely written in HTML 5.

HTML 5 will stretch the browsers to its limits. To be precise, the war will not be between just browsers, but between the engines that power the rendering of the browers. A rendering engine is a hidden piece of software that takes marked up content (eg. HTML) and formatting information (eg. CSS) and displays the formatted content on the screen. Believe it or not, today I opened an HTML5 powered site in my IE8, and guess what happened. The site killed my internet explorer.

Some of the popular rendering engines are,
  • Gecko - Used in Mozilla Firefox
  • Webkit - Used in Chrome & Safari
  • KHTML - Used in Konquerer
  • Trident - Used in Internet Explorer
  • Presto - Used in Opera
HTML 4.01 was around for a decade. The new HTML 5 working draft was released at the start of 2009.

Even though HTML5 gives you a lot of features, I will be discussing only those features the rich client developers are interested in.

Some of those exciting features are,
  • Canvas element
  • Drag and Drop support
  • Interactive Elements
  • Offline Web Applications
  • Web Database Storage
  • Video element
  • Audio element
But don't limit your knowledge. You can find the rest of the features at HTML 5 Draft. Lets find out more information about each of the above features.

Canvas Element

HTML 5 gives you a canvas element for drawing purpose. Most of the major browsers like Firefox, Safari, Opera, Chrome etc support the 2D canvas context.

What about 3D? An experimental build of Opera supports 3D canvas.

Can SWT be extended to support browser widgets? We have RAP!!! GWT is out there within a hands reach.

You want to try out a sample code? Copy the below code and save it to a file 'canvas.htm' and open it in canvas tag supported browser (eg: chorme, firefox, ...).

<canvas id="myCanvas">I do not support canvas tag</canvas>
<script type="text/javascript">
var canvas=document.getElementById('myCanvas');
var ctx=canvas.getContext('2d');

Drag and Drop

HTML5 provides an event based drag and drop support. You have events like 'dragstart', 'drag', 'dragenter', 'drop', 'dragend' etc. There is a good tutorial which explains more about drag and drop.

Interactive Elements

Whats the limit of interactivity on a browser? The answer is that its 'limitless'. HTML5 provides the following interactivity elements.
  • datagrid - For grid control. This is similar to the 'grid layout' in swt.
  • menu - You can create menus.
  • command - This is a command the user can invoke. Similar to the 'commands' in eclipse.
  • details - This is an additional information the user can obtain on demand.
There is an interesting article on ibm developerworks which explains more about the interactive components of html5.

Offline Web Applications

Gmail users might have noticed by now that you can use the inbox even if you are not connected to net. See the offline web demo app at html5demos.

This is achieved by using a caching mechanism. Using a manifest file, you convey to the browser to cache the required files. The browser will download the files at the client side. A simple, but powerful mechanism, which will change the way web apps are used.

Web Database Storage

This allows you to embed an sql based database in your web app. You can find a demo of web database here.

Who will gain from the offline apps and web db storage? This will definitely be a boon for the web operating systems. How about rich client apps? What if you need to run rich client features in your browser? Definitely, you need to download all those rich UI code to the client's machine and web db storage comes handy.

Video and Audio

Like the <image> tag, now you can embed videos with the <video> tag and audio with <audio> tag.

A few interesting apps based on HTML 5 from Mozilla Labs and Google Labs are listed below.
  • Mozilla Bespin is an extensible web code editor based on HTML 5.
  • Mozilla Prism lets users split web applications out of their browser and run them directly on their desktop.
  • Google Wave is an online tool for real time communication and collaboration.
  • Google Gears is a plug-in that extends your browser to create a richer platform for web applications. Webmasters can use Gears on their websites to let users access information offline or provide you with content based on your geographical location.
  • Google Docs is a free, Web-based word processor, spreadsheet, presentation, and form application offered by Google.
The way we interface the world is about to change. Its happening around us. This is the best time to create the next killer app based on new web standards.

What is the strategy at Eclipse to compete against the web technologies? We do not compete, we synergize with the web technologies to give the best value to the end user. e4 is the outcome. e4 is still under development. You can customize the look and feel of an e4 based app using css. You can modify the user interface using xml. Eclipse is adapting the open standards to create tomorrow's technologies and next generation rapid application development tools.


Thursday, January 14, 2010

Eclipse Consultant And Trainer

"Be the change that you want to see in the world"
M. K. Gandhi.

You find a purpose on what you do when you know that you are serving something larger than yourself for a bigger cause.

I would like to announce my change in avatar from an organization man to a freelance Eclipse Consultant and Trainer.

And okey-dokey... My first client is one of the best I could get!

This way I can spend more time with Eclipse Community, learn and evangelise more about Eclipse and the new technologies.