APIFest08
From APIDesign
Line 48: | Line 48: | ||
{{:APIFest08:Task3}} | {{:APIFest08:Task3}} | ||
+ | |||
+ | == Task 4 == | ||
+ | |||
+ | {{:APIFest08:Task4}} | ||
== Final Round == | == Final Round == |
Revision as of 21:47, 11 October 2008
As part of promotion of TheAPIBook and also celebration of ten anniversary of NetBeans releases, we decided to play again the game described in Chapter 17. The participants include primarily members of Czech JUG, extended potentially with everyone who likes to play and wishes to celebrate with us.
Thanks to the courtesy of Arseniy Kuznetsov, director of NetBeans, the winner(s) of the APIFest08 will receive a copy of TheAPIBook.
There will be few rounds of the competition, during which the participants are supposed to solve tasks given to them in timely manner and send their results to the API Fest 08 mailing list. The whole competition will use rules like those of API Fest One.
Contents |
Task 1
The first task consists of downloading the template. The preferred way is to use Mercurial and clone the apifest08 repository:
hg clone http://source.apidesign.org/hg/apifest08/
You will get an Ant project in the currency directory. It is designed to be opened in NetBeans IDE easily, but it can also be manipulated from command line or other tools by those who prefer pain over comfort.
Two sources files are important:
- currency/src/org/apidesign/apifest08/currency/Convertor.java - will contain the API that you should create. Feel free to introduce other classes, but please keep them within the org.apidesign.apifest08.currency package.
- currency/test/org/apidesign/apifest08/test/Task1Test.java - this is the class with actual tasks that your API has to fullfil. Please stuff the method bodies with code, so they demonstrate use of your API.
The project is currently not compilable (you need to make the Convertor class public somehow), compile it, compile its tests and execute the tests so they pass without a failure.
Remember that Runtime Aspects of APIs are as important as API signatures.
Finally zip your project and send it to the API Fest 08 mailing list by Friday, Sep 26, 2008.
cd apifest08/currency ant clean zip -r $HOME/myname-task1.zip .
We'll discuss your design decisions on Czech JUG session on Monday, Sep 29, 2008 together with announcement of the second task!
For those who will not make the Mercurial work for them, there is an alternative option: You can download source ZIP file from the repository snapshot, unzip it and use it directly.
As processing of the results might take some time, we need to set the following rules:
- members of CZJUG takes precedence
- first come, first served
- if we run out of our capacity, we can stop processing further solutions
Task one and half
Thanks you all, dear twelve brave men for participating in APIFest08! I was really glad to see your submissions after the task 1. I really like the variety between your individual solutions.
However, I also have to apologize. I did try, to correctly specify the task 1 goals, however, looking at some of your solutions, I failed. Some of your APIs do not satisfy all the use cases that I had in my mind. That is my fault, I should have expressed myself clearly. Anyway it puts us into bad situation. Now you are not at the same starting position for the real APIFest08 game. That is why I have to, like a starter seeing a problem before 100m run, call off the ready state, and ask you to prepare once more. That is why I am calling round one and half. Please adjust your your solution according to additional tasks, described in Task1Test.java. There is proper description of the behaviour of the factory methods and two more tests. Please implement this in your solutions.
Please do it by Tue, Sep 30, 2008, noon. You do not need to retain any backward compatibility yet, however restrain yourself from doing too big changes to your APIs, they are all good, just satisfy the additional use cases, please.
Please accept my apology, and good luck!
Task 2
The task2 of APIFest08 is here. We have fourteen solutions that advanced to second round. Some of them did use their chance to get up to speed in APIFest08:Task1.5, some of them did not. The latter ones will be in tougher position, as the second round is just about to start.
You task #2 is to allow one convertor to hold multiple rates of multiple currencies. Also, create an API to allow composition of convertors. Here is the Task2Test.java file with detailed description of the quest. Locate your solution among existing task2 directory, copy the Task2Test.java file along your Task1Test.java. Enhance your API, show its usage in the Task2Test.java.
After you are done, please generate a diff. The best way is to use Mercurial:
# create the repository hg clone http://source.apidesign.org/hg/apifest08/ # or update it hg pull; hg update # copy the task 2 file hg copy currency/test/org/apidesign/apifest08/test/Task2Test.java task2/solutionXY/test/org/apidesign/apifest08/test/Task2Test.java # then do your modifications # ... # and finally produce a diff hg diff
you can obtain the diff in other ways, potentially you can send us to our mailing list the whole ZIP file, but we want to have the right to process diffs first, as that is simpler for us.
Please submit your solutions by Sat, Oct 4, 2008. Good luck, and do not forget to keep BackwardCompatibility!
Task 3
The task3 of APIFest08 is here to tease you more, dear participants. Btw. great work on the previous tasks! It is really hard for me to come up with a task that will be unimplementable for you. I guess you all defend BackwardCompatibility of your solutions pretty well.
Let see what will happen during the round3. I have prepared the Task3Test.java for you. Please enhance your API to allow your API users to write online convertor that updates its exchange rates all the time. Please find the details of your quest inside of the Task3Test.java file.
Locate your solution among existing task3 directory. There shall already be Task3Test.java file along your Task1Test.java and Task2Test.java. Enhance your API, show its usage in the Task3Test.java.
After you are done, please generate a diff. The best way is to use Mercurial:
# create the repository hg clone http://source.apidesign.org/hg/apifest08/ # or update it hg pull; hg update # then do your modifications # ... # do not forget to add newly created files hg add task3/solutionXY # and finally produce a diff hg diff
you can obtain the diff in other ways, potentially you can send us to our mailing list the whole ZIP file, but diffs are preferred.
Please submit your solutions by Fri, Oct 10, 2008, morning of CET, so we can process your submission before weekend and think about more sophisticated ways to tease you. Good luck!
Task 4
It is unbelievable! We are approaching task4 of APIFest08 and we still have eight participants who play with us! Moreover the competition is still not decided, as far as I can tell. Today I spent few hours looking for BackwardCompatibility problems in provided solutions and I still have not managed to break three of them! It is not that surprising as some of the competitors follow advices of TheAPIBook. For example I've seen APIDesignPatterns:ResponseReply being used. Guys, how can I find a quest for you if you know all the good tricks? Anyway this means we have to go on, as I have only two books to give to winners!
That is why let me ask call round4: Please integrate with dates. Keep history of conversions, allow queries in historical data, etc. Please see Task4Test.java with the actual quests.
Locate your solution among existing task4 directory. There shall already be Task4Test.java file along your Task1Test.java, Task2Test.java and Task3Test.java. Enhance your API, show its usage in the Task4Test.java. Remove the conditional if failing statements.
After you are done, please generate a diff. The best way is to use Mercurial:
# create the repository hg clone http://source.apidesign.org/hg/apifest08/ # or update it hg pull; hg update # then do your modifications # ... # do not forget to add newly created files hg add task4/solutionXY # and finally produce a diff hg diff
you can obtain the diff in other ways, potentially you can send us to our mailing list the whole ZIP file, but diffs are preferred.
Please submit your solutions by Thu, Oct 16, 2008, morning of CET. I guess this is the last coding round. On Saturday you will start hacking solutions provided by others!
Final Round
There will be multiple rounds each with new task. The goal is to finish the last round and select the winner by Oct 26, 2008 - that is the day of the NetBeans first release anniversary!
That is all, happy API designing!