Mystery with MysterySpot

We have just comeback from the MysteryHouse. This is near Santa Cruz and from Fremont, it took 45 minutes. The drive is little rugged with lots of turns and narrow roads. Its better to drive with a experienced driver so that you wont end up as a Mystery 🙂 .  Weather its scientifically proven or even if its a  illusion, its definitely worth a visit and the 5$ that you pay for the entrance fee. They have guided tours and the guides really do a good job there. They also give you some time to take pictures.

Couple of points that i liked there were…

  • On the plain surface the visual hight of your body changes
  • When you walk the uphill and downhill, your feet experiences funny inclinations
  • A small room there has some funny inclinations and climbing the ladder without support is amazing
  • The force that you feel while you swing the lead ball, makes you believe that there is some anti force
  • The “Scientist” experiment that they conduct there is a good visual illusion and great fun

In the end its a good trip for 4 hours from the eastbay and enjoyable. Good Luck.

Posted in technology | Tagged , , , | Leave a comment

UI Designers dilemma !!!

Eclipse Visual Editor, NetBeans Matisse project and Instantiations SWT Designer are wonderful WYSIWYG editors that i have used till now. With few projects that i have done, i have always hand coded the UI’s. And of course i have done UI development on the Eclipse through out. So all the perspectives, views, editors, wizards, preferences and properties are hand coded and i am quite comfortable with it. I do agree that probably it takes more time for me to hand code but i feel “personally” satisfied.

When i discuss this with few of my colleagues, there are for and against the UI Designers. For me and many others, Layouts and adjusting the controls on the screen are the challenges. I do spend a lot of time in adjusting the controls in a layout.

Why they like UI Designers…

  •  UI can be build very very fast, without knowing whats in the code
  • With the advanced UI Designers, its easy to adjust/auto-adjust the Layouts
  • The easy-to-use drag-and-drop paradigm makes it easy to quickly visualize
  • Properties are set in the palette and the same is reflected dynamically on the UI preview
  • Control and Widget hierarchy is what many appreciate. I know precisely, which controls are in UI

Why they want to handcode…

  • I can code. I am a developer. I am used to it.
  • Code generated by UI Designers are not optimized. I want my code to be optimized.
  • Many a times, generated code is not readable to customize.
  • It might make me less creative and insecure, as i do not know whats happening at the code level.

I am sure many of us share some of the above views and you might definitely have great experience in building UIs. Its really interesting to know, if there are really more number of developers who would use UI Designers. For now i would stick to the hand-coding. Do share your experiences with the UI Designers …

Posted in eclipse, java, software | Tagged , , , | Leave a comment

Need some Experiences on Topcased, OAW for MDA

I have been looking at the Topcased IDE for Model Driven Development. With so many tools used inside, its a lot overwhelming to know each tool and see how they should be used. Tools / Concepts like AADL, Acceleo, OAW in the TopCased makes me confuse with the Eclipse Modeling Framework Project. OAW has the topics like Model-to-Text, Model-to-Model and other Model Front end tools.

I would need some help from any one who can point me to a high level differences between the EMF Project and OAW/Topcased. I do remember seeing OAW on Eclipse site some time back, but i don’t remember the context.

More importantly, if any of individuals or companies are using Topcased suite for the MDA, please do let me know your experiences.  I am evaluating some of the MDA Development tools and i would like to get feedback from all you experts.

Posted in eclipse, reviews, software | Tagged , , , | Leave a comment

Did you check your Pulse ?

If you are using Eclipse, then you must check out Pulse. Irrespective of if one is a Developer, Technical Lead or an IT manager, Pulse has some thing to offer. Pulse is free software created by Genuitec LLC, which focuses to decrease some of the pain points and ease the eclipse profile maintenance.

I have been playing with Pulse in past few weeks and it certainly does what it claims to be. Following is a typical scenario that i have been using eclipse from past 5 years. Its very interesting to analyse them and see how Pulse helps me in improving the same tasks that i very often.

Scenario #1 : For users who are familiar with the Eclipse Platform, they simply need to download the installation and run it. As we need and install more plugins, it often becomes little difficult to maintain the dependencies. Eclipse instance that i typically run follows a sequence of steps…

  • Find the plugin “MyPlugin”
  • Find the Dependencies of the plugin “MyPlugin”
  • Depending on the download size, find a nearest mirror site
  • Download the dependencies and the actual plugin “MyPlugin”

With Pulse : Pulse enables me to overcome all the above mentioned steps. Of course i need to still know which plugin i want to install :). Once i find a plugin, looking for Dependencies, Looking for faster download mirror site and downloading tasks are done by Pulse for me. I wanted to use WTP XML editor, and i got this option from Pulse default profiles. Its very cool that all the dependant plugins are automatically added by Pulse and downloaded concurrently. Yes you read it right. See the following screen-shot which shows you the PHP editor download.

PHP Downloads

Scenario #2 : So far so good, I have installed my favorite plugin and successfully ran my eclipse instance. Its very customary for many of us to have many instances of Eclipse installations. They could either be for work or for playing a new cool set of features from a latest release of eclipse. At any point of time i normally have minimum of 4 instances namely WTP All in One (my sandbox), Project Specific Eclipse, CDT Eclipse and TopCased Eclipse. Of course i do want to maintain different instances and don’t want to install one on the top of other. In this scenario, i am increasing my disk space by having multiple installations.

With Pulse : Pulse manages all your profiles that you have created. Pulse knows all the plugins that have been downloaded and manages a single copy of the plugins, and supplies to different profiles. So, you would save your disk space by default. This would be a significant save for many of us and especially IT Department. They do care about the hard-drives provided to developers ;). e.g. if CVS plugin is already downloaded, it will be shared across multiple profiles that you have.

Scenario #3 : And now, once i have successfully downloaded and installed plugins, i am interested to see the SAME configuration on my team’s machines. Hummm… Till now i used to send the download sites of all the plugins to my team and they download again. Or, i copy the entire eclipse installation on to Memory Card :). 

With Pulse : Pulse lets you to create your own profile and share it to other users. Of course you need to register on Pulse to be able to share profiles, but that’s nothing compared to what you gain. That means, a profile shared by my colleague is seen by me and i can start using this profile right away by running this. In-fact the same profile can be seen worldwide and can be accessed by any one who knows about this profile. 

Pulse Sharing

Scenario #4 : I worked for Bosch, an automotive supplier and the IT department had no way to distribute a single instance of Eclipse that has a good set of plugins. If IT developers find few good plugins and want to have them with all colleagues, there is no single way to do this. This usually ends up in having different Eclipse and plugins combination.

With Pulse : As Profiles can be shared, any user can send this profile and the same can be accessed by all colleagues. IT Department can distribute these profiles so that developers can run the profiles they are interested in.

My Pulse Profile

Overall its a great tool. One interesting thing i like is, any registered user can submit a plugin of his choice to be included in Pulse’s profile. I guess currently this is in the beta stage and i am hoping to see lot more features in future. More information can be obtained at following pulse links…

Download Pluse : http://www.poweredbypulse.com/download.html       

Pulse Features / Why use Pulse : http://www.poweredbypulse.com/why.html 

Support and Forums : http://www.poweredbypulse.com/support.html

Posted in eclipse, plugins, software | Tagged , | Leave a comment

Web Interactive Design patterns

Most of us are familiar with the Design Patterns on the Desktop and Multi-tire type of applications. With the recent Web 2.0 kind of applications its very important to understand the User Interaction Design Patterns. I got this site from one of my manager and i found it to be very very useful. It has a variety of experiences from the industry experiences and also has great examples.

You can visit http://www.welie.com/index.php.

Posted in software, technology | Tagged , , , | Leave a comment

Application Performance : Part II

I have been dealing with many of the java applications for years and in the recent past i am finding all the areas that effect the performance. I have been reading lot of books and articles and i thought that a summary would help everyone. In the past 2 months, i have been reading the book Java Performance Platform. Thanks to the authors, they have really given valuable information in this book. As always, “Its not enough to read this book but to consciously write applications that takes care of the memory management and performance”.

Many of the developers and IT does complain about the huge foot print by applications and some times its difficult to know whats causes the foot print. Applications becomes memory hogs and instead of looking into the root cause, we tweak JVM settings, increase the virtual memory, increase the PermGen size, custom class loading. I am sure and any of you would agree that we do “all sorts of things” for the application performance. I have written some notes on the Garbage Collection  (which is Application Performance – Part I) in my previous blog. The current “notes” concentrates on the causes for the RAM footprint and different aspects of the things that we need to be aware of.

Memory foot print of the program is tricky to find out. Many of developers do look into the TaskManager to see RAM usage by the application. This definitely gives an idea of how much of memory your application requires. When this memory increases over a period of time, we suspect memory leaks and take corrective actions.

Programmatic Memory Usage : Certain in formation can be derived from the java.lang.Runtime class. This class can look for the heap size of the JVM. Two methods namely Runtime.totalMemory() and Runtime.freeMemory() gives the size (in bytes) information that many of us want. Heap memory can only give the size of the objects. But the actual size of the application is a combination of the Objects, Classes, Threads, Native Data Structures, Native Code.

App Runtime Size = funtion of (Objects + Classes + Threads + Native Data Structures + Native Code)

Depending on the OS, JVM and application the actual memory consumption changes. So any one of the above parameters could be the number one memory consumer for a particular application. In general the memory consumption depends on following items (but not limited to).

  • usage the native code
  • usage of java core libraries
  • bulk of the frameworks used in the application
  • number of classes loaded against the objects used

Most of the developers do have a great deal of control over the Objects and their sizes. It could help if the developer knows the approximate size contributed by the objects at the run-time to see what is the optimization area. i.e. if object memory is only a small % of the total size then perhaps we could concentrate on the classes or native libraries, etc.

When classes are loaded into the memory, there are few more dependant entities that contribute to the RAM footprint. Bytecodes is the intermediate format that a java class file gets compiled to. It is necessary that the bytecode gets loaded into the RAM. All the related contents are parsed and reflective data structures are created for methods and fields.  Constant pool is defined for all the classes. e.g. all the String literals are present in this constant pool along with all the class, method and fields names. Threads are another important item that could cause a large memory foot print. Its necessary to see what kind of computation is done in the Thread and what data-structures are used. Many of the UI level libraries/frameworks like SWT, AWT does depend on some sort of the native libraries. Its difficult to know which class of these frameworks directly access the native libraries.

Knowing some of the entities that increases the memory footprint would help many of developers. If not completely avoid the large memory footprints, we can at least be aware and work towards conscious usage of resources.

Posted in java, reviews, software | Tagged , , , , | Leave a comment

Is anyone doing Mashup IDEs on Eclipse ?

Gartner predicts that Mashups and Composite Apps is one of the top 10 technologies for 2008. There have been lot of companies embracing the so called bleeding-edge technologies like SOA, RIA, Web2.0, Virtualization, Social Networks and Enterprise Wikis. As these technologies and frameworks are supposed to increase organizations productivity, there is a need to look-into the developer’s productivity too. These days many are happy that you get to choose one in many of the development environments. 

Following are few of the very cool IDEs that i have seen in the area of AJAX, SOA, RIA …

  1. Eclipse (WTP, ATF, RAP)
  2. MyEclipse
  3. Aptana
  4. GWT Designer
  5. Flex Builder
  6. OpenLaszlo IDE
  7. JackBe’s Presto
  8. Nexaweb
  9. BackBase
  10. TIBCO General Interface

I am very curious to see anyone coming up with an IDE for Mashups and Composite applications in the Commercial and Open Source area. I am aware that the enterprise Mashups and composite applications is a budding concept. Of course Mashups from Google are there for a while (but these are not the real enterprise Mashups). Recently i have seen few projects like Damia from IBM, PopFly from Microsoft, Wires from JackBe, Kapow and Denodo. These projects do have some sorts for IDEs but none of them apparently have an IDE based on Eclipse.

“Is anyone out there who is doing Mashup IDEs on Eclipse ?”

Posted in eclipse, java | Tagged , , , | Leave a comment

Do you care about Garbage Collection ?

Recently there have been few instances our RCP application crashed with the OutOfMemory exception and it took lot of time to look reasons behind the crash. An easy solution is to increase the PermGen from 64mb (default) to 256mb (recommended). Well, this works for the application and i am happy. Since then, i explored few books and articles to look into the memory allocation, objects creation and garbage collection can effect the application and its memory needs.

Garbage Collection is the concept that its publicized as “JVM does automatic GC”. But in reality this does not seem to be as cool as it sounds. Developers should not completely relay on JVM to take care of your applications memory needs and garbage collection. A solid understanding on “How GC works” is essential to write robust and high-performance applications.

Its necessary to understand the complete life-cycle of an object and how it transforms its state from declaration till garbage collection. We will look into each of the state in detail.

  • Created
  • In Use
  • Invisible
  • Unreachable
  • Collected
  • Finalized
  • Deallocated

Created: Creating the object makes many things to happen. Space is allocated for the Object. Object constructor is called. If at all there is a super class, it constructor is called. Instance variables are initialized. In the end its important to realize that the object construction does take time and this depends on the JVM implementation for sure.

In Use : Once an object has strong reference, its said to be In Use. It is normal for any object to be In Use state for relatively longer than any other states.

  1. public class InUseClass {
  2. static List someList = new ArrayList();
  3. static void doSomething() {
  4. Customer customer = new Customer();
  5. somelist.add(customer);
  6. }
  7. public static void main(String[] args) {
  8. doSomething();
  9. }
  10. }

In the above code you can see that the at the time doSometing() is executing, there are 2 instances of the Customer that’s holds on. One in the line 4 and one in the line 2. Once the doSomething() returns, there is only one instance that remain of Customer which is line from line #2. Which is a reference of the Customer object in the List. Thus you can imagine that there would be lots of references that remain strongly referenced even after they are used up.

Invisible : When an object is no longer strongly referenced but references still exists, its said to be in Invisible state. Its not necessary that all objects go via this state. In the following code snippet you can see that the strong object references are lost once the something() method is returned. In other words, they go out of scope once the method is returned.

  1. public void something() {
  2. for (int i =0; i<5;i++) {
  3. Customer customer = new Customer();
  4. customer.printName();
  5. }
  6. }

This scenario is dangerous and one of the main causes for the memory leaks. In this code block the references become invisible and its recommended to make the references null explicitly.

Unreachable: An object is in Unreachable state when there are no strong references and it will be marked for the collection. Of course “marked for collection” does not mean that JVM does the GC immediately. JVM has all its freedom to delay till memory is required by application.

Collected: When an object is unreachable the JVM readies it for the finalization. If an instance has the finalize method then it is marked and if the instance does not have any finalize method, it will move directly to Finalized state. Its very important to note that the when an instance has the finalize method, the deallocation process is delayed.

Finalized: Once the finalize method is run, if the object is still unreachable, its in the Finalized state. A finalized object is waiting for the deallocation. Its certain that the object’s life is prolonged when the finalize method is attached to the object. Also its not recommended to attach the finalize method for short-lived classes.

Deallocation: After all the above steps if the object is still unreachable, then the object is marked for the deallocation state. Its not sure when exactly the JVM deallocates, but this is dependent on the implementation of GC algorithms.

In the end, GC is not really what many of us perceive. An extra care must be taken to carefully write the applications with a special check on the object references and freeing the memory when ever possible.

“Nothing comes for free and so is GC”.

Posted in java, software | Tagged , , | Leave a comment

MyEclipse is Cool !!!

MyEclipse 6.0 GA has been released in August 2007 with a some cool features aiming at developers productivity. I just downloaded their 30 day trial version and played around little bit for two days. I was developing a AJAX and SOAEclipse IDE for my client; i was particularly interested to look into the ajax and database capabilities from MyEclipse.

Noticeable features from the 6.0 GA release includes (see myeclipse for complete list of features)…

  • Europa eclipse distribution compatibility
  • Integrated Libraries (for Java EE 5, JPA, Struts 1.1-1.3, Hibernate 2-3.2, Spring 1.2-2.0, etc…)
  • Integrated Tomcat 6.0 Server
  • Integrated Derby Server (10.2.2)
  • Java Persistence Tools
  • Visual JSF designer and Flow editor
  • AJAX Tools
  • Matisse4MyEclipse Swing Visual Designer

Ajax debugging capabilities are awesome from MyEclipse. They tried to provide most of the capabilities from the Firefox’s FireBug.

  • It has the JavaScript Inspector to look-into the scripts loaded by the webpage.
  • JavaScript Console to look into any kind of errors happening on the particular browser. One of the important issue that i was looking is to change the underlying browser that the page renders so that i can see the errors/warnings/info depending on the browser(IE/FF/SF). Some how i could not find this capability (perhaps i am missing something).
  • Ajax Request Monitor is another great tool to see how many ajax requests are happening on the page. It also shows the Request/Response along with Headers and Body. This is very helpful for debugging any kind of ajax requests to indicate time, status and request and response.
  • DOM Source view is very useful to see the code for a selected DOM node. The DOM Inspector view enables the developer to select any node on the dom and it highlights the specific area in the WebPage. This is great feature for the developer as he can see and inspect the inner elements from DOM.

Web20

I found the Java Persistence Perspective is very useful with DbBrowser, Table/Object Info, SQL Editor, Results, and Table Edit capabilities.

  • How cool is it for a developer to be able to connect to different databases (via DB Browser), select the tables and view the table Info (via Table/Object Info) and the edit the tables if needed (via Edit Table).
  • SQL Editor allows to select the different data base connections and then execute the query on a specific table or view. The query results are displayed in the SQL Results view. A developer oriented feature is to be able to copy the results on to the clipboard.
  • I really liked the ease with which we can add a capability; some of the capabilities include Add Web Service Capabilities, Add Tapestry Capabilities, Add Struts Capabilities, Add Spring Capabilities, Add JPA Capabilities, Add JSTL Capabilities. All these capabilities can be added by a single click. Configuration files and property files are automatically generated for the developer.
  • Java Persistence perspective enables to be able to select a table and create code supporting the persistence capabilities. Persistence mechanisms like JPA, Hibernate and EJB3 are supported via this feature (they call it reverse engineering… from table to code).

Pertistance

Last but not the least, Installing the MyEclipse examples dynamically is a great feature. User can decide what he wants and then he can get a full running application. I really like the bundling of the Tomcat and Derby so that all the minimal set of pre-requisites are satisfied.

Overall, working on MyEclipse was a great experience for me. All the mentioned features definitely improve developers productivity to a greater extent.

Posted in eclipse, java, plugins, software | Tagged , , , , | Leave a comment

Carmel-By-The-Sea on Route 1, CA

On October 13th we have started to see few places on Route 1 and to stay overnight there in Monterey. We stay in Fremont and its only 90 miles away from Monterey. After few weeks of time, we wanted to go out and have a great time with the California beaches. Monterey is the place we are visiting for the 3rd time and its worth many visits.

Relax

Carmel-By-The-Sea is a small city along the coast. A small left turn onto the Ocean View Ave from Route 1 after the Monterey takes you to this wonderful small city. The life here resembles me of the small villages in Germany and Swiss and i always love that kind of life style. Everyone is relaxed, lots of food, wine, shopping and a great ocean view. Wow, i can spend few days just enjoying the shopping and walking in the small streets. The best thing is to go along the Ocean View and at the end of it, you can actually park the car and there you are…. you can see the ocean and if you have a nice book to read…you have made your day. And of course its definitely a romantic place for young couples like me and my wife.

Monterey

17 Mile drive a another great drive which takes almost around half day. It totally has around 21 scenic spots and each and every spot accounts for your memories. Some of them i remember are Cyprus Point, Ghost tree. Another amazing thing on this drive are the private mansions / houses of filthy rich people. Even you can see some of the private golf courses. The greenery that you see all along the 17 mile drive is fantastic. You can imagine the ocean on right side and golf on the left side.

CarmelByTheSea  We  Bird Rock  Ghost Tree

And finally Ghosts are very famous in both Carmel-By-The-Sea and in Monterey. Each shop that you visit has hundreds of books on ghosts and their stories. Somehow we did not even dare to visit some of the haunted houses near to Monterey.

Overall it was a great and memorable experience and i recommend everyone to visit when you get a chance.

Posted in reviews, travel | Tagged , , , , | Leave a comment