Thursday 27 September 2007

Lego Star Wars

OK, so this is a bit late but it's still pretty cool.
If you're into your lego and you're into star wars you might wanna consider ordering yourself a Millenium Falcon

It's a bit pricey at $500 but it should look amazing once it's assembled.

Something to do while you wait for Lego Starwars: The Complete Saga to be released! Then you've just gotta decide on your console of choice, with the Wii having motion controled lightsabers it could be a difficult choice!

Tuesday 25 September 2007

Exploding Power Supplies Continued...

A few weeks ago i posted about my exploding power supply issues. Well, I received a shiny new power supply back and i also got a refund for my postage which was very good of them.

So i got home and plugged my new power supply in and.... nothing! I feared initially that the power supply frying itself may have taken a component or two with it but hoped it would be ok, it wasn't.

Now i've got a new RMA number for the entire PC and the company i bought it from and they have arranged to collect the PC from work which will save me on the postage for the whole PC. I guess it's gonna be another couple of weeks before i can get back to the WAR beta and XNA development projects.

Friday 21 September 2007

NumberFormat issue answered

I posted my issue on MSDN to see if anyone knew what i was doing wrong or if there was a workaround but one of the answers i got made some sense as far as explaining the omission of a "pence" symbol on the NumberFormat object.

Posted by IsshouFuuraibou...
I think because "pence" or cent symbol is an exception to the rule and not the standard. In many cases monetary systems don't have "pence" currency. For example the smallest denomination for the Japanese Yen is 1 Yen. This is true in many other currencies. You'll also see that in all cases where you have a "pence" symbol, you can also format it as "$"0.00. From what I've seen the culture info doesn't store the pence symbol.


The full thread is here.

While that is a fairly reasonable explanation it still seems to be a fairly large omission. Although the "pence" symbol is the exception to the rule it is applicable to a large portion of the world, all of Europe Australia, the US. Sounds like a flaw to me, surely you include it where applicable and omit it in the other cases?

Thursday 20 September 2007

NumberFormat object flaw?

I've been working on some price tables on our website today and we want to make sure everything is formatted correctly based upon the users culture. Obviously you would assume that the the CultureInfo.NumberFormat would be the way to go and, for the most part, it is. If you want to format your numbers to have seperators in to break them up or format a currency string with a currency symbol then you're laughing,

decimal.ToString("N0", cultureInfo) will give you your number with the correct seperators in the correct places i.e. 10000 becomes 10,000 in en-GB culture.
decimal.ToString("C2", cultureInfo) will give you your currency string, i.e. 100.59 becomes £100.59

All is well, or is it? What do you do if you want the "pence" symbol for a culture i.e p or ¢? There is no property on the NumberFormat object to do this for you, at least not that i could find.

Anyone know what i'm missing here or have a decent workaround? I've got by for now with string manipulation but that involves hard coding the p or ¢ into the code. If we decide to introduce a new currency with a different symbol then it will require a code change.

Monday 3 September 2007

System Convert Class

As they say, every day is a school day. I was getting an "Invalid Format Exception" when trying to read a VAT rate from a config file and convert it to a decimal using Convert.ToDecimal(). It turns out that the Convert class by default uses
CurrentCulture.NumberFormat.CurrencyDecimalSeparator


I was testing a website and i had my CurrentCulture set to French which meant the value of 0.175 for the VAT rate was no longer valid as in France the currencyDecimalSeperator is ',' not '.'

Because our config entries will all be in English i created a NumberFormatInfo object which could then be passed into the Convert method call and it all works fine.

MMO Beta testing

A couple of weeks ago i was lucky enough to recieve an email from mythic entertainment inviting me to partake in the WAR (Warhammer Age of Reckoning) beta. Now, unfortunately, i can't tell you any more than that because of the NDA (None Disclosure Agreement).

MMO (Massively Multiplayer Online) Betas are a bit of a mixed bag in my experience. The purpose of a Beta in an MMO game is to play as much of the game as possible reporting everything you find wrong with the game from text that is miss aligned to game breaking holes in the world and hardware crashes.

However, a lot of people just see them as a chance to play the game for free. They run round, complain when things don't work and never submit a bug report for the entire duration of the beta. Partly this is due to a lack of tools to do this. In past betas i have played you would need to hit print screen to take a screen shot, log out of the game completely and then write a complete bug report which then needs to be emailed or posted on a forum. For people to report everything they see, while it's fresh in their minds you need in game tools to do this. That way even the people who just want to play for free can just open the tool, write a few sentences and carry on with their game while contributing to the process that they agreed to when siging up for the beta.

I've played a few betas in the past at various stages from open beta which is generally a stress test for the final build, through to early closed beta where some of the content hasn't even been finalised and released. And then there have been games like Neocron which were released in a worse state than some of the early betas i've been involved in, anyone play that game? It had loads of potential but should have undergone better testing before release!!

Anyone reading this have any thoughts on betas they have been in, which were good ones which were bad ones? What made them that way? Obviously you can't talk about current betas because of the NDA's that companies use so keep the comments to past games! Hopefully my PC will be fixed soon and i can get back to the WAR!

Exploding Power Supplies & RMA's

Well, it was an eventful week last week, i turned on my PC at home and nothing happened. So i checked the usual stuff, is the rocker switch at the back set to "ON", does the plug socket work... Everything seemed fine so i guessed the fuse had blown in the plug. I didn't have a spare fuse but i had a spare "Kettle Lead" which i plugged into the pc and then into the mains.

The resulting BANG and sparks, mere inches from my head, was a bit of a shock, followed closely by a burnt smell. I've only had the PC for about 6 months so i raised a support call with the supplier and they were suprisingly quick at coming back with an RMA form for me to return the power supply. The real kicker is that it will take 2 - 3 weeks for them to get a power supply back to me, that's assuming they have 1 in stock! Surely it doesn't take that long to figure out that the lump of molten plastic inside the power supply means it's broken.

I must admit though, every time i've contacted the support department they've been very quick in generating a response and it's been a pretty good response in most cases so i guess i'll just have to be patient.