Vacation reading, it’s all Groovy

Groovy: Embedding Groovy

Groovy: Groovy Beans

Groovy: Groovy and JMX

Groovy: Using Spring Factories with Groovy

Groovy: Dynamic language beans in Spring

JavaWorld: Creating DSLs in Java, Part 1: What is a domain-specific language?

JavaWorld: Creating DSLs in Java, Part 2: Fluency and context

JavaWorld: Creating DSLs in Java, Part 3: Internal and external DSLs

JavaWorld: Creating DSLs in Java, Part 4: Where metaprogramming matters

IBM developerWorks: Functional programming in the Java language

IBM developerWorks: alt.lang.jre: Feeling Groovy

IBM developerWorks: Practically Groovy: Stir some Groovy into your Java apps

IBM developerWorks: Practically Groovy: Unit test your Java code faster with Groovy

IBM developerWorks: Practically Groovy: Reduce code noise with Groovy

IBM developerWorks: In pursuit of code quality: Programmatic testing with Selenium and TestNG

Groovy Zone: GroovyShell and memory leaks

Apache: GroovyUtil.java

Code To Joy: Zen and Groovy’s Expando

Code To Joy: Simply Groovy (How to gain Competitive Advantage on Weiqi Gao’s Friday Java Quiz)

Code To Joy: Groovy’s -e and friends: The Command Line for Java Developers

Code To Joy: Groovy 201: How to Win a Bar Bet on Copy-Paste

Code To Joy: myTunes: Groovy and JFugue

Code To Joy: JFugue and The Charm of Computing

Code To Joy: Zero to RMI with Groovy and Spring

A Public Scratchpad: The Future of Groovy Interoperability?

Test Early: Spring’s so Groovy

Spring documentation: Chapter 24. Dynamic language support

JavaBeat: Integrating Spring and Groovy

Martin Fowler: “Will DSLs allow business people to write software rules without involving programmers?”

Martin Folwer: BusinessReadableDSL:

I do think that programming involves a particular mind-set, an ability to both give precise instructions to a machine and the ability to structure a large amount of such instructions to make a comprehensible program. That talent, and the time involved to understand and build a program, is why programming has resisted being disintermediated for so long. It’s also why many “non-programming” environments end up breeding their own class of programmers-in-fact.

That said, I do think that the greatest potential benefit of DSLs comes when business people participate directly in the writing of the DSL code. The sweet spot, however is in making DSLs business-readable rather than business-writeable. If business people are able to look at the DSL code and understand it, then we can build a deep and rich communication channel between software development and the underlying domain. Since this is the Yawning Crevasse of Doom in software, DSLs have great value if they can help address it.

With a business-readable DSL, programmers write the code but they show that code frequently to business people who can understand what it means. These customers can then make changes, maybe draft some code, but it’s the programmers who make it solid and do the debugging and testing.

This isn’t to say that there’s no benefit in a business-writable DSL. Indeed a couple of years ago some colleagues of mine built a system that included just that, and it was much appreciated by the business. It’s just that the effort in creating a decent editing environment, meaningful error messages, debugging and testing tools raises the cost significantly.

Related:

The Fishbowl: Dear XML Programmers…

defmacro: The Nature of Lisp

Python, Java, and Netbeans links for December 11th, 2008

Thanassis Tsiodras, Dr.-Ing.: The Knight’s Tour in Python. Discussion at Slashdot.

Ted Leung: Python in Netbeans

Thinlet in Netbeans: thinnb

NetBeans Wiki: Getting Started With Python in the NetBeans IDE 6.5

NetBeans Python IDE download

ars technica: Getting a grip on Python: six ways to learn online

Artima: Python and the Programmer: A Conversation with Bruce Eckel, Part I

Elliotte Rusty Harold: Java is Dead! Long Live Python!

/var/log/mind: Java : the perpetually undead language

Bonus link 1 – start it simple: Bokardo: What if Gall’s Law were true?

Bonus link 2 – fight your fear: iBanjo: Programmer Insecurity

Bonus link 3 – Code less: willCode4Beer: Code Reduction or Spartan Programming

Retrying Netbeans

While I live in Emacs, Eclipse won me over for Java development a long time ago. I’ve been keeping my eye on Netbeans for a while. Each major release I’ve given a try by checking out a current project from SVN and attempting some basic development tasks. Usually I’d hit a snag that would discourage me just enough to not get over the hump. Netbeans 6.5 has been different so far, so I’m going to give it an honest try now.

Some notes:

1. Choosing View | Show Versioning Labels makes it easier to cope with having multiple versions (branches) of the same project open.

2. In OSX, Netbeans, like many non-CLI applications, does not respect terminal set environment variables (.bash_profile, etc). This handly Python script updates your “~/.MacOSX/environment.plist” file from your environment variables. Set up a cron job and you’re done.

3. This handy guide to Mac keyboard shortcuts is a keeper.

The Visual GC Module looks like something to try out.

Thinlet GUI Toolkit

Mat Schaffer pointed to this library earlier, and I experimented with it a while back for a personal project, building a desktop version of the Myers Briggs Temperament Sorter (I need to dig up the source code). The Thinlet library made it ridiculously easy to wire in a nice looking GUI to my app so I was able to concentrate on the quiz logic. I’d use it in projects if I was doing lightweight desktop Java applications.

I’m looking forward to Mat’s X-Plat strategy to take hold.

On the Big Ball of Mud

Brian Foote and Joseph Yoder, Department of Computer Science, University of Illinois at Urbana-Champaign: Big Ball of Mud:

In the end, software architecture is about how we distill experience into wisdom, and disseminate it. We think the patterns herein stand alongside other work regarding software architecture and evolution that we cited as we went along. Still, we do not consider these patterns to be anti-patterns. There are good reasons that good programmers build BIG BALLS OF MUD. It may well be that the economics of the software world are such that the market moves so fast that long term architectural ambitions are foolhardy, and that expedient, slash-and-burn, disposable programming is, in fact, a state-of-the-art strategy. The success of these approaches, in any case, is undeniable, and seals their pattern-hood.

People build BIG BALLS OF MUD because they work. In many domains, they are the only things that have been shown to work. Indeed, they work where loftier approaches have yet to demonstrate that they can compete.

It is not our purpose to condemn BIG BALLS OF MUD. Casual architecture is natural during the early stages of a system’s evolution. The reader must surely suspect, however, that our hope is that we can aspire to do better. By recognizing the forces and pressures that lead to architectural malaise, and how and when they might be confronted, we hope to set the stage for the emergence of truly durable artifacts that can put architects in dominant positions for years to come. The key is to ensure that the system, its programmers, and, indeed the entire organization, learn about the domain, and the architectural opportunities looming within it, as the system grows and matures.

Periods of moderate disorder are a part of the ebb and flow of software evolution. As a master chef tolerates a messy kitchen, developers must not be afraid to get a little mud on their shoes as they explore new territory for the first time. Architectural insight is not the product of master plans, but of hard won experience. The software architects of yesteryear had little choice other than to apply the lessons they learned in successive drafts of their systems, since RECONSTRUCTION was often the only practical means they had of supplanting a mediocre system with a better one. Objects, frameworks, components, and refactoring tools provide us with another alternative. Objects present a medium for expressing our architectural ideas at a level between coarse-grained applications and components and low level code. Refactoring tools and techniques finally give us the means to cultivate these artifacts as they evolve, and capture these insights.

Read the whole thing.