I was chatting to a colleague recently who although he was a very good programmer, did not have a computer science/maths background – this was fine until he wanted to use bubble sort on a large(ish) (100k) number of records and I had to explain to him about how algorithms that take n2 time are not your friend for big (or even little) n.
One of the most important decisions you can make when optimizing an application is the up-front choice of algorithm to use, performance tuning and optimization can make a difference but you are very lucky to achieve 2x-5x improvement, to be able to make 10x or 100x improvement in your application you need decent algorithm choice.
I find Visual Studio Item Templates very useful, but a lot of teams I encounter haven’t really adopted them as they can be a pain to construct. Here’s the technique I use to manage the templates and make it painless to add new ones and modify existing templates if they need to change. What we do is put the templates into source control and then use a build process to automate the production and distribution of the zip files.
Sometimes doing very basic things can be quite tricky in new technologies; case in point presenting a DropDownList (a ComboBox to those, including me, with a VB background) using the new EditorForModel syntax in ASP.NET MVC 2.
I had a little class in my MVP framework called IdLabel which as the name implied just held an Id and a Label so that I wasn’t forced to have a separate display and edit model for every trivial case, so I wanted to do the same sort of thing when writing my shiny new MVC apps.
I’m trying to write some templates for MVC 2 and one of the most useful things I’ve found is being able to step into the source code and see how it is actually interpreting what you’ve written.
It’s easy enough to acquire the source, but what you might not have done before is set up a symbol server. A symbol server is a location that the Windows and Visual Studio debugging tools can use to obtain pdb files, so that you can debug almost anything, including drivers and the operating system!
Working on a project where we needed a (slight) proof of humaness, and we opted to use Recaptcha as it has a fairly simple integration with .NET.
Was fine until we wanted to use custom styling to tie in with the site which is when the fun started! A few hours later, after downloading the project’s sample app, I found some things out that I thought I’d share with you…