September 16, 2010

Autocomplete static imports in eclipse

Here's a recipe on how to get autocomplete on assertEquals, and have eclipse automatically add the static import for you.

September 10, 2010

On Lean And Agile (Gil Broza from Agile 2010 panel)

Gil Broza Article: Lean And Agile — Roommates, Married Or Twins?
Our panelists were all experienced Agilists who incorporate deep Lean thinking: Mary Poppendieck, Jim Shore, Alan Shalloway and Jean Tabaka.
....
Mary led with a quick definition: “Lean is delivering constantly increasing customer value for continually decreasing effort, leveraging energy and creativity”. The panelists all agreed that Agile is really a subset of Lean.
....
While Lean thinking can certainly improve the value flowing out an Agile team, its strong suit is in wider-scale application to the business and the whole value chain, “from concept to cash”. We have to pay attention to metrics that traditionally sat on the business side, as Agile lacks discipline around business methods. Teams must understand the business justification — and focus on delivering its promise.
Some people claim that “you can't improve what you can't measure”. But we manage things that we can't measure all the time. .... Lean will help us improve stuff even if it's not measurable.
Lean has us pay attention to throughput and value flow; it encourages having mechanisms for flow control. Agile's mechanism is the iteration ... Kanban's mechanism is the work-in-progress (WIP) limit
....
[the most common mistakes when implementing Lean?] Emphasizing practices over principles and culture; taking Scrum roles as gospel; not realizing the true nature of change (believing the only thing that needs to change are the programmers).
I was surprised by the panel's answers to the question, “What should teams be trained in?” Jean answered: “Reflection” — so the team can even take in the rest of the training, and apply continuous improvement. The other three all said, “Writing testable code!” They all emphasized the point of having great technical skill and writing acceptance-driven, defect-free code.

September 4, 2010

Script Junkie | How to Debug Your jQuery Code

  • Firebug—Although many developers have used Firebug, I don't think that many understand the true potential of its debugging capabilities. If you know your tools inside out, you can become a more productive and efficient programmer. Note: If you aren't using Firefox, the Firebug Lite bookmarklet can come in handy to provide many of the nice debugging features of its Firefox add-on counterpart. I tend to use this bookmarklet primarily with Google Chrome.
  • FireQuery—This Firefox Firebug add-on provides some nice features to Firebug, such as letting you see which jQuery events are attached to what DOM elements, displaying any data elements that are attached to a DOM element, and providing the ability to inject jQuery into Web pages that don't have it already loaded.
  • FireFinder—This Firefox Firebug add-on can help you find the selector you are looking for. You can test the selector you have, and it will highlight all those items on your Web page.
todo: checkout firequery, firefinder...

Defect Driven Testing: Your Ticket Out the Door at Five O'Clock

are you not doing TDD yet? start with DDT...

Defect Driven Testing: Your Ticket Out the Door at Five O'Clock:
Test automation is not a controversial topic in most circles. Even developers who don't write automated tests agree it's a great idea. They just don't have time to work on it very often.
....
DDT is a fairly simple concept. When you find a bug, add a test.

Why take this approach?

First, no one can dispute the need for the test. If an issue was found, then it had been missed earlier. Perhaps the developer missed it and QA spotted it. Maybe it slipped past everyone and it was reported by your customer. Whenever it's reported, it needs to be fixed in a way that will prevent it from reappearing.
....
DDT is a gradual approach.
....
Over time you'll find that DDT creates an extremely effective test suite that targets the most problematic parts of your code base. Run your defect driven tests inside of a continuous integration system and you'll find your code running more cleanly every day.