Nelz' Blog

Ruminations on Development


« Previous month (Aug 2008) | Main | Next month (Oct 2008) »
Tuesday Sep 09, 2008

Cleansing Of The Email

One of the ways that I keep myself organized is by sending myself emails in GMail... I usually put links to things I want to look at later, and since I'm now doing a cleansing of my "note to self" emails, you get to benefit! :-)

Mockito - The New Mock Framework on the Block:

  • I haven't used it (yet), but the whole Test Spy concept (as being a half-way point between stubs and mocks) is very interesting
  • I'm actually going to forward this around work a bit to see if this is easier for people to swallow, because EasyMock is being choked on (because it's so heavy) by some of our developers.
  • Here's the home page for Mockito

Post-Redirect-Get:

  • I haven't been doing a lot of front-end work lately, but this article on Wikipedia discusses a pattern that we were sorely lacking at my last gig.

The capture-recapture code inspection:

  • I haven't yet found the right set of words to convince an employer that systemic organization-wide code reviews are a Good Thing, but I'd like to submit this article as another point of reference in the code-review effort.

Ajax testing with Selenium using waitForCondition:

  • Here's a helpful bit about using Selenium to test AJAX apps

Tom Brady on Software Management:

  • I gotta say that one of the most powerful ways of showing me that my efforts are needed is when my employer seems thirsty for my code. At my current job, I put in a weekend working on a pet, side-ish project... And when I got back the next week, it was already planned to get used. That is the kind of substantive feedback (more than talk) that makes me feel needed and appreciated.

Urgency is poisonous:

  • Interesting... Now that I am working in a startup, it seems like we are always just on the edge of being late or behind the curve. I wonder what a 4-day work week would look like, considering I usually do about 5.5 or more work days a week...

Use your singletons wisely:

  • This is really good advice.
  • I think it's funny, but I've had fewer and fewer inclinations to create a Singleton since I've been getting so involved with Spring.

JSONVid: Pure JavaScript Video Player:

  • Ooh! An alternative to Flash for video in a browser?!? It'd be nice, wouldn't it?

Back in Action!

I am now back from Burning Man, and having a fairly smooth re-adjustment to this so called real world.

Spring AOP and Internal Method Calls

When using AspectJ with Spring's AOP framework, I didn't realize that there were challenges getting AOP to work when a member method calls to a sibling method.

Here's an example I've borrowed from some discussion of this phenomenon:

public class MyService {

  public methodA()
  {
    //do something
    methodB();
    //do something
  }

  public methodB()
  {
    //do something else
  }
}

Now both the method in the service have been AOPed, and when I call the methodA() on the proxied instance, the methodA() will have the benefit of the aspect, but when the methodB() gets called from methodA(), it would not get that benefit of AOP.

Used strategically, I think this can be a benefit. When I came upon this problem, I basically used it as an opportunity to refactor "methodB" (and it's associated overhead) into a new stand-alone class. This may not always solve your specific problem, but it worked in my one case so far.