Thursday, December 30, 2004

Back to Reality

Just got back from a few days in Plymouth. Went down to be jolly for a bit (since 'tis the season).

Did some cool stuff, saw plenty of friends and family and whatnot. Now I've got a few more days until I go back to work. Feels a bit weird today, though. Apart from anything else, I can't type any more, it seems. What a bugger. What can I say, nearly a week away from a keyboard really takes it out of you.

And I guess it being a ver boozy week doesn't help. Think I woke up with a week's worth of DT's this morning. Yow.

Wednesday, December 22, 2004

My true love has a bigger house than me

Actually, that's not true. My true love lives with me.

But really, if on day 1 my true love gave me a partridge in a pear tree (gee, thanks hun!), and then on day 2 gave me 2 turtle doves (eh?) and another partridge, in another pear tree, I'd be getting suspicious. And cramped.

But what the heck am I going to do with:

12 Partidges (all in their accompanying pear trees)
22 Turtle Doves
30 French Hens
36 Calling birds (just think of the racket!)
40 Gold Rings (Okay, the ones I can't pawn, I can melt down)
42 Geese-a-laying (lucky old geese!)
42 Swans-a-Swimming (Where? Who's got a pond big enough for a flock of swans?)
40 Maids-a-Milking (No cows though. Best leave that one there, I think...)
36 Ladies Dancing (Now you're speaking my language!)
30 Lords-a-Leaping (36 ladies + 40 maids, and only 30 Lords. I like those odds!)
22 Pipers piping (The neighbors are going to have something to say about this...)
12 Drummers drumming (...And this!)

I can't fit them all in my flat. And who's going to pay for the upkeep? I mean, most iof the birds I can just feed seed, but Lords? They'll be wanting proper food for sure. Okay, I'm thinking in a while I'll have a surfeit of geese, but that'll take a little while to come through.

Drummers and pipers? Dammit! Do you reckon I can retrain them? Wouldn't it have been better to just give me 34 multi-skilled labourers? They can give me a hand cooking for the 106 other people I've got cluttering up my 1-bed flat.

A bit of forethought next time, I think.

'My True Love'. Hah! You don't know me at all, do you?

Just wanted to share.

Tuesday, December 21, 2004

Flamewars R teh 5uxx0rz

After having a quick flick through Peter Torr's firefox entry this morning, and seeing some of the slashdottery its attracting, I was reminded of this page about language and the web.

Monday, December 20, 2004

Another release of Paint.NET

Another release of Paint.NET 2.0 is out.

I love Paint.NET. I have great fun with it. Of course I don't use it for anything productive. I use it to illustrate stupid things I say at work. Or stupid things that roll around in my head. You see a trend here?

Yes. I am Stupid. NO!! That's not the trend I was thinking of. I don't use PDN for anything useful. I just use it for buggering about.

But I love it, though. I can do things so much cooler than with bog-standard paint.

And it's a student project. That's my favourite part. A Student Project! That rules, man.

Juust wanted to share.


Yes. I admit it. I got sucked in. I went to the FireFox website, downloaded it, installed one or two extensions, and am happily enjoying the slightly (only slightly, mind) nicer user experience it gives of surfing the web (Except for Rory's site. It still doesn't like it.)

What a fool I've been. Fool, Fool, Fool, I tell you.

And this is why.

Quick Distraction

Now for the past week or so I've been plagued with a problem at work with some analysis I've been doing.

I've been looking at how people's giving has varied over 12 months (e.g. Has person x giving more or less in the past 12 months than in the previous 12 months?, that sort of thing.) In theory it's quite simple, make up a couple of views, one or two functions here and there. Job done. There was only one problem.

I had to use Access.

Normally I wouldn't be concerned about this. I use Access all the time. I grew up on it. But unfortunately, Access doesn't do things very quickly (if it does it at all) and neither does it enjoy long-running processes. It just locks your machine up and won't let it go until it's damned well good and ready.

This data I was working with was just using a single table, of some 500 000 rows. This caused one or two problems from the outset...

The number-crunching involved a function, 'Status', which was based on several factors (How much the supporter had given this year, how much last year, when the first started donating, stuff like that). Now I had a choice for this, neither options particularly appealing:

  1. Try to assemble this function in Access SQL using a whole bunch of nested IIF statements
  2. Do it with a VBA function
Well at first I opted for writing a VBA function. Boy was I misguided! What I hadn't taken into account was that actual cost of running a VBA function. It's just never been high enough to worry me before.

Draft 1 of this function was very bad - The function even needed to read data from the tables, so for every row, it would have to:
  • Compile the function
  • Start running the code
  • Open a connection to the database
  • read some data
  • Close the connection
  • Do some maths on the values pulled in
  • Finally spit out a result

Whoops. I didn't even try to time it. It was taking forever. I figured one of the big costs (at least one of the costs I could eliminate) was these calls back to the database, so I jigged abut with it, and added all the values it was reading as parameters. Fine. That made it a lot faster than it was before. Cool.

But not fast enough. It still took bloody ages to work through the table.

So I had an idea. 'Why not', I thought 'create a table from the resultset using an in-memory recordset?' So I did. I rewrote the code, so that it loaded up 2 or 3 recordsets and then (because as far as I know I can't use ADO.NET from VBA) go through iteratively and for each record do the maths and add the result to a table. 'Whoah!' I though. 'Just look at that performance boost. Lightning quick, that!' I manged to get the processing time down to a very nippy 30 mins. Woo Hoo!

30 minutes. That's just silly. I can't wait for 30 minutes for something to happen.

So I skived off work one afternoon (while everybody was at the office christmas party. What a geek!) and redid the whole thing on SQL Server. It rocked. Muli-statement Stored Procedures rule. User Defined Functions also rule.

And not just from a performance point of view, either. One of the big problems was trying to validate my queries. Making sure what was being produced was what I thought was being produced. Not that difficult, just a pain in the behind when you've got to wait 30 minutes to find out every time (and this was 30 minutes if I wasn't trying to use my machine at the same time. Longer otherwise!). Sprocs? No problem - I can go through my sproc and pull out the bit I'm trying to validate. Run that, and see if all is well. Takes seconds. Sweet.

And I've noticed something very fishy about Access' query designer. If you've got a nested subquery you're doing a join on, then it runs fine. Open it up in Design View, that works fine too. Your subquery appears in there as a table, same as usual. HOWEVER open the bugger up in SQL view, and you'll find Access has done something very very strange to it...

Well, it's not strange at all, just irritating because it stops it from working.

I started with this:
SELECT DISTINCT ThisYear.[Constituent ID], ThisYear.YearValue
FROM (SELECT Data.[Constituent ID], sum(Data.[Gift Amount]) as YearValue FROM Data where Data.[gift date] > #09/30/2003#
GROUP BY Data.[Constituent ID]
) AS ThisYear INNER JOIN (Select data.[Constituent ID] from data where data.[gift amount]>=100 AND Data.[Gift Date] > #10/01/1998#
) AS BigGivers ON ThisYear.[Constituent ID] = BigGivers.[Constituent ID]) LEFT JOIN [September 04] ON BigGivers.[Constituent ID] = [September 04].ConsID
WHERE ((([September 04].ConsID) Is Null));

Ugly, but the only way I could figure of doing it in a single SQL statement (rather than a series of separate queries). Open it up in the query designer, though, and this is what you get:
SELECT DISTINCT ThisYear.[Constituent ID], ThisYear.YearValue
FROM ([SELECT Data.[Constituent ID], sum(Data.[Gift Amount]) as YearValue FROM Data where Data.[gift date] > #09/30/2003#
GrOUP BY Data.[Constituent ID]
]. AS ThisYear INNER JOIN [Select data.[Constituent ID] from data where data.[gift amount]>=100 AND Data.[Gift Date] > #10/01/1998#
]. AS BigGivers ON ThisYear.[Constituent ID] = BigGivers.[Constituent ID]) LEFT JOIN [September 04] ON BigGivers.[Constituent ID] = [September 04].ConsID
WHERE ((([September 04].ConsID) Is Null));

Spot the difference. It took me a while to notice it, but the subqueries are losing their brackets. The surrounding '()' is being replace by '[].'. However Access doesn't notice this change until you edit the text. If you just open it in this view, and re-run the query, it works fine.

Edit the text, however, and you have to remember to change the brackets back to how they were initially, otherwise it throws an error.

Grrr. Like I said, it's more of an annoyance than anything else.

So that's what I've been doing lately. Sorry about the very long, very boring post.

I can get back to making my blogger client now...

Just wanted to share.

Sunday, December 19, 2004

A Public Apology


I would like to take this opportunity to apologise unreservedly for any offense caused by my previous artist's rendering of Carl Franklin with Geoff Maciolek's hair.

My brain at the time was running wild. The nice doctor people have since talked to me, and explained the error of my ways. Illustrating their arguments with the use of diagrams and electrodes, they have demonstrated to me that I was wrong to do what I done.

In true ET re-release style, I have re-worked the offending image:


Tuesday, December 14, 2004

Stop it children!!!

I don't know if it's because my parents didn't get divorced until I was 17 or if it's because I never win arguments, but I can spot a pointless argument when I see one.

The pointless argument I see happening at the moment is between Google's Desktop Search and Microsoft's MSN Toolbar suite.

Now while I'm all for technology that helps you organise your life (hell, I could do with a little of that myself), I just don't get the point of this competition. If there was some real commercial stuff (ie cold, hard cash) at stake, then sure, there's every reason for one company to outdo the other. And we, as consumers, would go with whichever product was right for us. Based on a whole load of different factors. Who made it being just one of them.

But the fact of the matter is that nobody's going to lose out on anything. Apart from anything else, both products are in beta, so neither of them are complete. Also, they're both free, so nobody's making money off them as yet.

Picture the scene in a little while. One of the 2 companies decides to release a paid version. Now there's one of 2 things that can happen.

  1. Everyone switches t the product that's still free
  2. Everyone just keeps using the Beta, or eval, or whatever you want to call it, free version, except for a few (and I'm guessing it'll be a very few) businesses who decide to pay for the license
So whoever starts charging for the software first will lose out, I reckon. Once that balance as shifted, if the other one starts charging, only then will there be any kind of level playing field, and by then, everyone will most likely just carry on using whichever they were using before.

So that's what I think. I think that nobody will win. Nobody will make any money off their search utilities, so which is 'better' is a moot point.

2 quick notes, though...
  1. I don't have either installed - to be honest, I don't have enough documents and email to warrant it. It would take me longer to find something with a swanky software widget than it would to just find it by looking for it
  2. I don't want to even think about wither com[any deciding that advertising revenue is the way forward. The thought of my computer being used to advertise stuff at me even more than t already does fills me with untold dread. I get enough of that on the web. I don't need it while I'm trying to work too...

Just wanted to share.

Monday, December 13, 2004

2 things...

I don't usually combine blog post subjects, but just for a change, I am today.

Firstly, Happy Birthday Mrs Mawoo. It was my girlfriend's birthday yesterday, so we both had a nice relaxed day in, she was istening to her new iPod mini (I got her the pink one) and getting that all sorted on my machine. And then we went out and had a rally nice meal. Lovely.

Secondly, I got this damned XML thing sorted. Admittedly it was a bit of a cop-out. The problem was that I couldn't work out how to pull a set of key-value pairs from the XML returned from a Blogger API method call.

Well I sorted it out with an XSLT. The XSL transforms the XML returned from Blogger to a format I can understand. Bit of a cop-out, I know, but such is life. I'll write about it at a bit more length shortly. Need to get the rest of it working before I get too excited...

Just wanted to get these things out of my head.

Friday, December 10, 2004

Been a bit quiet of late...

Well, no I haven't been quiet of late at all. I've been frantically blogging my heart out, but just about useless stuff.

In fact, I've had a look through my blog entries, and it would seem the last .net related post was nearly a fortnight ago!

I haven't stopped coding. In fact, I've just been working over the past couple of weeks on a client for the Blogger API. It's been quite slow going, though. It uses quite a few things that I just haven't really used before. Well. It uses one thing I haven't really taken the time to really look at. How .NET handles XML.

Although I like XML, I haven't really played about with it in itself. Sure, I can read my way through a file and get what's going on. I can even (at a push) knock up a simple XSL file to churn out some templated xml. When it comes to actually using the thing in an app, that's where the mystery begins...

If you take the time to look through the Blogger API, the returns from method calls look really weird! Here's a snippet:


<value>Blogger Biz Dev</value>

Now reading that's pretty straightforward. You've got a Struct element, inside a Value element, which contains a number of members, each of which has a Name element and a Value element.

Easy, huh?

For some reason, though, running that through an XML reader and parsing that down to a set of Name-Value pairs so I can create an object from it seems to be really hard! I dunno. I think it's just a heady combination of me not knowing enough about it, and the whole thing just hitting a blind spot in my head (Anyone else get them?).

The soution I've been trying to make work is by using nested XPathNodeIterator's to read through each member element, and populate a HashTable with the names and values, and create a BlogUserInfo ojbect from that.

Unfortunately I just can't get my head around whereabouts in the loop the values should be read off and the ojbect created. I'd post code, but it's really ugly. Once I get it working, then I can make it look pretty, but until then it's just a mess of temp variables and suchlike.

Oh well. Mrs Mawoo's off out tonight, so I should be able to have a bit of a sit down and spend some real time on the problem. No doubt, when I get it working, I'll let y'all know (I'll be that damned happy!).

Otherwise might just lose my patience over it and spend all night playing with SQL Server Analysis Services. I'm trying to get to grips with that at the moment. Lots of cramming. Lots of reading. Quite good fun, though.

ust wanted to share.

Thursday, December 09, 2004

Shameless Plug

Okay, so this has nothing to do with .NET at all. Not even a tenuous link to anything even .NET related.

It's just a shameless plug for a friend of a friend's website HagsHarlotsHeroines. It's a place for short stories that feature strong female characters.

check it out. And if you know any closet feminist writers, then get them to check it out too!

Just wanted to share.

Shock News!!!

This just in.

The shock revelation that 1/4 of us british men want to get broadband so we can have quicker, better quality and just plain more pr0n.

But I just wanted it for managing my household budget and maybe email now and again (fnar fnar!).

Wednesday, December 08, 2004

Pimp my Presenter

Now and again, some strange things happen in my head. There are some connections made in there that no one on god's green earth should ever make.

So I was listening to this week's Mondays. And this week, Carl Franklin was saying that he's got no style. And Geoff Maciolek (he of the fantastic hair) was saying a whole bunch of stuff about all sorts of things. And I thought.

Carl no style.

Geoff great hair.

Carl no style.

Geoff great hair.

And my addled and enfeebled brain came up with this mental image:

I am truly sorry, but it's been sat in my head all day...

EDIT: If you've come here from Carl's Blog then there's a wholehearted public apology here.

Can you make espresso with normal cooking coffee?

No. Eugh!

Monday, December 06, 2004

Going wit' da Flow

Roy Osherove and Scott Hanselman, to name but two, have recently blogged their list of tools they couldn't live without.

I also have lots of tools I couldn't live without. Here are my top must-have's to bear in mind, particularly coming up to the festive season...

  • Wreak havoc with the right tools!Screwdriver - Want to pop the back off your case because it's started making that horrible whining sound again? Need to take out an IDE drive to give it another tap on the side of the desk? What better tool to use than this functional beauty. Whips components out of a cheap box in literally just a few minutes. The perfect tool to help you while away a long rainy afternoon.

  • Need some time to think?Coffee grinder - Waiting for your friendly supplier to deliver that new drive to replace the one lying in bits next to your desk? Give your hands something to do with a fantastic Coffee Grinder. Works for all varieties of coffee, plus as an added bonus, drowns out the horrible whining sound you just tried to fix, but which seems to have got worse.

  • Quick - Hide it before anyone notices!Long-Nosed Pliers - Dropped something small but expensive-looking into the one area of your 'quality' case that you can't bend out of shape to find? (It's OK. With these modern wafer-thin tinfoil cases, you can pop it right back in!) Well not no more, with a pair of long-nosed pliers. Just a lick of the wrist and you can have the front end of them straight through the side exposing the lost object. Bonus Bonus!!!! Improves ventilation WHILST making your machine more accessible. Who could argue with that?

  • Sorts singed things.Glass of Water - Seen a bit of fire leap from your new case vent onto the carpet? Minimise injury or loss of property with a cup of water. Beautiful.

  • Do you think anyone'll notice?Glazier's Putty and Glass - Need to replace a computer-sized pane in your window? Nothing's more useful than glass and putty. It's almost as if it was made for it!

  • Keeps you nice and toasty!Sleeping bag - Not going to be allowed back in the house for a while? Need to wait for your significant other to change the locks back/cut you a new key? Stave off hypothermia with a nice snuggly sleeping bag. N.B. You might also need a rollmat and bivvy bag, depending on the season - There's nothing like being caught short with a sodden sleeping bag in the rainy season.
So they're my most useful tools. I wouldn't go anywhere without them.

Just wanted to share.

Saturday, December 04, 2004

New Blog to Check Out...

Actually, it's not a new blog at all. I've been reading Raymond Chen's blog for a few months now, and he's always good!

You ever see Kill Bill 2? Imagine Pai Mei, sat in an office, with nothing more pressing on his time than to blog. That's Raymond Chen.

I've never read a post from him that hasn't captivated me. I love his writing style too (that's what reminded me of Pai Mei!). Raymond Chen, I salute you!!

Just wanted to share.

Friday, December 03, 2004

So what's your brand like?

I've just been reading this article about managing your brand in real life.

Now I'm not quite sure what my brand is like. I act fairly consistently, I guess, but what bits of me are the bits that people are actually taking away? When People think 'Benjimawoo' what are they actually remembering?

I get the feeling round the office that I've been branded a bit of a nerd. And sadly I don't work in an office where they value nerds as highly as they should.

Oh well. Such is life. Guess I'm just going to have to start flogging my own brand of... erm... Something. Underwear? I guess. 'My other willy's a monster', that style of thing.

Just wanted to share.

Good things to do before you ask for help

Scott Hanselman's written a quick list of do's and don't's to go through before you ask for help.

It's something that I see quite a lot, not so much in newsgroups (I don't really subscribe to any) but more in the ASP.NET forums (where I've been a bit quiet of late. Mostly because of this).

Debugging's something that's easy to not do. I know there have been times when I've been confounded by something strange happening, pondering it for ages before stepping through my code and finding I'd made some sort of silly mistake (typos usually).

The one step I'd add, which I guess comes after debugging, but before asking for help is googling it. Whatever the problem is, it's very unlikely to be something that nobody's experienced and solved before.

Just wanted to share.

Thursday, December 02, 2004

Another reason why I won't be moving to Spaces just yet...

I just tried to show Mrs Mawoo the joy of blogging. I think MSN Spaces is quite well suited to people like Mrs Mawoo.

I'm afraid I'm with Scoble on its current shortcomings. Mrs Mawoo isn't, though.

She doesn't care about playing with CSS, HTML and all that. She just wants something she can set up in 2 minutes, drag some elements about the page and type away. Job done.

I know it's still only in Beta, and I know when it's unleashed on the world in toto it'll be much slicker than it is right now, but damn, it's slow to load. I tried to show her my blog (I have a blank Spaces blog up there at the moment, in case I ever do fancy moving) and by the time the page loaded she'd lost interest.

Oh well. I'm sure I'll convert her someday!

MSN Messenger beta

I'm sort of ashamed to admit it, but I use Windows Messenger quite a little bit. Some people hate it, and Mrs Mawoo just can't see the point of it when I have not one, but two phones at my disposal.

however, one of the things that really bugs me about Windows Messenger looks lkike it's being sorted out in MSN Messenger beta. Finally I can sign in to Messenger without anyone knowing, and set my status beforehand.

I know it'll take a little while before it propagates down to the embedded windows version of Messenger (no matter how similar they are, I don't really want to install the MSN version). But still, it'll be nice. (Pinched from Mike Gunderloy)

Well Whaddya know?

Schizoid, eh? I'll give them schizoid!

Check it out. How screwed up are you?


-- Personality Disorder Test - Take It! --

Just had the irrational need to share.

I've been thinking about this for a while...

... But Blogger was down yesterday and I'd forgotten about it when it came back up.

For those of you who don't know, I work for a charity in real life, and one of the things charities in general get asked about is how much of their donation income goes to admin costs. I was reading an article in a magazine the other day about supporter services, and this guy called up a charity to ask how migh their admin charges were. The conversation went something like:
Caller: So how much of your donation income goes towards admin?
Charity guy: About 7p in every pound.
Caller: so about 7%, then.
Charity guy: Oh no, I don't think it's that high...

The caller was then put on hold and tranferred to 2 different departments before someone finally confirmed that yes, 7p is, in fact, 7% of a pound.

Just made me chuckle, that's all.

Spoilt for choice...

Hmm. I've just checked out MSN's Spaces, and Oh My are there some nice features on it!

  • Draggy droppy bits

  • Media albums and stuff

  • 'Custom Lists' (whatever they are)

  • Enough options and settings to keep me playing for hours.

  • Integrated site stats

I don't think I'll change, though. I kind of like Blogger's simplicity. I like having a template that I can just change in the HTML. And I like that they're not too fussy about having tools on there from other sites (things like comments and site stats).

And (granted it's like Blogger in that respect. But it's workaround-able) you have to sign in to leave comments on your blog. I really hate that. Okay, I can sort of understand it for somewhere that attracts a lot of comment spam, but my blog isn't one of them.

Having said that, though, it's still only in Beta. Who knows what tricks are still tucked away up various people's sleeves. I might revisit it at some point, but who knows...

Just wanted to share.

Wednesday, December 01, 2004

Helping out Rory

It would seem that les grandes fromages at Microsoft Towers aren't convinced by Joe Stagner's appeal for traffic.

Rory's having to do it as well. Oh well. Clickety Click. I'm a believer, even if MS management aren't.

Would have posted it sooner, but Blogger's been down all day...


Someone nicked my idea!

Well I still think it's cool. Doubt if I'll be getting a WMC PC for a while yet, though...