Ted’s Rants and Raves by Ted M. Young

November 12, 2008

Easing Into Agile - Slides from Silicon Valley Code Camp 2008

Filed under: General Rant

The presentation "slides" are here: http://www.tedmyoung.com/EasingIntoAgile.pdf.

Note that the content is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

Question, comments, criticism, etc., are always welcome.

November 10, 2008

Two IDEA 8.0 Features Worth the Price to Upgrade

Filed under: General Rant

I don’t know about you, but I’ve got code in my code base that still uses arrays and we need to move them to Lists. Sounds like fun, huh? Well, a new refactoring in IDEA 8.0, Type Migration, is going to help a lot in this task. The other feature that blew me away during the EAP was the Data Flow To This… command, which lets you see how the variable you’re looking at got its value all the way back through the method chains. This is really useful when you’re trying to figure out, say, why the value is null and where it got set that way.

Examples and screenshots on these coming soon. 

IntelliJ IDEA 8.0 Released!

Filed under: General Rant

Yeah, IDEA 8.0 has been out almost a week, but I’ve been so busy with the Code Camp preparations, I didn’t have time to focus on it.

I’ve been using 8.0 since the first Early Access builds, and it’s been a very solid product all the way through. There were some regressions in the way things were "painted" (causing background colors to not work properly in some cases) that I’m betting has to do with the fact that IDEA 8.0 ships with the 1.6u10 release of the Sun Java VM. Those bugs are fixed and I’m happily using 8.0 on its 30-day trial until I get my 7.0 license upgraded. I’m bummed that I didn’t win the JetBrains raffle at the Code Camp, but oh well.

I’ll be posting thoughts and information about the new 8.0 features over the next few weeks. 

Silicon Valley Code Camp 2008 - FEEDBACK

If you attended my "Easing Into Agile" or "Building Better Tests in Java" sessions at the Silicon Valley Code Camp 2008, I’d love to hear any feedback, compliments, constructive criticism, and any questions that you might have thought of. The code camp eval for the Agile session is here: http://tr.im/yqi and the eval for the Builders session is here: http://tr.im/yqm. I also encourage you to leave a comment here if that’s more convenient.

November 9, 2008

Why Test Data Builders Are Good

Filed under: Java, Testing

This morning at Code Camp, Shaun Abram (http://www.shaunabram.com/) asked me about my "Building Better Tests in Java" presentation where I talked about using Test Data Builders instead of Factory classes (what we at Guidewire call DataGen classes). He said that he liked Builders, but wasn’t sure what the compelling benefits were. I’m glad he asked because besides giving me an idea for a blog entry, it’ll make me go back and make it more clear.

If you were at the presentation, here’s the reasons that I had hoped to get across:

  • Prevent the combinatorial explosion of variations on methods to create an entity. In one example, we had 12 different variations to create a Policy. Yikes.
  • Tests become much more readable. For example, would you rather read:
  • Activity myActivity = DataGen.activity( true, true, false, true, true, Status.NEW, Priority.MEDIUM, false );

    or, with a test data builder:
    Activity myActivity = new ActivityBuilder()
            .autoGenerated()
            .notEscalated()
            .ownedExternally()
            .mandatory()
            .recurring()
            .statusNew()
            .priorityMedium()
            .shared()
            .create();

    If you said the first one, you’re far too familiar with our Activity entity and probably work at Guidewire. :-)

Shaun also mentioned a problem where someone comes along and changes one of the defaults (i.e., the value of a property that wasn’t specified) in a factory method to fit the test they’re writing, only to break a bunch of other tests that relied on different defaults. They probably did that because they didn’t want to create yet another factory method that took the property as a parameter so they could choose a different value.

 

Chained Methods and the Fluent Interface

Also, Jeff Brown (http://blog.bits-in-motion.com/) at the BBQ last night mentioned that he was surprised I didn’t use the phrase "fluent interface" and he’s right! OMG! There goes my credibility. Seems like a need to rework my Builders presentation, but I think I knew that.

November 8, 2008

SILICON VALLEY CODE CAMP 2008

Filed under: General Rant

If you attended (or missed) either of my Silicon Valley Code Camp talks, I’d be happy to do them again as 5 minute lightning talks. :-)

Saturday’s sessions are over, but there’s still Sunday! See http://www.siliconvalley-codecamp.com/Sessions.aspx

Silicon Valley Code Camp

If you’re looking for slides and other information from my Silicon Valley Code Camp 2008 talks (either Easing Into Agile or Building Better Tests in Java), stay tuned! I’ll be uploading them very soon!

Thanks for coming!

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com