Like the tale of Goldilocks and the Three Bears we’re seeking a way to get more of you involved in the Golden Lunch Bucket contests—trying to find the one that is just right. As noted in our original announcement (where you find the link to download the Dragon Factory) all you need to do is to add classes to the existing parent classes. A slight change in the contest makes it easier. Just set up the draggable elements so that you can create a single Design Pattern of your choosing. By clicking the Play button below, you will see a finished example that does exactly that:

As you can see in Figure 1, by dragging the different pieces you can create a Class Diagram of a design pattern.

Figure 1: Class diagram dragged into place
The little gray splotches are drag handles I added. Also, the fat lines are for the same reason—they’re easier to drag. Grab anything with an arrow by the arrowhead, and it’s easy to drag. Here are some tips:
Read more…
In the fourth Golden Lunch Bucket Contest, Barbara Parkman entered for the first time and won the Grand Prize. This moves the US from last to second place in the World Cup.


Barbara Parkman, USA
Barbara’s entry added a Movement interface and implemented a movement class for each of the characters. In this way, each character had his/her own movement.
Contest #5: Our next contest (#5) is a good one for both Flash and Flex (FD) developers. Contestants first download the Dragon Factory files, and then create draggable objects that can be used to create class diagrams for any of the GoF class diagrams. That means you’ll need the proper set of relationship lines (e.g., ones for subclassing, aggregates, associations, etc.) and either input text fields for the different names of the design participants or make a huge number of graphic names. All elements must extend or implement the existing classes/interfaces in the ‘Dragon Factory’ files. All entries are due, October 20, 2009. This one is both fun and useful. (I’ll be putting up a sample of what the final product looks like to encourage entries.)
Click Here to see contest standings:
Read more…
If you’ve put off entering one of the Golden Lunch Bucket Contests, you’ll not want to miss this one. This one is as easy as pie. In a recent post, Wrong Way Warrior Part II, the Warrior class was modified to get its weapon behaviors from another interface named Fire. The Warrior class did nothing more than extend the Sprite class and set up a reference to the Fire interface. However, you will notice that two other behaviors were implied in the commented-out references to Movement and Communicate as shown below:
1
2
3
4
5
6
| public class Warrior extends Sprite
{
protected var fire:Fire;
//protected var movement:Movement;
//protected var comm:Communicate;
} |
For this contest, all you have to do is to create the necessary interfaces and classes only for Movement (we’re saving the Communicate until later) so that the Warrior instances will retain their current weapons behavior but include the Movement behavior as well. The movement algorithms must come from a separate interface and concrete movement implementations (just like Fire did).
Read more…
In the third Golden Lunch Bucket Contest, Timo Hannelin again sent in the winning entry and added four more points to Finland’s lead in the Golden Lunch Bucket World Cup.
We’re hoping to expand the number of entries, and so the next contest will have the basic design pattern laid out, and the entries will simply have to extend it. That will be out next week.
Read more…

After looking at the first two Golden Lunch Bucket Contests, making this a wider event seemed like a good idea. So, I tallied up the different winners and their countries, and came up with a table reflecting winning entries. Each Grand Prize got four points, first place got three points, second place got two points and third place got one point. Then I put them in a table and thought that looked like fun. Currently, Finland is in first, the UK and Brazil are tied for second, and the US is in third as you can see in Table 1. We’d further like to encourage more participation; so Golden Lunch Bucket Contest #3 is pretty simple—requiring only a useful example of the Mediator. As we run more Golden Lunch Bucket Contests between now and next July (2010), more people can participate. Also, by adding .5 points toward their country’s World Cup total for Honorable Mention entries (those who entered a contest but were not in any of the four winning categories), we hope to encourage more entries.
Read more…
This time around we had fewer entries, but the quality was sky high! So instead of four prizes, we only have the Grand Prize and First Prize. Also, we decided to put all winning entries together with previous contests so that you will have a full selection. Download winning entries. In addition to photographs, we also included national flags.

Timo Hannelin, Finland
Timo was the 2nd Place winner in our last contest, and this time he moved up to the Grand Prize—and a well-deserved win! Using a MVC framework, Timo created a Hello World message in a wide variety of languages including Czech, Yoruba, Tagalog, Bemba and others! I believe you will find Timo’s entry instructive in how to create an international greetings in such a way to make it very easy to add more language classes. Anyway, congratulations to Timo again, and as they say in Basque—Kaixo Mundua!

Stéphane Pajon, Birmingham, England
Stéphane used the Factory Method Design Pattern to create a rich combination of expressing Hello World! Included in Stéphane’s mix is Arabic, along with Arabic script, all tucked into a Product subclass. ( رحبا العالم ) Even though your system may require Arabic, take a look at it anyway—along with the other languages Stéphane included.
It’s about time for another Golden Lunch Bucket Contest, and once again you can reap fame and fortune! (And again, we’ll provide the former if you provide the latter. This time, though, we must insist that you provide better prizes for yourself if you’re one of the winners!)
If you’re feeling lucky, then enter the contest. Who knows? You might just win, and then you can go nuts! We know, you’ll have to put up with the paparazzi and the inevitable groupies, but that’s just the cost of fame. (Our former winners will give you advice on how to handle it all.) Just remember Dirty Harry’s advice:
You gotta ask yourself one question: Do I feel lucky? Well, do ya, punk?
Read more…
We finally finished judging the contestants and here are the results. Instead of having several categories for age, we decided to have only one because the ages did not have a great deal of range. Each of the winners happened to be from a different country, and so we can claim a true World Wide Contest. Congratulations to all! Download winning entries.

William Rafael de J. Ribeiro, BrazilOur grand prize winner created an interactive “funny face” using the basic Decorator and adding a second component class for a face and four decorator classes for angry, normal, and sad eyes plus a smile decorator. By moving the mouse around you can see the face change and eyes move.

Todd Coulson, U.S. Todd’s entry used a creative combination of elements to build a baseball diamond. The field was a simple rectangle, and it was decorated with an infield, the bases, a pitcher’s mound, boundary lines and players scrambling to the field. Todd is interested in adding to this foundation using other design patterns.

Timo Hannelin, Finland
Theoretical background for Timo comes from Katariina Nyberg’s article about phyllotaxis, fibonacci and the golden ratio. If we had a grand prize for the best algorithm, it would go to Timo. One algorithm makes an amazing amount of shapes—stars, triangles, squares, lines, shells, spirals…if you are lucky you will see almost all kinds of basic symbols. It also demonstrates that you can change a class in design pattern with a complex algorithm and it doesn’t faze it one bit.

Kevo X. Thomson, UK
Kevo had a very simple entry. By changing the x and y coordinates of the three concrete decorators, he was able to rearrange the images. Again, the change was made and there was absolutely no negative ripple effect. This is exactly what a good design pattern is supposed to do.

The Contest
Okay, here’s a chance for Fame and Fortune. (We’ll supply the former; you supply the latter.) On Monday, April 27 you’ll find a new ActionScript 3.0 Easy and Practical Decorator Lunch Bucket Pattern on this blog. The contest will begin on Monday, April 27 and end Friday May, 22–2009. (That’s not a lot of time! But it should not take a lot of time to make the changes.) You can download the Decorator files here .
The contest is to see if you can change the Decorator design pattern in the new post, ActionScript 3.0 Easy and Practical Decorator Design Pattern.
Using the provided Component class (no changes allowed) and the provided Decorator class (no changes allowed) add new or changed Concrete Components and/or Concrete Decorators to make the most interesting program using the Decorator Design Pattern.
We have four age categories, and each category will have 1st, 2nd, and 3rd prizes. The Grand Prize will be given to the very best entry, regardless of age. Here are the categories:
- Under 18
- 18-25
- 26-40
- Over 40
All winners will be displayed on this blog along with their entries and photos. Read on to learn the rules.
Read more…
Recent Comments