I missed Mixins in Java today

Note to Sun: I missed being able to do mixins with Java today. Maybe it’s all this playing with Rails, but back in Java-land I had this particular problem and I thought – mixins would solve this. But no go. Not even with JDK 1.5.

I guess I’ll just put on my monkey coder hat and add decorator scaffolding and almost-identical configuration code for 50 different classes instead. Maybe I should switch back to Spring autowire (like he Rails folks say, value convention more than configuration, right?). 😛

Yes, I know that you can do it using interfaces, but it still leaves me changing more than one line in all 50 classes. I also know that you could use some fancy AOP or dynamic proxying, and go against the GrainOfTheLanguage and end up with something that “works”, but it’s a pain to run through the debugger and determine basic intent.


Mac Mini.. This should prove interesting.

Today we were driving around and found a closing sale at a “Good Guys” store. All of their stores are closing in California and folding into CompUSA.

The discounts were very deep – they were even getting rid of the furniture and fixtures. So as I was walking around I saw a floor model of a Mac Mini (1.25G4/256Mb/40Gb/CDRW+DVDROM) priced at $329. As Apple never discounts and eBayers have a way of getting things priced way higher than fair market, I couldn’t resist.

So now I’m typing this on a Mac. Continue reading “Mac Mini.. This should prove interesting.”

Using Jobs API and asyncExec

Using the Jobs API (Job and IProgressMonitor) you can implement code that will run in a thread and update the standard Eclipse progress monitoring service as you go along in your thread.

To create a job, extend from org.eclipse.core.runtime.Job and implement the run method:

protected IStatus run(IProgressMonitor monitor) {
  int steps = 100000;
  monitor.beginTask("My Task", steps);
  for ( int i=0; i

To activate the job in MyClass (say it's a page with a tableViewer which we use to set the input), you do the following:

MySampleJob myJob = new MySampleJob();
myJob .addJobChangeListener(new JobChangeAdapter() {
  public void done(IJobChangeEvent event) {
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
                        setInput(myJob .getInputForTableViewer());

Have fun!

Migrated to WordPress

I liked Mambo, but it takes a lot to maintain, and I don’t really use all the features. So I decided to move the site to WordPress instead. The only caveats is that I didn’t migrate the user registrations (or the comments).

But all the articles are still here.

Please bear with me while I import links and other content.

In the meantime, you can find the old blog here (Note: It will be removed once I moved all of the content over).

Continue reading “Migrated to WordPress”