More Thoughts on Modularity

January 25th, 2013

A few days ago, Neal Ford blogged on Why Everyone (Eventually) Hates (or Leaves) Maven. It’s an excellent read.

Allow me to expand on a few of his points; on what makes software modular and the importance of tools like bash and make.

Read the rest of this entry

The year is 404 BC (no relation to the HTTP status code). Athens has just surrendered to the Spartan commander Lysander, ending the Peloponnesian War, with its 27 years of bloodshed.

John R. Hale’s glorious history, Lords of the Sea, describes what happened next (page 243):

Read the rest of this entry

Scala Identifiers with Spaces

September 14th, 2011

This morning, I was looking at some Java code I’m writing for a client. I have an enumeration of flags for various error conditions, say for example, FileHasTheWrongFormat. As I looked at a log file, I thought, “wouldn’t it be great if that name got printed with spaces instead, so it’s more readable?” Of course, you can add an appropriate toString method, but then I remembered Scala’s back quote syntax, e.g., java.util.Scanner.`match`, which lets you use Java identifiers that are reserved words in Scala (like match in this case). Could you use back quotes to embed spaces in identifiers?

Read the rest of this entry

Programming Can Be Fun Again

September 5th, 2011

Eric Allman’s recent blog post, Programming Isn’t Fun Any More has struck a cord with a lot of people and is enjoying a spirited discussion on reddit. The comments by deong are the best (here, here, and here).

Language environments like Java have a serious problem with bloated tools that get in the way of solving customer problems. The Spring Framework was great in its day, because it cut through the J2EE garbage and introduced a much needed focus on (relative) simplicity.

However, I now see Spring as a local minimum in the quest for simplicity. In the Java world view, Spring minimized complexity, but in a larger world view, you realize we can do better.

Read the rest of this entry

Contract4J Web Site Has Moved

February 1st, 2011

I decided to move my website for Contract4J from to

By the way, I’m looking for someone who would like to take over the project. While it’s mostly feature complete, there are some major performance improvements that could be made. Let me know if you’re interested.

(Updated August 4th to make corrections suggested by commenters; thanks!)

At last year’s Foo Camp, Alex Payne led a brainstorming session on the idea of a conference devoted to “emerging” languages; that is relatively new, innovative, and often obscure languages with interesting ideas. That idea bore fruit this week with the first Emerging Languages Camp, held in conjunction with O’Reilly’s OSCON. OSCON and O’Reilly deserve a lot of praise for making this a free event (although registration was required and it filled up quickly.)

(Alex co-authored Programming Scala with me. Makes a guy proud…)

I counted 26 languages over two days, although I think I missed a few impromptu presentations during what was supposed to be a long break on the second day. All the talks where limited to 20 or so minutes, including questions. Confreaks recorded the presentations and they will be releasing them soon.

I took some notes on all of them, summarized here, in order. (And yes, many of them are running together in my mind right now…) Others have also blogged their impressions, such as Ola Bini on day 1 and day 2

Disclaimer: Any error in my descriptions below – and there are probably many – are my own. Visit the language web sites to get the real stories.

Day 1 (July 21, 2010, Room F150, Portland Oregon Convention Center, USA, Planet Earth, ...)

Rob Pike – Go

Rob is a personal hero of mine. I have one of his books on C programming that he wrote when we both had more and darker hair. I sat next to him at one point during the camp; now I know how Justin Bieber fans feel…

Rob actually spent most of his time describing major influences in his career leading up to the creation of Go. “Communicating Sequential Processes” is a seminal paper by Tony Hoare on a model of concurrency that influenced most of what followed, including Actors. (It’s one of those papers all of us should read – Homework!!)

For prior languages, he cited Occam, a concurrency-oriented language created by Inmos for their Transputer systems, Erlang, and Newsqueak (not to be confused with Gilad Bracha’s Newspeak latter was presented).

Rob cowrote a paper with Luca Cardelli in 1985 called Squeak: a Language for Communicating with Mice (not to be confused with the Smalltalk-based Squeak). Later, he created a more realistic version of the language called Newsqueak. It introduced the notion of communication channels as types for exchanging instances of other types, including other channels (e.g., you could send channel to be used by a receiver for subsequent communications).

Rob then created Alef, which he described as “C with Newsqueak concurrency”. Around the same time as Java was under development, he worked on a VM-based language called Limbo, with channels were 1st class values. However, the explosive popularity of Java effectively killed that project.

That brings us to Go, which started about 3 years ago after he gave a talk about Newsqueak that revived his interest in such projects. Go is a compiled, garbage collected, OO language with built-in concurrency, where communicating sequential processes are 1st-class values.

In hallway conversations, there were some complaints that Go seems to ignore much of what’s happened in the last few decades in language research, such as on type theory. However, true to his long career focus, Go is aimed at lower-level systems programming, the space occupied by C and occasionally C++. The data structures, idioms and patterns in these domains are more mature than in the application-level terrain where most of us work, so Rob probably doesn’t feel compelled to exploit all that is new in language design. I don’t know if this is a bad thing or not.

Ola Bini – Ioke and Seph

Ola created Ioke (“Eye-Oh-Key”) to see how expressive you can make a language with a minimal set of constructs and if you disregard performance.

The syntax is similar to Io (see below). It is dynamically and strongly typed, and prototype based. It uses Smalltalk-style message passing. Another thing he ignores is concurrency, so he can fully embrace mutability ;) It started as a JVM language, be he was able to port it quickly to the CLR.

A pet peeve for Ola is the absence of condition systems in most languages (e.g., extending the concept of exception handling to include retrying the code after fixing the problem, etc., etc.) He added a condition system inspired by the one in Common Lisp. Ioke also has a runtime macro system.

Seph is a new language that attempts to be more practical. It makes the following changes from Ioke:

  • Objects are immutable (including the AST).
  • However, local variables are mutable, including in lexical scopes.
  • It does tail-call optimizations (TCO).
  • It has lightweight threads.
  • It has Clojure-style concurrency primatives.
  • It has a full numeric tower with real numbers.

Phil Mercurio – Thyrd

Most of the languages in the camp are text based, but a few are visual. Thyrd is one of them. It starts with concept of a spreadsheet grid as both a UI and a type. The syntax for the underlying scripting language has a Forth-like syntax (hence the name Thyrd). Thyrd is also inspired by Joy and Befunge (another two-dimensional language).

The Fundamental unit is the cell. It can be atomic, i.e., contain a single value. Those values are represented by text, but they can have a type associated with them. Cells can also be non-atomic, containing a grid of sub-cells. The space of cells is called a Thyrdspace. There is a path notation, where the root space is represented by ”/”.

In a vague way, Thyrd reminds me of Fit and the wiki-based wrapper FitNesse, in the sense that they are also based two-dimensional table representations. The similarities end there, however.

There has been a long history of attempts to build complete visual languages, with mixed results. The rationale is that people are visual creatures and a visual language should be more intuitive, especially for non- or novice programmers, and a picture gives a better overall sense of a system. However, it seems that the most successful visual languages have been focused on particular domains that lend themselves to visual representations. I’ll discuss another example, Kodu, below.

Allison Randal – Parrot

Parrot is multi-language VM original designed for the next generation of Perl, version 6. Its goals have evolved to support many languages, mostly dynamically-typed ones.

Parrot is register, not stack based. Local registers are scoped as in subroutines. Hence, it uses continuation-passing style (CPS). It has a native “ASM”, which is object oriented.

It has compiler tools that are based on PEG, but it doesn’t do pack rat optimizations (memoization). Tree transformations and attribute grammars are rumored to occur…

After much work on parrot and many lessons learned (and dare I say it? a lot of time passed), a new project has been started called Lorito (“small parrot” in Spanish). The goal is to create a smaller, lighter, faster VM. For example, it has just 20 opcodes, while Parrot has over 1200!

Can Parrot/Lorito be relevant outside the Perl community? I’m not sure. For dynamically-typed languages, VM’s like V8 have a lot of mindshare and excellent performance. Even the JVM and .NET CLR have been used successfully for such languages.

Adam Chlipala – Ur/Web

Ur/Web is a statically-typed DSL for web application development. It has statically-checked metaprogramming that is used to do OR-like mapping, security, etc. It borrows the functional reactive programming concept of effects. The type system is inspired by Agda.

This is a somewhat academic approach. It’s hard to tell how practical it is now, but the goals of enforcing consistency and correctness across the whole stack for web applications is a valuable one.

I guest-edited the next issue of IEEE Software’s coverage of Multiparadigm Programming. We have some papers on similar, if less theoretical approaches to web development that are also based on DSLs.

Alan Eliasen – Frink

We all had some sense of what we would see at the camp. It’s great when a surprise comes out of nowhere. Frink was the first big surprise for me. Frink is aimed at the problem of doing mathematical calculations with proper management of units, including valid combinations (trivial example, not adding values with units of time and distance), conversions between different units (e.g., feet and meters), etc.

Sounds dry, doesn’t it. He chose several hilarious examples of “back of the envelope” calculations to illustrate what you can do quickly. For example, what size earthquake would be created if all the people in China jumped off chairs at the same time?

Besides being a “glorified calculator”, Frink can also do some symbolic manipulations to simplify expressions and improve accuracy.

Frink really appealed to this recovering Physicist, especially since I just finished reading Street Fighting Mathematics: The Art of Educated Guessing and Opportunistic Problem Solving, which discussed the importance of dimensional analysis, as well as tips and tricks for coming up with approximate solutions to difficult problems. (Highly recommended, by the way.)

Final note; Frink is based on a precursor that was developed at the University of Colorado.

Gilad Bracha – Newspeak

Gilad Bracha is well known to the community for his insights on language design, including his participation in the development of Java.

Newspeak is a dynamically typed, class-based language with two properties.

  • Names are late bound.
  • There is no global namespace.

It has several goals:

  • modularity
  • security
  • reflectivity
  • interoperability

Classes can nest within other classes. That is sufficient to define modules, but it depends on having no global namespace.

Newspeak is message-based (in the Smalltalk sense). You can’t refer to variables directly, only through methods. All collections, etc. that an instance will ever know about are passed in as arguments to a factory. Newspeak abstracts over instance construction. A pet peeve for Gilad is that OO languages have polymorphic method dispatch, but few also abstract over construction (except through bolt-on patterns). All these properties give you security sandboxes “for free”.

Reflection is through “mirrors” exposed by the class, which allows user control over what’s visible and changeable.

Joe Pamer – Productization of F#

Joe’s talk focused more on the practical issues of “productizing” a language, rather than language design issues. F# now has first-class language support in Visual Studio. One example issue he cited is the challenge of localizing compilation error messages. You can’t just hard code strings in the compiler source code. Also, simple translations of such English strings are not at all sufficient.

It’s easy to dismiss these issues as “uninteresting”, but how many of you have had trouble getting a new language, tool, or process introduced in your environment because of a perceived lack of tool support. (This is a friction point for Scala, even though IDE support is maturing.)

Jeremy Ashkenas – CoffeeScript

CoffeeScript is a cleaner syntax for JavaScript, which it compiles to. I’m usually skeptical of approaches that let you write JavaScript in other languages (like Ruby or Java). Normally, you should just “suck it up” and go native, IMHO. However, CoffeeScript’s improvements are so nice that I’m seriously thinking of switching to it.

Tool support might be an issue. When you use CoffeeScript, if you have to debug your code, you’ll have to work with the generated JavaScript. Fortunately, Jeremy works hard to pretty print the output.

CoffeeScript is now mostly written in itself. Note that Jeremy is also the author of Underscore.js, which adds missing functional features to JavaScript.

Charles Nutter – Mirah

Charlie is well known in the Ruby world as the lead of the JRuby project. He and his collaborators have done amazing work fitting Ruby into the JVM and providing excellent performance.

Mirah, which is the Javanese word for “ruby”, is a Ruby-like dialect for Java, using Java’s object model, including static types. The only significant difference you notice when comparing Ruby to Mirah is the presence of type annotations on method arguments. Mirah uses type inference in all other contexts.

I think Mirah could be very attractive to Java developers who prefer the elegance of Ruby, but don’t really need JRuby, meaning the Ruby object model, libraries, etc. The usual tool support issue will be a sticking point, however.

Steve Delacorte Dekorte – Io

Io is not really a new language. In fact, it’s old enough to have influenced other languages, like Ioke. Io focuses on expressiveness via simplicity and conceptual unification. As stated on the website, it’s inspirations include:

  • Self – it is prototype-based.
  • Smalltalk – all operations are message sends and everything is an object.
  • NewtonScript – it has “differential inheritance” (the idea that when “inheritance” is just object cloning and modification, then the objects tend to only differ incrementally).
  • Act1 – for Actors and futures for concurrency.
  • Lisp – for runtime reflection and modification of code (homoiconicity).
  • Lua – small and embeddable.

Like NewSpeak, there are no globals.

Day 2 – Son of Day 1

Matt MacLaurin – Kodu

Day 2 started with another pleasant surprise; a visual DSL for teaching kids how to program games. Kudo is a project at Microsoft Research that works with the XBox (surprised?). It has clearly been through a lot of UI design and usability research. While it teaches programming through an engaging game experience, Matt says the real goal is to get boys and girls to learn how to think about problems and their solutions. Awesome. I don’t own an XBox, but I’m tempted…

Rich Hickey – Clojure

Rich didn’t introduce Clojure, which is probably fine since it’s likely that the people who would come to an “emerging languages camp” already know something about it. Instead, he described some experimental work he’s doing to improve performance when doing computationally expensive manipulations of collections, while still preserving Clojure’s principled approach to mutability.

One flavor he has explored is the idea of introducing “transient” data structures to complement the persistent data structures. Already today, the internals of the persistent data structures aren’t purely functional, to get optimal performance.

Transient data structures aim to provide performance for large operations in a way that is explicit to the user. For operations like “assoc”, there are transient equivalents like “assoc!”. The “persistent!” function makes a transient structure persistent, when you are finished with it. As Rich described it, transients have most of the same properties as persistent structures, but they reuse some intermediate nodes in the tries, rather than create new nodes, as would happen during each mutable change for a persistent data structure. This reduces allocations, garbage collection, and other operations, during a sequence of steps. Note that transient data structures aren’t mutable in the usual sense. They are also fully thread safe.

Then he criticized the idea as doing to much, because it combines both editing and policy management. So, he introduced the idea of “pods” that split policy and editing. They are essentially remind me of Monads.

Some form of these ideas will eventually be introduced into Clojure.

Mark Miller – E and Caja

Mark Miller has been involved in network security for a while. He described the origin of XMLHttpRequest (XHR) and its problems, such as susceptibility to cross-site scripting (XSS) attacks.

E is a language for secure, distributed programs, supporting an object capability architecture. Caja is an object capability subset of JavaScript, which is now influencing the EcmaScript5 standards process and will probably lead to Secure EcmaScript5 (SES). Mark mentioned that object capabilities support is already deployed at Yahoo!, Google, Shindig, and others.

Christopher Bertels – Fancy

One of the goals of Fancy is to focus on a clear, straightforward, well documented implementation to make it easier for potential language implementors to get involved. Fancy has easy and simple semantics that are newcomer friendly.

Fancy is inspired by several languages:

  1. Smalltalk – for class-based OO, pure message passing, a minimal number of keywords, dynamically typed, with reflection and metaprogramming.
  2. Ruby – file, rather than image based, Unix focus, “more than one way to do it”, class definitions that are executable script, but with fixes to some inconsistencies, such as having blocks, procs, and lambdas that aren’t quite the same thing.
  3. Erlang – message passing concurrency, lightweight processes. (planned for the near term)

Fancy embraces the TDD mantra that tests are runnable documentation. It has a simplified RSpec clone.

A major next step is to host Fancy on the Rubinius VM. It is currently implemented in C++.

Jonathan Shapiro – BitC

Most of the languages at the camp are high-level. The few lower-level, “systems languages” include Go, ooc and D (both discussed below), and BitC.

BitC combines ML- and Haskell-inspired functional programming with the low-level expressiveness and imperative features of C. It has a Hindley-Milner-style parametric type system and uses type inference. Functions are first class. Abstraction mechanisms are type safe (unlike the C preprocessor) and provide good performance. Mutability is embraced as necessary to achieve the performance requirements of systems code.

BitC seems to be the most radical departure from the C patriarchy for the systems languages discussed. As such, I suspect it will have the hardest time breaking into the systems culture, which is quite conservative about languages and tools. Too bad.

Steve Folta – Trylon

Trylon is an OO language that combines elements of Smalltalk and Python (whitespace indentation is significant), but compiles to native code.

Amos Wenger (EPFL) – ooc

(I missed the first part this presentation due to a schedule conflict.) Amos is a student at EPFL, the birthplace of Scala. He got tired of writing ugly C and C++ code for assignments, which inspired him to create a nicer OO syntax around C, called ooc. For example, he compared the hard-to-read syntax for function pointers to his syntax, which is more Scala like. The language syntax is indeed very appealing and it makes you think, “this is what C++ should be.”

Some of the features include:

  • Class-based OO with single inheritance. Methods are virtual by default.
  • Garbage collection
  • Some type inference.

Jonathan Edwards – Coherence/Subtext

Jonathan is an MIT professor who has worked on Coherence and Subtext for a while. This talk was one of more theoretical talks, packed with ideas. I’ll definitely watch the video at least once to absorb the ideas. In fact, my notes feel really inadequate, but here goes.

We know that imperative programming is bad, e.g., because of concurrency. We prefer declarative programming with clear data flows. Unfortunately, pointers lead to undecidable data flows.

You get to pick 2:

  1. Declarative Programming
  2. Mutable State
  3. Data Structures

(I’m reminded of the CAP theorem…)

What’s the solution? Limit pointers. Combine nesting and binding with modeling of the data flow. The entire system state is modeled as a tree with bidirectional bindings between elements. Domains of interest are nested collections. Pointers are cursors and bidirectional into this structure. This is very similar to a data flow in MVC.

(Again, see the video for yourself…)


From the Finch website:

  • Finch is a simple bytecode interpreted, purely object-oriented, prototype-based, dynamically-typed programming language. It’s mostly inspired by Smalltalk, Self, and Javascript.
  • It is written in C++ with a hand-written lexer and parser. It has minimal dependencies.

Finch has an elegant syntax. It’s designed to be lightweight and embeddable.

Andrew Fisher – Circa

Circa is designed for interactive editing where changes take effect immediately. From the website, there is a corresponding, cross-platform graphical environment called Plastic. Circa appears to be primarily an imperative language with a C-like syntax.

Matt Youell – Wheeler

Wheeler is named for Physicist John Wheeler. It is implemented in Python. Wheeler embraces mutable state. Rather than classes, per se, it has a concept called “categories” that are represented by names. There is no clear distinction between types and categories. Behavior is contextual, providing flexibility for changing behavior based on current circumstances.

Alan Eliasen – Discussion of Interval Arithmetic

Alan talked about Frink yesterday. This impromptu talk discussed an important practical problem in computation; all computers introduce floating point errors, due to finite-wide representations. A classic example is 0.1, which can’t be represented exactly in binary.

Many years ago, the concept of intervals was invented as a way of specifying the boundaries of accuracy of numbers and tracking those errors throughout calculations. Frink supports intervals natively. For example, here are two interval declarations in Frink.

a = new interval[3,6]
b = new interval[3,4,6] # 4 is the best guess

The first declaration for “a”, specifies a number that ranges from 3-6 (inclusive?), while the second is the same number, but adds that 4 is the most likely value.

There are algorithms for propagating these ranges when doing arithmetic. The behavior is nontrivial for most operations!

Alan gave us “homework”; plot these functions in Frink and Mathematica:

y = 9sin[40/x] 
y = (x^2-3x)/(x-3.001)

Mathematica doesn’t plot them correctly. The second equation is instructive. Mathematica samples the values and plots a smooth curve through zero, but by properly accounting for interval errors, Frink shows that this function diverges to positive infinity as x approaches zero from negative values, and it diverges to negative infinity as x approaches zero from positive values,

Alan recommended looking at GrafEq for a good discussion of graphing intervals.

Alexander Fritze – Stratified JavaScript

Stratified JavaScript extends JavaScript by adding modular, structured concurrency. It is based on Strata (ref?) with behavior like threads, but more deterministic. Here are some methods and what they do.

  • hold() – suspend, like sleep but not blocking.
  • waitfor() – wait for input. resume() called when done (basically: a continuation).
  • and() – parallel composition, more deterministic that spawn and join.
  • or() – explore set of alternatives in parallel; the first one to complete wins and the “loser” is cancelled.
  • try/finally – for handling cancellation.
  • retract – (with try/catch/finally) used to clear stuff we are no longer interested in anymore, like future alarms.

Stratified Javascript works as a browser plugin. Stratified JavaScript runs directly in the browser’s JavaScript virtual machine by compiling on the fly from to “standard” JavaScript. No plugin installation is needed. This works across all major browsers. You can verify this yourself using the examples embedded in :-)

Slava Pestov – Factor

Factor, like Io, is a more mature language than most discussed here (it was started in 2003) and it has become influential for other language designers. Factor is concatenative (stack-based), dynamically-typed, OO and functional. It is influenced by Forth, List, C++, and Smalltalk.

A stack program is a list of literals and words. Literals are pushed on the stack and words are executed. An anonymous function is a list literal.

A nice feature of Factor is that the REPL remembers where definitions, etc. came from. For example, if you load a file of definitions, then remove one of the definitions from the file, then reload it, Factor’s REPL will remove the obsolete definition. Most REPLs only let you overwrite old definitions, but they don’t keep enough information to know when to delete a definition.

Walter Bright – D

I know I’m dating myself, but Walter Bright is another hero. He wrote the very first true compiler for C++ (sold by Zortech), i.e., one that generated native code. Previously, the only option was AT&T’s original cfront that translated source to C, where it was then compiled to native code. Debugging such code was a joy…

For the last several years Walter has been working on a multiparadigm language called D. It is commercially supported, with open source implementations, such as a front end for gcc. D is another of the four “system” languages discussed in the camp, including Go, ooc, and BitC.

D’s multiparadigm support includes the following:

  1. Old-school imperative.
  2. Metal – inline assembler with some sugar, like handling call frames automatically, binding D variables in scope, etc.
  3. RAII – resource acquisition is initialization (popular concept in the C++ community).
  4. OO.
  5. Functional
  6. Generic – think C++ template programming.
  7. Generative – code that generates other code.
  8. Concurrent.

There is a “struct” concept that behave like classes (e.g., they can have member functions and constructors), but they are non-polymorphic. While D uses garbage collection by default, you can control memory if you want (hello my old friend, malloc!). D matches the C AVI (the binary standard), so interoperation with C code is easy. Types can be inferred for some variables.

One of the most interesting features for functional programming is handled with the pure and immutable keywords. Pure functions are side-effect free (although they can have mutable local variables). The compiler enforces purity. Immutable is for variables.

I was an embedded developer earlier in my career. I really wanted better tools and languages, which is one reason I “moved up the stack” to application development. I hope the systems and embedded communities shake off their excessive conservatism and start using the more modern systems languages discussed in the camp.

Tom Van Cutsem – AmbientTalk

Tom is from the Vrije University in Brussels. He developed AmbientTalk for scripting mobile devices. In particular, these devices form ad-hoc networks, where presence and connections are volatile. The language itself is dynamic, object-oriented, with functional patterns, actors, and mirror-based reflection. It runs on the small-device JVMs, including Android and J2ME/CDC phones.

AmbientTalk provides asynchronous, buffered messaging. You can even “send” messages when the device is disconnected; they will be buffered until they can be delivered. There is no blocking synchronization. In general network failures aren’t treated as exceptions; AmbientTalk embraces the fact that unreliable connections are common.

The structure of a programs is an event loop that reacts to events from the outside world. Even inter-event loop communication is asynchronous.

There is a prototype deployment in Brussels of AmbientTalk-enabled devices and applications.

Final Thoughts

It was an intense, but wonderful two days. So many new and interesting ideas. It inspired me to consider writing languages for my own interests. Who knows, maybe I’ll be a speaker next year, if there will be an Emerging Languages Camp next year. O’Reilly watched the OSCON Twitter stream and noticed the buzz, so the chances are good.

Make sure you watch the videos for the languages that look interesting to you!

I did a lightning talk last night on how Scala generates valid byte code and some implications for interoperating with Java, including one new issue I discovered with using Function traits in Scala v2.8.0. Nils said he has also seen the problem.

The details are in the presentation notes on GitHub. The essential idea is this. In v2.7.7, if you wanted to instantiate a Function trait in Java code, you would write something like this, for example:

  Function1<String,String> toUpper = 
    new Function1<String,String>() {
      public String apply(String s) {
        return s.toUpperCase();
      public int $tag() { return 0; }

The $tag method is now gone, but this code won’t work anymore, apparently because of the new @specialized annotation. When you compile this code, you’ll get an error that the abstract andThen[Double,String] method is undefined. I believe this is because specialized versions of the function are instantiated for the AnyVal types.

The workaround is to declare a subclass of Function[String,String] in Scala code with a default apply method implementation. Let’s call it StringToString. A good default implementation is the Template Method Pattern; have the method call an abstract method you declare, say doApply(String): String. Then, back in your Java code, subclass StringToString and implement doApply.

I’m speaking twice at OSCON 2010, a half-day Scala tutorial on Monday, July 19th, and a short talk to kick off the Scala Summit on Tuesday.

This will be my first OSCON, which I’ve always wanted to attend. If you would like to attend, use the discount code os10fos for a 20% discount.

Michael Norton (a.k.a. @DocOnDev), did a nice presentation at the recent Carolina Code Camp called Taking Control of Your Development Career. It echoes several of the ideas I discussed in my (long) blog post on this subject If You Want a Job Tomorrow, Cultivate Your Career Today last Fall. Michael’s presentation is more elegant and succinct, however. ;)

I updated my Polyglot and Polyparadigm Programming presentation, which I presented at the Chicago ACM meeting on March 17th. You can find it here .

I also gave a presentation on the Akka Framework at the March Chicago-Area Scala Enthusiasts meeting (March 18th). There is a PDF on this GitHub site, but the main presentation is written in HTML using S5. See the README for details.

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!