tools

Before and after: Cairo/Pango

December 4, 2009

I work at a company called Key Technology, where I develop control software for automated inspection equipment.  Our UI is written in VisualWorks.

Over the past couple of releases of our main software product, we've been slowly converting to use Cairo and Pango for the graphics and text.  We're not completely done, but we're far enough along that I thought it would be worth showing some before and after pictures.  Without further ado, here they are.  Click on the small images for full-size versions (1280x1024).

First is a configuration page that is used on one of our systems.  We redesigned the look of the buttons and the list widget using Cairo, and used Pango for all of the text.

Before:

Old CIP configuration page

After:

New CIP configuration page

Next is a settings page, along with the main tab strip for the various pages in the system. We had some icon redesign done and redesigned the number editing widget.  Most of the widgets are now drawn with Cairo, and you can see the antialiasing the results.  If you look closely, you'll notice that the little black bubble in the middle of the "brightness slider" is still drawn the old way.

Before:

Old parameters page

After:

New parameters page

tools

Explicit Prerequisites in VW 7.7

December 4, 2009

Some time ago, I wrote about some enhancements I'd made to the NewPrerequisiteEngine package.  These enhancements allowed you to mark prerequisites as either Ignored or Explicit.

In the forthcoming VisualWorks 7.7, the prerequisite tool has been enhanced quite significantly, adopting much of what was accomplished by NewPrerequisiteEngine.  I think the new tool is a huge improvement over what was there before.

The concept of an Ignored prerequisite was included in the new tool (now called "Disregarded").  However, the concept of an Explicit prerequisite was not carried forward. 

In our work, we find that it is important to distinguish between prerequisites that we know are required, even if the tool can't find a reason, and prerequisites that used to be required, but no longer are.  We have a set of tests that we run on our code.  One of these tests checks to make sure that the prerequisites on all of our packages are up-to-date.  That is, that what is specified matches what the tool computes.  Without the concept of an explicit prerequisite, we can't keep this test passing.

To that end, I've just published ExplicitPrerequisites to the public repository.  Under the hood, it uses the same storage format as NewPrerequisiteEngine (a property on the CodeComponent) so it is backwards-compatible.  The package adds a toggle menu item to any current prerequisites, along with some modifications to the status icon to allow a direct-manipulation interface.  Clicking on the "no reasons" icon will mark the prerequisite as explicit; clicking on the "explicit" icon, will un-mark it.

In order to add the new icon and clicking behavior, I had to override one method from the base tool.

Feel free to try it out and let me know what you think.

books

Book review: Dealers of Lightning

December 4, 2009

I just read a fascinating book about the history of Xerox PARC from when it was started until the late '80s.  As most Smalltalkers know, this is where Smalltalk originated (along with a number of other technologies we take for granted today, like laser printers and ethernet, to name a few).

Michael Hiltzik's Dealers of Lightning: Xerox PARC and the Dawn of the Computer Age is a fascinating look at the people of Xerox PARC and what they were able to accomplish.

I found myself amazed, inspired, and sometimes wistful for what could have been while reading the book.  The author concludes with an interesting epilogue discussing the popular conception that Xerox had all this technology and let it all slip away to others (Steve Jobs and Apple being one of the main beneficiaries).

 

STS

Fit presentation posted

December 4, 2009

The video of the first part of my Fit presentation at Smalltalk Solutions has been posted here.

tools

Sample Views

December 4, 2009

At Key, we've used a family of extension methods on VisualComponent for a long time.  Travis Griggs urged me to split them out and publish them to the public repository so that others (likely him :-)) can make use of them.  They are in the package SampleView.

What SampleView allows you to do is open an ApplicationWindow that displays any VisualComponent in it.

The main API is sampleView: anExtent named: aString, but there are variants that allow both of these parameters to take on default values.

An example usage:

(Label with: 'Hello World!') sampleView: 400@50 named: 'This is a sample view'

This opens a window that is 400 wide by 50 tall; the title bar reads 'This is a sample view' and the main part of the window displays the label.

We find these methods extremely handy for testing small parts of our UI in isolation.  We'll often have an example method on the class side that sets up some state in the VisualComponent, and then displays it in a sample view.

STS

CruiseControl presentation posted

December 4, 2009

The audio and video recordings of my CruiseControl presentation at Smalltalk Solutions have been posted.

Audio is here.  Video is here.

fit

Smalltalk Fit on fitnesse.info

December 4, 2009

One of the tools that I've worked on (and still maintain) is the VW Smalltalk port of Fit, Fitnesse, and FitLibrary.  I've presented on this work at Smalltalk Solutions in 2006 and 2008, but haven't really written about it here.  That will change when I get more time.

For now, I've added some information about the Smalltalk version of Fit et al at www.fitnesse.info, which is a community wiki that was set up to discuss Fit and Fitnesse.  I've also added the necessary example code for the Fixture Gallery that is available from the same site.  The code is shown in classic fileout format in the documentation. 

If you grab the downloadable version, there is a 7.6 runtime image plus parcel files for running the examples (you'll need to edit the SmalltalkExamples page to point to the correct VM for your platform).  In addition, the code is available in the public repository as FixtureGallery-DomainCode and FixtureGallery-Fixtures (which are also part of FitBundle).

If you want to get started with Fit, Fitnesse, and/or FitLibrary in VW Smalltalk, the best place to start are the package comments for Fit and Fit-Subsystems.  I do plan to provide a more thorough introduction here, but that'll have to wait until I can finish some other projects.

Thanks to Gojko Adzic for allowing me to add the Smalltalk code and information to the site.

STS

Cruisecontrol presentation at Smalltalk Solutions 2008

December 4, 2009

At Smalltalk Solutions, I also did a brief presentation on Cruisecontrol and integrating that with VW Smalltalk.  I've written about that topic in this blog, so you can look at the archives (from September and October, 2007) for more information.

The slides for the talk are here.

It was the only session in its timeslot, and though a few people had already left for the airport, it was really well-attended (I'd guess 60 or 70 people, but I'm bad at estimating crowd sizes).  There were some really good questions at the end.

I expect video and audio from the talk to be posted at stic.st at some point in the near future.

STS

Fit Tutorial at Smalltalk Solutions 2008

December 4, 2009

Last week, I attended Smalltalk Solutions 2008 in Reno.  I enjoyed the conference very much.  Lots of interesting presentations and offline discussions.  I had two presentations there.  The first was a half-day tutorial on using Fit, Fitnesse, and FitLibrary from Smalltalk.  The second was a 45-minute talk on using CruiseControl to automate Smalltalk builds.

The slides for the Fit tutorial are here (PDF).  I didn't actually use Powerpoint during the presentation.  Instead, I had the information directly in a Fitnesse wiki.  I just put the information into a Powerpoint document for easier access for those who want to download the slides.

Because I didn't use Powerpoint, I was able to do something that I've wanted to do for a long time.  There was a story in Wired several years ago about some high school kids from Phoenix who entered a college-level underwater robotics competition.  The article is very entertaining, and I highly recommend reading it.  As part of the competition, the teams had to give a presentation to the judges about their design.  These kids used simple flip charts.  When one of the judges asked where their Powerpoint slides were, one of the kids (Cristian Arcega) replied: "PowerPoint is a distraction. People use it when they don't know what to say." 

I used this quote at the beginning of my presentation.  When I copied the information to Powerpoint, it seemed ironic to include the quote there, so I left it out.

Overall, I was pretty happy with how the tutorial went.  It was in an out-of-the-way room, and so I was concerned that no one would bother coming.  However, I had 6-8 people for most of the time, and it went really well.  There was a lot of good interaction and discussion, and the audience asked lots of really good questions.

There should be a video of the first half of the tutorial posted on stic.st at some point.  The second half was mostly just the group working together on an exercise, so it was not recorded.

Thanks to all who attended for making it a very enjoyable afternoon.