Setting your rates II
Related articles by Zemanta
- Happy Customers Equal Better Business (underthegrapetree.blogspot.com)
- 5 Ways to Please Your Clients and 5 Reasons Why You Should (sitepoint.com)
# yum install subversion
# yum install mod_dav_svn
If you're on a Debian based system try:
# apt-get install subversion
# apt-get install libapache2-svn
In your apache configuration file, near the module declarations make sure you have the following lines.
LoadModule dav_module /usr/lib/apache2/modules/mod_dav.so
LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so
$ svnadmin create /path/to/repo
It's usually best to create this somewhere near, but not in the document tree for the webserver.
Open you're apache config file, or the config file that stores the details for the virtual host you're using and add the following lines:
DAV svn
SVNPath /path/to/your/repository
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /path/to/your/passwdfile
Now create the htpasswd file and add a user or two using the following commands
# htpasswd -cm # htpasswd -cm /etc/svn-passwd andrew
New password:
Re-type new password:
Adding password for user andrew
# htpasswd /etc/svn-passwd -m simon
New password:
Re-type new password:
Adding password for user simon
Restart apache and that's it all done. You should now have a running subversion repository with two users, andrew and simon, they should be able to view and commit anywhere. We'll assume these are staff members who can view and commit on any project.
# htpasswd /etc/svn-passwd -m john
New password:
Re-type new password:
Adding password for user john
The next thing you need to do is to setup svnauthz to control access to the repository. Back in your apache config file, add the following line into your svn config:
AuthzSVNAccessFile /home/goroam/dev.goroam.net/user/repos/svn-authz
So that it looks something like this:
DAV svn
SVNPath /path/to/your/repository
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /path/to/your/passwdfile
AuthzSVNAccessFile /path/to/your/repository/svn-authz
I tend to keep my svn-authz file within my repository path, you may wish to place it elsewhere - whatever works best for you.
The next step is to create the svn-authz file. That's as simple as this:
[groups]
staff = andrew, simon
contractors = john
[/]
@staff = rw
* = r
[/external-project]
@contractors = rw
The file is pretty simple and self explanatory but the first block starting with [groups] defines the groups. In this case we've got two one for staff with andrew and simon and one for contractors with john as the single member. The usernames to use here are the same as you set in your htpasswd file. Authentication is controlled by the standard basic authentication, subversion is only controlling access.
The next two blocks are paths within the repository. The first:
[/]
@staff = rw
* = r
Tells subversion to give all members of the staff group read and write access to everything under the / path - basically the whole repository. The next line * = r tells subversion to give everyone else, read access to everything.
Again this may not work for you, but we tend to allow read access to everything to everyone with a password. If we trust them enough to give them a password, we trust them. Also it allows contractors to build dependant libraries from the head, which is required at times and saves us the trouble of working out dependencies in our svn-authz file.
[/external-project]
@contractors = rw
In the next block, above, we're giving everyone in the contractors group read and write access to everything in the /external-project path of our repository. This of course is the project they're currently working, so your path will be different.
That's it. Contractors hired, up and running in your subversion in minutes.
# htpasswd /etc/svn-passwd -m dick
New password:
Re-type new password:
Adding password for user dick
# htpasswd /etc/svn-passwd -m jane
New password:
Re-type new password:
Adding password for user jane
# htpasswd /etc/svn-passwd -m dave
New password:
Re-type new password:
Adding password for user dave
Assuming, as above we have andrew and simon as staff users we should make our svn-authz file look something like this:
[groups]
staff = andrew, simon
companya = dick, jane
companyb = dave
[/]
@staff = rw
* = r
[/project-x]
@companya = rw
[/project-y/branches/zing-bang-feature]
@companyb = rw
We're only building slighty on the previous file with the groups entries, and that should be clear. The entry here for project-x should also look familiar - Both dick and jane, members of the companya group have read and write access to the path.
For the next entry we've created a branch and we have company b working on the branch. I'm really just throwing that out there, mostly because I can, but also to show that you can go to any depth in the repository tree granting access as you see fit.
In this case it's been determined that the work CompanyB in engaged to complete only needs to take place in this branch, so while they can read the whole repository they cannot write anywhere except here. This would allow you to continue internal development, or indeed external with some more entries on project-y making point releases while zing-bang feature is developed and CompanyB could merge the trunk in at will, since they have read access to it.
While on holiday the code I'm responsible for has been modified by an external contractor. Before my holiday I pointed out that we should make sure version control is used by anyone making any change. It wasn't. Now I'm frustrated and pissed off. The problem isn't that someone else was editing the code, or that I somehow lost control of a fiefdom or anything like that. It's that I've just spent hours I could be using to do something else tracking down file modification dates and then diff'ing them against my versions out of version control. Time I shouldn't have to had spent doing anything The bigger issue is now I'm under pressure by my boss to deliver some changes at the same time as I have to deal with this, and no extra time has been allowed for it.You pay contractors to do work for you, a large part of that should be to insist they do it in a way that is consistent with your working practices. You wouldn't let them commit changes to a PHP website in ASP, Perl or Python and equally you should insist that changes are delivered consistently and in a manageable format. Warning flags get raised if someone tells me they don't use version control. Not knowing how and asking questions is one thing; I have no problem helping someone, a contractors included, learn our version control system and practices because I see our relationship as a long term one, so any investment in that relationship is worthwhile. If a contractor tells me they cannot or will not use our version control system though, we have a problem and usually we end the relationship then and there. It may sound like a hardline call based on a single criteria but it is a deal breaker for me. For a contractor there could of course be some concern that they've submitted the work and may not be paid. Version control is not the cause of this - it's dishonesty, plain and simple and if the person you're working for is that dishonest submitting code via email before the cheque clears is equally risky.
Re-reading my post about saying no got me thinking about the other reasons we've turned down work. It's hard getting work in the first place and doubly hard turning it down, but sometimes you just have to say no.
One big one that comes to mind is we quoted to do some work for a company we've had a long term working relationship with. A small company, they were unfortunately facing the loss of a key member of staff in the final few months of development of a key project already well overdue. A update to a project we'd worked with before, so we were familiar with the architecture, team and almost every aspect of the project.
We made quoted a day rate at the low end of the scale and offered to agree fixed times for each bit of development, insulating them from any estimate errors by delivering that iteration for the quoted price before undertaking the next. We agreed to put the work we were quoting on first, push our own development schedule back, not take on other work and offer any time the needed to get their project released.
I got the very distinct impression they wanted the work done cheap from a discussion with the technical lead for the project. I tried to mitigate any problems by sending an email detailing our costs and how they break down from developers salaries, equipment costs and the meagre profit margins. I also made it clear that we were uniquely qualified for the work, due to our extensive working history directly with the project.
The response was disappointing, they were willing to pay about half the rate we quoted. I had a brief discussion with the technical lead, who was as disappointed as us with the reaction, but it was clear there was going to be no middle ground. The offer was never even going to come up enough.
We gave up in the end - a shame really, like any small business we could have used the money. It was an issue of value. Despite all the positives, the experience, the fact that there was nobody else who could have hit the ground running like us and our prior working relationships they weren't willing to pay what we consider a very reasonable price. They effectively wanted work done for less cost to them than it would have cost to hire a member of staff, with none of the security or benefits. A short term contract under terms worse that a job I'd been offered months prior.
In the end they had to give the member of staff who had planned to leave a significant pay rise to entice them to stay, hired another, less experienced developer who needed more managing and training and still haven't delivered the project, months later.
For us, and for anyone else considering taking work at less than a market rate, it's a tough choice. Though we could afford to survive without the work, it would have been nice to have the money in the bank. There is also always the potential that work can lead to more work, however do you want cut rate work leading to more of the same? It's all too easy for it to set the tone of a working relationship and an expectation that you will continue to work for the low rate. Also the whole time you're servicing the contract you're not getting new clients or doing other more lucrative work. As a consultant if you're not saving for a raining day you're taking a huge risk, especially if things get a bit lean for a few weeks or months.