worflow


For the last couple of years i have been a great proponent of XP. I have seen it work, i have seen it fail. I have seen products delivered where features had to be cut in a realistic fashion due to time constraints which the XP approach pointed out and i have seen deadlines for releases missed due to the aggressive feature creep that some managers think they can slide in because XP is agile after all and if the client/truth wants it, well its got to be there, init.

Any system can only carry the blame if it was rigorously applied and failed to deliver the expected result. So obviously me being negative about XP when i have seen it work would imply that in essence i see nothing wrong with the process itself but rather in its application in real life institutions. I mostly see it fail when companies adopt the xp paradigm (mostly coming over from the waterfall model) and confusing the agile process with doing no planning at all. Yes, change is a constant, but certain features are known from the start. Yes, requirements will change, but all requirements are not guaranteed to change, actually you have no grunter’s that anything will change.

So suddenly the planning game in XP has become the planning process. Features are specified with little requirements, thus stories are underdeveloped and tasks do not meet the descriptive level they should. This makes me uncomfortable, taking the strong point of XP (the iteretive adaptive nature of developing a product) whilst combining it with an extremely haphazard approach. From experience the most successful XP projects i have worked on had the features defined to a level of reasonable granularity before it started, design was 80% fixed already, the the time line as to which features were to be done in which order (according to dependency and weight/importance) mapped out.

Suddenly XP comes into its own under these conditions, it becomes a metric whereby we can determine accurately during the development process (which can take months or years) whether we are on target. We can measure the velocity (the amount of perfect engineering hours they can do in a week) of developers, the accuracy of their estimation (perfect engineering hours quoted versus time took). Using helpers like burn down charts we know each day and each week exactly what the status is of the current iteration and the project as a whole is. This is the beauty of XP, we can adjust what can be done, we can change requirements and the whole time the client knows and feels empowered.

Badly designed features which gets developed in the development process is part of r&d not product development. XP should not be a scape goat for project managers who do not want to do project management.

in case you missed this paul barnes-hogget published an excellent article about our CI process we use at the large finicial institution i am contracting to.
http://www.eyefodder.com

this was largly his baby, with the rest of us chipping in here and there.

process is king…

At work there has been a major drive towards better code, better processes and a more mature way to develop flex applications which led us to unit test with much more urgency (using ASUnit). We don't Flex Builder for Flex 1.5 (check out this tut by Darron Schall for setting up eclipse for flex)
always preferring the FDT and Oxygen. Now if you used the ASUnit create class command for the Flash IDE you would know that creating a class and its testcase was fairly simple. You pop the classname in and voila the class is created. the testcase is created and the allTests file is altered. This kind of functionality is nice, but we wanted to use it in Eclipse as well. Last year when we started down this line I contacted the great folks over at Powerflasher (the creators of FDT)and asked them if their Class Creation Wizard could link to an ANT script which it would execute directly after the class was created. Nico Zimmermann obliged (Thanks!).

I then went and wrote a python script which created testcases for all the files in a source folder, and altered the AllTest file for each of the flders beneath that as well. A problem I Immediatly ran into was my source control system (SVN) created .svn folders which i then recursed through so I just put a check in for any folders that follow the SVN naming conventions. Another issue we were facing after this was that we used external libraries like XPATH from xfactorstudio and we did not want to create unit test for these as well so Peter suggested using RegEx to filter out certain packages. Having never learnt how to use RegEx properly i come from the Alias school of RegEx ( A man had a problem, he decides to use RegEx to solve it, now he has two problems), so i just told Peter you do it, which he promptly did.
On how wo use this:

extract the .tar file into the root of your project. you have two files to worry about at this point, the classCreated.xml ANT script and the clientBuild.properties which that uses.
in clientBuild.properties which looks like this

CODE:
  1. src.path = ${basedir}/src
  2. test.templates=${basedir}/python/templates
  3. test.include = .
  4. test.exclude = ^com\\.xfactorstudio
  5. lib.dir=${basedir}/lib
  6. base.package = com
  7. pyAntTasks.jar=${lib.dir}/pyAntTasks.jar

you need to worry about the src.path variable. i keep my source in a folder called src, if its in the root of your project set it equal to ${basedir}

then you haev test.include and text.exclude which takes takes a regular expression on what to include. as you can see at the moment we are including everything whilst excluding anything in the com.xfactorstudio package.

the last variable to set is the base package. if you keep your code in a package called com it will work, if however your code is in a package called org you need to change that value to org.

you also need python set up as an enviroment variable. (in bash or your command prompt you ahve to be able to type python and it will start and show you >>>), i used python 2.4.1 and have not tested it on anything else yet, but i don't expect any problems.
current limitations:

this does not deal with multiple top level packages yet
if a class has the word interface in it a testcase does not get created for it.

this has been tested on both pc and mac.

http://xperiments.lennel.org/createTestCases.tar

i have also uploaded the templates for AS3.

http://xperiments.lennel.org/AS3templates.tar

the mxml testing stuff is pretty imature, that is a work in progress for us