Playing in the Sandbox

The IBM Enterprise Modernization Sandbox for IBM i that is! We often hear that developers want to try out RDi but don’t have the time to do it at  the office and don’t have access to an IBM i box at home. So we created the Enterprise Modernization Sandbox for IBM i; an set of tutorials and access to a demo system that can be run from anywhere. This includes things like (under “architecture”):

And of course you don’t need to buy RDi or RDi SOA first. You can download the trial editions for playing around.


Ease of Use vs. Standard Behavior

Ease of use (including ease of learning) and following Eclipse Workbench standard behavior are two of many things we try to include in all our designs. However, sometimes these two things are at odds and we have to choose one or write extra code to compromise on a solution. Over the past few weeks we’ve run into 3 good examples of this working on RDi 7.5 which I’m going to include here for comments on:

1.  In Eclipse 3.4 (or Eclipse 3.3) the Plug-in Development Environment (PDE) added a new keyboard shortcut: Ctrl + Shift + A to open a plug-in artifact. RSE users will recognize this keyboard shortcut as the “Open Member” dialog.  So now when you press Ctrl + Shift + A, Eclipse detects the conflict and pops up a little conflict dialog:

conflict dialog

We (the RSE development team) had 3 choices: (1) Change our keyboard shortcut, (2) attempt to write some code to disable the PDE action, or (3) leave the conflict. Option (1) was ruled out because changing our action will make existing users frustrated because they are used to the old key sequence, and it doesn’t guarantee there won’t be future conflicts. Option 2 is out because it’s generally considered a bad practice to do something like this in the Workbench.

I believe option 3 is the best option because Eclipse already provides a preference page (General > Keys) where users can customize keyboard shortcuts. So really option 3 leaves it to the user to resolve by either changing the keyboard shortcut assigned to one of the actions or removing the key binding for the one they don’t want.

As a design rule, I’d like us to leverage the existing Eclipse workbench as much as possible for things like this instead of writing more code to resolve the issues (which can make things more complicated in the long run IMHO).  Of course the shortfall of option 3 is that you have to know that you can customize the keyboard shortcuts via the preferences.  The pop-up dialog does hint at this with the “Press Ctrl + Shift + L to open the preference page”.

2. The second example was around the current line color for the debug editor. The default editor used by the debugger is the Remote Systems LPEX Editor. The default current line color for the editor is pale blue that is hard to see. Again this can be changed by a preference (LPEX > Appearance) if you know where to look. In past releases we did some extra coding to override the preference and make the current line darker blue while debugging.. This release some things changed underneath us in the software stack and that no longer work. We ultimately decided to not re-implement this override since the preference already exists.

3. In the RSE you can right click on a local save file (local being on your PC), right click and select the Restore on IBM i… action to restore the save file on one of your IBM i connections (yes connections are now IBM i in 7.5 instead of i5/OS in 7.1 and iSeries before that).  Previously this action ran on the user interface thread and blocked any refreshes of the Workbench (so the Workbench appeared hung during the upload and restore). We wanted to change this to run asynchronously and even give the user the option to run it in the background and continue doing other things. The design question was: what to do when the action completes with errors? The standard Eclipse progress task just puts an icon in the bottom right corner of the workbench with and explanation mark on it:

If you click the icon then a dialog box appears showing the results. Of  course, you have to know to click the icon to see the results. The alternative would be to always show a dialog box when the action completes, but that could become annoying if you are in the middle of doing something like enter some source code. The jury’s still out on this one.

Ultimately we want the RSE to be easy to use and follow standard look and feel guidelines (which makes it easier to use in the long run).  Like every other development team we also have fixed resources and implementing a workaround for something means something else doesn’t get done.

I’d love any comments that new or existing users have on this topic to help us in our future decisions!


Moving around in LPEX

So I originally intended to keep blogging as I was working on the RSE book, but as it turns out, writing a book is a lot of work (who knew?) So things like blogging, exercise, and other hobbies got put on hold for awhile. The manuscript is due to MC Press next week so hopefully blogging and exercise can make a come back.

I’m currently reviewing Nazmin’s editor chapters and came across a section called “Moving the Curosr”. My initial thought was “this seems kind of obvious, perhaps we should just delete this section”. But to my surprise I learned three new ways to navigate around LPEX from reading it and I added one that Nazmin didn’t know about.
I suspect that a lot of users don’t know all of the ways, or perhaps they use them in a Web browser but don’t realize they can also be used in LPEX. So we decided to leave this section :) It’s pretty short anyways. And don’t worry, there are lots more exciting sections with cool stuff like the outline view, content assist, and of course keyboard shortcuts in LPEX.

And just so you don’t have to wait, here is the list:

  • Press the Up, Down, Left, or Right arrows.
  • Press Home to move the cursor to the beginning of a line and End to move it to the end of a line.
  • Press Ctrl + Left arrow to move the cursor one word left, or Ctrl + Right ar-row to move it one word right.
  • Press Page Up or Page Down to move the cursor up or down one window at a time.
  • Press Ctrl + Up arrow to scroll the editor up one line without changing the current line, or Ctrl + Down arrow to scroll the editor down one line.
  • Press Ctrl + Home to move the cursor to the beginning of the document, or Ctrl + End to move it to the end of the document.
  • Press Ctrl + J to return the cursor to the place in the editor where you last entered text.
  • Press Home and then Shift + Tab to position the cursor in the Prefix area.

For those existing RSE users out there, I’d be interested if any of these are new to you. I wasn’t aware of the Ctrl + J shortcut, Ctrl + Left | Right arrows, or Shift + Tab to jump into the prefix area. Good thing Nazmin wrote this chapter!


Keyboard Shortcuts are Documented

Doing some more testing this morning and I stumbled across this in the online help (WDSC 7.0):

Keyboard Shortcuts

So the keyboard shortcuts are documented in WDSC! This will be handy to know.


A Lot of Stuff

I’m currently running some old testcases for the editor and I came across one that included these steps (while editing CMD source):

  • Position your cursor at “(” and press Ctrl + Shift + M
  • Cursor should reposition to the matching “)”

I knew we had a match function, but I had no idea it would match brackets too! So I had to try it with RPG and sure enough it works there too! Bottom line: there are a lot of features in the RSE, epecially the Remote Systems LPEX Editor. I’m really looking forward to reading the editing chapter that Nazmin is currently work on to see what else I’ve been missing out on : )

As for my progress on the book, I just finished up my big chapter which basically covers the Remote Systems view (connections, filters, working with libraries, objects and members, iSeries table view (which perhaps should be a separate chapter, but is closely related to the other stuff), and filter pools. I resisted putting a section on profiles, but the more I think about it the more I’m inclined to include one. Probably in a different “miscellaneous stuff” chapter. Now I’m onto the iSeries projects chapter.


The RSE Book

It’s official. Nazmin and I have a publishing agreement with MC Press to write a book on the RSE. We sent in two chapters (Getting Started and the Debugger) back in October and they liked them so they gave us the green light to go full steam ahead. We are scheduled to deliver the first manuscript to MC Press in 1Q 2008 and the book should be out around 4 months after that.

The book will be dedicated entirely to the RSE, integrated iSeries debugger and iSeries projects. The goal is to provide detailed descriptions of the features, how they were intended to be used, how this differs from how they are actually being used, customizations, how to map how things are done in SEU / PDM to the RSE, lots of tips, techniques and screenshots. And of course, some of the deep technical information that the RSE power users out there have been waiting for :)

Nazmin is currently working on the editor chapter and I’m working on the “Accessing libraries, object, and members” chapter. My chapter will basically cover the Remote Systems view (connections, managing LIBL, filters, filter pools, iSeries table view, running commands).

The problem so far has been too much writing. All the chapters are blowing their original size estimates. It seems there’s lots to write about once you dig into it.

I’m planning to do a lot more blogging here while writing the book, to share some tips, thoughts, updates on the progress, and to get feedback. In fact this has been the impetus behind quite a few of my recent postings. I would be doing some writing and want to share it immediately.

We would love any feedback, suggestions or comments you have for the book. Feel free to post a comment here or send us an email.


COBOL comes first (this time)

I was just writing some COBOL source code (which is a challenge since I don’t really know COBOL) to test some of the new features we are working on when I cam across a cool editor feature for COBOL that I didn’t know we even had for COBOL. And it doesn’t exist yet for RPG!

Normally when we add new features to the RSE we put them in for RPG first and then COBOL either at the same time or later on. Simply because RPG is more widely used on System i than COBOL.

Back to my story. Like any good programmer I was trying to add comments to my source. Not knowing how COBOL expects comments to appear, I first tried // comment. Nope, synatx error. Next I tried /* */ which worked, but at the same time I accidently hit some key combination that put a * in column 7. Updated: apparently /* */ doesn’t work.

Whoa, backup. We have an auto comment / uncomment action for COBOL? Apparently so. Just like the Java editor, if you press Ctrl + / it automatically comments out the current line (or selection of lines). And Ctrl + \ automatically uncomments the line.

I’m going to assume that kudos goes to Adrian for that one. Now, if we only had that for RPG like everyone asks for :)


Closing Multiple Editors

For some reason this week I keep finding myself with a lot of open editors and wanting to close all of them except for just one or two. Normally I’m working on a problem and someone stops by and we get off track investigating something else. When they leave I want to close all the other editors to get back to my original task.

I’ve discovered a pretty cool way to do this:

  1. Press Ctrl + Shift + E which opens the Switch to Editor dialog.
  2. Select the editors you want to keep open.
  3. Click the “Invert Selection” button.
  4. Then click on”Close Selected Editors”.

Viola, only the editors you want are still open. I’ve been using this with the Java, XML and properties file editors, but because of the beauty of Eclipse it works for any editors, including the Remote Systems LPEX editor for RPG and COBOL.


WDSC Pin-up

The current issue (August 2007) of the IBM Systems Magazine, i5 Business Systems edition, has a “Favorite Keyboard Shortcuts for WDSC” pin-up created by System i Developer. Unfortunately I can’t find a link to it online, but the magazine subscription is free.

I’ve memorized all the standard Windows shortcuts and Eclipse navigation shortcuts but I can never seem to remember the LPEX shortcuts so I now have it pinned up in my PWA (personal work area, aka cubicle). I’m hoping it falls within the IBM guidelines of appropriate and non-confidential materials :)

The pin-up also lists the outline view as the the System i Developer’s favorite WDSC feature. Which got me thinking; what is my favorite WDSC feature? Outline view, application diagram (I’m biased on this one), and extensibility are definitely runner-ups. But my favorite feature is without a doubt service entry points!

So, what’s your favorite?

Updated  09/20: A PDF of the pin-up is available on the System i Developers website here.


What’s Your Preference?

WDSC comes with a smattering of preferences that can be customized to tweak the workbench to your liking. The good news is they are all centralized in a single dialog (Window > Preferences). The bad news is there are lots of preference and finding the one you want can be a challenge.

Of course that assumes you already know that such a preference exists. That is why I sometimes just browse through all the preference pages. It’s amazing the stuff you can learn just by doing this. Obviously you learn what preferences exist, but quite often I find a preference for a function I didn’t even know existed!

To be honest, I don’t customize that many preferences. But there are a few that I change immediately whenever I create a new workspace (of course now I’ll just export / import them). So here are my top preferences:

  • Background color for the currenLine in LPEX (LPEX Editor > Appearance). The default for this is a light blue which I find hard to see. So I always change this to yellow so it’s very easy to see which line the cursor is on.
  • Editor font size (LPEX Editor > Appearance for LPEX and General > Appearance > Colors and Fonts for other editors). Dropping the font size 1 or 2 points is a great way to crank out a bit more screen real estate from my ThinkPad screen.
  • Enable all capabilities (General > Capabilities). The idea of having capabilities that could be turned on / off seemed like a good idea initially. But I find it gets in the way more often than not, so I just enable all of them.
  • Keyboard shortcuts (General > Keys). I always use Ctrl + m to maximize / minimize editors and views and it drives me crazy that it doesn’t work for LPEX (because LPEX overrides it for some other action). So I always go here and remove the Ctrl + m assignment from LPEX. Warning: doing this will also disable whatever action LPEX has assigned to the Ctrl + m keyboard shortcut.
  • Templates (Remote Systems > Remote Systems LPEX Editor > iSeries Parsers > …. for LPEX and Java > Editor > Templates for Java). I use these mostly for my Java development to insert the standard IBM copyrights into each new file.
  • PDE Target Platform (Plug-in Development > Target Platform). We use Eclipse to develop WDSC, so often we are running two copies of the workbench at the same time (one where we write the code and the other where the code is running). So I download a plain vanilla version of Eclipse to write my Java code and point the Target Platform preference at the most recent version of WDSC I have installed. Then the code I write overrides the version of the code in the WDSC I have pointed to when I run and debug.

So what’s your top preferences?


Follow

Get every new post delivered to your Inbox.