Wednesday, November 28, 2007

DLL Dependencies

Found this blog entry on geekswithblogs.net linking to Dependency Walker. This is an application that shows you the dependancies that a DLL has.

I couldn't get to the site though, so I downloaded the app from majorgeeks.com.

There's a comment on that blog saying it doesn't work with .Net assemblies though, but you can just use ildasm for that, and look in the manifest.

Monday, November 26, 2007

Blackwater (Jeremy Scahill)

I'm currently reading Blackwater: The Rise of the World's Most Powerful Mercenary Army by Jeremy Scahill. It recounts the history of Blackwater USA (Wiki entry here), the company employing a large proportion of the "security contractors" hired to protect assets in hostile places around the globe, such as in Iraq.

The book begins by documenting the bloody ambush of Blackwater contractors in Fallujah in March 2006, and moves on to tell how the U.S. Government is increasingly using companies such as Blackwater to influence foreign policy where it would be politically unwise to use the U.S. Military. Scahill tells how Blackwater has set up bases in Tbilisi, Georgia and Azerbaijan which are now tantamount to having unofficial U.S. bases in the area, but without the political uproar.

The book certainly makes interesting reading. In fact, what I find most enlightening is not how powerful and influential companies like Blackwater are, but rather the clear political wrangling that goes off behind closed doors, that common folk like me only get a hint about in the press.

Scahill is obviously very passionate about this cause, and he has produced a seemingly well researched piece of writing that forces us to ask questions not just about our role in Iraq, but also asks us to cast an eye over other conflicts and places of political unrest. It is clear from the stories told in this book that our governments aren't giving us a true picture of what is happening in these places. But this is something a cynical, skeptical person such as myself already suspected anyway.

However, the book could hardly be called impartial, and as such it loses much of the credibility it should be earning. Scahill's choice of language is constantly laced with emotive terms that will make it easy for any party opposed to his views to dismiss the entire book as left-wing propaganda.

In choosing to write in this style Scahill has made a rod for his own back. What should be a chilling, hard hitting exposé on the U.S. Government's recent political choices is in danger of being wholly dismissed when the questions it raises deserve to be answered.

If you can look past the occasional emotional phrase, and concentrate on the fully referenced source material, you can see a book which raises as many questions as it answers. Although I doubt answering these questions was ever Scahill's intention, in writing this book he has at least made public what is happening that other media sources aren't giving us a true picture of.

What does that error code mean?

If you've ever come across an error number in managed code it can be infuriatingly difficult to find out the true root cause of your problem: normally there's a helpful wrapper around the numbers, giving (semi) meaningful names to the errors encountered.

But, work with stuff long enough and you'll soon find a huge, dirty-looking (mostly negative) integer staring back at you in your log files or debugger window and you'll wonder "What the **** does that mean?"

If you can't find anything on Google for the exact number you've got, paste the number into calc and convert it to hex. You'll usually get a number preceded by a bunch of Fs, which you can ignore. Do another search for this hex number (minus the Fs), and you'll sometimes get something which will point you in the right direction.

It was on such a search where I stumbled across this helpful document. This text file contains a heap of hex error codes and their meanings. judging by the ntstatus.txt file name they look to date back to Windows NT days, but they're still helpful now in some cases.

I can't say that everything in there is accurate, or that every error code you'll get is listed there.

Creating an Interop Assembly for RTC Client API 1.3

If you want to use the RTC Client API 1.3 in managed code (like C# or VB.Net), you need to create an Interop assembly from the rtccore.idl file that is found in the C:\Program Files\RTC Client API v1.3 SDK\SDK\IDL directory (if you used the default installation path).

There are some steps detailing how to create the assembly here: Creating a Interop Assembly for RTC Client API 1.3. However, I found that they were a little out of date and I had to do some reading around before I understood them.

To create the assembly:

1. Download and install the Microsoft ® Windows Server® 2003 R2 Platform SDK. This SDK works for "the x86, x64 and Itanium-based versions of Windows Server 2003, Windows Server 2003 R2, Windows XP SP2, Windows XP x64 Pro Edition, and Windows 2000".

2. Go to the Visual Studio 2005 Command Prompt from Start Menu -> All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools

3. In the Command Prompt window, change directory to where the rtccore.idl file is (C:\Program Files\RTC Client API v1.3 SDK by default).

4. In the Command Prompt type: midl /I "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include" rtccore.idl. This will create 5 new files in the directory. One of which is rtccore.tlb.

5. In the Command Prompt type: tlbimp rtccore.tlb /out:Interop.RTCCore.dll /namespace:RTCCore /sysarray. This will create an Interop.RTCCore.dll file in the directory, which you can then reference in your .Net applications.

Using Microsoft's Speech API (SAPI) in managed code

Neat little article here for How to use Microsoft's Speech API (SAPI) in a managed application.

Doesn't go into much detail on how to use it afterwards, but there's enough there to show how simple it is.

Tuesday, November 20, 2007

First mobile blog post!

I'm just testing right now, I'm not mobile myself but this post is being written on my mobile phone. It's a new free service we're offering, so if you want to use your mobile to add blog entries give it a go!

Mobile post from the Esendex BlogIt service

Esendex BlogIt

I've just signed up for this great new service from Esendex where I can blog all day long from my mobile phone for free!

Mobile post from the Esendex BlogIt service

Wednesday, November 14, 2007

YO! Sushi

I've been to the Nottingham YO! Sushi a few times now and I have to say I've never had a better fast dining experience. It's a very short walk from the office and thanks to the conveyer belt of dishes, you can start eating straight away--perfect for a quick bite to eat at lunch.

Only trouble is I always find myself getting carried away and eating too much :)

How fast is your turnaround time?

There's currently a question been posted on AskSlashdot which asks How fast is your turnaround time?:

...Overall, we manage to get a 'bullet-proof' patch in about 4-5 weeks (from coding->QA->Build/Packaging->shipment), which I consider not so bad. But the other day, we got an urgent request from our support team to come up with a decent fix in 48 hours. I think they're a tiny bit unrealistic. So I wanted to get feedback from my peers: are we doing that bad?...


Esendex's core product is an online service, which means our customers don't need to install anything. So realistically I'm not in a position to comment on this particular matter. We don't need to go through a packaging stage, and we can be pretty confident that we won't have installation issues as we own all the server hardware the system runs on.

But looking at the timescales involved here puts a few things into perspective. If one of our releases introduces a critical error (by which I mean that people can't use our service anymore), then the entire business rests on getting that error fixed. In these cases (thankfully they are few and far between) 48 hours is just too long. In fact much too long.

If we're in a position where we have customers not able to send messages then our SLAs make us contractually obliged to fix the problem within 4 hours. I remember being alerted to one such error a few years ago at 2am on a Sunday morning. By 5am that day the system was patched and fully operational again.

A quick turnaround stems from the design methodology you are using. With XP we learn to expect change, so we make sure that we don't code ourselves into a corner. This makes new requirements easy to add, but it has the side effect of making most bugs easier to fix as well.

Of course, there's always going to be the possibility that your design is so flawed that it's impossible to fix a certain bug. In these cases backing out of an update is sometimes the only feasible option.

All non-trivial software contains errors. If there's one truism about software development, that's it. The important differentiating factor is the severity of those errors. A truly business critical severe error needs to be fixed as fast as possible, and if it means late nights then so be it.

As professional developers we're paid to release working software, and if that software doesn't do its job then we haven't done our job.

Tuesday, November 06, 2007

And so I bought an Ipod Touch...

Just happened to pass Curry's at lunch, so I wandered in from the cold and had a look around. Among the Ipods was the new Touch, with the tempting notice of "Back in stock" next to it. I've been wondering about getting one since seeing it reviewed on Something for the Weekend, and as I asked the shop assistant if they did indeed have some in stock (as I no longer believe everything I read) a strange feeling swept over me.

And so I bought an Ipod Touch, and I must say I am very impressed. I haven't put any music on it yet as my music collection is at home, and I am at work, but the internet connectivity is very useful. The Safari browser is cool, and it has the "pinching" zooming that the IPhone has.

And the Esendex website works through it too. I think I must be one of the few people that have sent a text message from an Ipod Touch :).

Monday, November 05, 2007

Zero Punctuation

I got emailed a link the other week to Zero Punctuation's MOH: Airborne review, and this evening I've just watched a load more.

Very, very funny. I can't recommend them enough.

Check here for a list of reviews

Remember, remember

As I write this the sound of gunfire clatters in the street outside. Huge explosions rock the glass in my window. Orange haze stains the night sky as distant fires rage.

A smoky mist lingers in the crisp November air.

No, England hasn't been invaded. Marauding rioters aren't destroying the town. And I haven't taken a day trip to Iraq.

It's just that time of year again where we decide to celebrate the fact that 402 years ago a Catholic tried (and failed) to blow up the Houses of Parliament. So now, to show our solidarity in this traditional religious intolerance, we feel the need to purchase illegal industrial fireworks and set them off in our own back yards.

Now, don't get me wrong, I enjoy Bonfire Night. In fact on Saturday I wended my merry way down to Tesco and took advantage of their "buy 1 get 1 free" offer on fireworks, and later that evening we set them off (and we were only slightly drunk).

But these were "garden fireworks". Actually sold for use in people's gardens. And, if I have to be honest, some of them weren't that good (in fact, some of them were really quite crap). But we all had a good time nevertheless.

These aren't garden fireworks going off outside.

I'll try and describe what I can see from my window now. If you've ever been to an organised fireworks display you'll know that those fireworks are considerably louder, faster and bigger than what you can buy over the counter at your local supermarket. Imagine those types of fireworks being set off from at least one house per street as far as I can see. I can see maybe twenty streets from here.

All around rockets are screaming into the sky, erupting into a shower of sparks. It is really impressive looking actually, and I admit there is a tinge of jealousy that their fireworks are better than the ones I bought on Saturday.

But imagine this. You jab a rocket a little too far into the ground and light it. What happens? It goes nowhere and makes a big bang. Imagine doing that with one of the industrial fireworks I'm looking at right now. The outcome of that would spoil any body's night.

I can't remember a Bonfire Night being this noisy. How come people are spending this much money on their own personal fireworks displays? Is it just petty competitiveness that makes people do it?

I'll be sticking with my legal garden fireworks, thank you.

Thursday, November 01, 2007

Manually Remove a Windows Service

Just a quick note linking to this article explaining how to Manually Remove a Windows Service.

Basically, open the Registry and go to this key: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services

If you expand this key you'll see sub-keys for each installed service. Delete the key for the service you want to remove.