Monday 24 November 2008

Setting up source control

I have from time to time had to set up source control on a new system, or after formatting a system that's grown old over time. The steps are pretty simple if you follow the instructions, but they can ramble on a bit in my opinion. I want something short and quick to follow, so when I decided to put source control on a new development box I decided to post this as much for myself as for anyone else.

Steps to setting up Subversion source control

The steps below describe how to set up source control for local use and do not require installation of an Apache web server to allow remote access.

  1. Download and install SVN
  2. I chose Slik Subversion. The same page has links to AnkhSVN (see below). Installation was smooth but for the registration of the service (didn't happen, and no error message). The command line to register my installation of the service was:

    sc create Subversion binpath= "C:\Program Files\SlikSvn\bin\svnserve.exe --service --root D:\Repository.SVN" displayname= "Subversion" depend= Tcpip start= auto

    I ran into the following error because by default on Vista, all things run as normal user.

    [SC] OpenSCManager FAILED 5: Access is denied.

    Screenshot showing how to set a command prompt to run with admin rightsThe solution is pretty simple; you make the command line run as administrator as follows: Edit the properties of the command line link and on the [Shortcut] tab, press the [Advanced...] button and then tick the [Run as administrator] option. Press OK twice to close the properties and then run the command line. You might be prompted to continue with administrator rights.

  3. Download and Install AnkhSVN
  4. If you want Visual Studio integration (and who would not want this?) you need a client tool such as AnkhSVN.

    Installation was simple, and it registered with both VS2005 and VS2008 on my system. The new version has icons that show the checked out/in status of each file under source control. It also has very good integration with the pending changes and a neat history viewer.

  5. Install TortoiseSVN
  6. This shell extension will highlight which files and folders are under source control by embellishing their icons with indicators. Tortoise also has a useful repository browser which can be loaded from an explorer context menu when no file is selected.

  7. Backup
  8. No installation of source control is complete if you aren't backing up that repository. Schedule a task to run as frequently as you desire. I used the svnadmin program to make a hotcopy of the repository/ies I have. Using the same example repositoryy as above, the backup is done with one simple command:

    svnadmin hotcopy D:\Repository.svn c:\backup\D_Repository.svn

    New entry 14 June 2009: I've just written a batch file to perform the backup and compress the backed up repository to a ZIP file with the current date. I know I'll need this again, so I'm posting it here. The two things to care for are highlighted in yellow.

    @echo off
    set backupDT=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
    set backupFolder=Backup_Repository_%backupDT%.svn
    echo Removing existing backup folder
    rd %backupFolder% /S /Q
    echo Backing up repository to %backupFolder%
    svnadmin hotcopy C:\repository\Svn %backupFolder%
    set backupZipFilename=SvnBackup_%backupDT%.zip
    echo Compressing repository into %backupZipFilename%
    D:\UTIL\zip -r -9 -S -o %backupZipFilename% %backupFolder% > nul
    echo Removing backup folder (contents are in ZIP)
    rd %backupFolder% /S /Q
    pause

Saturday 22 November 2008

Job matching

I can't help but wonder about the state of job hunting these days as I am now in the process of trying to find work again. It doesn't bother me (yet) that I don't have work, but might do in a week or two's time if I've not had an interview or five at least.

What I do find interesting though, is the whole matching of candidates to jobs. Being a software developer it seem to me that it shouldn't be that difficult to match skills. But then I realise that that is exactly where so much of my frustration with agencies comes from. All too often I find myself talking to an agent who may be very good at the process of finding out about who needs manpower, and employing people, but knows very little about the details of the work we do. And who can blame them? When I feel at times like I am struggling to keep up with so many technological changes and new developments in terms of operating systems, frameworks, language updates, IDE updates and so on. And so the matching of candidates to jobs in careers that require constant learning is never going to be easy for agents, yet I cannot see how we could make the matching of agents to roles more efficient without them. I think we (employers and employees) need to work together in their efforts to bring agents along on the learning curve.

My two pennies are spent.

Wednesday 19 November 2008

A bad day

I stayed at a friends house again for my last night in Bracknell. I enjoy their company very much, and we have a very nice Indian take away. We had way too much food as usual, but I managed to get it all in :D. We stayed up pretty late watching photos from my recent holiday, and then chatted for a while. It was a lovely evening really. But one of their children was ill and was crying for an hour or two in the small hours of the morning, and the older one decided she wanted in on the action and played up as well. Having gone to bed around 1:30, they kept me awake from around 2:15 through 4:30. I felt so sorry for their mother, who seemed to be stressing about them waking me. The alarm went off at 6 and I struggled out of bed, not looking forward to my last day at work.

I tried to have a shower, but gave up on hot water, so just a rinse of the head and face and got out again. Seemed like tons of kit I had to take to the car, and then headed for work to find there had been an accident on the M4 and there was now one huge snake of cars lying on the motorway. People doing the usual lane jumping to no avail, with the result that it took hours to get to work.

The website build was still failing, even with CC.NET 1.4.1 though the service at least no longer deadlocks, and the web dashboard has a few nifty new display features. Mostly I liked the status bar below the project being build, and the overview of builds on each project's home page.

Work went okay, and the leaving ceremony was as awkward as I've always found them. I was overcome by the pressure of it, and didn't feel the loss and sadness that I suspect will still come.

The drive home was worse than the drive in. I didn't think that would be possible, but it was. The traffic was down to a single lane heading for the M3. Once on the M3 things were fine until I approached the A303 off ramp, where a sign told me that at some junction the 303 was closed. CLOSED! Great I thought; at least I had no reason to rush. Things were fine until I reached Yeovilton. Turned right towards Taunton and had to endure the afternoon drivers on the way there. 30 mph in a 50 zone. By the time I hit the M5 I gave up on restraint and let myself fly away from it all at nearly 100 mph. I felt bad for speeding, but the motorway was pretty much empty, with a whole spare lane between me and the 3 other cars I could see.

I got home tired and worn out. My kids came out to meet me, daughter with a beer and son asking if he could take something inside for me. Poor kids, I could not be angry with them and asked her to put the beer back in the fridge as I really was not in the mood for a drink. They helped me unpack the car and take things inside. Having not eaten, I gobbled a slice of bread (dry) with a few slices of pack ham and a packet of crisps. I washed it down with a Pepsi and sat on the sofa with my head on the armrest; eyes closed and exhausted. I decided that rest was in order and tomorrow I'd push myself again for job hunting and self-study.