Rick Hurst Web Developer in Bristol, UK

Menu

Month: August 2006

Subversion – the penny drops

I think I might have just had one of those “two problems solved at once” moments. For the last few weeks i’ve been churning over in my mind how deal with version control and backups and also come up with a solution to allow me to develop my freelance stuff on multiple platforms, on multiple machines, but having it all stored in one place.. Then it occurred to me – one of the ways subversion can be used is to check out a whole project to a local machine to work on, then changes can be committed back to the repository, so as long as I have a machine ready to run a local version of whatever it is I want to work on, I check out the project, work on it on that particular machine (disconnected if necessary) then check changes back in later. Even If I manage to get out of sync by forgetting to check stuff back in svn should resolve any conflicts.

So now I need to change my strategy, rather than relying on shared folders and network drives, I need to set up svn repository and find clients for the different environments I will be working in. and err.. learn how to use it properley beyond adding files and committing stuff.

Format Date in ZPT

Just a quick example of how to format a date in ZPT. DateTime is already available within the Plone environment, so you can do something like this:-

item_date item/EffectiveDate;
item_display_date python:DateTime(item_date).strftime(‘%B %d, %Y’);

The above example formats the date in a US style e.g. 3 July, 2006

Platform Agnostic

For the past few months i’ve been using mainly windows for web development, because I seem to find myself doing a lot of testing in IE, and I was fed up of lugging my powerbook to and from work (on a skateboard), so I nagged netsight into buying me a cheap laptop to use here and to take on client visits. Set up on an iCurve stand with a second monitor it has proved to be a nice little set-up. One thing I have noticed is that it gets into a panic if you do something such as unplugging a cable at the wrong time and I do find myself rebooting quite often compared to my mac. It is nowhere near as portable and robust as the powerbook. Always paranoid of the viruses too..

At home i’ve ended up running ubuntu linux with windows running as a virtual machine in the excellent and FREE vmware server. The powerbook will shortly be married to an apple studio display as a living-room friendly multimedia machine and workstation. I have probably spent an unhealthy amount of time getting myself in a situation where I can do everything from every machine – using putty in windows to develop on the linux and osx machines, vnc, terminal services, shared folders. I justify this because I am after all a developer and I have my reasons for using all these setups. If I wasn’t a developer I would just stick with the powerbook.