Rookie Mistake

So, knowing that there was a large Windows 7 update in the works, I left work yesterday leaving my machine on so that it would download and install the update. Stupidly I didn't lock the screen, and insanely I left before one of my collegues who is a known prankster. Revenge is a dish served cold Ben....

I love Linq to XML

I have never really been a fan of XML files before, sure for certain tasks they are definitely the structured format of choice, they compress well and they get through firewalls, plus they allow you to navigate “jagged” data, but the pain of having to program to them via a pretty unwieldy DOM was always in my opinion a hefty price and frankly not always worth the cost.

However all that has changed for me with .NET’s Linq to Xml, I swear I am now finding that I LOVE coding to Xml now, incredible!  Hurrah the DOM is gone, the wicked witch of the west truly is dead. The new XML API as embodied by XElement (and related classes) is simply a joy to use, and the associated Linq extension methods for navigation over the document is superb.

Look at this snippet for example…

var xe = (from x in XElement.Load(spotFile).Elements("Table")
         where (string)x.Attribute("Name") == txtTableName.Text
         select x).First();
txtResults.Clear();
txtResults.Text = (string)xe.Element("SQL");

In this particular case the “SQL” element contains a CDATA section, but in reading the file back I can simply type cast the element to a string and the API realizes that I want the inner text and that if the inner text is in a CDATA section to simply extract it…brilliant.

Fine night out

I caught up with Anders and David (from Codegear) at TDUG in Toronto last night, it was great to see them. Ironically since I left Codegear they were aquired by Embarcadero, who just so happen to be competitors to Quest (my current employer). Anders has a photo on his Blog from the night (http://blogs.codegear.com/ao/2008/07/16/38939 ).

Concurrent programming

I was watching a channel 9 video earlier by some members of the C# design team, including Anders Heijsberg and Eric Lippert, and one of the recurring themes was one about programming for concurrent processing. (Video is here http://channel9.msdn.com/posts/Charles/C-40-Meet-the-Design-Team/)
Of course the holy grail is for a developer to be able to cut code as if it were to be processed in a single thread, and then for the framework to run it cuncurrently when its deemed safe to do so. It's pretty clear though that the holy grail is not that close yet, sure we are talking about it and things like PLinq are already in beta but we are not there yet, largely because this is a very difficult problem to solve. One thing that the video did bring home to me though was the fact that I have not really turned that switch on in my head yet, I have of course written threaded apps, but only when its been very necesarry for a specific task, mainly because its hard to write, and its hard to maintain, concurrent programming is not yet a regular tool in my toolbox, I think I need to address that.

In Toronto for a couple weeks

So, arrived in Toronto Friday night late, spent Saturday in a fog of Jet Lag and went to Niagra Falls today, definitely want to come back here sometime with Pip and  the kids.

First impressions of Toronto so far, I really like this city, it has a great feel about it. Seems that some Codegear guys will be in town as well while I am here and there will be a Delphi User group meeting on Wednesday, I'll pop along and say hi.

Goodbye Adobe Reader

Ok that does it, Adobe Reader you have pissed me off for the last time, you are fired, uninstalled and banished from my household.

It is the height of arrogance to think that you are so important that you can steal focus from me when I am in the middle of typing something. It's not even an easy programming trick to pull on Windows XP so your developers had to specifically want to do that, sheesh! Adobe Reader you are a little tool for reading pdf documents, why the hell do you want to update yourself every couple weeks anyway? what the hell ? And then to make me reboot, thats just bad manners, so Adobe Reader, thats it you're gone.

(I guess you get the last laugh, I had to reboot to completely remove you...sigh.)

Using the domain a little more

Recently I was approached by a business who wanted my domain name (jarvis.com.au), they noted that I wasn't really using the domain much myself, and all that was at the address was a static placeholder page. What they didn't realize is that the domain is in fact used quite heavily firstly in email accounts (all my family have a jarvis.com.au email acccount) and also as an internet accessable source control and ftp server. So the question was put to me "how much is it worth to you to give that up". Suffice it to say that our respective views differed quite greatly as to how much it is worth and I will be keeping jarvis.com.au, it also occured to me that while I was trying to figure out what the pain points would be in selling the domain that I have owned for more than 10 years that the biggest pain point is that my email address is my default password recovery mechanism, over the years I have signed up to so many online sites that all require passwords most of which I use maybe once or twice a year or even less frequently I have no hope of remembering them, my email address is my saviour for those sites.

One really useful thing that has come out of this exercise is that I have moved hosting companies, while contemplating selling the domain I did some research into hosting companies, and made the switch to Lunarpages, this plan is great, It's a windows server host, so I can finally start using my own domain(s) for testing .net apps that I write instead of just testing on localhost, I really should have done this a long time ago. It also means that I can host my own blogging software and blog, By the way BlogEngine.NET appears to be pretty damn good (so far...) pretty painless to install and get going.