Sunday, September 7, 2008

Coding Dojo Outcome

Two Coding Dojos were cofacilitated by Ryan and myself.

The Dojos were:
  1. Great fun and exciting too
  2. An excellent opportunity for those who are shy; You're in front of an audience coding.
  3. Best when the story / CodeKata was small, focused, and simple to work on
  4. Better when the JUnit red bar indicated that the audience should not talk
Styles of writing code and tests were shared on the fly. New tricks were discovered.

In all, it was awesome!

Sunday, August 17, 2008

Code Kata Quest for a Coding Dojo

In my quest to find Code Katas for an upcoming Coding Dojo at work, I searched quite a while for something suitable for our needs.

Dave Thomas' Back to the CheckOut at http://codekata.pragprog.com/ is good. The others there did not seem to exactly fit what we want right now. Either they were
  • too academic (often single function solutions)
  • the ramp up in explaining the problem was too high
  • or there was no coding involved in solving the Kata
The other Code Katas of Dave's may be exactly what others are looking for.


Perhaps if the Klondike one at http://codekata.pragprog.com/2007/01/kata_twenty_klo.html was sectioned into several exercises, the ramp up of explaining the Kata would be manageable.

Looking elsewhere, I see http://www.codingdojo.org has a KataCatalogue. Nothing there that seemed to fit as of this writing (August 17, 2008).

In the future, looking at something like Head First books may be promising.

Sunday, August 3, 2008

Next Language Making Language?

The question is not “What’s the next language?” The question is “What is the next language making language?”

The answer: It will be a language that comes downloaded with out of the box sensible examples so you can use what is given to you right away. Yet, the language itself will easily support the creation of domain specific languages (DSL).

A search for "domain specific languages" in google results in definitions of DSL and languages that can be used for making DSLs. The results are interesting!

Clearly, the demand for new languages is always there. Trying to model something new using an old programming language is sometimes like eating yesterday's breakfast.

Wanting to write in a way which is powerful yet expressive and clear is the foundation for new languages. Demanding a language which supports your domain and how you want to express yourself will always exist!

So, keep your eyes open. Explore. Share the results!

Saturday, July 19, 2008

Social Web And Window Shopping

Social web. What do you think that means?

Imagine walking down the sidewalk. You stop at the big display window for a store. You're looking at this really cool item being displayed. Near you, there are a few people there looking too. You strike up a quick conversation with the person next to you. You and she share insights and then walk on; both a little wiser and happier. The shopping experience is much more enjoyable and memorable.

This same social experience can be had on the web. See the video:



Saturday, July 5, 2008

System Metaphor Gold

A good System Metaphor is a golden thing to have. It's the theme that ties everything and everyone together. In an existing system with a great System Metaphor, one can find anticipated concepts reflected in the code easier. A System Metaphor is also a fantastic communication bridge between the Customer and Developers.

The System Metaphor article by William Wake explains what a System Metaphor is. I suggest going beyond the article and checking out his book titled Extreme Programming Explored to see the "More Examples" section provided in chapter 6.

Examples of System Metaphor and discussions about System Metaphors have been going on for at least 8 years. At http://c2.com/cgi/wiki?SystemMetaphor, people such as AlistairCockburn and MichaelFeathers have debated on how to make System Metaphor work best. Interestingly, Martin Fowler stated in his XP 2002 Conference article "...I don't worry too much about metaphor when working with XP...." Has he changed his mind since then?

A thought currently in my head is what to do about System Metaphor Disharmony. If an existing system lacks a System Metaphor that we can recognize, a System Metaphor conceptual rehashing is necessary. Adding communicative new code and cleaning up old code is just easier with a System Metaphor.

So, go forward! Find those System Metaphors! Go for the Gold! :)

Friday, June 13, 2008

Testing an Annotation

I found neat ways to test annotations.

Here is some annotation test code using JUnit

public class LongParameterListRefactoringTest {

@Test
public void isAnnotationWhenAsked() throws Exception {
assertTrue(LongParameterListRefactoring.class.isAnnotation());
}

@Test
public void annotationIsAnnotated() throws Exception {
assertTrue(LongParameterListRefactoring.class.getAnnotations().length > 0);
}

@Test
public void isAnnotatedWithRetentionAnnotation() throws Exception {
Annotation annotation = LongParameterListRefactoring.class.getAnnotations()[0];
assertTrue(annotation instanceof Retention);
}

@Test
public void isAnnotatedAsSourceCodeAnnotation() throws Exception {
Annotation annotation = LongParameterListRefactoring.class.getAnnotations()[0];
Retention retention = (Retention)annotation;
assertEquals(RetentionPolicy.SOURCE, retention.value());
}

}
This code lived at the SeePeople project.

Note: annotationIsAnnotated has since been changed. Can you guess why?

Tuesday, March 25, 2008

Yes, Smile and Repeat Yourself

If you care enough about something, you will repeat yourself. That's a good thing.

"I love you!", I said to my wife this morning. I said it yesterday. I've said it for over a decade. I never grow tired of it. I care about my wife and that miracle we call love.

Writing great code is important! Creating things of value is important! Being someone of value is important! Communication, Simplicity, Feedback, Courage, and Respect are all important values.

If I am asked the same question repeatedly, I am happy to answer someone who sincerely seeks knowledge and wisdom.

Human communication often requires things to be repeated. It may take 10 times! I saw this in a training class I just took. The same question was asked 2 minutes after the answer was already given. The trainer, Brian Button, calmly responded with a smile and gave the same answer.

That's the way to go! Smile, support communication, and move on.