Upgrading the Code Manager


Our little code manager is written in Ruby, so the actual code doesn t matter here. Here s a quick look at what we did with it. We decided that we wanted it to just hang in a loop, checking for files that change. When they change, poof, it copies them to the archive.

So we put our Ruby hats on and wrote a test to find changed files in the CodeManager s source directory. That worked pretty quickly, once Chet figured out that I was checking the wrong directory for changes. We paused for lunch with some friends at Red Hawk and finally we got back to work. We quickly made a test for backing up changed files, made that work, and refactored the code a bit. Then we wrote a simple timer loop method that sleeps, checks for changes, backs up if there are any, and sleeps again. From now on, we ll use that cm to watch our work.

We know we ll want some new features. The first few times we have to restore, we won t mind doing it manually, but we know we ll get tired of that. So we wrote a few new stories for the code manager, while we were thinking of them:

  1. Build a restore GUI, probably in C#, that lets us pick a version to restore and puts it all back. That ll be interesting, not least because Visual Studio probably has some of the files reserved, given some other odd things we ve seen. We ll burn that bridge when we come to it.

  2. Change NUnit to write a file recording test results into the source directory. The cm program will back this file up, just like any other. We can make our GUI show us the red bar/green bar status, using that file. It ll be easy to decide how far to back up.

  3. Integrate starting the cm into Visual Studio, so we won t forget to run it. Right now we have to remember to start it up, and we could forget, if past performance is any predictor of future results.

    Lesson  

    We could have spent more time making this tool more capable, but, wisely for once, we stopped with just enough. We may or may not need those additional features, and we and our customer will schedule those if and when they re needed.

Just for fun, we made a couple of little changes to the Notepad project and watched the code manager put them in the archive. Then we broke for the day.




Extreme Programming Adventures in C#
Javaв„ў EE 5 Tutorial, The (3rd Edition)
ISBN: 735619492
EAN: 2147483647
Year: 2006
Pages: 291

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net