Wednesday, May 04, 2005

From the guys that wrote Ruby On Rails

Ruby on Rails was an offshoot from a product these guys made for project management. Thoday they released a site aimed at life management.

http://www.backpackit.com/

It's free to join... and has so much potential!

Check it out.

Tuesday, March 29, 2005

Version the file system not the files

Most version control software misses the point. They version the files fine. Most fail to sufficiently version the file system.

When you are working on a codebase you want to be able to write new classes, rename them, move them to other assemblies, etc. A single class (throughout it's life) may have lived in various diffrent directories, in varously named files.

SourceSafe allows you to rename files or directories, but once they are renamed it is as if they have always had that name. If you ask for an old version, it still has the new name. Not what you want.

Subversion is better. It remembers the file's filename and content, so getting a version as of a past date works correctly. However subversion still required you to use subversion to rename the file otherwise it can't track the change. What if you are using a refactoring tool or IDE that does the file renaming for you?

What is needed is a version control system that watches the changes you are making to the filesystem as a whole and tracks these changes for later. Renaming a file on the hard drive should be enough for the verison control software to know the file was renamed.

Last weekend I have started a small application that attempts to achieve this goal. SVNMirror.

SVNMirror mirrors all changes made to a directory (and all subdirectories) in subversion. Here is how it works...

SVNMirror watches a source directory for changes (using the .Net FileSystemWatcher classes). SVNMirror is also given a versioned directory (which would usually be your working directory if you were using Subversion in the standard way). When a change occures the change gets mirrored in the versioned directory.

For example:

* You create a new file in your source directory. SVNMirror copies the file to your versioned directory and tells subversion to add the file to version control.
* You modify a file in your source directory. SVNMirror copies the change to your versioned file.
* You delete a file in your source directory. SVNMirror marks the file as deleted in subversion.
...
etc.

There are still a few issues with renaming files that are not comitted to the database yet, but other than that the proof of concept works fine. :)

I'll post a link to the page once I make a site for the project.

Tuesday, March 22, 2005

What exactly are you estimating?

"How long will it take to get to Sydney from Melbourne?"

To answer this you need to know three things:
* How fast are you going?
* What route are you going to take?
* How accurate are my estimates for speed and distance?

Whenever you estimate a task in terms of time you are joining three independent variables. The Productivity of the team, the Magnitude of the task and the Accuracy of your estimate.

* To drive direct to Sydney is about 1000 km.
Assuming you don't need to take any detours or get lost.

* The average velocity for the trip is around 100km/hour.
Assuming your car doesn't break down, or you have an accident, or the kids need the toilet every 20 mins ... etc.

So.. I could quote my estimate as 13 hours.

If I had done the trip a few time, and it always took between 10 and 13 hours then maybe I would be much happier to make that quote.

But... what if I was gambling $100,000 on being able to get someone to Sydney in that time.
I wouldn't be happy with the estimate any more. I would want to allocate extra time incase the unforseen happened.

What level of risk is your customer happy with? Have you asked?

Thursday, February 17, 2005

How often do customers want new software?

Prompted by a thread on extremeprogramming@yahoogroups.com (How often do
customers want new software?)

Frequent releases are good for development. The more often you can get
the software in the hands of the users, the quicker you can get
feedback. The sooner you get feedback the easier it is to incorporate
your new learning into the software.

Users sometimes shy away from any form of update or upgrade, and
traditionally they have good cause. New release s frequently represent a
gamble. "Will the new bugs be worse than the ones it fixes." This is
however not true for all software.

Virus checkers by there very nature support risk free updates. Users
trust that each update will only make the software better. AVG virus
checker for example allows you to specify the frequency that it checks
for updates. On finding an update it downloads it and prompts you to
accept the change. If you turn off auto update the application still
warns you when the bug data it is using is considered old/out of date,
thereby prompting users to update.

Another product that I have the same trust with is ReSharper from
Jetbrains. Through their 'early access program' (EAP) they frequently
release new builds. By subscribing to watch the download page I get
emailed when a new build is available. I usually download and installing
it that day. I trust Jetbrains to fully regression test each release
(and haven't been let down once yet), so I consider the risk of each
install is very small. I accept the occasional bug in a new feature as
this is the nature of the EAP. The risk is further reduced by the
ability to uninstall the current version in favor of an older build.
Most of the time I just avoid using the broken feature until the next
build (a couple of weeks at most). I am naturally an early adopter, and
so gain value from having the latest version at my fingers.

Jetbrains also caters for more careful customers by updating their main
site each time a new badged version is released. The EAP builds tend to
initially focus on new features, then on bug fixes until the new
features are working in everyones environment. They relying on the EAP
community to feed them bug reports to gain this vital feedback. This
'bug reporting' mechanism therefore needs to be as pain free as possible
to maximize the feedback you get from this process. Once the important
bugs are fixed a badged version is released to the wider community.

Within any user base there are early adopters, hungry for any and every
new feature. These guys are the key to making frequent releases work. If
you can build trust with these people you can gain access to the
valuable timely feedback you require as product developers. This trust
can only be built through maintaining a high level of quality for each
release and being responsive to all feedback. Users stop giving feedback
if its ignored, so always respond quickly and with a human voice. Not
everyone is an early adopter though, so this process needs to be 'opt in'.

What can you do to make more people early adopters?

* Minimize the cost of change
One or no-click upgrade process.
* Make benefits obvious.
Provide access to a list of changes represented by the update
* Minimize the risk.
Guarantee the quality of each release, and provide a mechanism to roll
back an upgrade if required.
* Make giving feedback painless and valued
Let people know that the feedback was received and provide a way for
users to be kept updated with the progress of the issue.


Thursday, February 10, 2005

Find a file in Solution Explorer [updated]

Solution explorer keeps jumping around every time you get latest. Refreshing the tree takes almost as long as getting the files. So.. turn off the syncronisation. Get latest now works faster.

Sometimes you want to find the current file in the tree though, so...

Here is a macro to find the active file in solution explorer.
[updated for vs2005 with changes from Simon R.]
Sub FindFileInSolutionExplorer()
Dim sln As String = DTE.Solution.FullName
sln = sln.Substring(sln.LastIndexOf("\") + 1)
sln = sln.Substring(0, sln.Length - 4)
Dim pi As Object = DTE.ActiveDocument.ProjectItem
Dim endString As String = "Microsoft Visual Studio"

Dim path As String
While (Not endString = pi.Name)
path = "\" & pi.Name() & path
pi = pi.Collection.Parent
End Whilejavascript:void(0)
path = sln & path

Dim UIH As UIHierarchy =
DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Object
Dim anItem As UIHierarchyItem = UIH.GetItem(path)
anItem.Select(vsUISelectionType.vsUISelectionTypeSelect)
End Sub
Coupled with the ever useful "Collapse all the open project folders in the Solution Explorer".
Sub HideAllProjects()
DTE.SuppressUI = True

Dim UIH As UIHierarchy =
DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Object
Dim aSoltion As UIHierarchyItem = UIH.UIHierarchyItems.Item(1)
Dim aProject As UIHierarchyItem

For Each aProject In aSoltion.UIHierarchyItems
Dim aFolder As UIHierarchyItem
For Each aFolder In aProject.UIHierarchyItems
aFolder.Collection.Expanded = False
Next
Next
DTE.SuppressUI = False
End Sub
I map these to
[Ctrl]+, = Collapse all
[Ctrl]+. = Select currently active file

Very handy.

GitHub Projects