Dan's Blog

A mixture of tech and books

Warhammer Online

I recently bought the game Warhammer Online – Age or Reckoning, a MMORPG which is based on the popular table top game – Warhammer. Website here: http://www.war-europe.com/

Now I was seriously tempted to buy WoW, but instead went for WAR. I am now wondering if I am going to get into this game or not. It came with 30 days of free subscription – after which it is about £10 per month. I must by now be about half way through my free time (which is a depressing thought).

If anyone else has the game and would like to come help me decide if I should get a subscription or not I am a dwarf called Thepaintedman on the Karak Norn server.

The Sword of Truth by Terry Goodkind

This is a place to comment about Terry Goodkind and the Sword of Truth series. This post is here to replace the much spammed guestbook from http://www.dangarner.co.uk/wizardskeep/

Please feel free to leave a comment.

The Painted Man by Peter V Brett

“Enter a world were darkness belongs to demons”

The Painted Man is Peter V Brett’s first novel and was published in the UK by Harper Voyager in September 2008. The book is due to be released soon in the US where it will be called The Warded Man. The Painted Man is book one of ‘The Demon Trilogy‘.

I bought this book on the offchance while looking for something at the book shop. One of the things immediately noticable about this book is its compelling cover – which draws you in.

The story is set in a world where demons rise from the ground at night and people hide in fear behind buildings protected by ancient magic. There are 3 main characters that are followed closely in the book, these are Arlen, Leesha and Rojer.

Arlen is a young boy that lives on a farm with his parents until his life is shatered by a demon attack and he leaves home seeking a way to fight back against the demons. Leesha is a young girl that had her life mapped out until her betrothed betrayed her with his words and she chose a different path. Rojer is the sole survivor of a village whose wards failed when the demons came.

The main concepts in the book are the demons or “corelings” that rise from the core at night and the “wards” that provide some protection from these demons. The book develops the world well and in particular the ward magic is a “breath of fresh air” from some of the more conventional magic found in other books.

The only small critisism I have of the book is that the map is not particularly engaging and can easily be memorised – this may seem like a good thing, but refering to the map to try and work out where the characters are is all part of a good read.

The Painted Man is a definate page turner – I was hooked to such a degree I finished it in under 2 days – I will certainly be buying the next in the series when it comes out! Hopefully it will not be a long wait.

The author has a website that can be found at http://www.petervbrett.com/

Gong Fu Set

Today I became the proud new owner of a Gong Fu tea set which I have had on order since last week. I bought the set from Jing Tea here.

The set is primarily glass and consists of a pot, a pitcher, 2x double walled glass cups (80ml). I purchased the master set which also includes a bamboo tray.

In addition to this I ordered an extra cup and a Oolong tea explorer found here.

First impressions are good… I have only made one round in it so far but everything works as expected with a nice feel.

I hope to post more about the set and the tea’s I try.

Read Committed Snapshot In SQL Server 2005

Why do it?

Once concurrency on a database reaches a certain level the chances of deadlocks increase. Whenever a deadlock occurs there will be at least one transaction that is a victim.

Deadlocks also have a negative effect on performance.

What about protection of data

Without going into detail (see further reading below) READ_COMMITTED_SNAPSHOT provides the same level of protection against dirty reads as the current SQLServer default (READ_COMMITTED).

The payload of SNAPSHOT is increased resource usage. However compared to the resources lost from creation of LOCKS this doesnt seem to be a big issue.

I have deadlocks and SQLServer 2000, what do I do?

In this situation you are a little snookered!
The only strategy is to determine which queries are being locked/being selected as dead lock victims and reduce the lock protection on them by adding WITH(NOLOCK) to the table selection.
e.g.

SELECT * FROM Articles WITH(NOLOCK)

Example a Deadlock error message

Transaction (Process ID 98) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

How to enable it

To enable READ_COMMITTED_SNAPSHOT you must have the only active connection to the database you want to enable it on.

  1. Log everyone off the database server
  2. Restart the MSSQL service.
  3. Open Developer Studio – you now have the only active connection to the database
  4. Run: “ALTER DATABASE MyDatabase SET ALLOW_SNAPSHOT_ISOLATION ON”
  5. Run: “ALTER DATABASE MyDatabase SET READ_COMMITTED_SNAPSHOT ON”
  6. Complete

Note: If either of the queries in points 4 or 5 take a long time to complete (more than a few seconds) it is likely you do not have the only active connection. Check in the activity monitor for information on active sessions.

Things to be aware of

When enabled ALLOW_SNAPSHOT_ISOLATION keeps an archive of all changed values in the tempdb (it will automatically clear these up after it is finished with them). You should check the location of the tempdb and ensure there is available space on that drive.

Further Reading

http://msdn.microsoft.com/en-us/library/tcbchxcb(VS.80).aspx

Number of working days in the UK

Assuming a 365 day year (no leap years, too rare)

Start with 365

Deduct 104 for weekends

Deduct 20 contract holidays (4 weeks @ 5 days),

Deduct 9 public holidays.

Makes 232

The 9 public holidays are:

2 each at Christmas and New Year (thats 4)

2 bank holidays (thats 6)

May Day

Victoria Day

Good Friday (thats 9).

I only write this here because everytime I have a need to know, I realise I have forgotten and lost the bit of paper it was written on last time.. Here it will remain!

N810 Internet Connection with Sony K850i

I’ve been trying to get my N810 Internet Tablet (which is a very handy device) working with my SE K850i mobile phone. My network provider is Vodafone and I have a decent data account on it, so I thought why not, ill make use of the tablets large screen and excellent MicroB web browser via the bluetooth GPRS on the phone.

One problem, it didnt work! This was a big suprise to me, as I expected it to work “out the box”. Two days, 3 hours fiddling with suggestions and settings I happened on the post below:

http://www.internettablettalk.com/forums/showthread.php?p=48550#post48550

The linked post sorted out all my problems!

Aptana Studio 1.1 JVM Exit Code=1

Ok, so my Aptana crashed. And then wouldn’t load (the JVM exited when loading and I was left with a splash screen).

I tried renaming the jre directory in the Aptana Program Files folder as suggested in the Aptana FAQ, but no joy. So I did a little digging and found this : http://forums.aptana.com/viewtopic.php?p=22803&sid=c2bd9586a773ff9be69c4b6e84d33d12

This lead me to deleting the tigris folder from plugins/ .. Hey presto, aptana now boots again. As a clean up step I disabled the Subelipse plugin altogether once I could get the plugin manager back up.

Ever want to change CSV to vCard…

Well I did, and it ate up a lot of time.. until I found this site: http://homepage.mac.com/phrogz/CSV2vCard_v2.html Enjoy!

WebRequest Proxy Authentication

I have a client application written in C# and I use a Web Reference to a SOAP webservice. Now this works fine on my development machine – and indeed it continued to work fine, up until I tested it from behind a proxy.

Many hours of searching MSDN and Google later I was a little the wiser (not much) about how to deal with proxy’s and authentication with .NET (I’m using v2 of the framework)

The first thing to check is whether .NET will auto detect the fact there is a proxy (from IE) or whether we have to set this manually. This depends on the <defaultProxy> element in the .config file. Check out this page for info: http://msdn2.microsoft.com/en-us/library/sa91de1e(VS.80).aspx Particularly the following note:

“The proxy element defines a proxy server for an application. If this element is missing from the configuration file, then the .NET Framework will use the proxy settings in Internet Explorer.”

So – what we could assume from this is that if the setting is not there – all should work fine and dandy… well this would be true up to a point – and that point is authentication.

Authentication

Does the Proxy server authenticate using the default credentials of the user logged into windows? If so then we either want:

a) useDefaultCredentials=”true” in the default proxy config element, also see: http://geekswithblogs.net/mnf/archive/2006/03/08/71663.aspx

b) or we want to “WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultCredentials;”

Credentials arnt stored in the Default Credentials? This is the situation you are in if have a user/pass box popup when you first navigate to a page in IE.

  NetworkCredential nc = new NetworkCredential("ProxyUser","ProxyPassword", "ProxyDomain");

  WebRequest.DefaultWebProxy.Credentials = nc;

Other interesting reading about a specific problem that you might be having:

http://geekswithblogs.net/mnf/archive/2006/09/13/91012.aspx

http://www.dotnet247.com/247reference/msgs/52/263150.aspx