Tuesday, April 29, 2008

Webinars

My employer, Imaginet Resources, will be starting a series of webinars this spring. Details are just being worked out, but we will be producing one per week on a variety of topics. Currently I am scheduled to host two 'episodes':
  • May 28 2008 - WCF Service Gateways with C# 3.0 and Linq-To-Sql; and
  • June 25 2008 - NHibernate: An Entry-Level Primer
I'll post links to the rest of the topics and further details as they come out over the next couple weeks.

While many of the other presenters are seasoned vets at this sort of thing, this will be my first externally facing presentation. I'll probably post a couple of different thoughts as I prepare, and I will certainly post with my thoughts after each presentation. Hopefully I will learn some things that can be passed on to whichever poor soul Google's the wrong combination of terms and finds themselves at this blog.

Saturday, April 19, 2008

Am I Becoming An Experienced Traveler?

I've now traveled twice since the last time I wrote about my usual misadventures. Once to Vancouver, and now again to New York. And both times, nothing really of note occurred.

For most people this is probably normal, but I am far from a normal traveler and so we should be expecting lots of good material whenever I get sent away from home. Sure I brought the wrong suit to Vancouver and through a quirk in how I unpacked my bag spent about 45 panicked seconds at 6:00am the first morning thinking I had brought no pants. Sure, I pack 2-3 times more stuff than anyone I travel with, including most recently 4 pairs of shoes for 3 days in New York. And sure, I'm still totally awkward in pretty much any situation that involves speaking with hotel staff.

But this stuff isn't really up to snuff; I seem to be getting too good at traveling. We can only hope that maybe next time I'll lose my passport and have to spend a few nights at the Canadian consulate or something.

Friday, April 18, 2008

Should I Become A Rangers Fan?

I was in New York this week for work, and was lucky enough to catch game 4 of the Rangers/Devils series at Madison Square Garden. This was the first NHL playoff game I've seen in person since the Jets left way back in '96, and it was everything I hoped it would be.

The Garden itself is pretty amazing, and the fans and energy of New York just add that much more. There are several cool little traditions that I had no idea existed before I went, which were a joy to discover. I won't detail them all (you can read about them here), but my favorite is the song they all sing after each Rangers goal, followed closely by the "Potvin Sucks!" chant that at the time seemed random. I just love that people are still pooping on a guy that has been retired for 20 years for an incident that happened 30 years ago. Great stuff.

Now, was it as glorious as the playoff games I watched the Jets play back at the Winnipeg Arena in the 90's? No, but it couldn't possibly be. First off, I was in my teens back then, and things like using up a deodorant stick seemed like monumental events. Second off, the white-outs were ridiculously awesome, and ridiculously loud. If you showed up at school the next day with anything resembling your normal voice it meant you weren't really at the game.

But mostly the games back then were better because I cared so much more about who won the game. I read every Jets article in the newspaper every day. I spent more time studying box scores and leader boards than I did doing homework. I watched almost every game that came on TV (the Jets didn't get on TV all that often), and listened to many more on the radio in my room as I pretended to sleep (called marvelously by Curt Keilback).

But once the Jets left, my interest in the NHL declined. I'm still a fan, but now I mostly scan the headlines in the Sports section. I don't even glance at box scores or leaderboards, and honestly don't really know who is in what place in their division until the last week or so of the season. I don't even follow the scoring leaders anymore, despite my annual hockey pool.

Now don't get me wrong: I still love NHL hockey. I watch a few games on TV throughout the year, and I probably watch about 50 games over the course of the playoffs. But with no rooting interest, the results and stats have lost a lot of meaning. After the Jets left I hated the Coyotes. I resented them for leaving, and wanted nothing more than for them to fail badly. Thankfully they did just that, sparing me the fate so many Nordiques fans have tortuously endured.

If I wanted to really feel involved, I needed a team of my own. I had a brief fling with Buffalo during their couple strong years at the end of the decade, but that didn't stick. I tried to like the Canadiens during my 6 month stint in Montreal, but that died out soon after I left. Burned twice by brief flings, I swore off false allegiances and have since simply rooted for teams that played a fun style or had players I liked.

Unfortunately the ramification of this hockey chastity is that I never really get swept up in the games or series' anymore. Sometimes I will really want a specific team to lose (like Devils because I will hate them forever for inventing the trap), but mostly I just watched passively and marveled at individual plays or displays of skill. The only games that remind me of the old days are international games involving Team Canada, but those are few and far between.

So with all of this said, after enjoying a great time at MSG and being quite impressed by the fans and their traditions, is it time to give another team a chance? Should I adopt the Rangers as my new favorite NHL team?

Friday, April 4, 2008

I've Only Been Into It For A Couple Hours Though, But I'm REALLY Into It

I decided that it might be fun to list the stuff I'm currently "into". Theoretically this type of list might inform or inspire a reader to check something out, but the reality is I'm the only one who will read this so it's more just for historical purposes. I think it might be fun to find this blog 5 years from now and remember all the stuff I thought was great back in '08.

As an aside, I really wish I'd made a list like this every year of my life. It would be hilarious to see what 12-year old Dave was all about. I can make an educated guess (G.I. Joe, Transformers, spandex bike shorts, and my brother's-friend's-sister) but I'm sure I'm forgetting lots of stuff and my time line for others might be way off (perhaps 12-year old Dave thinks G.I. Joe is lame now! That was 11-year old Dave, and he was a loser).

Anyways, onto the list. I'll break this into two categories: tech stuff, and other stuff.

Tech Stuff
  • LINQ - In the spirit of Brick Tamland, I love LINQ! I'm not sold on LINQ-to-SQL, but LINQ-to-Entities is the best thing since sliced bread.
  • Lambda - I'm finding some nice places to use Lambda expressions, and it's happening more often. I can even write them without referring to old ones for guidance now!
  • NHibernate - This is really recent, as in this week, but I've finally gotten around to looking into NHibernate and I really think it's cool. Nothing like being 3-4 years late to the party, but whatever.
  • Gateways - I stole a cool Service and DAL architecture from some DinnerNow samples and have used it in a couple of projects now. It uses 'the Gateway pattern' (if such a thing actually exists) and just seems clean to me. Again I'm probably late to this party (and likely butchering terms - terms are not my strong suit), but whatever.
  • Macs - I'm dying to own a Mac. Yes, I am a marketers dream. Yes I'm jealous of Steve and Juan, those handsome, Mac-toting, metro-sexual bastards.

Other Stuff
  • Call of Duty 4 - This is a surprise to me and everyone I know. I hate on games like CoD all the time. I'm not a big FPS fan in general. And to top it off, previous versions of CoD made me sick when I watched or played them. But I've fallen for this one, aided by the fact that 7 of my friends also own it. Private matches are the bees knees.
  • Super Mario Galaxy - No one should be surprised by this. SMG is right in my video game wheelhouse, and it hits a home run. Fun times.
  • Motion-sensing light switches - The bathroom at the office I'm currently in has one, and inspired me to install them all over my house. I will be posting about my experiences soon, I just need to find about 3 hours to type it all out.
  • D&D - My friends and I have been getting back into D&D after a long hiatus. Yes, 30-year old men playing D&D in my basement; we are the uber-nerds. I don't care though, it's been a blast, and soon version 4 will be out and I'll get to soak in a bunch of new rules etc (my personal favorite part of RPG's is reading the books and making characters. Actually playing is merely icing on the cake).
  • Running - My wife and I just started a 10-week class at the Running Room called Learn to Run. I don't think I'm going to become 'a runner' or anything, but the class looks to be enjoyable and will hopefully prepare us to run in the relay portion of the Manitoba Marathon this summer (the other time I ran it my 'training' consisted of using my elliptical machine twice in the week leading up to the race... I did ok, but the idea of pacing was foreign to me and that last mile was pathetic and excruciating).
  • Hockey - My spongee and ice hockey seasons have just ended, but I felt this needed to be listed. Despite my ineptitude, I love playing all forms of hockey. I wish I could get into a summer league of ice hockey. Oh well, maybe some year.

I think that's it for now. I can't wait to review this thing in 2013 and discover what a dork I was!

Monday, February 11, 2008

Guess Who Traveled Again?

My wife and I just got back from a week long vacation in California. We had a great time, spent two awesome days skiing on Bear Mountain, and another fun one at Disneyland, visited with my snow-bird parents, saw some sights, etc. But I was vexed, very vexed, with one particular task I attempted. It was a task that at first looked easy, perhaps even mundane, but as usual the devil is in the details. What was this seemingly easy, yet incredibly difficult (and ultimately failed) undertaking?

Filling my dad's car with gas.

Don't laugh (ok, laugh), but that simple, every day activity had me absolutely steaming. Why was it so hard? Because America is stupid, that's why! Well maybe not, but somehow my anger took me there, as you will see. Here's what went down:

My wife and I took my Dad's Dodge to Disneyland. On the way home, I thought it would be awful nice (or at least mildly courteous) of me to leave him with a full tank of gas. So a few miles away from home I pulled into a friendly-looking Chevron station. I approached the pump, which indicated I needed to insert my debit card before I could fill.

"Fair enough", says I, so I swipe it through. Then it asks for my 5 digit zip code. Umm, I'm like, not from here... I don't have a zip. So I use a California one, which it tells me is invalid. Apparently the pump is 'smart' enough to check the zip against the address of my credit card (at least, that's what I assume it did). A little annoyed, but still pretty positive about the chances of getting this car filled up, I head inside to speak with staff.

Now here's where it gets fun. I present you with the transcript of my chat with the semi-English speaking Chevron employee (SESCE):

SESCE: How much?
Me: Fill please. (I hand my credit card)
SESCE: How much?
Me: I'd like a full tank of gas.
SESCE: I need number.
Me: I don't know how much it will take, I just want to fill it up.
SESCE: You tell me number, that's how much you get.
Me: But what if I tell you $50 and it only takes $42?
SESCE: You tell me number, that's what you pay.
Me: But I want to fill up the car, and I don't know the exact dollar amount it will take!
SESCE: I need number.
Me: Fine $40!!

So he runs my card through and actually charges it for $40 before I've even received any gas! Outside at the pump I'm fuming.

Me: How can I tell him a number if I don't know how much I need! I just want a fill!
My wife: Calm down.
Me: No! This is stupid! Why is this so difficult?!?
Wife: Do you think it will stop automatically at $40 or do we need to slow down?
Me: Keep holding it to the max, if it goes over $40 we're taking everything we can get!
Wife: What?!
Me: It shouldn't be "pay me $40 and hope you get some gas" it should be "give me some gas and hope I pay you for it"!
Wife: Sssh! These pumps have microphones, he can hear you!
Me: Good! He should hear this! This is dumb! I've just about had enough of this stupid country!!

Once I'd slandered an entire country for the actions of one gas station, it went downhill from there (I think I muttered random swears until the pumped stopped automatically at $40, which of course hadn't totally filled the car).

Can someone please explain to me why it was essentially impossible for me to fill my Dad's car with gas? Why do I need a zip code to pay at the pump? What kind of insane system makes you pay for something you possibly aren't going to get? If the car had only taken $32 in gas, could I have received a refund? Was there some kind of communication breakdown between me and the semi-English speaking Chevron employee? WTF??

I demand answers, and until such time as this makes sense, I am declaring that America is stupid.

Thursday, January 31, 2008

JP Boodhoo, You Magnificent Bastard!

For a little while now, my co-workers and I have been watching videos from dnrTV over lunch once a week. Recently we have been watching JP Boodhoo's series on demystifying design patterns, which has been nothing short of excellent. But one of the neatest things I learned while watching was something he and the host mostly glossed over: A strongly typed Constants class.

In the past when I've done a Constants class, it has looked something like this:

22 public class MyConstants

23 {

24 public const string MyFirstValue = "VALUE1";

25 public const string MySecondValue = "VALUE2";

26 }


Then to use them it goes sort of like this:

17 public class MyClass

18 {

19 public string MyValue { get; set; }

20 }


8 class Program

9 {

10 static void Main(string[] args)

11 {

12 MyClass myObj = new MyClass { MyValue = MyConstants.MyFirstValue };

13 Console.Write(myObj.MyValue);

14 }

15 }


Which would print out "VALUE1".

This works out fine, but has an inherent flaw: you are still just passing around a string, and there is nothing stopping someone from forgetting there is a class of constants and simply assigning their own random string value. This is where JP comes in. In this episode, somewhere near the end, he whips up a quick strongly-typed Constants class, and it works really, really well. Here's what my example above would look like if I had a quarter of Mr. Boodhoo's intelligence:

22 public class MyConstants

23 {

24 public static readonly MyConstants MyFirstValue = new MyConstants();

25 public static readonly MyConstants MySecondValue = new MyConstants();

26

27 private MyConstants() { }

28 }


Now when you use it, it can be typed:

17 public class MyClass

18 {

19 public MyConstants MyValue { get; set; }

20 }


8 class Program

9 {

10 static void Main(string[] args)

11 {

12 MyClass myObj = new MyClass { MyValue = MyConstants.MyFirstValue };

13 Console.Write(myObj.MyValue);

14 }

15 }


Which would print out... ConsoleApplication1.MyConstants? Oh crap, we're only part way there. But JP didn't leave us much to do, we just need to find a way to get a string value out of that object. Here's what our class could look like now:

22 public class MyConstants

23 {

24 public static readonly MyConstants MyFirstValue =

25 new MyConstants("VALUE1");

26 public static readonly MyConstants MySecondValue =

27 new MyConstants("VALUE2");

28 private readonly string value;

29

30 private MyConstants(string value)

31 {

32 this.value = value;

33 }

34

35 public override string ToString()

36 {

37 return value;

38 }

39 }


Now let's use it again:

17 public class MyClass

18 {

19 public MyConstants MyValue { get; set; }

20 }


8 class Program

9 {

10 static void Main(string[] args)

11 {

12 MyClass myObj = new MyClass { MyValue = MyConstants.MyFirstValue };

13 Console.Write(myObj.MyValue.ToString());

14 }

15 }


Pretty sweet eh?

The Latest Christmas Post Evar

When last I wrote, I promised a picture of this year's Christmas tree, in all it's glory. Six weeks later, I've gotten around to it. Here it is, check out the girth of this thing:



I'm gonna miss that tree, what a monster. Compare it to last year's tree from my previous post they both have the same tree skirt!

Coming soon: A useful post!