Last Thursday, August 27th, Google kindly hosted the second edition of the EclipseDay at the Googlepex. The event was a full day of technical sessions on Eclipse. Having been an Eclipse tools developer for the last 1-year, this event was an excellent opportunity to improve my Eclipse skills, network with other Eclipse developers and attend a series of excellent talks.
The agenda divided the sessions in two tracks and I selected the following sessions to attend:
Overall, it was a great day! Although 3 sessions focused on build/provisioning/deployment, each one of them tackled different aspects of the process and contributed with valuable insights. Another thing I would like to note is the quality of the speakers and their sessions! No product or marketing pitch, just pure technical joy
As of this writing, the slides are available online at http://wiki.eclipse.org/Eclipse_Day_At_Googleplex_2009#Presentation_Slides_.26_Videos
Thanks to the organizers for EclipseDay 2009, and hope to join you again in 2010!
Today I cameÂ an issue that required me to debug a custom Ant task that we have. While the Eclipse integrated debugger allows you to step through the targets and tasks in the build.xml file using the action Debug As -> Ant Script, it doesn’t actually let you step into the java class that implements the task. This is a major drawback, as most of the complexity (and issues :-)) tend to be in the task implementation code.
After searching around for a bit, I came across the Eclipse Remote Debugger debug configuration. This configuration allows you to remotely debug applications, by establishing a JDWP (Java Debug Wire Protocol, part of JPDA – Java Platform Debug Architecture) connection between the running application and the debugger. After learning about this, setting up the environment to debugg Ant tasks from within Eclipse was pretty straightforward.
The first step is to setup the Ant script launcher to run in debug mode and attach to the debug server. The following should be used as JRE arguments for the Ant configuration:
You can setup your Ant configuration by going to Run -> External Tools -> External Tools Configurations and creating a new Ant Build configuration. Inser the location of the build file in the main tab and setup the arguments in the JRE tab:
After the Ant configuration is setup, we need to take care of the remote debugger configuration. Go to Run -> Debug Configurations… and create a new configuration for Remote Java Application. Make sure you set the same port number that you used in the Ant configuration, and you are good to go.
Now, place the breakpoints in your build.xml and java classes. In order to debug, you need to first launch the Ant script and then attach the debugger to it. Do right click in the build.xml file and select Debug As -> Ant Script. Then go to Run -> Debug Configurations… select the Remote Ant Debugger and click Debug. The debugger will now attach to the running proccess and let you step through both the xml file and the java classes:
If you are into photography, then you should already know that calibrating your monitor is something really important if you plan to print your pictures. I recently printed some photos and noticed that the printed colors were considerably different from the colors on my LCD. After comparing my monitor with a few others, it was obvious that mine, and some of the others too, were not color calibrated.
Monitors can be calibrated to display the “correct” colors by using a calibration device, complemented by the vendor software. I decided to buy the Spyder2Express since it had good reviews and a reasonable price. Unfortunately, there is no color calibration device that is supported on Linux by its vendor and I currently use Linux (openSuse) as my main operative system. I could use my work laptop running windows to calibrate the monitor, then export the color profile and import it in Linux. There is an article here on how to do it. With help from one of the comments in that article, I found about Argyll Color Management System. Argyll is a monitor calibration software package for Linux that supports most of the existing calibration devices. It uses the Windows binary software to create a Linux binary in order to be able to communicate with the device to run the calibration tests and create a color profile. It also provides an utility to apply the color profile to your monitor.
The steps to calibrate your monitor in Linux using Argyll are pretty simple. In my case, using the Syper2Express device, all I had to do was runt the following commands(as root, or give the user permission to communicate with the usb device):
$ cd Argyll_V1.0.3/ $ ./spyd2en -v /media/ColorVision/setup/setup.exe (creates binary file to communicate with device) $ ./dispcal -v -y l -o MyMonitor (runs calibration tests and creates monitor color profile) $ ./dispwin MyMonitor.icc (applies color profile to monitor)
The generated color profile can also be imported to your post processing software like GIMP in order to use the monitor color profile instead of using a more common profile like sRGB or Adobe RGB.
exiftool is a very useful utility that allows you to query or edit EXIF information from pictures. Going through some of my pictures recently, I have found some sets of pictures with incorrect date in the EXIF info, be it a few hours off or even 1 year and a few days off. Fixing them one by one was not an option, so after a couple of searches on google I found exiftool. It is a command line utility that lets you edit EXIF information and you can do it in batches of files or folders, even using conditions to specify when a change must be applied.
For me, the need was only to change some photos info so that it shows the real time they were taken, three hours before the saved setting. The command was as simple as this:
exiftool -DateTimeOriginal-='0:0:0 3:0:0' -CreateDate-='0:0:0 3:0:0' myfolder/
The format for date changes is ‘YYY:MM:dd hh:mm:ss’.
When I migrated my development environment to Eclipse 3.4 Ganymede, one of the things that caught my attention on Eclipse’s update website was a plugin called Mylyn. A visit to the website, a look over the webcast and it sounded something promising.
It definitely is! Mylyn is a task manager that changes your IDE context based on tasks. You create a task, add resources to its context and when you activate the task, it hides all the other (unneeded) resources from your views (project/package explorer, outlines, editors, etc…). It provides integration with several task repositories, like Bugzilla and Trac. Unfortunately, it doesn’t provide a connector to Clearcase, but I’m still able to use it in an automated way.
I find the tool really awesome when I do something basic like switching tasks: it just closes all the editor windows and projects in the explorer for the task I’m leaving and opens all the files I was working on for the task I’m switching to. This would take me several minutes to do by myself, so having a tool that does that in 1 second is pretty neat!
Here are some more things I like about Mylyn:
And the things I don’t like that much:
Overal, I think Mylyn is a great tool and very useful! Even more if you are working with Bugzilla/Trac projects.
I’ve been looking at JPA – Java Persistence Architecture and decided to play a bit with OpenJPA using DB2 as the back-end. My goal: to persist and query XML data in DB2, making use of DB2’s pureXML capabilities to query the XML data using SQL/XML‘s XMLQUERY() function.
However, while OpenJPA has an extensive documentation, the examples are not always complete and there isn’t a lot of information on the web regarding OpenJPA error determination and solving. So, here are some recommendations for some of the problems I have encountered. The class xml.Address is the one to be persisted as XML in the database using JPA and it is stored as the field shipAddress of the Order objects.
[java] Exception in thread "main" <openjpa-1.0.0-r420667:568756 fatal user error> org.apache.openjpa.persistence.ArgumentException: Type "class xml.Address" does not have persistence metadata.
Suggestion: Remove the reference to xml.Address from persistence.xml.
[java] Exception in thread "main" <openjpa-1.0.0-r420667:568756 nonfatal user error> org.apache.openjpa.persistence.InvalidStateException: Encountered unmanaged object "xml.Address@9b2a51" in persistent field "xml.Order.shipAddress" of managed object "xml.Order@12b3349" during flush. However, this field does not allow cascade persist. You cannot flush unmanaged objects. [java] FailedObject: xml.Address@9b2a51
Suggestion: Make sure you have no @Entity or @Embeddable annotations in xml.Address. The main annotation is @XmlRootElement.
[java] Exception in thread "main" <openjpa-1.0.0-r420667:568756 fatal general error> org.apache.openjpa.persistence.PersistenceException: "xml" doesnt contain ObjectFactory.class or jaxb.index
Suggestion: add a file jaxb.index into your xml package containing all the classes to be persisted as XML: a file containing Address in our case.
For the GIMP users that, like me, keep complaining that Photoshop has so much more filters to do some fancy effects, the agony is over
I just found this today, but it dates back to 2004. There is a GIMP plugin that handles Photoshop plugins. It is called PSPI and it works like a charm on the filters I have tested so far.
Here are the instructions on how to get it working on Windows:
This was a new for me, and I’m quite happy as there was a couple of photoshop filters that I like to play with sometimes (just for fun, but still).
(*) For some odd reason, all my plugins appear under the sub-menu “Flaming Pear”, the creators of the first photoshop plugin I loaded into GIMP.
I’m back to fiddling around with my Ruby on Rails experiments(1)(2). I was able to create a very useful 2-way mapping between Ruby objects and xml data stored in DB2 pureXML. Basically, trying to replicate some of ActiveRecord’s functionality but for XML data. I still find it odd, though, that both ROXML and xml-mapping haven’t had much activity as of late. I’m wondering if there is any new OXM library around that I don’t know of.
Also on the same topic:
After reading Alcides Fonseca’s post regarding is opportunity to become an MSP and asking whether other companies have similar programs, I would like to introduce two programs related with DB2 that are targeted for university students: DB2 On Campus and DB2 Student Ambassador.
DB2 on Campus: The DB2 on Campus Program is a project designed to promote the use of DB2 in universities. The logistics and delivery of the program is performed between the DB2 Express-C team, and the local IBM Academic Initiative representative. The program consists of the following items and activities:
I will be at University of Minho on September 19th doing the speech for the DB2 on Campus program. There was not enough time to prepare the full-day event, but if you or someone at your university is interested in having this full-day event happening at your university, please feel free to email me and I’ll put you in contact with the program’s manager in order to schedule the event (my email is vrodrig at us.ibm.com).
There is a DB2 On Campus Facebook group. Follow these instructions to join.
DB2 Student Ambassador: This is a program for individual students that want to promote the use of DB2 at their education institutions. Though the program is voluntary, it gives students a chance to learn more about DB2, develop presentation skills and marketing skills. All of these skills will be valuable in their careers. At the end of the program, the student will receive a letter of recommendation from IBM including all the details of the activities performed. The more activities performed, the better the letter of recommendation! We hope this will help the student get a job more easily in the future.
I consider this to be an excellent opportunity to get involved and interact with developers from a huge project like DB2, distributed across Toronto and Silicon Valley laboratories.
More information about this program can be found here: http://www-306.ibm.com/software/data/db2/express/students_programs.html#ambassador
Although I’m only familiar with the DB2 programs, for the ones interested, there is also an IBM Academic Initiative program, focused on Open Standars, Open Source and IBM resources for the academic world.
The opportunities are out there, so just grab the one you like and boost your career
(1) Yes, it is the fully loaded version available for free, with one limitation: it can only use up to 4GB of RAM
Dear lazy web…
I’ve been playing with Ruby and XML lately, and one of the key features I need to use is XML mapping from XML to Ruby objects and vice versa. However, both ROXML and XML::Mapping do not seem to be very active at the moment. Both forums contain un-replied questions several months old, and I can’t find any examples that are not a couple of years old.
Is there any XML Mapping library for Ruby that is currently active(*)? XML::Mapping was serving me good enough, until the moment that I needed some of the documented features and found that they are not supported in the current release
(*) by active I don’t mean it needs to be in exclusively in code development, but at least with some recent activity in forums, documentation, examples, etc..