Tuesday, October 14, 2008

Bug fix bingo

In case you have seen this before I recommend you print it out and stick it over the top of one of your Dilbert comics or something :) Bug Fix Bingo Better still it's from a Queensland company!

Regular Expressions (regex)

Still kinda surprises me the number of developers I know who are completely oblivious to the power of Regular Expressions. I'm certainly no expert on the subject but I find myself using them on quite a regular basis, probably around once a week off the top of my head.

The funny thing is that they are applicable in so many situations from Find and Replace in Visual Studio to Validating ASP.Net Form Fields to jQuery matching (though i gave up on this before i could get it to work)  to parsing comma delimeted files (j/k)  

Any Drawbacks? I find the major drawback is the fact that just about every regex provider uses a slightly different syntax, so you need to trawl the reference docs to find the right symbol. Heck, even Visual Studio's regex provider is slightly different to System.Text.RegularExpressions :S 

To combat this there are numerous cheatsheets somewhere in the pile of papers on my desk that help to remedy this situation:

And how could I forget the obligatory quote for any blog post concerning regular expressions:

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems. --Jamie Zawinski, in comp.lang.emacs

Don't name your View "View"

but if you must don't try to use code like this: Obviously you'll just end up with a StackOverflowException. ActionName attribute to the rescue! It's strange what working in a different environment or with different technology can lead you to make the most simple mistakes :)

Sunday, October 12, 2008


Kick ass latex equation editor (if you're into that kind of thing)

Welcome to Gratuitous Development!

Welcome to Gratuitous Development, my belated first attempt at blogging. My focus for this site is to keep a log (funnily enough) of activities relating to Software Development primarily regarding the .net framework and surrounding technologies. Off the top of my head a few areas I hope to explore include:
This is very much a learning experience for myself so any constructive criticism would be greatly appreciated. If  When I do something stupid please don't just point it out, provide a solution. Eventually I'm hoping that this may in some small way benefit the .net community, however small that contribution may be :)