APIFest08:TaskX
From APIDesign
The judgment day is here! Dear APIFest08 participants, today you have to stop looking just into your own solution, but you need to start digging in solutions provided by others to find possible evolution mistakes. This is new task, different to what you've been doing so far, but I hope you'll make it. Because only if you find mistakes in solutions provided by others, only then you can win TheAPIBook.
If your own solution is found BackwardCompatible, you'll be awarded with 10 points. By default you all have those points. However you can be awarded with 1 point by showing compatibility problems in each solution provided by someone else. Of course, in case somebody finds such problem, the author of the solution looses own 10 points. As I wrote in last post APIFest08:Task4, I know that at least five solutions has some problems. So please do not give up and seek for some problems!
First of all you need to setup your working environment:
# create the repository hg clone http://source.apidesign.org/hg/apifest08/ # or update it hg pull; hg update cd taskx # create directory named by you Joe Hacker would have: mkdir jhacker
and now repeat following tasks as many times you wish. Somehow select the solution you want to find problem in. Usually I use a diff:
cd .. diff -ru task1/solution03 task4/solution03
If I notice some potential evolution problem, then I setup the against project and write test to show the error:
# select the solution you want to break, let supposed it is #3: hg copy jtulach/against-solutionXY/ jhacker/against-solution03 # now open some of the created files in your favorite editor: netbeans --open jhacker/against-solution03/project.properties
Now adjust the content of the properties file:
# change definition of apitotest property to solution03: apitotest=solution03 # you can also adjust the taskA and taskB variables to # reflect the days that you want to compete against # for example if there is compatibility problem between # task2 and task3, change them to: taskA=${apifest}/task2 taskB=${apifest}/task3
Now you can open the project in the NetBeans IDE
netbeans --open jhacker/against-solution03/
or directly edit its jhacker/against-solution03/test/apifest/CurrencyTest.java file. The goal is to make this file compilable against api available in the version taskA. If you execute the project:
ant -f jhacker/against-solution03/build.xml run
or by pressing F6 in the IDE, your test is compiled, executed against taskA and it has to succeed. If it does, the test is executed against taskB library. If it fails, you have demonstrated BackwardCompatibility problem and that is why the build succeeds. Make sure you open the Output Window to see the real result! If the test succeeds with taskB library, the sources of your test are compiled once again against taskB library. This can fail, if there are source incompatibilities. Failure means your success, as you have demonstrated incompatibility! Perfect, you can repeat these steps for another solution.
Then generate the diff using hg diff and submit your solutions by Sun, Oct 26, 2008, morning of CET to [mailing list]. As soon as I process your submissions, I'll write an APIFest08 report and announce winners. Also I will prepare TheAPIBook for the winner. Good luck!
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!