Tuesday, August 24, 2010

Making Eclipse More Welcoming

From the title you might be thinking I was going to talk about how we can encourage new-comers to get involved with and contribute to Eclipse, blah blah blah. But you'd be wrong. I'm actually going to talk about a thingie that shows up on your install when you first pull off the shiny shrink wrap of an Eclipse RCP / SDK Application / Product / Whatever.. Rather than get into the details -- the Eclipse documentation is quite good (as one hopes it would be!), and there are a number of nice tutorials on it -- I'd like to discuss more generally what Eclipse offers, how it fits into the overall picture and discuss how it might be improved. There may be a few useful technical tidbits buried in here somewhere..

I wrote most of this post back in February but have been too busy with other things to ever get back to it. But this bugzilla I received last night made me think that I wasn't the only one that has had trouble grasping the overall logic of the Eclipse User Assistance system, so I decided to spend the time to resurrect it. I hope it gets a little discussion going.

Drawing Users In


I've been thinking a lot about initial user experience lately as I've been getting ready to release more -- for lack of a better description -- consumer-oriented offerings. As much as I'd like to think otherwise, I keep getting corralled back to the view that no matter how well explained and functional P2 provisioning is or becomes a (large majority?) of people will want to click on a button on your website, download the software and run it. They don't care -- and in fact don't want to even know -- about the Swiss Army Knife. They just want the can opener. Maybe later they'll be happy to find out that they can also use it as a screwdriver (but anyway, isn't that what a butter knife is for?), but in the meantime it would be really nice if when they're rooting around in their drawers for it, it is labeled "can opener" in bright letters or better yet has some visual cues that make it look like it might be for opening cans.

And while some people are like me (and probably you) in that they like to open everything up and experiment, other people like to take the direct route -- they'd like to pull the shrink wrap off of their new can opener box and have a nice little full color tri-folded diagram about how to use the can opener. So, while the rest of us are busy chatting on IRC about the most efficient way to saw the top off of a tomato soup can with a nail file, and writing bug reports requesting that the tooth pick be made out of mahogany rather than plastic ("but mahogany has poor wear characteristics") they're sitting down for lunch. In the most brilliant marketing phrase out of the most brilliant marketing company of all time, these people are referred to as "the rest of us", and they really aren't anything like "us". If by us we mean, "us software developers". When I'm in the kitchen, I prefer Can Openers too. And I use a Mac because there is a lot of technical noise and clutter I don't want or need to know about either.

So, how to make a good first impression? How to lead your users into actually using your software? I don't want the results of all of my efforts to be the unused whatsit at the bottom of the drawer of lost gadgets. At the very least, I want users to tell me why my can opener is useless and send it back for a refund. In order to get to that point, I'm going to need them to use it to try to open just one can. And, if they've never seen a can before, along the way I need to let them know that food is stored in it, that they need to go and buy one at the store first ("remember, you'll need to pay for it before leaving..you'll need money for that, which comes from.."), etc.. And that's what I think initial user experience is all about. Not making assumptions about what users do and don't know while accommodating different levels of user interest, experience and curiosity.

OK, enough technical blah blah blah -- to specifics. One of the many nice things about Eclipse is that it already has an enormous amount of infrastructure supporting User Assistance. And, one of the challenging things about Eclipse -- at least for me -- is that employing that infrastructure is going to involve some fiddly bits and dipping into a lot of different areas.

Help!!


You need some! Really. User's like it!

There are many gaps in the overall Agent Modeling Platform, but the products I'm developing are focussed solely on developing Agent-Based Models and there is a lot to that -- users need to be able to figure out how to use the can opener, but they also need to now why and for what they might want to use one. We're lucky enough to have one Manual for an earlier related tool (written by Damon Centola), so I started with integrating that into the docs for Ascape a related tool I worked on for about ten years prior to moving to the Eclipse platform. That meant a lot of work just trying to parse a manual from Word to Apple Pages to HTML output to readable, well-formatted HTML output -- and then moved on to write the Help as well as integrate that with other aspects of the system. Then I started in on creating some (pretty extensive and reasonably complete, I think) user documentation including design overviews, user tools, and examples. By the way, it sounds like an obvious point, but it's good to think a lot about how your documentation is organized. The basic documentation outline for the core Eclipse projects is very good, and while the overall design won't fit perfectly for every project, it's a good place to start and following the common outline provides a seamless experience to users as they move from one Eclipse related tool to another.

The Eclipse TOC editor works quite well for all of this -- there is only one plug-in point to maintain and the maintaining hierarchical structures is easy. Even better, the Eclipse ecosystem now supports some really good tools for creating and most importantly maintaining help content and doing so in a distributed automated way. A number of months back I spent a great deal of time stealing and modifying XText's documentation system. Now we can write all of the AMP documentation in WikiText, launch an ant script, and get all kinds of docs automagically generated. When complete we had nearly two hundred pages of PDF text including the converted Ascape manual, as well as online help and Eclipse integrated help.

Welcome!


The next piece is providing a way for users to be guided into actually using these cheat sheets, references and so on. For that, Eclipse has the welcome screen. The welcome screen is a really nice feature of Eclipse that is under-appreciated and a bit under-utilized. Part of that may be that it is surprisingly difficult to get up to speed with how to use it. There are a number of pieces that have to work together -- a theme I'll return to below -- and you have to poke around quite a bit to figure out where the points of integration are with other projects. For example, for my IDE build, I wanted to be able to turn off some help items that my users probably wouldn't need -- like plug-in development samples -- while keeping some they would, like for (the perennially problematic) SVN integration.

What you end up with is really useful -- if users use it. But I've watched a fair number of neophyte users start out with the software from scratch, and what is the first they do when they launch the software? Click on the "close" button to get rid of the this weird view that is blocking the software! That's in large part due to the initial Eclipse start page that had a bunch of cool symbols on it but really, it's actually not at all apparent why it would be at all useful. So the first change to make for an IDE build is to change the style to Slate, which brings up the four or five main categories along with a description of why they might be useful.

Cheat Sheets


I'd already spent some time getting up to speed on Cheat Sheets. Cheat Sheets aren't something that I personally use a lot -- they are generally a bit to linear feeling for me -- but I'd probably benefit from doing so, just as I'd probably benefit from reading the damn manuals before blindly diving into implementation! My fellow developer and ABM tool user Ed Mackerrow has been pushing me to use them more as he's found that they work really well for easing people into tools.

Now that I'm beginning to work with them a bit more, I'm starting to think of cheat sheets as less clingy versions of Wizards -- they walk you through doing something useful, but when you've done it a few times they don't hang around wanting to hold hands with you all of the time. And they're a lot easier to develop than Wizards.

Generally the cheat sheet authoring process has been really straightforward. If you don't use them and have any kind of product or set of features involving getting people through two or more non-obvious steps, then you really need to try it. (Is there a cheat sheet cheat sheet?)

But as with the Welcome system, the cheat sheet integration process is not so easy. There are some fiddly bits, things that seem more complex that they need to be. Most of that has to do with just mucking around with configuration stuff. In order to create and maintain a cheat sheets for multiple nested groups, one has to define separate cheat sheets for each sub-group, link those together, and then link those to plugin cheat sheet definitions. At each level, you create and maintain names and IDs. So for one group, we need:

  • Parent cheat sheet name and id

  • Parent cheat sheet file name

  • Group name

  • Child cheat sheet names

  • Plug-in id, name and client link.

If you decide to change the name of one cheat sheet, that can can be one file name, three separate files, and seven text entries to maintain! For me this also creates a lot of cognitive dissonance. Coordinating these kinds of artifacts is a common problem in software design, especially within a large pluggable set of tools, but I think it comes up quite a bit in Eclipse infrastructure. I'll pick up on that general theme below. I'll also talk about how I think the user experience could be improved.

Connecting it all Together


One of the coolest and least appreciated aspects of bundled documentation is the ability to make the documentation interactive. You can call commands or refer to existing cheat sheets.

Calling commands from Help


If I'd known how easy this was, I would have done it much earlier. Something else you really should try, as it provides a nice solution that sits between cheat sheets and screenshot oriented tutorials in the suer experience. In my case, I thought it would be neat if user's could actually run example models while reading about them in the Documentation! So, here's how to call code directly from help.

First you implement a live help action:

public class ExecuteJavaModelAction implements ILiveHelpAction {

String javaPath;

/**
* Launch the Escap model.
*
* @see java.lang.Runnable#run()
*/
public void run() {
IPath path = new Path(javaPath);
EclipseEscapeRunner eclipseRunner = new EclipseEscapeRunner();
IProject javaProject = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
IPath fullPath = path.removeFirstSegments(1);
try {
javaProject.open(null);
eclipseRunner.open(javaProject, fullPath.toPortableString(), fullPath.lastSegment());
} catch (CoreException e) {
throw new RuntimeException(e);
}
}

/**
* Define the Java pah to the model node.
*
* @param data
* @see org.eclipse.help.ILiveHelpAction#setInitializationString(java.lang.String)
*/
public void setInitializationString(String data) {
javaPath = data;
}


Here, since I need to refer to a model within a project within the workspace, I need to discover where that workspace and project are. Otherwise the code is very straightforward.Then, we just need to define an embedded javascript to actually execute it:

<a href='javascript:liveAction("org.eclipse.amp.escape.ide", "org.eclipse.amp.escape.help.ExecuteJavaModelAction",
"org.ascape.escape.models.brook/edu.brook.sugarscape.GAS_II_1")'>


This is covered nicely in the Eclipse help (as one would hope it would be!) though why not have a working example here!

Calling Cheatsheets from Help


It's pretty easy to get to Help from Cheat Sheets, but what about getting from Help to Cheatsheets? It's actually pretty easy though for some reason it was at first opaque to me and isn't actually spelled out in Help anywhere. Instead it's one of those things where you have to put two and two together but it can be difficult to locate where those two twos are to begin with. So here is how it is done:

Please follow this <a href='javascript:liveAction("org.eclipse.ui.cheatsheets", "org.eclipse.ui.cheatsheets.OpenCheatSheetFromHelpAction",
"org.eclipse.amp.escape.loadProjects")'>cheatsheet</a>.


But cheat sheets still have some significant usability issues I think -- and like the other issues, they aren't really technical, but have to do with the overall design approach.

Hey, I still can't open this can!


Which brings us back to my reason for resurrecting this post. It's that whole can opener thing. The Eclipse user assistance capabilities, especially when compared to what's available on many platforms is quite complete. Overall, the Eclipse toolset and User Experience provides a powerful, world class set of user tools. There have been enormous efforts in improving the User Experience, most especially I think with provisioning -- but I still think we can do better. For example, it's hard to explain exactly why, but somehow the Eclipse User Assistance experience still seems a bit disjointed.

Part of making the most of the tools is for all of us to (yeah, obvious, right) use them, and that means I think improving the tools for authoring and integrating help so that small teams can get up to speed on them quickly to produce good help. But part of it is being willing to rethink aspects of the user experience. And thinking clearly and in an unbiased way about how all of the different pieces fit together.

How do we do that? I don't know exactly, but I've observed that one of the biggest challenges to the improvement of Eclipse is this attitude: "We've always done it that way, and it makes sense to me.." Well, of course it makes sense to you, you've been using the tool for five years! Then it's, "Ok but, no one has ever complained about it, they should file a bugzilla". The last feedback you're going to get is from new users -- they don't know how to use the software, so how likely is it that they're going to know the culture of bug reporting? And so here's the problem with that response: new users don't complain, they just go somewhere else. Or, if they stick around, they quickly learn that that is just the way things are done and its not likely to change, because everyone is used to it. And more than anything else -- which constantly surprises me, knowing how imperfect most software really is -- they figure that they're just missing something that must be obvious to everyone else!

Which is why I love the Bug that I mentioned at the beginning of the post. Here's a user that didn't get it, and let us know that he didn't get it. Now, I know Scott and he's not a dumb guy. He's actually a really smart guy -- a Computer Science Ph.D. and just finished a postdoc at Caltech. And he's done a lot of development for ABM tools based on Objective C on OS X. So what's he missing? The issue he is having here is being directed to a cheat sheet from the welcome screen.

The Eclipse developer (me) and platform (us) point of view: I've put together a great Welcome setup, and even included some sample models. All the user has to do is click on the Samples button, click on the Example Models button and he get's directed through the simple process of downloading and installing some example models from the version control system. Neat, huh?

Scott's point of view: I clicked on a button and the window went away and nothing happened.

Now Scott didn't know that he was being asked to use a cheat sheet. The Welcome screen just tells him that he's going to be able to load some example models. Well, if you've done this before, you know that you're gong to get a cheat sheet and you just need to follow the steps that are layed out for you. Once you know what a cheat sheet is, it's pretty clear what it's for. But what if you've never used one before? Cheat sheets actually open into a small window on the right side of your screen. They're surprisingly easy to miss. Not for you and me, but for a new user. Worse then all of this, loading some of the models (the one's I can't host on Eclipse for licensing reasons) requires SVN, and (as all long-time Eclipse users are only too painfully aware) if you haven't installed Subversion yourself, it won't work, and you won't know why. So even if the Cheat Sheet were obvious it still wouldn't work out of the box. Which means that I need to add something to the cheat sheet that says "First you need to install Subversion..". Argh! I think it will actually be easier to just move the example models.

Perhaps you have other User Experience examples to share. It's always a bit difficult to share examples because you end up critiquing a small aspect of work that someone has put a great deal of effort and thought into. But doing so is critical to having a culture of continual improvement. In that spirit, here are a couple of examples I've gleaned from users..

What's the difference between Help Contents and Dynamic Help? And where does "Search" fit into that? Another one is the Eclipse downloads -- there have been improvements to the download page itself, but I still get questions all the time from users asking me what version of Eclipse they should download. Hey, that's easy, right? OK, for the Eclipse developers out there, we can find anything we need quickly and easily, but please imagine for a minute that you are a new user facing this matrix of choices. Now, there are all kinds of good rationales for not changing things -- (yep) that's the way we've always done it, and conversely the users need to learn to use what we're trying to give them, and -- but I'll go out on a limb and say that user experience trumps pretty much every one of these.

Perhaps you've got some ideas you'd like to share. Or perhaps I'm making a mountain out of a speed bump on the entrance ramp to the exciting world of Eclipse, but I'll just suggest that before you think "that's obvious" put your self in the mind of a new user. And then ask yourself "is that really obvious, or am I just used to it?"

Thursday, August 12, 2010

Oracle Sues Google over Java Patents

Reuters

OK, am I the only person who read this and got a kind of sick panicky feeling? The implications here are unsettling to say the least, and potentially dire. To the corporate watchers out there, I guess this looks like just another drama for the industry big boys. But for those of us who use Java to get things done, I'm really afraid that the stakes could be a lot higher than that. Maybe I'm overreacting, but what are the limits on Oracle here? And given those limits, where will they stop?

Seems to me that anyone who relies on Java could wind up in Oracle's sights, which means, um.. all of us. I don't know about the rest of you, but I've been under the willful misconception that Java was for all intents and purposes a truly open platform. Or at least an open standard.

But to me the scariest thing about this suit is Oracle went after Google not for using Sun's Java but for creating a JDK implementation of their own. One that can't even run unmodified Java byte code. Now, we all know that Oracle owns most of the Java implementations we're using. But in the back of our minds was the idea that we could always bail for an Open Source clean room JDK. But how's an Open Source JDK ever going to be truly clean? Who hasn't looked at the Java code?

Even is Oracle and Google settle, Oracle has opened a door that they're going to have a very hard time closing. Needless to say most of the case seems to be based on software patents -- and patents are the ultimate bad news for the little guys who just want to build something cool and share it with others. Are we all going to wake up tomorrow and discover that Oracle believes they own a slice of everything we've done for the last decade? Is this the point at which we all begin to look for an exit strategy? Is there one that doesn't mean starting all over? I don't know about you, but if I had to choose between that and being owned the choice would be pretty clear.

Eclipse Dock Icons Part Deux

OK, more fun with bad art. But what can I do while watching the build paint dry waiting for yet another failure. Between failures I don't seem to have much mental bandwidth left to get any real work done.

Now I'm stuck trying to get the promote scripts working -- there are lot's of examples to work from but every one seems to involve Buckminster calling ant calling Buckminster calling ant in a different feature. (Question: how many features do you need to build one deployable Eclipse site? Answer: everytime you ask yourself this question, n + 1.) For extra credit, some projects use ant to call buckminster in the first place. Of and of course a lot of the time we don't have calls at all, but mysterious indirect invocations from somewhere..mysterious. So I moved on to Unit testing and somehow managed to break the part of the build that was already working. Why am I finding this so hard?!?! I'm beginning to suspect that some people are good at this kind of thing, and I'm just not.

Anyway, due to popular demand (actually only one person asked) I've put together some more icons. You can download them here. See my post yesterday for details on how to use them. Here's the basic drill for customizing them:
  1. Get your Keynote out if you have it. If you don't you can do most of this in Preview.

  2. Grab some images from flickr. You want images that have very light consistent backgrounds. Don't forget to attribute them!

  3. Go nuts. You can use the instant alpha tool to get rid of the background. Then grab whatever icons you want, type some text, add shadows, etc..

  4. Copy the image into preview. (You can sometimes skip this step but it works best for sizing.)

  5. Copy that image into your icns file.

Want your own crappy custom icons? Happy to trade for help with my crummy build.

Attributions

Mrs. Logic Creative Commons Attribution 2.0 http://www.flickr.com/photos/mrs_logic/3556644715/
nomac*nolife Creative Commons Non-Commercial 2.0 http://www.flickr.com/photos/nomacnolife/1855209577/
Travis S. Creative Commons Non-Commercial 2.0 http://www.flickr.com/photos/baggis/524174723/

Wednesday, August 11, 2010

De-obfustacting Eclipse dock icons in OS X

OK, I am long over-due for an update to the blog, and I have lots to report on, but I've been deep in build hell for the last week, (and the week before I left for retreat, and a week before that...) so no time to spend on the fun stuff. Still, I had to find something silly (and hopefully a bit useful) to do for a half a half an hour or so. I don't know if this is a familiar scenario for other Eclipse users, but I seem to spend a lot of time with multiple Eclipse instances open, and I end up no being able to keep one instance straight from another.

So, to identify what version I want to pop over to in the app switcher or the dock I needed some way to change the icon in both places. Turns out that this is one of those annoyances that is super easy to fix, and once you do you wonder why you put up with it for so long. The first thing I thought of was to change the eclipse.ini file, but it turns out that like a lot of things having to do with Eclipse configuration, the -Xdock:icon property in this context is totally vestigial -- or at least it doesn't actually seem to do anything. But the answer is even simpler than that. Here's what to do, and again, it ain't rocket science:


  1. Right-click on your Eclipse Application

  2. Select "Show Package Contents"

  3. Open Contents:Resources

  4. Replace the Eclipse.icns image with a different one

  5. Enjoy some new found clarity.



As a bonus (today only!!) I've even included some icons for you to use:

Blue Eclipse Icon
Green Eclipse Icon
Gray Eclipse Icon
Teal Eclipse Icon

Snazzy, huh? Now instead of this:



You get this:



[By the way, why does it take blogger.com five lines of html to insert one image? And why isn't their editor smart enough to not not create extra BRs between li tags? And why can't they make an editor that displays more than twenty lines of text at a time. Basically, with everyone crowing about how everything is going to web applications, why can't anyone seem to create one with a larger text window than the VT102 I used in high school? I mean, doesn't Google have like billions of dollars in spare cash to hire a few decent web programmers for blogger?]

To use a different icon for hosted Eclipse Application Runtimes, go to the Arguments tab of your Run Configuration for your app and add the following line to your VM Arguments:

-Xdock:icon=/Path/where/you/put/the/damn/thing/EclipseGray.icns


If you haven't done it before, it's really easy to make your own .icns file. Just:


  1. Install XCode Developer tools if you don't have them.

  2. Open Icon Composer in Developer:Applications:Utilities.

  3. Open up an icns file you already have, like the Eclipse.icns. Or just create one form scratch. (I really don't need to spell this out I guess..

  4. Copy the images you've edited into the cells.



You can just drag and drop from your image editing program into the boxes, assuming that they are compatible. I just use Preview for my editing, and for the icns above I just used the nifty Adjust Color tool. These aren't the most attractive icons in the world, but they'll do. It's amazing what you can do with the built in Preview tool plus a little creative cutting and pasting. I thought about creating some icons for say "Runtime", "Modeling", etc.. but I've already spent enough time on this. Back to hell for me.

Popular Posts

Recent Tweets

    follow me on Twitter