This is looong overdue, but you can now manage dependencies on Contract4J5 using Maven. The details are here. Also, I moved the code from a private subversion repository to GitHub.

Contract4J5 is my Design by Contract library for Java. I haven’t worked on it in a while, but I hope to return to it sometime this year to solve the one issue that keeps it from being practical for many teams: performance. Currently, the runtime overhead slows down tests considerably. It is already feature complete and stable.

The Maven bundle includes the all the sources and javadocs, as well as the runtime jar file. However, it is still built with Ant. If you want to work with the source code, clone or fork the GitHub repo.

The Erlang Factory, San Francisco (March 22-26) will have a tract called Give me a break on Friday, where other programming languages are discussed. I’m doing a talk called Scala for the Curious Erlang Programmer. I’ll compare the implementations of some features that both languages implement and discuss features that are available only in Scala or Erlang. I’ll try to highlight situations where I think Scala or Erlang is the best choice.

Several years ago, while I worked for Object Mentor, I blogged about an old friend, Master Chef Rino Baglio. I described some of the lessons I learned from him about craftsmanship and how they apply to software development.

Yesterday, I read a blog post by Christopher Cribb that contained another Chef anecdote that shows the same fanatical commitment to quality. Chistopher is a Kansas City-based wine importer who visited Chicago’s Fronterra Grill recently. Fronterra is the famous Mexican Restaurant owned by Chef Rick Bayless. Bayless won one of those master chef competitions recently, so now his restaurants are even more popular (and hard to get into) than they were before.

Christopher’s blog post is actually about wine pairings with spicy foods (and worth reading for that discussion alone). Along the way, he describes observing Bayless eating his own dinner at the bar. When he started to eat the fish entree, he immediately took it back to the kitchen. Twenty minutes later, the head chef brought him a new plate and apologized for whatever transgression Bayless discovered.

It’s easier to just let subpar work go uncorrected, but Bayless is so successful because he’ll send a subpar dish back to the kitchen. When was the last time you said “no” to subpar work in your software project?

We have extended the deadline for submissions to February 15th. Get those papers in now! For more information, please see the call for papers.

February 1 is the deadline to submit papers for the IEEE Software special issue on “Multiparadigm Programming”. You can read more about it here.

We also need reviewers for the submissions!

Scala Type Parameter "Gotcha"

November 25th, 2009

During the exercises for my Scala tutorial at QCon last week, one of the students was mystified by the error message he got when he ran the following (greatly simplified…) script:

  
trait Doubler[T] {
  def double(t: T): T
}
class IntDoubler[Int] extends Doubler[Int] {
  def double(t: Int) = t * 2  
}
  
  
(fragment of ....scala):5: error: value * is not a member of Int
  def double(t: Int) = t * 2  
                          ^
one error found
  

What?! Of course Int has the * member method!!

Well, yes, the final class scala.Int type does have a * method, but that’s not what the word Int means in the declaration of IntDoubler. Because he wrote IntDouble[Int] instead of IntDouble (without a type parameter), he effectively said that IntDouble is still parameterized and the type parameter now has the name Int. The declaration that yields the intended behavior is this:

  
class IntDoubler extends Doubler[Int] {
  def double(t: Int) = t * 2  
}
  

This is a common beginner (and not-so-beginner) mistake. We discussed it in Programming Scala and I posted an enhancement request today for the Scala compiler to provide some “help”. The compiler could disallow any type name that is in scope to be used as a type parameter name, as in our example, or the compiler could at least warn you that you probably didn’t mean for the new type to have a type parameter.

I just completed a search for a new job. In these economic times, finding a job can be daunting, even in the software industry, which has fared better than most. (Today, it was announced that the official unemployment rate in the U.S. is 10.2%, the highest level in 25 years.) A job search can be harder if you're a software developer of a certain age (I turn the big Five-Oh in January).

Despite these obstacles, this was the easiest and most rewarding job search of my career. I had the good fortune to receive several excellent job offers. I regret that I had to turn down all but one of the opportunities. (I start at DRW Holdings after Thanksgiving.)

Read the rest of this entry

I’m teaching an all-day, introductory tutorial on Scala at QCon San Francisco, November 16th. You can find out more about it at the QConSF web site.

QCon San Francisco is a new conference (this is its second year), but it is already my favorite conference in the US for general coverage of software industry topics. It’s jointly organized by InfoQ and Trifork, the people who produce the highly-regarded JAOO conference in Denmark.

The end of QCon overlaps with the start of RubyConf, so I’ll be attending that one, too, and also the one-day JRubyConf on Sunday, November 2222.

I hope to see you at any or all of those conferences!

I have the pleasure of guest editing, along with Michael Feathers and Tony Clark, a special issue of IEEE Software on Multiparadigm Programming.

Obviously, multiparadigm, a.k.a. polyparadigm, and polyglot programming have been topics I’ve thought a lot about recently (Hence the polyglotprogramming.com web site). Here is the opening paragraph of the CfP:

For most of today’s applications, using one language and one paradigm—for instance, object-oriented programming—is inadequate. Today’s applications are often polyglot, involving multiple languages, and multiparadigm, involving a mixture of deployment directives as well as functional, relational, object-oriented, aspect-oriented, and other paradigms. IEEE Software is soliciting articles for a special issue on multiparadigm programming, or MPP. It will explore MPP technologies, advantages, disadvantages, and applications ranging from embedded and IT systems to the Internet.

You can find out more information about the kinds of articles we are looking for, guidelines for submitters, etc. on the CfP home page. Note that we also welcome people who would be willing to review submissions.

I'm Joining DRW Trading Group

November 5th, 2009

My time at Object Mentor has come to an end. On November 30th, I start at DRW Trading, where I’ll write all kinds of software for trading applications, some of which is written in Scala, Clojure, etc.

Speaking at CJUG, 5/19

May 19th, 2009

Update: The talk is tonight (Tuesday). The 4th Chicago Area Scala Enthusiasts meeting is Thursday evening.

I’m giving my JavaOne talk at CJUG this Tuesday evening.

The title is Don’t Do This! How Not to Write Java Software. I’ll discuss ten issues I often encounter in Enterprise Java applications, why they are bad, and how to correct them.

Please join me!

We finally got organized; I’m pleased to announce that we’re holding our first meeting at 6:00 on Thursday, Feb. 19, at the Chicago ThoughtWorks offices. Our google group is chicagoscala and more information about the meeting can be found in this message. We hope to see you there!

I’m organizing a group in Chicago for people interested in Scala, called the Chicago Area Scala Enthusiasts (CASE). If you’re interested, join the google group for more information.

I posted an S5-based presentation called The Seductions of Scala (Zip). I'm giving this presentation tonight at CJUG.

To view it, unzip the file and open html/all.html in your browser. Use the arrow keys to navigate or the controls in the lower right-hand corner (visible when you mouse over).

The corresponding code is in the code directory.

Feedback welcome and I hope to see you tonight!

Slides from My QCon Talk

November 20th, 2008

I posted an extended version of the slides from my QCon San Francisco talk, Radical Simplification Through Polyglot and Poly-Paradigm Programming (PDF). The PDF includes some slides I skipped in the actual talk, for time’s sake.

InfoQ.com may offer a video of this talk. Stay tuned.