Saturday, September 25, 2010

Extension Methods

Extension Methods allow for the readability you expect in code you don't own. C# and Ruby have had them for a while, and I created a jar to so you can use them in java as well. (you can read the original post here)

I vBlogged my thoughts here:



Here's the simple reason you want a fluent interface for your code.











Download Extension Methods for Java

Thursday, September 23, 2010

Lamdbas in Java 1.6

If you've ever heard that java is a poor language because it doesn't have lambdas, that ends today!

I created a way to do lambda's in java 1.6 without changing: the JDK, the compiler, the ByteCode or the Syntax.

I vBlogged my thoughts here:


It's only a jar file, no special requirements or changes.

You can down load it here at www.approvaltests.com

You might also be interested in my similar addition of extension method in java

Here's the diagram of the syntax :

I also made a small tutorial here : http://blog.approvaltests.com/2010/10/java-lambdas.html


Tuesday, September 14, 2010

Theory Based Testing

Most of us are familiar with classic unit testing. Today, I wanted to talk a about a different form of unit testing, that is much more powerful when it is possible.

Theory based test take the normal form of
Given A & B expect C
and change it to
Given A & B expect C theory
This removal of the expected C, allows you to test MANY more cases, because you don't need to pre-plan the results for a given A & B

I vBlogged my thoughts here:


btw: if you are interested in attending an open spaces, check out Open Agile So Cal. There's one coming up in San Francisco Oct. 11, 2010

Saturday, September 4, 2010

Rewriting Vs Refactoring

Once again, I found myself having a discussion about the dangers of doing a legacy code rewrite. Durning this client meeting, I came up with an illustration I wanted to share.

I vBlogged my thoughts here:



These 3 graphs sum up the Massive Risk at the end.

The Rewrite Scenario





The Hidden Question at the End






The Refactor Scenario