Tuesday, October 14, 2008

Thanksgiving

Last weekend was thanksgiving in Canada, a chance to enjoy a great turkey dinner (by candle light in Victoria), take a day off of work, and kick off the new NHL season (Go Leafs Go!). This year I have a lot to give thanks for. Not only did my wife and I celebrate our 5th wedding anniversary and my daughter celebrated her first birthday, we also found out that we are expecting our second child (ETA January 2009). As well, on July 9th I successfully defended my PhD, bringing 13 years of computer science education to an end.

I started studying computer science in 1995 at the University of Waterloo. Throughout my undergraduate degree I had a chance to work at some pretty cool places, including Manulife Financial, ATI Technologies, and Trilogy Software. In 2000, when most of my friends were heading off to industry to take advantage of everything the dot-com boom had to offer, I decided to head back to Waterloo for a Master's degree. I studied reverse engineering under Dr. Andrew Malton in the Software Architecture Group (SWAG). I completed my Master's in 2002 and in 2003 I headed west. Landing in Victoria, I decided to start a PhD with the Computer Human Interaction and Software Engineering Lab (CHISEL) under the supervision of Dr. Margaret-Anne (Peggy) Storey. I could not imagine working for a more encouraging supervisor. Peggy, your kindness and enthusiasm will never be forgotten. In addition to studying at UVic, I was also given the opportunity to work with the IBM Centre for Advanced Studies (CAS). My IBM mentor was Ed Merks.

Now, after 13 years of school, I am finally heading out to the "real-world". Because of the enthusiastic community and great technology, I have decided to take a job that will bring me even closer to Eclipse. I will be working with Jeff, Chris and Scott at Code 9. I will be spending some time doing Zest development, but this job will also bring me much closer to Equinox and the Eclipse run-time space. I will be transitioning throughout the fall as I am still teaching a course at UVic and finishing off a few projects. I'm looking forward to working with all of you!

Friday, September 05, 2008

GWT and OSGi

A number of people have asked me how I configured GWT and OSGi. Some detailed steps are available here, however, following wiki pages is not always the easiest thing. I have created a small "hello, world" example. You can get the projects here.

To use this, simply import the zip file into eclipse: (File->Import, select Existing Projects into Workspace).



Once it is imported, you should have 3 projects in your eclipse workspace:
The GWT project is simply the GWT jars wrapped in a bundle.

The client project is the client side code, and the server project is the servlet we use (it simply returns the word "World" to complete Hello, World.)



I have included an external tool to compile the client side code. Make sure you select com.example.gwtclient ant_build.xml in the external tools list.



After this runs, you should refresh your workspace (press F5). Under the com.example.gwtclient you should have www directory.

Finally, you can use the provided launch configuration to actually launch OSGi, the Jetty engine and the servlets. To do this, go to Run Configurations..., and select GWT Example Launch.



This will launch the Jetty server on port 80. If you want to change this, go to the Arguments tab and set -Dorg.osgi.service.http.port=8080 in the VM arguments.

Once running, simply hit: http://localhost/index.html



If anyone is interested, we could extend this and make it part of the Eclipse Examples project. However, there may be some licensing issues as it currently includes the GWT jars.

Thursday, May 22, 2008

A p2 Success Story

With all the good / bad and the ugly posted about p2 lately, I thought I would share a positive experience I had today with Eclipse, Modeling and p2.

It all started when I saw a new video about ECore tools. If you haven't seen ECore tools, and you are a fan of EMF, you really should check it out. (It will likely be featured in my Ganymede Top 10 List). After the video I decided to take ECore tools for test run.

1. Grabbed the latest Ganymede milestone for modelers.

2. I launched Eclipse and tried to create an Ecore Diagram (using Ecore tools)

Problerm: the Ganymede package for modelers doesn't contain ECore tools.

3. I launched Help->Software Updates and searched for ECore tools



4. Ok, no ECore tools... So I selected "Manage Sites" and selected the Ganymede Site



5. Now when I search for ECore tools, p2 returns some Installable Units



6. After selecting Install, and accepting the license, Eclipse suggested I restart



7. And in less than 5 minutes, I was up and running with ECore tools.



While I realize that there are still bugs / features / requests outstanding, this was the first time in all the simultaneous releases that it truly felt like I could just point at a piece of software, and have it up and running without worrying about dependencies, 3-5 minutes to load the UM, broken connections, etc...

I know p2 doesn't work for everyone, but the negative comments often seem to overshadow the positive ones, so I thought I would share with everyone the good experience I had.

Note: I did not write this to start a war, or downplay the problems people are having; this was simply my experience today.

Wednesday, April 30, 2008

GWT 1.5 Milestone 2 Available

FYI,

It seems that milestone 2 of GWT 1.5 is now available. Not huge news, but something worth nothing. See the google groups link for more information.

Monday, April 21, 2008

Should we post our own articles on DZone

Should we post our own articles on DZone? Is this frowned upon? If we have written an interesting article that we would like to share with the community, should we post it ourselves or wait for someone else to?

Please don't comment here, let's have this discussion on DZone (here). Vote the article up, not so people come to my blog (I really couldn't care less about that) but rather so people see the question, and post a comment.

Tuesday, April 01, 2008

10 Ways to get an Article on DZone

I like DZone. I have been reading stories posted there for a least a year now. It is a great place to go if you want to stay on top of new technologies. However, over the past year I have noticed similarities among many of the articles that find there way to DZone. Here are the top 10 things you can do to get your article on DZone.

10. Write about CSS rounded corners: Especially if you can do them entirely in CSS or HTML or DHTML or XHTML. There is a real shortage of articles on this.

9. Explain why something is dead or dying: Pick something you don't like, you don't want to learn or you feel is a threat and explain why it is dead or dying. Great choices include .NET, Java or Agile methods.

8. Agree with Google: Find something Google did or someone at Google said, and agree with it. It's even better if you mention that you thought of it 5 years go.

7. Disagree with Microsoft: There seems to be a hot trend of people disagreeing with M$ solutions, technology, whatever. Find something Microsoft did and explain why you would not have done it that way. (Note: It is important you get these in the right order.... Don't agree with Microsoft or disagree with Google. You are likely to start a comment flame war if you do.)

6. Link to something Linus said: Find something Linus said on a newsgroup or mailing list and link to it. Make sure you take it out of context too. This will improve your article.

6. Write about Scala: I'm really sorry to all you Ruby developers. If I wrote this a year ago you would have been mentioned, but today's language of choice seems to be Scala.

5. Talk about hiring programmers: This is especially important if you have never actually hired a programmer, because I love the opinions of bloggers who don't know what they are talking about. Another great idea (especially if you are a pointy hair boss) is to talk about being hired as a programmer. As a non-technical type you know exactly what to expect -- You, Mr. Non-Technical, I Wish I My Subordinates Respected Me, Guy.

4. Summarize or point to an old article: Find an old article. Not a week or a month old, but maybe something Joel on Software wrote in 2001. Point to this, it is sure to get votes.

3. Talk about your love / hate of closures: Nuff said.

2. Boldly state that dynamic languages are better than static languages: There is no if-ands-or-buts here. They are better, for everything you (and I) will ever do, end of story. Say so, you have the right!

1. Formulate your post as a top 10 List: It doesn't even matter if you actually have 10 items or not! People love to read top 10 lists.


Revoke Ed and Chris's Commit Rights! NOW!

I would like to request that the commit right's of Ed Merks and Chris Aniszczyk be revoked immediately. At the past two EclipseCon's these two managed to each win both the Top Ambassador and Top Committer awards, two of the three voted on Eclipse individual awards.

If either of them hopes to win all three awards, the Triple Crown of Eclipse Awards so-to-speak, or the Eclipse Awards Grand Slam if you prefer, one of them will have to win Top Contributor next year! This will be tough as both of them are such avid committers. It may be easier for them to battle for this final award if they both have to submit patches for each change they wish to make.

Of course, if we strip of them of their commit rights the evolution of PDE and EMF may slow, but really, who uses these technologies anyways? :-)

In all seriousness, congratulations Ed and Chris, and to Remy Suen (Winner of this years top contributor awards) and Eric Rizzo (Winner of top Newcomer Evangelist).

Monday, March 17, 2008

Why I haven't changed my language!

There was a very interesting question posted on TheServerSide, "What would make you change languages?" and for me the answer is simple, Tool Support. I have used Groovy and it was kinda neat, but content assist didn't work very well. Possibly because of some bugs or maybe the language is just too dynamic to fully support this feature. I have used JavaScript and 3 of us spent a 1/2 hour tracking down a extra character (we tried to call a method Foo=(arg1, arg2)), bad place to put an equal sign.

Back in my undergraduate days, life was simple. All I needed was vi and a command line. I was happy and I figured if you needed a tool to do your job then you were never going to be a "real" software engineer. Seven years later (and the Eclipse influence) this has changed. What does looking up a method signature somewhere really do for me? What does spending my time tracking down a runtime error that really should have been caught at compile time accomplish?

Sure, a lot of new languages have shorter syntax for common operations, all intended to save me a few keystrokes. Let's count:

var person = new Person; (about 15 keystrokes)
Person person = new Person(); (about 10 keystrokes)

See, with proper tool support I would use content assist and type P(content-assist) p(content-assist) = (content-assist) P(content-assist);[enter].

And it is not just content assist. It is refactoring, search, navigation, debugging, analysis and collaboration. It seems that some languages are easier to write tools for than others. Java and Javascript are almost the same age; why isn't there top notch tooling for Javascript (something like the JDT)?

I'll continue to try out new languages, but without excellent tool support, I'm not changing languages anytime soon.

Anyways, to each their own!

Friday, March 14, 2008

An Updated Design

Today I decided to use the CSS from my website for my blog. The new design should integrate my blog and my website a little more tightly. The update wasn't too hard to complete, but the CSS isn't pretty. Blogger seems to use some custom server side scripts to handle style and some of them weren't compatible with my existing CSS page. As well, I could not find a way to upload images as part of my template, so I am linking back to my main site for those.

Anyways it's done, and hopefully over the next few days I will get a chance to clean-up some of the code and remove the unneeded tags.

Friday, March 07, 2008

Small GWT / OSGi Problem

I thought I would document a small problem I had today in case others ran into the same issue.

If anyone has been to my website you know it's not that exciting. A few links, a picture or two and links to my blog. What is exciting (for me at least), is how I built it. My website is actually an OSGi engine (Equinox) with a Jetty bundle to serve up the pages, a small EMF model in the back end (to hold some links), and GWT to tie it all together. To be clear, this is overkill!!! But I enjoyed setting it up and I learned a bunch!

Now the problem. Today I decided to see if I could modify things on my site (both client and server side) and update it using the OSGi update command. (With P2 on its way this seems like a cool thing to do). However, after I did the update *BOOM* GWT died.

It turns out that GWT does some server side security checks and they use the classloader attached to the current thread to do them. However, this doesn't play very well with OSGi. To fix this I added:

Thread.currentThread().setContextClassLoader( MyActivator.getDefault().getClass().getClassLoader() );

This way, the same class loader that loaded my activator will be used when GWT does its security checks.

I'm not sure if this is the best way to fix this, so if anyone else has suggestions I'll try them out and let you know how they work. Also, I found this bug after I sorted all this out :).

Thursday, November 15, 2007

Eclipse and Web Technologies

The news yesterday by Denis regarding Babel is terrific. Globalizing Eclipse through a community driven approach seems so obvious, yet somehow so novel. However, the choice of technology (LAMP: Linux, Apache, MySQL, Php / Perl / Python) caught my eye. LAMP seems to be one of the most common application stacks (the Microsoft stack being the other one).


Where does OSGi / Java / Jetty (and possibly GWT, I call this J-JOG) fit in here? Is there a reason why this configuration is not even mentioned in the alternatives section on Wikipedia's Lamp article? Is there something fundamentally wrong with this setup (scalability, performance, stability) or is it simply a matter of preference?


This is not meant to start a flame war, and I am by no means questing the choice of technology, I'm honestly just curious.

Monday, October 15, 2007

Plug-in Dependency Clarification

I posted earlier today that I released a version of my plug-in development visualization tool. I was wrong is saying this, since the project is in incubation and the version was 0.1. What I really did was make Milestone 1 of my plug-in development visualization tool available.

It is important that I make this clarification since my work is has not been deeply reviewed yet. I'm sorry if this caused any confusion.

Plug-in Dependency Visualization... M1 Available!

I was finally able to make a version of my Plug-in Dependency Visualization tool available on an update site.

http://download.eclipse.org/eclipse/pde/incubator/visualization/site



Point your update manager there if you want to try it out. The tool works with Eclipse version 3.3 (Europa) and later. The tool is pretty easy to use, simply load the view (Visualizations->Graph Plug-in Dependencies), right-click on the canvas, select "Focus On..." and select the bundle you wish to see.

I also put together a New and Noteworthy to highlight some of the features. I am already getting some good feedback, including Eugene's suggestion to remove the control panel (and make the options available through context menu) and to add extension point information.

As I mentioned before I did this work as part of the Summer of Code project. It was a great experience and I can't thank Chris Aniszczyk enough for encouraging me to apply and mentoring me throughout the summer. Seriously Chris, if you are in B.C. skiing this winter let me know, I owe you a few frosty beverages.

As for the SoC program, it is a great opportunity! For all you students out there, it is never to early to start thinking about ideas and bouncing them off Eclipse developers. As I won't be a student next summer (my wife and daughter will disown me if I am still in school next year :D ) I won't be participating as a student, however, I hope to help out as a mentor. Wayne, when does that start?

Friday, August 17, 2007

Thanks!

With Wassim publicly announcing his departure from IBM and his reduced role on PDE, I thought I would use this opportunity to say a few thank-yous, and suggest a new award at EclipseCon.

I first started within with Eclipse in January 2003, and my first exposure was with GEF. It was part of my PhD research (that is *hopefully* almost finished :) ) and it was at IBM as a research student. Throughout my time working on / with Eclipse, numerous people helped me along. First is Wassim, who contacted me about building a graphical view for Plug-in Dependencies. Many-a-nights I would find him on-line asking him stupid questions like why does the PDE have 5 different models to represent Plug-ins. I'm not sure who I'm going to turn to now to help solve my confusion (I'm already hounding Mike and Brian of the PDE Team). The second person I need to thanks is Chris Aniszczyk. Chris is actually my Summer of Code mentor and I'm not sure if he knows *everything* about Eclipse, but he sure knows everyone! Chris is also knows everything about Eclipse process and can really help get things done. Finally, and maybe most importantly, is Ed Merks. Ed is my IBM research mentor and I still turn to him for real life advice (not to mention all my questions on the newsgroup that keep him busy).

With the departure of Wassim (and no he is not the first committer to leave), you start to realize the importance of junior developers and Eclipse up-and-comers. Eclipse thrives both because of its user base and developers, but what if one company decided to pull all its committers? In order to ensure Eclipse growth continues, it is important that new committers (both from existing member companies, and elsewhere) join the ship. This is why I would like to throw the idea our there of a mentorship award at EclipseCon. An award for the committer who goes out of their way to bring new committers on board?

Thoughts?

Good luck Wassim!

Thursday, August 16, 2007

PDE Dependency View (SoC)

It has been too long since my last update. I meant to post this early this week, so this isn't the latest code. I will do another update this weekend.

Anyways, I thought I would give a brief overview of what the PDE Viz tool looks like and how to use it (My SoC project). The PDE Viz Tool is targeted at developers trying to understand the dependencies of their bundles. Once you get the tool (currently only available in source, but that will change soon) from here, you can find it using the now famous CTRL-3 :)

Once loaded, you can right click on the canvas to select a bundle.

For this example I selected ecore.


Producing a nice little graph.
I have also added a few small analysis tools, so if you ever wondered why javax.servlet was needed by EMF, you could see the dependency path:

A few other small notables in this version. I have updated my labels to use gradient colours. Also, if you double click a node it will refocus the graph on that node. The arrow keys (at the top of the view) can be used to navigate forward and backwards through the graph. Finally, I added a "Screenshot" action so you can save your dependency graph to a PNG.

I have tested this on some of the large IDEs built on Eclipse and it worked (albeit a little slow). My hunch is that it was not slow because of the large number of nodes, but rather because of the even larger number of edges. But for all the bundles I tested in Europa it worked without problems.

Thursday, July 12, 2007

Node goes up... Node goes down...

Throughout the past week I have been focusing pretty steadily on my Summer of Code project. Last week I reported that container support had been added to Zest. Since then, I have been updating and fixing up many of the issues containers presented. There were a number of small changes that needed fixing (like the fact that my labels were all truncated), but I also managed to add a number of new features. In particular I added open close animations, and container layout and scaling. Now each container can have its own layout and scale depending on the number of nodes. I also reversed the direction of my gradient, although I really should work with the UI team and use the Kelvin Colours.


The most exciting feature I added was a new open / close algorithm. Now, when a container is opened, it moves the nodes below it out of the way. I attempt to put the nodes back when the container closes again. Moving nodes out of the way (without really altering the graph) is considered a pretty hard problem in graph drawing, but since I knew my nodes always grow downward, it made it somewhat easier for me.


Finally I added a fisheye feature. Now, if enabled, when you mouse over a small node you can have it zoom into focus. Using this technique, I chose only to show the icons on the small nodes, but on hover you get the full text. (In this screenshot I moved my mouse over the centre node in top container).



The snippet used to create these screenshots is less than 70 LoC (and if I was a more clever programmer I could probably do it in less than 40).

It was a pretty busy week with a lot of late nights and I haven't seen my wife and daughter much, so I think I will head home and enjoy the nice west coast weather we have been receiving.

Tuesday, July 03, 2007

Europa, My Top 10 List

I have had the pleasure of using Europa for the past 8-10 months. Of course it was not called Europa the entire time (Eclipse 3.3 Milestones with several milestone plug-ins attached). I have now come to depend on several of these new features and here is a list of my Top 10 Europa Features that I Cannot Live Without!!!

I should point out that I do a lot of Model Driven Software Development and Java Development, so if this list seems a little biased, it is :) There seems to be really good stuff going on in CDT, Birt, etc... but I have not used these tools enough to give them a fair review. I guess that's why this is My Top 10 List :)

Without further ado, my top 10:

10: Mylyn! A lot has been said about this, and yes it really does live up to all the hype!

9: GMF / MDT: Both of these are really cool technologies, but out of the box they also provide graphical editors for model development. One of the biggest criticisms of the modeling project was “I cannot see my model graphically”, well now you can!

8: New Look / Min-Max behaviour: Eclipse got a bit of a face lift with some new Editor Min / Max behaviour. This makes much better use of the screen real estate, while maintaining easy access to your favorite views through “Quick Views”. Press CTRL+M when coding, you'll enjoy the space.

7: The Eclipse Packaging Project: I still use Eclipse the “Old Fashion Way”, that is get the SDK, install the features I want, adjust the Eclipse startup parameters (memory use, file handles, etc..), but judging from some early download numbers, people have really enjoyed the pre-packaged Eclipse distributions. It is contributions like the EPP that answers the critics who said Open Source projects are cumbersome to setup and lack polish. I am definitely jumping on this bandwagon!

6: Plug-in XML and Manifest improvements: Several new features were added to the PDE to make plug-in development easier. This includes Content Assist, Hyperlink support, Code folding, and Code Formating. Also, the PDE now allows you run multiple version of the same plug-in in the workspace or target environment. These features echo Wassim's comments that PDE Does tooling, but our business is people!!

5: Printing on GTK+:This is just a great bug fix / feature addition. I should also point out that GTK+ support for Eclipse is amazing. I personally think it looks nicer than Windows and Eclipse runs as fast, if not faster on my Linux box than it does on my Windows one.

4: New PDE Forms: They really Brought Sexy Back with this one. As well as a form face lift (with new gradients, icons, section headers, etc...) field assist and field validation were added. If you don't know, these forms are not just for PDE, you can use them in your favorite SWT app too.

3: Save Actions: Every now and then you get a feature that you really hate, and this is one of them! Why? Because I can no longer sit at someone else's machine and use their version of Eclipse. I am entirely dependent on my save actions: to organize my imports, format my code, and update my brackets. In my opinion, this feature ranks up there with Automatic Builds!

2: CTRL+Awesome: CTRL+3 is the new CTRL+1, that is, the new hot key I cannot live without. I no longer have to remember where I saw that action, or even what actions are available. Every view, perspective, menu item and editor are instantly available with a push of a button (CTRL+3).

1: EMF Generics: The EMF Team really out did themselves with this one. Not only did EMF lead the way with Java 5.0 support, they managed to do this without breaking binary compatibility. And like everything else in Eclipse, if you don't like the feature, turn it off. Using this feature, EMF will generate fully templatized lists. Now when you get lists of Books from a Library, you actually get Elist<book> not just an arbitrary list. Ed and Marcello gave an excellent talk at EclipseCon about their experience adding this feature.

Saturday, June 02, 2007

Swt Callback Java Library

I just saw this post on dzone and thought someone on the planet may find it useful. It is a simple call back library to help deal with all those anonymous inner classes / listeners you get when you develop an SWT application.

http://www.playingwithwire.com/2007/05/wireload-releases-swtcallback-java-library/

I have no idea how well it performs.

cheers,
ian

Monday, February 12, 2007

TagSEA 0.5

As Chris mentioned, there are a few projects associated with tagging in Eclipse. We have just released version 0.5 of our project, TagSEA.

Website:http://tagsea.sourceforge.net
Update Site: http://tagsea.sourceforge.net/update

Like many other Eclipse projects, TagSEA is both an extensible framework as well as a set of exemplary tools. It provides basic tagging infrastructure for Eclipse, as well as concrete implementations for Java Tagging and Resource Tagging. TagSEA uses a concept from wayfinding known as waypoints. A waypoint is a particular location you wish to mark. TagSEA allows you to add tags, metadata and a comment to this waypoint.



Why did we do this? Good question :) We hypothesized that through the use of marking locations in code (or XML, or PDE Forms, or Workbench layout, etc...) , and providing mechanisms to return to these locations, developers could more easily navigate to “common” hot-spots or share interesting places with others. What do you think? Of course this is very new and we are just starting out, but we have all sorts of ideas of where tags could be useful:

  • EMF generated code that users are likely to customize
  • Places in the GEF framework that “should” be extended for normal operation
  • Plugin and manifest files
  • Mylar tasks
  • Images and other resources for future retrieval
  • SWT Snippets or other sample code
  • JUnit test cases

TagSEA currently supports hierarchical tags, a tag view, waypoint view and tag refactoring. As I mentioned, we have concrete implementations for Java and Resource files (Web URL and breakpoints are on the way). Where should we go next?

We have a long talk planned at EclipseCon (here) and we are currently throwing around the idea of holding a BoF on IDE's and tagging.

Monday, February 05, 2007

Eclipse Modeling Project and OCL

Anyone who believes that modeling at Eclipse is limited to EMF and possibly GMF, really should checkout the Eclipse (Top Level) Modeling Project (EMP). Ed Merks and Rich Gronback have done an excellent job of bringing together all of the Eclipse modeling work under one umbrella. A quick count reveals over 25 components to this project (including EMF and GMF).

Why should you use this technology? Of course if you are focusing on SWT extensions or device drivers this may not be the technology for you. But if you are writing an application (rich client or otherwise) that uses a data model, leveraging the EMP may save you a ton of time.

Recently (for part of my PhD) I needed a data model with a lot of data. I created a model (using EMF) for National Hockey League statistics. I created a class for Player, Team, PlayerYearlyStats, etc... The stats had attributes such as goals, assists, PIM (penalty minutes), etc... Using EMF I hit “Generate” and I had a fully working Java application that allowed me to create players, edit statistics and save all the data to an XML file (not bad for 10 minutes work). From here I populated the data with all the NHL stats from 1917 (no, I did not do this by hand!).

Next I decided to checkout a few other modeling components. In particular, I looked at the Object Constraint Language. OCL allows you to specify constraints on your Object Model in a platform (language) independent way. For example, I can say that if a player earned 200 points in a season, then the player must be Wayne Gretzky (self.points > 200 implies self.name = 'Wayne Gretzky'). While this record may never be broken, I would probably use OCL to specify more “predictable” constraints such as 2 players on the same team can't have the same jersey number, etc...
OCL can also be used to query your data. Christian Damus (the author of OCL for Eclipse) has provided great examples to help you get up and running. Once installed, the OCL examples will generate a simple interpreter plugin that extends the Eclipse Console. Using the OCL interpreter plugin you can write OCL queries. For example, I can write:

Player.allInstances()->select( p | p.yearlyStats.goals->sum() > 800)

To select all the players who goals each year sum up to a total greater than 800. If I change this to 700 goals I get 6 players. I will leave that result as an exercise for the reader