MVC Html.ActionLink() fails weirdly with routeValues parameter in Asp.Net

It seems simple. In an MVC view page you have an @Html.ActionLink with parameters for action, controller & route values:

@Html.ActionLink("Some text","Action","Controller", new {id=1})

but instead of rendering the text with a link to the action, it renders a link with some weird URL that isn't what you want at all.

If you use intellisense to look at the overloads for ActionLink, you'll see that the overload you've got is interpreting new {id=1} as html attributes not as route values. You need the overload with one more parameter, which can be null:

@Html.ActionLink("Some text","Action","Controller", new {id=1}, null)

And then it works.

.Net Assembly Binding Redirect doesn’t work – because you have an Uppercase/lowercase error in config

Thanks to Eran Stiller for spotting the fact that assembly binding redirect fails—with no appropriate error message or clue as to the reason for failure—if you used PascalCasing instead of camelCasing casing in your config.
This fails:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Moq" Culture="neutral" PublicKeyToken="69f491c39445e920" />
        <bindingRedirect oldVersion="4.0.10827.0" newVersion="4.1.1309.1617" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

because of incorrect case in the attributes Culture and PublicKeyToken. Make them camelCase like so:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Moq" culture="neutral" publicKeyToken="69f491c39445e920" />
        <bindingRedirect oldVersion="4.0.10827.0" newVersion="4.1.1309.1617" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

and now it works.

Improving the accuracy of software project estimates: multiply everything by 3

I found when I'd worked in software for a couple of years that everything I delivered took me about three times longer than I expected.

Eventually I realised that my 'gut feel' for estimating a coding task was 'about how long will it take me to code this if I make no errors & get it right first go'. Which is a good starting point for an estimate, so long as you then go on to add testing, debugging, changing or misunderstanding requirements and time to release.

If you have stable requirements and a pushbutton deployment toolchain, then 3 x gut feel is may be about right. That covers clarification of requirements, testing, subsequent clarification of misunderstanding, and deploy.

If you haven't got those things, x5 or higher is usually closer.

I notice that others have found something similar. I'm please to find that multiplying by 3 puts me about 4.7% ahead of the curve - http://alistair.cockburn.us/The+magic+of+pi+for+project+managers.