Wednesday, February 24, 2010

Love the New System Admin w/Perl book (and RCS)!

I've been doing a bit of Perl-LDAP programming and I had always found the 2000 version of Perl for System Administration to be really helpful - especially the tutorials in the appendix (more on that in a bit). I just got the the new version: Automating System Administration with Perl. I was amazed at how much more useful it was. Not only is there 50% more material, ALL of the older stuff has been reworked and freshened. The LDAP section I was using heavily is MUCH improved. Too much goodness to cover now - check it out yourself!

The reason I decided to make the post was to mention RCS, in the books appendix, the author has a 5 Minute RCS Tutorial which makes a strong case for using RCS instead of all of those other revision control systems. I've tried RSC in the past and I've tried CVS and the guys in the office recently tried to get me to use Mercurial (Wow! Talk about overkill for what I do!!) But the authors argument was, this is so simple and easy for your small scripts lying around - why not use it. I was initially daunted by all of the commands and things you could do when I had looked at it years ago but the author distilled it down to a handful of commands. I am going to distill it down further:

1) Check in and unlock your program (leaving a copy):
$ ci -u program
2) To edit, check out and lock your program:
$ co -l program
3) View your revision logs:
$ rlog program

So far, that works well enough for me. Be sure to read the whole 5 Minute RCS Tutorial (see link above). I wish I had used this on my most recent, arduous LDAP programming job. Instead made numbered versions and left them lying all over. I then had to open them to see why this one was named program-4 and how it differed from program-3, etc. I know - silly. Should've stuck with this when I looked at in in 1997 (Hey! I remember the project that caused me to consider rcs then - that's not weird!)