Tuesday, August 25, 2009

Selling my soul for a free TDD course?

I just read this on a blog I follow and normally I wouldn't do this but I really want to go on this course... so for that reason here bbits have a peace of my integrity. Oh and one more thing... #Moonfruit.

Roy Osherove is giving an hands-on TDD Masterclass in the UK, September 21-25. Roy is author of "The Art of Unit Testing" (http://www.artofunittesting.com/), a leading tdd & unit testing book; he maintains a blog at http://iserializable.com (which amoung other things has critiqued tests written by Microsoft for asp.net MVC - check out the testreviews category) and has recently been on the Scott Hanselman podcast (http://bit.ly/psgYO) where he educated Scott on best practices in Unit Testing techniques. For a further insight into Roy's style, be sure to also check out Roy's talk at the recent Norwegian Developer's Conference (http://bit.ly/NuJVa).

Full Details here: http://bbits.co.uk/tddmasterclass

bbits are holding a raffle for a free ticket for the event. To be eligible to win the ticket (worth £2395!) you MUST paste this text, including all links, into your blog and email Ian@bbits.co.uk with the url to the blog entry. The draw will be made on September 1st and the winner informed by email and on bbits.co.uk/blog

P.S. Roy did a great videocast of reviewing the tests for NerdDinner. You should check it out:

First Pomodoro of the day.

My first pomodoro of the day is always a 'Plan and Catch up' session.

I begin by checking the results of the previous day's pomodoro and count up the number of full pomodori achieved. This I can use to as a guide of how many I will achieve today. I then do my equivalent of a daily scrum with my team and then can begin to plan my day.

Lets say yesterday I completed 9 pomodori. I allocate nine spaces. Following the meeting I realise that Abdul needs a code review and so I can allocate say 3 pomodori to that task and a quick look at my email shows that I need to speak to Donna about testing a feature. I'll allocate 2. I can now see that I only have 4 pomodori spare. I'll look at uncompleted tasks from yesterday and my active inventory list and pull the the most important ones (or the ones I can finish within those 4). Yesterday was a disruptive day so I hope to achieve more than 9, in which case I will just pull more from the active inventory list as appropriate.

Tuesday, August 18, 2009

SQL union Gotcha! Its a feature.

I spoke last time about the strange behaviour if SQL where if you run

SELECT 'X' AS line
SELECT 'X ' AS line

you will only get 1 value returned.

Well this is not a bug apparently it's a feature of the ANSI SQL-92 standard.

From section 8.2

 If the length in characters of X is not equal to the length
in characters of Y, then the shorter string is effectively
replaced, for the purposes of comparison, with a copy of
itself that has been extended to the length of the longer
string by concatenation on the right of one or more pad char-
acters, where the pad character is chosen based on CS. If
CS has the NO PAD attribute, then the pad character is an
implementation-dependent character different from any char-
acter in the character set of X and Y that collates less
than any string under CS. Otherwise, the pad character is a

Blimey so SQL pads the shorter string with spaces!

Thanks to StackOverflow for that one.