Archive for category: Featured

3 risks with Agile decision making

3 risks with Agile decision making

Agile teams are generally cohesive and are empowered and expected to make day-to-day decisions. A large part of empowerment in Agile methods is that the team makes the decisions, not the project manager. However, there are some risks involved with this type of decision making. In this article I describe some possible risks.

Group think

The first risk in decision making is group think.

Group think has the following symptoms:

  • Little or no consideration of alternate plans
  • Risk is not assessed
  • No review is taken of rejected plans
  • Advice from outsiders is not sought
  • Facts that support the plan are acknowledged, facts that do not support the plan are ignored
  • Contingency plans are not created

Surprisingly, synergy and loyalty to each other and to the team leader are a team’s greatest qualities, however, they are the same factors that lead to group think.

Abilene Paradox symptom

The second risk in decision making is the Abilene Paradox symptom.

The Abilene Paradox symptom has the following symptoms:

  • Members, as individuals, privately agree on the correct decision to make. This is not shared with the group.
  • Members, as individuals, privately agree on how the problem or situation being addressed can be resolved. This is not shared with the group.
  • Instead of communicating their views, members keep their views and reservations to themselves, agreeing with views they are opposed to. As the individuals have not presented their views and reservations, a collective decision is made that is actually contrary to the views of all members.
  • Members feel frustration, even anger, at this and find someone, or some people, to blame.

The Abilene Paradox is real. How often have you agreed to a suboptimal solution? What if every other team member felt the same way about this solution?

Decision hijacking

The third risk in decision making is decision hijacking. This happens when for example a developer implements features that are not needed right now. The developer hijacks the decision to implement these features.

Example during daily stand-up:
Developer: The customer databases will be used by several applications, so I have implemented support for dealing with various technologies, including Oracle. It took a lot of time. Scrum master: Did we not agree on postponing this? Developer: We need this later and now it is done.”

Decision hijacking is a big problem because the decision making itself is removed from the team as a whole. This behavior has a big impact on trust within the team.

Solutions

Conflict in Agile software development projects can be beneficial to both process and product.

The literature proposes some solutions to the problems with decision making described above. These solutions are based on the existence or stimulation of intra-group conflict:

  • Separate groups should be formed, under different leaders, to propose solutions to the same problem (groupthink)
  • A devil’s advocate should be appointed (groupthink, Abilene paradox)

For the decision hijacking risk, make sure that developers are on the same page. Working together as a team means taking decisions together.

Sources:

  1. McAvoy, John, en Tom Butler. “The role of project management in ineffective decision making within Agile software development projects.” European Journal of Information Systems 18.4 (2009): 372-383. Web.
  2. Moe, Nils Brede, Torgeir Dingsøyr, en Tore Dybå. “A teamwork model for understanding an agile team: A case study of a Scrum project.” Information and Software Technology 52.5 (2010): 480-491. Web.
June 22, 2010 0 comments Read More
It’s not about the features!

It’s not about the features!

I believe that any software developing company that wants to have a competitive advantage needs to stop focusing on just building features, but instead focus on the users.

Many companies seem to focus on the checklist of features that are dreamed up by marketing. Most of these checklists result from doing ‘competitive analysis’, just look at what the competitors, and do that too. Development teams have to copy all the software features of the competition, just to keep up. That is mediocrity at its best.

Developing software is not a unique trait. It’s not that hard as it used to be, the lab coats are long since gone. Coding can be outsourced to China or India at a fraction of the cost, as can many other aspects of software development.

Shipping a huge amount of features became relatively cheap. The time of industrialization has come for software development. Lines of code are becoming cheaper every minute. A lot of open source software (‘free software’) now has the same (or more) features as commercial available software.

So, it is not about building a huge amount of features.

It is about building clever software that works really well, in its context. Companies have to build revolutionary, groundbreaking, surprisingly good software to be noticed and successful. It has to be different and fresh, revolutionary perhaps.

How do you do that? Invest in interaction design. Do research to find out who your users really are. Talk to them. The real users.

Learn about them. Find out what they need. Find out what they like, what they don’t like.
Learn where your software becomes part of their lives.

Learn how to improve. Improve your software, and learn more. Make your users happy. Never lose them out of sight.

June 1, 2010 5 comments Read More
Daily Scala

Daily Scala

Jesse Eichar writes a daily blog about Scala.
“A short daily dose of Scala examples and occasionally explanations”.

Everyday a nice read about Scala. I’ve added it to my newsreader and if you like Scala, you should do too!

http://daily-scala.blogspot.com/


December 19, 2009 1 comment Read More
London Wicket Meetup: Wicket 1.5, WiQuery, Brix and more..

London Wicket Meetup: Wicket 1.5, WiQuery, Brix and more..

London Wicket MeetupOn November 21st the London Wicket meetup took place in “The Gallery” at the central London Foyles Bookshop. At the venue some well-known Wicket-related speakers made their entrance and held talks about Brix, Wicket 1.5, WiQuery, and how having a baby compares to writing a book.

This is the summary of that afternoon. You should have been there…

Keep an eye on this page for when the next London Wicket event is scheduled.

Overview

Click on an item to jump down (same page) to the notes from that presentation.

(Unfortunately Alastair Maw couldn’t make it as he was sick. Hope you will soon be better!)

Cemal Bayramoglu of jWeekend giving the introductory talk for the London Wicket meetup.

Cemal giving the introductory talk

Cemal Bayramoglu: Introduction

As usual, the London Wicket Meetup is kindly hosted by Cemal Bayramoglu of jWeekend. Thanks Cemal!

Jeremy Thomerson showing some code at the London Wicket meetup.

Jeremy Thomerson showing some code

Jeremy Thomerson (USA): Custom JavaScript Integrations with Wicket + Auto Resolvers

Jeremy Thomerson started his talk with an example of how to do client side validation in Wicket. He showed abstract validation behaviors that validated form input with jQuery.

The remarkable thing was that by adding just one behavior to a component, validation was added for both the server side and the client side. This makes it very easy to keep client and server side validation in sync.

The Javascript behavior is added by letting the behavior implement iHeaderContributor and adding the script in the onRenderHead method call.

Auto component resolution

The next part of Jeremy’s presentation was about the AutoComponentResolver. The AutoComponentResolver makes it possible to wire components directly in HTML, without adding the component explicitly in Java. His demo showed how to use an AutoComponentResolver.

Matej Knopp commented that it is not really recommended to use automatic component resolving, because it has a limited use. The main purpose of auto component resolvers is for simple components that do not have a long lifetime on the page. For example the <wicket:message> tag is handled by automatic component resolving and is replaced by a Label with a ResourceModel. More complicated use cases are not supported nor recommended.

Components added via auto-resolving are not serialized or stored in the session and lose all state.

Lionel Armanet showing us the WiQuery goodness at the London Wicket meetup.

Lionel Armanet showing us the WiQuery goodness he and his fellow Frenchmen created.

Lionel Armanet (FR): Announcing WiQuery 1.0: Introduction & Demo

The presentation of Lionel Armanet was an impressive demo of what WiQuery is capable of. WiQuery integrates jQuery with Wicket, with clever tricks that ease development. WickeXt was merged with jQuery4Wicket and changed its name to WiQuery. Last week was the 1.0 release, and the library is available under the MIT license.

The rationale behind WiQuery is that to build rich internet applications, you need rich behaviors and components. jQuery is simple, unobtrusive and powerful, there are tons of plugins and jQuery UI has fancy components. So, let’s get jQuery, integrate it with Wicket and have the best of both worlds!

WiQuery has standard components and behaviors like the resize behavior, drag and drop behavior, datepicker component, etcetera. By simply adding Java components, WiQuery generates the Javascript for you and imports the required libraries.

Setting up WiQuery

There are two ways to setup wiquery:

With a WiQueryCoreInstantiationListener:

addComponentInstantiationListener(new WiQueryInstantiationListener)

Or by extending the Abstract class WiQueryWebApplication.

Demo

After the theory, Lionel showed an impressive demo with a drag-and-drop Scrum taskboard. The task board had three columns (new, in progress, done), from which task items could be dragged and dropped around. Double clicking an item showes the details for that task.

The double click action is easily added with:

add(new WiQueryAjaxEventBehavior(MouseEvent.DBLCLICK){
   ....
});

With the IThemableApplication interface you can make your application themable, like the themes that jQuery UI has.

Matej Knopp talked about Brix and Wicket 1.5 on the London Wicket meetup

Matej Knopp talked about Brix and Wicket 1.5.

Matej Knopp (SK): BRIX CMS + Wicket 1.5 Developments Q&A

Matej Knopp showed what the content management system Brix is all about. Brix is based on Wicket and is a component based content management system based on JCR for storage.

Brix is meant for integration with Wicket web applications and looks very interesting. The basic building blocks in Brix are Tiles, Pages, and Templates.

In Brix, Tiles are like a factory for embedding Wicket components. So any Wicket component can be added to a Page which is nearly impossible in ‘regular’ CMS systems. More information about Brix can be found on the Brix website.

Wicket 1.5

Matej also talked about some new developments that can possibly be shipped in Wicket 1.5:

  • New RequestCycle
  • New RequestMapper
  • New Ajax implementation

New RequestCycle and RequestMapper

One of the areas where improvements can be made is the RequestCycle. The RequestCycle in Wicket 1.4.x is big and complicated, and hard to step through while debugging. Matej worked on an improved RequestCycle.

Matej talked about the drawbacks of the Wicket 1.4 code for handling requests and mapping requests to URL’s:

  • Complicated, huge code base
  • Many abstractions, most of them on wrong level
  • Complicated class hierarchy, hard to find proper extension point

He proposed a new RequestMapper that handles Request mapping in a different way.

RequestMapper Interface

The RequestMapper will get the following interface.

public interface RequestMapper {
int getCompatibilityScore(Request request);
RequestHandler mapRequest(Request request);
Url mapHandler(RequestHandler requestHandler);
}

With the RequestMapper interface you can implement your own Request Mapping behavior for various URL’s.
There can be a hierarchy of RequestMappers. When there is more than one RequestMapper, the compatibility score can be used to choose which RequestMapper will be used.

Calculating RequestMapper compatibility score

The compatibility score is calculated by counting how many URL segments match the mount point.
For example, having an application where two RequestMappers are defined with these URLs:

  1. /mounted/page
  2. /mounted/page/that/is/different

When there is a new Request on “/mounted/page/that/is/”, the second RequestMapper gets a higher compatibility score (4) than the RequestMapper matching only the first two parts of the URL (“/mounted/page/”).

New AJAX implementation

About a year ago, Matej created a new Ajax implementation for Wicket. The new Ajax implementation is way better than what is now in Wicket 1.4. It is faster, simpler to use and will be based on a standard library. There is only one problem, the new Ajax implementation Matej built uses YUI. It seems that the world prefers jQuery over YUI. Matej told that rewriting it to jQuery will be a lot of work.

The focus of the new Ajax implementation is removing browser inconsistency code. The custom-written Wicket Javascript will be swapped for more standard Javascript (like the YUI or jQuery libraries).

The API for working with Javascript will be different and much cleaner according to Matej. Also, the generated Javascript is nicer: code is not put directly in the onclick of a UI control, but separately. This looks like how WiQuery does stuff. This means that the Javascript handlers are much shorter, so the page loads faster.

There is an experimental branch in source control, so if you want to try it out or convert it to jQuery, you are welcome to check it out.

Problems with implementation Wicket 1.5

There are some challenges with the implementation of Wicket 1.5. Matej touched a few and gave some insight in what needs to be done. The big question is: how to build this without breaking anything? How can we undo the universe?

One point was the use of global state during the 1.4 Wicket RequestCycle. This makes it difficult to implement the new RequestCycle in core, because much code and unit tests rely on this global state.

Another challenge is keeping the WicketTester in a workable state. The new RequestCycle breaks WicketTester, which is problematic because many people are using WicketTester. Fixing WicketTester is not really easy, because it is a big class with much functionality. It can simulate a lot of actions, like file upload and form submission.

Sven Meier encouraged us to not refrain from writing custom Javascript on the London Wicket meetup

Sven Meier encouraged us to not refrain from writing custom Javascript.

Sven Meier (DE):

Sven Meier showed us his implementation of a TreeModel. He argued that Swing’s TreeModel is not suitable for implementing a tree in Wicket: “The treemodel is ugly, and there are many methods you don’t need in Wicket.”

His implementation allows hierarchical markup in the tree. This makes it easier to use and extend. It uses simple and known patterns. Partial update is not there yet.

Google Code hosts the Wicket Tree project.

Drag and drop

Sven also created Wicket drag and drop functionality, which is also hosted at Google Code.

This project enables you to drag and drop between any Wicket component. It supports common desktop metaphors with ‘MOVE’, ‘COPY’ and ‘LINK’ operations and is fully themable.

Sven’s closing remarks were: “Don’t fret from developing custom Javascript. It’s really easy with Wicket!”

Martijn Dashorst compared having a baby to writing a book on the London Wicket meetup

Martijn Dashorst compared having a baby to writing a book.

Martijn Dashorst (NL):

Martijn’s presentation was titled “Writing Books vs Making Babies” and was a hilarious story with good slides. We have been informed of all the gory details of writing a book (finding the publisher, writing, editing, checking, etcetera) and learned something about having a baby as well!

Wicket Q&A

There were not many questions about Wicket, which is proof for the developer friendliness of Wicket ;-)

Were you there?

If you were at the London Wicket meetup (presenter or attendee) or plan to go there next time, please comment below!

If you send me links to the presentations, I will add them to the article.

November 27, 2009 3 comments Read More
Automatically test your Wicket panel HTML markup

Automatically test your Wicket panel HTML markup

Are you testing your HTML markup automatically yet? If your markup does not match the Java code, your Wicket panel does not work. It’s easy to get early feedback when your panels are broken: just unit test them!

In this blog post I describe a way of automatically verifying that the HTML markup of Wicket panels match the Java code. Scroll down to download the demo project!

Unit test

Unit testing Wicket panels with EclipseI created a JUnit test that you can add to your project to automatically test as much Wicket Panels as possible. Automatic testing works by resolving all panels on the Java class path and feeding them to the WicketTester. When a panel has invalid markup, the WicketTester will give an error: early feedback!

How does it work?

The Wicket panels that can automatically be tested should have a ‘default’ Wicket constructor, like this:

public DemoPanel(String id)

Resolving all panels is done with Spring 2.5’s ClassPathScanningCandidateComponentProvider (don’t you love those names! How can they stay below 120 characters per line?)

The ClassPathScanningCandidateComponentProvider is a component provider that scans the classpath from a base package. It then applies exclude and include filters to the resulting classes to find candidates.

Testing panels

@Test
    public void testAllWicketPanels() throws Exception {
        WicketTester wicketTester = new WicketTester(new WicketApplication());
 
    	ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(true);
        provider.addIncludeFilter(new AssignableTypeFilter(Panel.class));
 
        Set components = provider.findCandidateComponents("nl/stuq/demo");
        for (BeanDefinition component : components) {
            Class clazz = Class.forName(component.getBeanClassName());
            if(hasDefaultConstructor(clazz)){
            	testWicketPanel(wicketTester, clazz);
            }
        }
    }
 
    private void testWicketPanel(WicketTester wicketTester, Class clazz) {
    	wicketTester.startPanel(clazz);
    	wicketTester.assertNoErrorMessage();
    	wicketTester.assertNoInfoMessage();
    }
 
    private boolean hasDefaultConstructor(Class clazz) {
        for(Constructor constructor : clazz.getConstructors()){
            if(constructor.getParameterTypes().length == 1 &amp;&amp;
               constructor.getParameterTypes()[0].getSimpleName().equals("String")){
                return true;
            }
        }
 
        return false;
    }

The test instantiates a new WicketTester. After that, the ClassPathScanningCandidateComponentProvider is created and configured to scan only for Panel classes in the nl.stuq.demo package and below.
After that, the found components are all checked. If they have a default constructor, the test is executed.

The boolean hasDefaultConstructor(clazz) method checks if the class has a constructor with only one String argument, the Wicket id.

Keep in mind

  • This is only for lazy people (good developers are lazy in some ways).
  • You need a dependency to Spring.
  • Only Panels with a certain constructor are tested.
  • Only instantiating the Panel is tested, so code coverage has no meaning for this test. Real testing is still needed.

Download demo project

The demo project is a Maven project based on the Wicket 1.4.3 quickstart that contains the test class and an example panel to be tested.
Download demo project.

Extract the zip file and run mvn test to run the tests. Then fire up your IDE and check how it’s done.

You can change or adapt the given JUnit test to also automatically test classes extending from Page or Component.

Join in with your opinions and code! I’m curious to see what clever way you have of testing code.

November 1, 2009 8 comments Read More