Lessons Learned & Special Thanks

20 11 2008

A few months ago, the Google Summer of Code 2008 program officially came to an end. I don’t think I can name all the things that I’ve learned throughout the summer, since there’s just so many! But I thought I’d mention a few:

  • Reading – It wasn’t until this summer, had I realized how much reading a developer does. I devoted more time familiarizing myself with the Cytoscape code base than actually developing myself. I’ve also realized that reading external resources like books and discussion boards often facilitate your ability to work independently.
  • Documentation – Over the summer, I’ve truly learned the importance of documentation. Spending the time to document your code while you develop it will save a lot of time for yourself and others that will have to work with your code in the future.
  • Communication – In open source projects, developers are often located in all parts of the world. It is very important to have good communication skills so problems, ideas, and concerns can be addressed and brought to the others’ attention regardless of where they are.
  • Be open to feedback – The feedback from others should always be valued, regardless as to whether the feedback is provided by a mentor, peer, client, or user. These may not always be the best ideas, but taking them into consideration will often inspire and shed light onto some great ideas!
  • Be able to expand on the work of others – One of the most important things that I’ve learned this summer is that software development is not only about how impressive you can build something from scratch, but also about how you can successfully work with existing code and make contributions to it.

These were certainly not the only things that I’ve learned over the summer. Specifically, I’ve also strengthened my interpersonal skills and my ability to speak in front of people. The things that I’ve learned over this summer has been incredible. The skills that I’ve acquired has also helped me adjust to my third year of undergraduate studies. For those students who are thinking about participating in the Google Summer of Code program, go for it!

I’ve also created a screencast for this project. Enjoy!

Lastly, I’d like to thank Greg, Gary, Karen, Jen, and all the people that I’ve worked with and met over the summer. They’ve truly made my summer more enjoyable and memorable. I definitely look forward to having another chance to work with all of you in the future! :)





Wrapping Up!

19 08 2008

Ever since my last post, I’ve been busy finishing off my plugin by implementing various additional features. These include the first two suggestions from the previous Refinements post, as well as:

  • Allowing users to specify separate Spring Length and Spring Coefficient parameters for node and label edges. This further improves the label layout plugin’s ability in enhancing network readability.
  • Allow users to reset the label position of all their nodes. Without this option, users will have to reset the label position of each and every node manually in order to undo the change in position.

In addition to implementation, I’ve also been:

  • Editing the Cytoscape User Manual on the Cytoscape Wiki to let users know how to use this label layout plugin
  • Cleaning up code and adding more documentation
  • Issuing tickets on Cytoscape’s bug tracking system regarding what still needs to be done/fixed
  • Testing, testing, and more testing..

This will be my last week of Google Summer of Code 2008. It’s been an awesome summer, and I’ve definitely learned a lot! For the rest of this week, I will continue wrapping up this project, and I will be working on making my ScreenCast.





Refinements :)

30 07 2008

Gary kindly dropped by my office this morning to take a look at what I’ve got up and running so far for my plugin. It seems like the both of us are quite happy with the general functionality of the plugin, and how well our approach turned out. So what’s next is a few new features that I will be adding to my plugin:

  • Of the total number of iterations of the algorithm, users can specify what percentage of these iterations they would like the network nodes to be moved as well. [Kindly suggested by Greg :)]
  • Reposition the labels (and network nodes as well, taking the previous feature into account) only for the selected nodes.
  • Implement some sort of smart label wrapping which will wrap long labels into more of a square/circular shape.

In addition, I will also be spending some time testing out my label plugin to see which default values will work best for the plugin.

With a week and a half left of my GSoC summer (I will be volunteering at the Agile Conference next week), I am going to implement as many of these as I can. :)





New Approach

28 07 2008

As of last week, I’ve completed my first label repositioning plugin. It successfully repositions the labels of the network so that the networks are more readable. However, it is currently tied with the Force-Directed layout algorithm in Cytoscape. Also, this current approach creates too many additional temporary edges, which are later removed. So after meeting with my mentors last Friday, we’ve decided to take a new approach:

  • Make a copy of the current Force-Directed layout class (this will also copy the Tunables over so that constants that the algorithm needs can still be set by the users)
  • Convert each label to a LayoutNode as well
  • The list of LayoutNodes that will now be used will contain both network nodes and labels
  • Modify the algorithm so that it only needs to look at the x and y coordinates of various LayoutNodes

So this is what I will be working on for the next little while. :)

Here is an example of how networks look after the current label plugin is applied:

Before:

After:





Cytoscape Retreat 2008 & Automatic Label Plugin Progress

17 07 2008

This year’s Cytoscape Retreat is being held on campus (University of Toronto – Terrence Donnelly Centre for Cellular and Biomolecular Research Buildling). It’s been a good chance to meet others that are also working on Cytoscape. And it is also a good place to practice giving demos.. :)

For the past week or so, I’ve been reading more source code! But this time they were graph drawing classes that others have already implemented in Cytoscape. My mentors have suggested that I check if I can use an existing graph drawing algorithm if they’re suitable, instead of writing my own if it already exists. So I’ve been reading the Spring-Embedded JGraph layout code that Cytoscape currently offers through JGraph. I was planning to copy the source code over and make slight modifications to them in order to implement my own plugin. However, the current Spring-Embedded algorithm relies heavily on other JGraph classes within their layout packages. This has become a problem in the development of my plugin, because my plugin will be a Cytsocape plugin and it will not be offered under JGraph. So in order to make this all work, I can either:

  1. Take whatever classes that the Spring-Embedded algorithm relies on, and include them in my label plugin’s jar file.
  2. Write my label plugin based on the Cytoscape plugin template, and copy pieces of the implementation in the Spring-Embedded layout algorithm over to my label plugin, wherever they are relevant.

The first approach does not work out very well. Like as I mentioned above, the Spring-Embedded layout has been implemented in such a way that it relies heavily on its fellow JGraph classes. Hence, if I were to copy over the necessary classes needed in order to make the Spring-Embedded layout run as a simple Cytoscape plugin, I will have to copy over a lot of classes due to the complex dependencies involved. So I’m most likely going to give the second approach a shot, unless I can find a third approach that will be even better. Taking the second approach should not be too difficult since the Spring-Embedded algorithm is quite simple.

I will continue to speak to other Cytoscape developers at the retreat, and see what others think about this problem. I’m sure I will get some interesting feedback on this issue, and maybe even some interesting solutions!





Algorithms!

10 07 2008

Upon the completion of my second subtask, I’ve started learning more about graph drawing algorithms. Specifically, I’ve been focusing on force-directed algorithms since it seems to be the simplest approach to solving the label layout problem Cytoscape is currently experiencing. I’ve been working with the following sources:

Some of the above sources are algorithms and examples. Others are articles that I’ve found in order to understand certain concepts and examples.

At the moment, I’m beginning to put the pieces of what I’ve learned in the past few weeks about graph drawing together. More research may be needed, but I will be able to start implementing my automatic layout plugin soon!





No More Squares!

24 06 2008

As of the beginning of last week, my second plugin was capable of repositioning the labels of nodes. However, thereafter, whenever I introduced a new node or new edges to the graph, all the labels will move back to their original position. After speaking with my mentors, Gary suggested that I look up the bypass methods and bypass the VizMapper once I’ve changed the positions of my labels.

So for the latter half of last week and yesterday, I continued wrestling with the Cytoscape source code. I’ve found a few ways of repositioning labels, but everytime I tested my plugin, instead of repositioning the labels, the code turned the circle nodes into squares.

Thankfully, I found an old post made by Mike Smoot on the cytoscape-discuss group. With the help of this post, my plugin can finally relocate the labels of nodes and make them stay there!

Throughout this summer, Greg has encouraged us to blog about our progress and solutions to problems we’ve encountered. One important reasons behind this idea is to save others some time if they happen to encounter the same problem. I certainly hope that others will not have to go through all the trouble I did to change the visual properties of nodes and edges.

Now, I can finally start learning some graph drawing algorithms and hopefully work my way towards a layout algorithm for my actual label plugin!





“Document Me!”

13 06 2008

This week, I’ve spent the majority of my time going through the source code that is needed in order for me to proceed with my second plugin. Unfortunately, most of these classes had very little, if any, documentation. So I’ve spent most of my week going through them and figuring out what exactly each method did.

It wasn’t until last week that I realized how the Cytoscape community would most definitely benefit from the documentation that I could add to the source code! Thanks to Greg (my mentor) who actually pointed that out. So instead of simply going through each class and jotting down what each class does and how it would be useful to me, I started taking the code apart myself and adding documentation (Javadoc) to it.

This week I also managed to get svn access to the Cytoscape repository, with the help of Mike Smoot who kindly helped me create an account. Also, if anyone else was wondering how to access the Cytoscape repository, there’s some instructions here. By the end of today, I should have most of the source code that I’ve worked on so far committed to the Cytoscape repository.

As for my second subtask, I’ve written the layout/template of the plugin. So what’s left is to fill in the plugin to make it do what it is supposed to do. However, I spent most of yesterday trying to figuring out what was wrong with my Eclipse configuration when my second plugin wouldn’t run with the other Cytoscape code. It turns out that the svn project I created through Subclipse in Eclipse was in Java 6. And I haven’t found a way to change the JRE version of svn projects in Eclipse yet. The JRE version can be changed in Java Projects in Eclipse, but I don’t see that option available for svn projects. So I’ve made my plugins compile using Java 5, but run in JRE 6. But since it is only the Cytoscape project that is using Java 6 at the moment, I don’t think this will be problematic since all the Cytoscape code was built in Java 5. Others that will be using the plugin will still be able to compile and run everything in Java 5.

Lastly, just a list of the upcoming events that I will be attending in the next few months:

  • June 19th – Greg’s “Beautiful Code” talk at Jonah
  • July 15th – DemoCamp Toronto!
  • July 16th to July 18th – Cytoscape Retreat 2008 in Toronto
  • August 4th to August 8th – Agile Conference (Volunteering)

By the way, just a follow up on my last post, it looks like the hippo with the hat and the scarf wins!





Subproject 1 – Completed!

4 06 2008

As the title of this post suggests, I’ve completed my first subproject (Grid Layout). I found a few bugs today, but I’ve managed to fix them. :)

It has taken me some time to navigate through all the classes in the Cytoscape project that was needed for my layout algorithm. However, through this subproject, I’ve definitely gained a better understanding of the Cytoscape source code, and I’ve acquired greater control over it as well! Most importantly, this subproject has gave me a heads up as to what I should be expecting when I start my Label Layout plugin project.

For the rest of this week, I will continue testing my Grid Layout Subproject and I will also be starting my second subproject. Please see the About page for more detail on this second subproject.





Up and Running!

28 05 2008

After a few days of discussion on the cytoscape-discuss google group, I’ve finally managed to run a simple plugin in Eclipse (from a separate project) that will work with the other Cytoscape source code (Special Thanks to Piet Molenaar for the patience and assistance!). Now I can also debug plugins in Eclipse!

Now that I’ve got my programming environment correctly set up (hopefully), the next step will be to start on Subproject 1. For details on this subproject, please visit the About page.