Tuesday, October 27, 2009

GEF3D in Action

Models, models, models... we hear this all the time...

In computing world, modelling is all about arranging abstract objects (which we do not see) into the computer memory. We stack objects, we pile objects, we queue objects, we order objects based on business and personal needs.

The senior software developers who developed the modelling concepts encountered lot of troubles before the time of the modern modelling concepts. Hence, they understand the significance of modelling more than anyone else.

How do you teach these modelling concepts to the next generation of developers? You need to teach modelling which is a concept of abstract ideas. Ideas which cannot be seen with the naked eyes, but which needs to be visualized in the brain. (Will people with spacial inabilities ever be able to learn modelling?)

Scientifically, learning is an associative activity. Any new information, unless it is related with something we already know, can never be understood. Thats how brain works! Otherwise, we learn facts and concepts through our senses. We see and learn, we touch and learn, we smell and learn, we hear and learn, we taste and learn. Which senses are triggered when we read most of the articles and tutorials on modelling? To which 'data' in the brain tissues should the new and young developers 'associate' or 'link' the new abstract modelling concepts?

Forget about learning, how can we comprehend the massive amount of data piling around us. Complexity is the new norm! Impatience is the accepted emotion! We still need to use the five senses to see, touch, smell, hear and taste all the information around us.

Never get lost in the jungle of information! GEF3D comes to the rescue.

GEF3D helps you to visualize the models in 3-dimensional space. You will be able to 'see' all the abstract data that flows around using proper use of GEF3D. Since we all are 3-d animals, 3D-fied (as Jens says) models will revolutionize modelling. Any data if properly analysed, designed and implemented; can change or optimize the existing knowledge base. More than 3-d models, what else do GEF3D provide? Any other features?

How about 2.5D models! What is it? How about giving more meaning to 2D editors by connecting between multiple 2D editors.

Want to learn more about tomorrow's 3-dimensional computing! Attend any of the GEF3D sessions at,
  • 29-Oct-2009 : Eclipse Summit Europe at Ludwigsburg, Germany
  • 05-Nov-2009 : Eclipse Demo Camp, Bangalore, India
  • 23-Nov-2009 : Eclipse Demo Camp, Berlin, Germany
  • 04-Dec-2009 : Eclipse Demo Camp, Hamburg, Germany

For more details see http://eclipse.org/gef3d/

madhu

Saturday, September 26, 2009

Comments, Imports and Constructors

According to the butterfly effect, even the slightest and minutest events can change the course of events in future. Hence, each change is significant for shaping the future.

Progress of a society can be calculated by the amount of change happening in that society. A transforming society appreciates and experiments with new ideas. But, if the new idea is evaluated using the framework of old ideas, then the old ideas become more and more rigid.

I learnt three new things which conflicted with my existing understanding. In the below points I do not want to coin the term old approach and new approach, since they are just two ways of approaching a concept.

The best way to appreciate a new idea is to experiment and see whether it makes sense.

1. Writing Comments in Code

What I Knew : Write as much comments as possible in your programs. The more the better. It can never be more than needed. I heard about various code-comment ratio - 1:1, 1:5, 5:1.

What I learnt *: Do not write a comment unless you feel that you failed to express your indent in your code. Means, write comments if your code is not expressive enough. If you have a public method

"public int findTotal(int amount1, int amount2)",

you can provide a comment "Finds the total of amount1 and amount2". This comment is redundant. Anything redundant in your code can be avoided. The method and argument names convey the indent of the programmer. Redundant content in your classes will make it difficult and time consuming to understand.

2. Wildcard imports (import java.io.*)

What I Knew : Never use wild card imports. Wild cards do not cause performance issues in java. Still the use of wild cards were considered as ineffective coding practise. The specific imports helps to identify the dependencies of your class.

What I learnt* : Use wild card imports. You just need to know which packages your class depends on. All the specific imports clutter your classes with too much information. Incase you need to know the specific imports at any point of time, you can see those imports quickly using the advanced features of the latest editors. In Eclipse, just go for 'Ctrl+Shift+O' to add specific imports.

Another reason is that specific dependencies are hard dependencies. Wild card imports reduces the coupling by avoiding the hard dependencies.

3. Default Constructors

What I knew : Always create default 'no-arg' constructors in your class, even if you do not need it at the moment. Tomorrow, if you may need to sub-class your parent class without a default constructor, you may end up in agony. If your sub-class needs a 'no-arg' constructor, you may have to write a 'no-arg' constructor for the parent class at that time.

What I learnt : Do not use default 'no-arg' constructers unless you require it.

What if my sub-class needs it tomorrow?

If your parent class doesn't indent to provide a 'no-arg' constructor, then its a design decision. Your sub-class is supposed to use only the constructor which is provided by the parent class.

madhu

* Courtesy - Clean Code by Robert C Martin

Tuesday, August 11, 2009

Multitasking

Multitasking - the ability to do multiple tasks at a time. I am lost in the multitask world.

15 years before, every morning my father used to drink his tea while he browse through the newspaper. This is one of the few multitasks he had done in his entire life (I guess).

Today as soon as I wake up, I turn on my laptop, drink my tea, check my email, open planeteclipse, browse through multiple blogs, if there is a delay for a blog to open, I will go back to my email, in between I read the heading in the newspaper, I'll check the twitter account, how about linkedin account, new articles in newscientist.com, then i .... am I nuts? !!!

Bhoom! Information explosion !!!

Scientifically speaking, humans are designed to do only one thing at a time (females are an exception ;) ). Either I have to mutate to the new alpha persona with multitasking ability, or time for me to go back to the fundamentals of time management.

Prioritize, do one thing at a time. "Focus".

madhu

Friday, July 31, 2009

Creativity

A few days back I had attended a talk by Shankar Subramanian on the topic 'Creativity Unleashed'. It was a very inspiring talk.

What is creativity?

According to the dictionary its "the ability to create". Creativity is nothing but thinking in new ways. The ability to create something new.

"We are the way we are because we think we are the way we are", quote by myself till someone else claims the other way.

From the day we are born to this world, lot of rules are imposed upon us. After long years of exposure to lot of rules, strong patterns of thought are formed in our brains. After a few more years, our entire behaviour follows certian patterns. Our behaviour, becomes more and more predictable. For example, if my wife interrupts me during my work, my behaviour is very predictable. The only emotion that comes to my mind at that time is 'anger'. I don't mind giving part of the credit for my predictability to my education system as well. Some kind of work requries predictability, but definitely, predictability ruins innovation.

If we take the lives of some of the greatest intellectuals in the last 1000 years, most of them did not have a normal education like the rest of the kids. A few of them had never seen schools, and a few of them were expelled from the schools. Leonardo da Vinci, Hans Anderson and Niels Bhor were considered as retarded by their school teachers. Sir Isaac Newton was told as dunce, ie, stupid and slow to learn. Thomas Alva Edison's teachers were irritated as he asked lot of questions, so they called him 'addled', ie, confused kid. Albert Einstein's teacher had told him that he "would never make a success of anything". These kids were considered as below average students by the teachers, but geniuses to the world.

Who knows, may be the impression of less intelligence helped these kids. This resulted in less rules. No one imposed the existing ways of conventional thoughts into their brains. This helped them to think in their own creative ways. They never shelled themselves to the captivity of negativity. Instead, they learned things on their own. I heard this quote sometime back "If I teach you, then thats the end". The quote makes more sense now a days.

Now, we all are adults. Most of us have predictable thinking patterns formed strongly in our brains and minds. How can we break these patterns of thought? Does these patterns make us handicapped to be creative?

The answer is 'No'. You can be creative. Creativity can be taught.

There are quite a number of tools which will help to break these patterns and help you to be creative. Edward De Bono has contributed lot of tools to these existing arsenal of creativity tools. Some of the tools are Lateral Thinking, Six thinking hats etc.

If you feel that your organization requires a talk on creativity, I recommend Shankar Subramanian. He is the founder and Principal Consultant of Ninedots. Nindots is a consulting firm which helps to improve productivity and efficiency of organizations through personal development of employees.

Lets talk about the topic which we all are comfortable with - The Eclipse. Web 2.0 has unleashed hell lot of possibilities. I hope E4 is moving in this direction. There will be a day when the entire world will be wired with high speed internet. On that day, I hope the creativity and capability of our engineers will help to transform eclipse into a complete web based platform. In future, we may teach the new engineers, "huh... do you believe that eclipse was a desktop application, back then!".

madhu

Sunday, July 19, 2009

Eclipse India Summit '09 : Happenings from Day 2

The vision of Eclipse Summit India '09 is to nurture new contributors and to create new proactive committers to the Eclipse community. If Eclipse Community is getting diversified with lots of new projects, Indian Software Community is already diversified into lot of areas; its just a matter of time to organize and channelize the motivated young developers to the eclipse community.


Annamalai, Prakash GR and Chetan Kumar has already posted about the 2nd day of the Eclipse Summit India 09 on their blogs. Please check out Its Eclipse in Clips and Eclipse Tips and Eclipse Fever to get the perspective of the summit from the eyes of the organizers and speakers of the summit.

On the 1st day I was hopping between sessions. As the rolling stone I did not gather much information for the developer in me, even though I could get lot of information and photos for my blog. My priority for the 2nd day was to gain some technical knowledge, so I opted to attend the 3 hour session 'Design patterns in Eclipse' by Ilya Shinkarenko in the morning and the 3 hour session on OSGi by Sameera Jayasoma in the afternoon.

Before the technical presentations, the 2nd day opened by the keynote talks by the platinum sponsors, and this time it was the turn of Oracle and IBM.

(Clips from different sessions at Eclipse Summit India, Day 2)

For Oracle Mr. Dhiraj Bhandari from the sales team introduced their product. He presented OEPE (Oracle Enterprise Pack for Eclipse). This pack consists of Oracle Enterprise Pack for Eclipse 11g, support for Web Services, JSF, ORM Workbench etc.

One of the amazing feature he showed is the 'Fast swap' feature. Earlier, if you have ever worked on a client-server software application, you know that it takes lot of time for its 'code-deploy-test' life cycle. Even if you need to make a small code change, you need to deploy the entire project and then execute it. Using the fast swap feature, just make the change in your code, save the changes and execute the server application :). The deployment happens automatically in the background, just like the compilation happens in the JDT. Its that simple.

The Oracle's strategy - They are planning to phase out Weblogic Workbench, and more importance will be given to the JDeveloper and Eclipse Packs. It was a new information for me to hear that Oracle is the #2 committer to the eclipse community, after IBM!!!

After Oracle, it was the turn of IBM to present their tool - Rapid Application Developer for Websphere. IBM slides showed some interesting survery results from Gartner Group. Only 42% users are satisfied with the quality of the software products, only 34% of projects are successful, only 37% users are happy with the execution speed of the software products etc. IBM also featured Rational Data Architect, Rational Software Modeller and Rational Software Architect.

After the keynote talks, I headed towards the talk 'Design Patterns in Eclipse'. Ilya explained some of the patterns used in the eclipse framework using a sample RCP application. The patterns covered were,
  • Adaptibles (Properties View). This can be related with the Extension Interface pattern from the traditional patterns.

  • Singleton
    eg: PlatformUI.getWorkbench(), Platform.getAdapterManager(), ResourcesPlugin.getWorkspace().

    The disadvantages of this pattern includes classloading issues, unpredictability in dyanmic OSGi environment etc

  • Bridge Pattern
    eg: OSGi Service Registry

  • Whiteboard Pattern (Pluggable Listeners)
    This is an OSGi pattern.
    eg: Usage of ServiceTracker to register listeners

  • Proxy-Bridge Pattern (IResource to access the file system)

  • Composite Pattern (IWorkspace)

  • Observer Pattern - for tracking resource changes, event listeners in SWT.

  • Visitor Pattern
    eg: IResourceDelta and IResourceDeltaVisitor, IResource and IResourceVisitor etc

  • Strategy Pattern - Layout managers in SWT

  • Plugable Adapters - Label and Content providers in Jface

  • Command pattern - IAction implementation

  • Memento - For persisting UI state in Eclipse workbench.

  • Virtual Proxies - The lazy loading rule.
It was quite a useful session. Thanks Ilya for all the details.

(Clips from different sessions at Eclipse Summit India, Day 2)

During the lunch session I could interact with the Platform team from IBM. Post lunch I headed towards OSGi session by Sameera Jayasoma from Sri Lanka. He is a senior developer at WSO2 Inc., the open source SOA Company. He started his talk with a few words on WSO2 Carbon. Then he explained the need for modular systems and went to the details of OSGi. The workshop had lot of hands-on demos. I created my first OSGi project :).

The 3 hour long session gave some valuable information about OSGi internals.

Meanwhile in the other rooms, Anshu Jain from IBM talked about 'Eclipse: A framework of frameworks'; Janakiram MSV, Deputy General Manager, Bell Labs India talked about Google AppEngine for Java and Eclipse Developers; Krishna Venkataraman, Director, Product Management, Actuate Corp., presented Actuate's prestigious product BIRT; Srinivas Kantipudi talked about a few Eclipse Test Automation Tools, Munnangi Ravindra Babu talked about 'Fast track to develop online analytical applications using BIRT.

There were a few Salt March get aways like T-shirts, gifts from quick contests etc.

Salt March Media and ANCIT consulting had done a great job by organzing such a mega event successfully. As the eclipse community grows in India, the credit definitely goes to organizations like these, who think about the future and act. As I had mentioned in my previous blogs, open source is not a charity always; many businesses thrive on the open source model; but as open source projects 'gets' the revenue, it 'gives' back to the community; its a win-win situation.

And together, we grow as a community.

madhu








Friday, July 17, 2009

Eclipse India Summit '09 : Happenings from Day 1

A day full of eclipse presentations and trainings.


At 9 in the morning, I stepped into a hall full of eclipsers. I guess, around 300 people were filled in that hall.

Instead of the first session, I would like to comment on the last session taken today, not because I have short term memory loss as in Memento, but because it was the most enthusiastic presentation of the day. The topic was EMF, and it was taken by the young charismatic Chetan Kumar, the author of the blog Eclipse Fever and Annamalai Chokalingam, CEO of ANCIT Consulting. The 3 hour session started with the need for modelling in software applications, popped from the basics to the advanced EMF areas like code generation, emf queries, emf transactions, dynamic emf, teneo etc.

For EMF doubts may be you can contact Chetan at "chetankumar at gmail dot com" and Annamalai at "training at ancitconsulting dot com".


(Clips from different sessions at Eclipse Summit India)

Thats all about the last session; now coming back to the morning sessions, guess who did the keynote for the opening talk of Eclipse India Summit 09.

The keynote opening talk was made by the Director, MTC, Microsoft - Mr. Ramkumar Kothandaraman. Quite surprissing to see Microsoft presenter opening an opensource get together.

Microsoft has a success story on apps that run on individual machines - like Windows OS, MS Office Suite etc. But the future will be on apps that can talk with other systems with ease. MS wants their systems to talk with other systems. Hence, they want to learn more about open systems, and the best place to look for open systems is the open source. MS will be looking to make a mark on standards that define how the systems should talk with each other.

Mr. Ramkumar touched on topics like PHP support on windows applications; Azure, the cloud platform; Eclipse tools for Silver Light - the Eclipse4SL; Java API for OpenXML, Poi for Apache.

For more details you can check at http://www.microsoft.com/web

After the keynote talk, the actual presentations started on three different rooms; it was difficult to choose which talk to attend as all of them seemed too good to miss.

The first talk was from Mr. Illya Shinkarenko. He is a self employed software architect based in Germany (Eclipse Training Alliance). He started with the architecture of a sample RCP application and quickly drifted to the advanced stuff, but explained in a simple manner.

The topics he covered includes eclipse workbench, plugin philosophy, osgi services, extension and extension points, loose coupling between plugins, adapters, data binding, ....

In the other rooms Annamalai Chokalingam (ANCIT Consulting) and Lavanya Konda took a 3 hour session on GEF and Zest, which covered some of the advanced techniques and in-depth look into the graphical frameworks; The other talks were by Shaun Smith on Eclipse Link, Sunil Bannur and Mayank Kumar on Adobe Flex Builder. Adobe Flash Catalyst is a new interaction design tool to rapidly create user interfaces without coding.

Prakash GR from the Eclipse Platform UI team and author of Eclipse Tips blog, presented the topic 'Patterns in Eclipse'. It was quite a useful session for the plugin developers; a few tips and tricks were added bonus to the audience.

After lunch, Ankur Sharma, the Eclipse Platform team member and author of the blog Eclipse PDE briefed on various aspects of the target platform management in Eclipse. He talked about multiple target management, API tooling etc.

Mahesh Shankaran had taken a design case study of a GEF based application with lot of advanced UI features.

Salt March Media and ANCIT Consulting has done a good job with organizing such a successful event for the eclipse developers in Bangalore.

Lots of sessions are pending, wait until tomorrow ....

madhu