# Saturday, February 19, 2005

I’ve just watched the DVD “Man on Fire” and have to say I found it riveting. In fact it was so enthralling that I feel the need to blog about it; something I’ve not done about a film before. Basically it’s a revenge flick caused by the kidnapping of John Creasy’s (Denzel Washington) young charge. The first third of the movie provides an insight into John Creasy’s background and his new relationship with Pita (Dakota Fanning) and the remainder details Creasy’s revenge on all who were involved with or profited from her abduction.

This is an incredibly powerful film primarily due to the performances from Denzel Washington and Dakota Fanning. Denzel’s acting abilities are well known but I’ve also been a fan of Dakota since she appeared in “Taken”. It has to be said that there is a fair bit of violence during the revenge part but I don’t think it’s over the top. In fact, due to the events in the film, you end up actively wanting Creasy to take extreme action. I won’t spoil it by telling you what happens – you need to watch it for yourself.

There are a number of points that make this film stand out. Firstly the pace; once the kidnap takes place nothing detracts from Creasy’s primary objective. There is no side story, no “relationship” getting in the way. Actually, if you watch the deleted scenes then he was supposed to hook up with Pita’s mother and I’m glad Tony Scott stuck to the main story. Secondly, the sound track is perfect. Almost every scene has music and it compliments the action on screen. My particular favourite is the rave scene – a wall of sound, not much dialogue and a load of action. The cinematography and subtitle overlays are just as effective. Finally the ending matches the mood exactly. I was expecting the usual “Hollywood ending” – main character succeeds against all odds to save the day. Well thankfully the finale isn’t ruined by an implausible conclusion and the ending is more in line with the rest of the picture. Even the alternate ending fits (do watch it in the extras) but I prefer the one chosen for the final cut.

OK, that’s all I have to say. Go watch the film and let me know if you agree.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, February 19, 2005 12:25:35 AM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback
# Monday, February 14, 2005

For some reason when I’m developing something new I always end up changing my design twice. Note, I’m not talking about architecture here. Architecture is a higher level concept and as such isn’t killed by implementation detail the way a design is. I think there is a reason for this multi-version development though.

The first design is basically a prototype exploring possibilities. At this point I’m not sure what the best solution is or even what techniques might be best to employ. It only just does the job and is probably not very elegant or efficient. Not something to be proud of.

The second is usually a great design but, more often than not, flawed with a super hero style weakness. It will be elegant, efficient and cover every requirement imagined. The only problem – it will never be finished. This second iteration is usually complex, over designed and would take an eternity to implement.

After a good dose of reality, the third version takes shape. It’s much more practical, easier to maintain and solves only the requirements that are actually needed. These three designs are usually quite different. Not what the XP crowd would call iterative implementations but the end result is similar.

I think it’s important not to get too attached to any one way of doing things. I see some who start coding and stick with their first design to the bitter end no matter what. People often complain that a v1 product is OK for early adopters but not general consumption. Iterative design like this enables that sought after v3 product in your first release. Just don’t take three times as long to implement it…

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Monday, February 14, 2005 9:25:15 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Thursday, February 10, 2005

Ryan blogged about e-mail spam today which reminded me - I got hit this morning on three separate and unrelated addressed within a 10 minute time span. I can’t imagine how many mails they must have sent in that short time to hit all three addresses. The same message got through Google, Yahoo and Outlook spam filters. These spammers need a good long stay in Guantánamo Bay as guests of the US Navy.

So [via www.ryanstevens.co.uk] I suggest the following as a small way of fighting back:

A novel way of making spam less profitable is to help shutdown the scammers who send these mails by driving up they costs. Check out how you can help Artist Against 419

While reading this page you've stolen 41076 bytes already!

A fake banks imageA fake banks imageA fake banks imageA fake banks imageA fake banks imageA fake banks imageA fake banks image 
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Thursday, February 10, 2005 9:56:48 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Monday, February 07, 2005
I think Google are stepping things up a notch. Instead of the usual 6, they’ve given me 50 this time. If you want one then drop me an e-mail at james.snape@NOSPAM.ONLINE.gmail.com (remove NOSPAM.ONLINE.) with your first and last name (I need then to send the invite). No requirements this time – just sent the e-mail and it’s all yours.
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Monday, February 07, 2005 9:25:18 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Saturday, February 05, 2005

OK, I’m a little embarrassed to admit but I’ve been suffering from coder’s block this week. It’s a state similar to writer’s block which is defined as “a usually temporary psychological inability to begin or continue work on a piece of writing”.

I think probably everyone suffers it from time to time and, although I haven’t had a case for a number of years, this has come at a most inopportune moment because we are on a very tight schedule with our current release.

I guess it’s a little like depression in that you can’t just mentally “fix it”, you need to work through the cause. In this case I don’t think it’s an inability to write code, it’s more a case of too many possible solutions to the problem in question. They are all good but none are perfect. In particular one of the requirements is to allow additional code generation (note – not just an add-in, this is adding to the system) post release by our professional services engineers. This is hard for me because my brain prefers to work spatially – I need to see the design animated in my head before I code it up; not something that’s possible if an unknown chunk of code if going to be added by someone at a later date. Talking with other developers didn’t help because all that did is give me more good solutions to consider.

The other problem is that there are a number of very intricate details that have to be thought about or the implementation won’t meet the requirements. Completely overwhelming if you look at them together so on Friday I decided to take a leaf out of the extreme programming book – baby steps. I started by ignoring the mass of requirements and implementing a really small section. By lunchtime I was back in the flow, I managed to check-in something yesterday evening and things are looking to be back on track.

So if you are suffering similar then I can offer the following advice:

  • Take a break and do something completely different like go for a walk, however doing this too often is just procrastination
  • Try and work out what is causing the block and fix those issues one at a time
  • Take small steps to get something (anything) working
  • If all else fails, see if you can swap your feature with another developer
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, February 05, 2005 10:09:17 PM (GMT Standard Time, UTC+00:00)  #    Comments [3] Trackback

Robert, I'm happy you chose to add an article of mine to your link blog and quoting the full text is fine too. One thing though, I didn't find out until I started getting referrals so it would be nice if you could change your software to drop me an e-mail or send a trackback when you post, especially as the new site doesn't make finding the quoted article very easy. Thanks.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, February 05, 2005 8:55:42 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] Trackback
# Wednesday, February 02, 2005

Ward Cunningham’s recent contributions to Microsoft have appeared on the web in the form of a wiki called PatternShare. The content is excellent but what I find more interesting is that the person who invented the wiki concept is (a) using FlexWiki instead of his original creation and (b) doing some really novel things with the software itself.

Having never programmed in SmallTalk, I haven’t really got my head around WikiTalk so my FlexWiki development is limited to modifying existing examples. This new site has plenty of those.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Wednesday, February 02, 2005 10:15:47 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback
# Thursday, January 27, 2005
Clever, but not magic. How long will it take you to work out how this Mind Reader works?
by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Thursday, January 27, 2005 10:40:18 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] Trackback
# Monday, January 24, 2005

Sum_diamond_black_5drAt the moment I busy with work that I can’t blog about right now. One thing I can mention is that today I placed an order for the new GTI in diamond black as shown in the picture. It’ll be here at the end of April but in the meantime, some stats for those that care about such things:

  • Engine – 2.0 litre, 4 cylinder, 16 valve turbo
  • Gearbox – 6 speed DSG
  • Top speed - 145 mph
  • Torque – 280 Nm at 1800 rpm
  • Power – 197 bhp at 5100 rpm
  • Acceleration – 0–60 in 6.7 secs
  • Breaking – 60–0 in 34 m

 Can’t wait…

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Monday, January 24, 2005 10:25:51 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Friday, January 21, 2005

I test drove the new Golf GTI today and had about the most fun you can have in a car. It was the kind of experience that leaves you with an enormous smile for hours after. It looks awesome, the handling was excellent and the speed of the thing is astounding. For a better description from someone who knows about driving, I hope TJ will provide some content as he was with me at the time (and managed a very scary power slide around a tiny roundabout).

There is, however, only one problem with it – they can’t make them fast enough. The waiting list for new orders is already running into June. I better place my order next week.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Friday, January 21, 2005 10:21:05 PM (GMT Standard Time, UTC+00:00)  #    Comments [2] Trackback
# Sunday, January 16, 2005

Just a quick reminder that there is no point manually checking database constraints before modifying your data. Take this code for example:

create table Users (
    UserID uniqueidentifier
        primary key not null default newid(),

    LoginName nvarchar(50) not null unique
)

if not exists (
    select * from Users
    where LoginName = 'JohnSmith'
)
begin
    insert into Users (LoginName)
    values ('JohnSmith')
end

There is a race condition between the if not exists check and the actual insertion of data. Another connection could insert the same data before this insert gets a chance to complete. We could wrap the check and insert in a transaction to ensure consistency as follows (note the isolation level because we need to place a range lock on data that could be there):

begin tran
set transaction isolation level repeatable read
if not exists (
    select * from Users
    where LoginName = 'JohnSmith'
)
begin
    insert into Users (LoginName)
    values ('JohnSmith')
end
commit

This works but we’ve got the added expense of a transaction. There is no point in doing this though as there is already a unique constraint on the column and databases are very good at checking constraints. With this in mind, the new and improved version looks like:

insert into Users (LoginName) 
values ('JohnSmith')

Much simpler. There is only one minor problem, for which I don’t have an answer, and that is if you have multiple constraints on a table then it’s very difficult to determine which one failed. The @@error variable will be set to 547 (constraint violation) and a suitable raiserror is generated which could be parsed by the caller but not easily.

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Sunday, January 16, 2005 10:20:35 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Saturday, January 15, 2005

This one can be expanded to selling anyone on an idea:

The usual set of MSDN articles:

Some notable downloads:

Finally, a couple of excellent articles by Michele Leroux Bustamante (dasblonde)

by This posting is provided "AS IS" with no warranties, and confers no rights.
posted on Saturday, January 15, 2005 10:48:09 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback