Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

osfameron (3135)

  (email not shown publicly)

Technorati Profile []

Journal of osfameron (3135)

Tuesday April 22, 2003
05:47 AM

junit, Ant, CVS (tool fatigue?)

[ #11772 ]
Perlmonks regularly contains threads where monks advise on the benefits of learning other programming languages. I've been learning Java, and it's been a whole lot more fun than I expected.

I didn't think I'd like strong typing, but it does have some great advantages. (Though I find it annoying that in a modern high level language I have to worry about the different sizes of integers or reals).
Though Java syntax is more verbose and often less elegant than Perl, I'm finding a surprising effect that I seem to be more productive in it because my thoughts don't run away with me before I've properly planned them.
(In the same way that my handwriting is neater when I write with a fountain-pen than with a biro, because the fountain-pen slows me down and stops me scrawling).

Moving back to what I originally wanted to journal: I've (inconsistently) used Test::More in Perl, and I wanted to start with best practise in Java from the word go. I downloaded junit (not part of the J2SDK but apparently the standard Java testing suite). It's more or less intuitive, and the documentation is quite good, though I think it over-complicates some issues like the dynamic loading of test suites. I've tended to develop a 'Driver' framework to test my classes as I write them, so it was quite simple to rewrite them as junit tests. But I'm really only testing expected behaviour for large chunks of application: I now need to write more white-box unit tests for specific routines and look at boundary cases etc..

I also got tired of waiting for each of my source files to recompile every time I made any changes. I've really struggled with the make documentation before. I understand the basics but I've had a lot of pain even tweaking makefiles: luckily my Java instructor had recommended Ant as a make-like tool, so I installed that. And I was pleased that its build files have a very simple XML syntax, and that it has excellent documentation. (I read a few comments online saying "Ant's documentation sucks" but I can't say I agree, at least as far as the basics go.)

I stayed up till way too late customizing my project's build.xml to automate testing, create various distributions, archive them etc.. Bizarrely enjoyable, though I suffered sleep deprivation the next day.

Finally, in a fit of best-practise, I tried to get CVS to work. I want to do version control, I really do. But I really think that the CVS documentation sucks and I haven't yet found a decent alternative tutorial. There is lots of documentation provided, but it just doesn't make sense to me.

I think that I've worked out how to create a directory structure, and replicate my changes. But that's it. I'm not 100% sure how to check whether its maintained my old versions, and how to roll them back. It could just be that I got burned-out after teaching myself junit and Ant and I need to let my brain rest before diving into CVS?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I do agree with you - the standard CVS documentation is not the easiest to use. You should take a look at "Open Source Development with CVS"
    by Karl Fogel and Moshe Bar, which is GPL'd, and available online here []. I haven't read the new 2nd edition, but the online chapters [] of the 1st edition are excellent.