harriyott.com

The Blog

Measuring Software Development Progress

After recently having a brief discussion about progress, I thought I would try to write a list of all the ways people have tried to measure how a project is going.

  1. Lines of code written
  2. Number of bugs fixed
  3. Man hours spent
  4. Number of deadlines hit
  5. Deadline overrun
  6. Elapsed time
  7. Story points completed
  8. Velocity
  9. Burn down rate
  10. Money earnt (or saved) by the users
  11. Time saved by the users
  12. Bugs introduced
  13. Uptime
  14. User complaints
  15. Scope creep
  16. Working software

I never knew that was there

In Visual Studio, I use Ctrl+F12 to go to the implementation of a method. Just now, I accidentally pressed Alt+F12 and what happened next blew my mind. An inner editor window opened under the line of code I was on, with the code for the method I wanted to see visible.


I have no idea what this feature is called, or whether it is from Visual Studio or Resharper, but I'll be using it a lot, especially with test-driven development.

Update: I just googled it, and it's called Peek Definition.

 

 

Inner Editor

Being more organised

I was talking to a self-confessed disorganised person recently. I used to say I was disorganised, but I've put so many systems in place over the years to counter this, I might well now be considered organised. Anyway, here are a few of my systems, for his benefit, and anyone else.

Phoning myself

If I'm at work, and suddenly remember something I have to do at home, I'll phone my home landline and leave myself a message on the answer machine. When I get home, I'll see there's a message, and play it. "Hi Simon, it's Simon. Don't forget to ..."

Likewise, when I'm just about to drift off to sleep, I often remember something to do at work, so I'll phone my work voicemail.

Doormat

If I have to remember to take something with me when I go out later, or in the morning. I leave it on the front doormat. When it's time to go out, I would have to move it to open the door, which reminds me it needs to come too.

Homes for things

Everything should have a home. Whenever I finish using something, I put it back in it's home. It doesn't matter how random or strange the home is, so long as it lives there. My hammer lives in the bottom of the coat cupboard, for example. It's always there, unless I'm using it, and then it goes back.

Keys, phone, wallet

The holy trinity of misplaced objects. Again, these need homes. Two homes. One home for when I'm out and about, and the other for when I'm in my home. The first home is in my trousers. Phone and wallet in my front left pocket, keys and coins in my front right. They will always be there, unless I'm using them, and then they go back. They don't go in my jacket pocket, or in a back pocket, or on the table at the pub, or anything else. They stay in their pocket.

At home, when I go to bed, I put my phone on to charge, next to my bed, as I use it as an alarm clock. When I get dressed, I put it in my trousers. My keys and wallet live in my trousers overnight. If I want to wear different trousers, I transfer everything across before putting them on.

It sounds like a bit of hassle, and perhaps it takes a while to get used to, but once it becomes habit, it doesn't require any thought, and you'll always know where they are.

Camera phone as a notepad

I realised a while ago that taking notes isn't always practical, and taking photos of things is a super quick way to remember things. I use it to take photos of books that I might want to buy in the future, notes that have been scribbled on a bit of paper that will probably get lost, timetables and so on.

Turning around before walking out

When leaving a café or restaurant, I turn round for a last look at the table before walking out, to make sure I've not left anything on or under the table, and not left my laptop charger plugged in. It's now a habit.

Pre-packed laptop bag

I make sure that I have anything I could need in my laptop backpack, and they live there until used, and go back: mains adapter, phone charger, mouse, notepad, pen, business cards, deodourant and penknife. Whenever I go out with it, I know all I need to do is put my laptop in the bag, and I'm ready to go. I've had to buy a spare charger and mouse, but it's worth it to save the hassle of forgetting them.

Calendar and diary

This used to be such a problem with my wife and I double-booking things, but we've finally solved it using a shared Google calendar, synchronised on our phones. Don't book anything until you've checked the calendar on your phone.

Backup

I use Dropbox, but there are other things that are just as good. The important thing is that it is automatic. My phone automatically uploads photos and my computer files are saved in dropbox folders by default. Once it has been set up, it doesn't need thinking about.

On the way home could you just ...

When I used to commute by car, and had something to do on the way home, I'd often arrive home having forgotten to do it. The reason was driving on autopilot. I solved this by working out exactly where I needed to change my normal route - the particular junction. Before setting off home, I'd visualise it, and when I came up to it, I'd remember to turn off. Once I'd turned off, I wasn't on my usual route, so I wouldn't forget any more.

 

Continuous JavaScript Testing

Being used to NCrunch continuously running my unit tests as I type, I was looking for a similar solution for my JavaScript tests. I'm using Jasmine, which runs from a single HTML page. When I want to re-run the tests, I manually refresh the page in the browser.

Obviously this is a PITN, so by adding a meta tag I kept from the 90s, I've got my page refreshing every 2 seconds and running the tests.

<meta http-equiv="refresh" content="2">

Ninject Controller Testing

I've been converting an old, large project to use NInject to inject services and repositories into my controllers, removing the base controller's code that newed them up. I wrote a handy unit test to make sure all the bindings worked for the controllers' constructors, which caught a few missing bindings before it passed.

[TestMethod]
public void Can_create_controllers()
{
    var kernel = new StandardKernel();
    SiteResolver.RegisterComponents(kernel);

    typeof(AccountController)
        .Assembly
        .GetTypes()
        .Where(t => typeof(Controller).IsAssignableFrom(t))
        .ToList()
        .ForEach(c => kernel.Get(c));

    Assert.IsTrue(true);
}