Posts

Strange goings on in SQL land

Weird things with dates I have a simple sql script that extracts raw data from a quality centre database and extracts it to an excel spreadsheet, part of this is shown below: SELECT bg_bug_id as DefectID, bg_detection_date as RawDetectionDate, convert(varchar(10), bg_detection_date, 103) as FormatDetDate, bg_closing_date as RawClosingDate, convert(varchar(10), bg_closing_date, 103) as FormatCloseDate FROM BUG The issue I'm having is with the formatted dates. Some come through correctly and are left justified with the correct date, the others come through in US format and are right justified. When looking at the excel cell format, the left justified correct dates are showing as General format, and the incorrect right justified dates are Date format. Yes, I could just do the formatting on the RawDate in Excel which guarantees the correct date, and yes I could do some fancy malarky casting to a string and then back to a date but that...

Logic FAIL: Monty Hall Problem – GAH!

Now those of you who know me well will know that I love maths, I can spend hours and hours playing around with equations and figures and formulae, however a friend (http://rocko.co.nr/) told me at the weekend about the Monty Hall Problem and this one got me right in the logic chip. My first reaction to this was ‘that can’t be right, it doesn’t make mathematical sense’. It is a very counter intuitive problem and one that has caused much debate over the years if my googling on the subject is anything to go by. The problem for those of you who don’t know it: "Suppose you're on a game show and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the other doors, opens another door, say No. 3, which has a goat. He then says to you, 'Do you want to pick door No. 2?' Is it to your advantage to take the switch?” Ref: http://math.ucsd.edu/~crypto/Monty/montybg.htm...

SQL Server 2008 Certifications update

SQL Saturday in Auckland went really well on Saturday. Huge thank you to everyone who attended and especially to Dave Dustin for pulling it all together. On Saturday I re-presented the 15 minute certifications talk. As the last time this was presented was November 2008, there were quite a few changes. The ppt slides have been updated to reflect the changes since Nov 2008 and the latest version has been uploaded. Let me know if you have any questions on any of the presentations or white papers.

Shiny Things

One of the hardest things for me as a geek is forcing myself to walk past shiny new games with large pink SPECIAL OFFER PRICE stickers on them. Please supermarkets, don’t put cut price games on the way to checkouts where you can ensnare sun-starved and fragile geeks. Point in question, yesterday I went into the big red shed to buy a printer for the office and only through sheer willpower managed to come out without Wii Fit Plus, C&C 4 and the new God of War game. I’m getting better at walking past these evil stands of money grabbing games, though yesterday I did pick up C&C 4 and start walking towards the checkout before thinking twice. I stopped myself, turned round taking out some teenagers with my umbrella (quite by accident – it was a comic turn the Marx brothers would have been proud of) and put the game back on the shelf. If I’d bought it there would have been that wonderful rush of instant gratification that comes from buying something new and shiny but I know that...

Google Lab

If you're one of those people who uses Google for email, searching for internet stuffs and looking at their house on Google Earth, then it's time to do a bit more wandering around the Google site. Did you know that there are LOADS of other things going on with Google? Have a bit of a browse around their site one evening whilst you're having a surf and you could find all sorts of cool little gadgets. Google have made their code easy and freely available which means there are lots of people are out there creating cool gadgets and applications just for the fun of it, for example, the following: - Kick it old school with a game of snake in Gmail by using a certain ctrl key function. - Move the chat box to the right side of the Gmail inbox - See an email time in the sender's time zone - Enable Mail Goggles to stop you from drunken emailing - Send an SMS using the chat gadget - which I need to test to see if it works in NZ as this could be quite useful dontchaknow All th...

Some much needed sleep

I’ve been feeling pretty tired recently, well, for about 10 years . V arious trips to the doctor have resulted in all manner of weird diagnosis’ for this, including when I was 30 the wonderful medical opinion of “it’s just because you’re older now, it’s normal, of course you won’t feel as energetic as you did in your 20’s” erm…. I’m not an expert or anything but I’m pretty sure that’s not right. Over the past 10 years I’ve been to a few different doctors to complain about tiredness, and I’m not talking feeling a little bit snoozy, I’m talking the fighting to keep your eyes open sleepiness. During this time my weight has been slowly climbing and this has been making the sleep issue worse and the lack of sleep in turn makes my weight worse – it’s a vicious cycle that needs to be broken. Eventually I got fed up with doctors and being the geek that I am (though a somewhat tardy geek in this situation) took matters into my own hands. Google is your friend. After a bit of Googling I fou...

Tomorrow is the first day of the rest of my life

This isn't a geeky post I'm afraid, apart from a brief bit of science content courtesy of Wikipedia. I try to avoid blogging on personal items however, this is a pretty major change that will be taking place in my life and I'm fairly sure that people are going to notice. On the 15th March I'm having a gastric sleeve operation. This removes the portion of the stomach that releases ghrelin, the hormone that makes you feel hungry; More info here: http://en.wikipedia.org/wiki/ Ghrelin . I do feel that this needs some justification. My family and close friends are very supportive, however, a few people seem to think this is cheating to lose weight. It isn't. I've spent 2 years thinking about this and sold my house to pay for it. I am terrified and I really need everyone to be supportive as it's going to be very hard for the next 4+ months. For those of you who think I'm cheating, here's some background. In most people the hormone ghrelin is only at h...