Thursday, December 31, 2009

Continuous Integration at Eclipse.org

As we near the end of the year it's a good time to look back at how we're doing things and to look for opportunities for improvement. Last year Eclipse.org has taken some significant steps forward. One notable change for the better is the increasing adoption of running builds on a central build server (in this case, Hudson). While red balls look great on the Christmas tree, they can really detract from the benefits of continuous integration.

At my work we've developed a culture that focuses on maintaining a fast, clean build. It is light-hearted and fun: those that break the build are quick to respond and restore integrity. This behavior is encouraged by good-humored ribbing by other team members. This culture takes a small amount of effort to maintain, however the team recognizes that everyone benefits:

  • Integration problems are detected and fixed continuously
  • Early warning of broken/incompatible code
  • Early warning of conflicting changes
  • Immediate unit testing of all changes
  • Constant availability of a "current" build for testing, demo, or release purposes
  • Immediate feedback to developers on the quality, functionality, or system-wide impact of code they are writing[1]

At Eclipse.org we can do the same thing: let's strive to eliminate broken builds entirely. Builds should (almost) always be blue; when they're broken, those that caused the breakage should either roll back their changes or fix them.

Here's to a great 2010 at Eclipse.org, where continuous integration meets with continuous improvement!

Saturday, December 12, 2009

Hudson Helper for Android Update

Hudson Helper for Android has been updated. New in this version:

  • Support for untrusted SSL Certificates (Self-signed, or signed by an untrusted certificate authority)
  • Layout improvements, bug fixes

Thanks to Jim Hague who assisted with providing an environment for testing untrusted SSL certificates.

To get Hudson Helper for Android, search for 'Hudson Helper' in the Google Market on your Android device, or install via SlideME if the Google Market doesn't support paid applications in your region.

Wednesday, December 9, 2009

Ant Build Analysis Gets A Facelift

Wondering why your Ant build is slow? Are your continuous integration builds taking too long? Analysis of Ant builds has had a major facelift, with a new version of Ant Utility now fully integrated into the Eclipse UI. With Ant Utility, you can run your build and get immediate feedback:

As your build runs, Ant Utility measures how much time is spent in Ant tasks and targets. When the build is complete, build metrics are presented in an Eclipse editor, showing exactly which parts of your build file are taking the most time. Double-click on an entry to open the build file in the Ant editor, with problematic lines presented in varying degrees of red depending on the level to which the task or target contributes to the overall build time.

Ant Utility is not designed to replace a full-fledged profiler, however it can give you fast insight into build file problems in the language of your build script. Ant Utility has almost no overhead and is simple to configure.

Ant Utility can be installed into Eclipse via the following update site:
https://antutility.dev.java.net/site/

To enable Ant Utility on your build, add
-listener net.java.dev.antutility.core.MetricsBuildListener to the Arguments section of your Ant launch configuration:

The Ant build must also be configured to run in the same VM as the Eclipse IDE:

At this point you can run your build. When your build completes successfully, build metrics will appear in Eclipse. Hopefully you're off to the races, returning to snappy, healthy builds in no time flat!

Monday, December 7, 2009

How To Be A Successful Developer

I was recently asked for advice from a young student on how to become a successful software developer. This is a complicated question. I put some thought into it, and realized that every individual will become successful in different ways. Here are some things that helped me:

  • Always strive to improve yourself and learn more.
  • Share information freely with others — be generous.
  • Focus on developing good working relationships with your coworkers, both technical staff and others.
  • Effective communication, both written and spoken is crucial.
  • Get involved in open source.
  • Be precise.
  • Deliver on commitments, or if you need to renegotiate your commitments.
  • In everything that you do, do it with integrity.

Almost none of these have anything to do with knowledge of technology. I believe that social aspects have far more impact on success than anything else. Of course being knowledgeable helps too, however what's more important than knowing a specific technology is being able to pick up the knowledge that you need, when you need it.

A few things that I missed in my response because I take them for granted:

  • Have passion for what you do.
  • Strive for excellence.
  • Avoid being self-righteous.

I'm sure that there are many things that contribute to being successful. I'd love to hear from others: what do you think are key contributing factors to becoming a successful software developer?

Wednesday, December 2, 2009

iPhone Bluetooth Tethering Not Working?

I love my iPhone and I love it's Bluetooth tethering capability. I use it every day for at least two hours. Much to my dismay, one day it stopped working without explanation. On my mac the Bluetooth 'Connect to Network' menu item was disabled, and for the life of me I couldn't figure out what was wrong — no error messages, no log entries, no clues to speak of. Yesterday I stumbled upon the problem by accident. What follows is some basic instructions that helped me to get it working again. These instructions are only applicable to software developers provisioning apps to their iPhone via XCode.

The underlying problem turned out to be some iPhone provisioning profiles that had expired. If you've had expiring provisioning profiles on your device before, then you know that the iPhone will warn you many times as the expiry date approaches. In the Settings app of your iPhone, tap through General -> Profiles, select any expired profiles and press the Remove button. Once the rogue profiles are removed from your phone, start up XCode on your mac and from the menu select Window -> Organizer. From the Organizer, select Provisioning Profiles under IPHONE DEVELOPMENT.

Delete any expired provisioning profiles using the context menu. After completing this step, exit XCode and you're done! Your Connect to Network menu item should now be enabled, and tethering should now be restored to its normal greatness.

Tuesday, December 1, 2009

Encoding And Other Character Woes

Ever have a troublesome file containing unprintable characters or other character encoding problems? Ever wonder if your line delimiter (EOL) is correct for your platform? Over the years I've seen many incarnations of such problems, hidden deeply within XML and other text files. Due to the nature of such characters, being unprintable and sometimes occupying 0 space, these problems can be hard to find and diagnose -- until now. I've created a tiny utility for Eclipse that provides a way to see the invisible: Text Inspection is a new project specifically designed to aid in looking at text in Eclipse.

Text Inspection does this by providing a view that displays the current workbench text selection, exposing unprintable characters as a Java String literal using unicode escape sequences where appropriate. All you have to do to see the text of interest is open your file in a text editor (any text editor will do) and select the area of interest.

The project also augments the Java source editor with a paste command alternative for pasting text as a Java string literal, escaping characters as needed. This can come in really handy when writing unit tests. My unit tests often compare output to an expected value, which is often copy/pasted from the console.

I invite you to try it out and provide feedback.