Thursday, May 29, 2008

Time Machine's and White-Socked Ninja's

With 2 of my friends finally moving to Gmail accounts this week, I decided to click the "oldest" button in my "All Mail" section to see how long I'd been a member. Turns out my 4 year Gmail Anniversary will arrive on June 16th. In that time I've never deleted anything, leaving a little over 6000 e-mails essentially tracking the last 4 years of my life. Looking back at those early email threads is like having my own little time machine back into 2004, which feels like a lifetime ago now. A lot has changed for me since then. I've married, purchased a home, purchased a dog, changed jobs, and exited my 20's.

But my favorite part was seeing the first email I ever sent from the account. It is an email to my long-time friend Jeremy Maxom with an attachment describing the sacred teachings of the White-Socked Ninja Clan, a clan whose actions the two of us have been tracking since high school. This document was listed as highly-classified, but the time has come for the public to be aware. So, with little fanfare but much significance, I present...


Sacred Teachings of the White-Socked Ninja

Within this document are details of a clan, a clan which has existed, surprisingly, for ages, or at least 10 years. Few have knowledge of the White-Socked Ninja, but those who do are wise to respect and honor the fierce irony that members of the clan must face. For a White-Socked Ninja is as his name implies: a ninja, skillfully trained, deadly and swift, cunning and agile, heard of often, yet never seen… from the ankles up.

You see, a White-Socked Ninja, much like your run-of-the-mill, everyday ninja, is above all else a man of stealth. Clothed all in black, a ninja can stalk the night like no other. But a White-Socked Ninja must adhere to the number 1 rule of the clan: White tube-socks must be worn, and visible, at all times. Although quite comfortable and stylish, this requirement has been the undoing of more than 1 White-Socked Ninja. In fact, it has foiled 100% of all missions the clan has attempted.

The exact date of inception for the clan is unknown, and some members have been known to claim it has been around for centuries. However, historians and clan co-founders have narrowed the likely date to sometime in 1993. The clan was borne out of a growing distaste for the normal ninja clans of its time. Tired of the outrageousness of the Teenage Mutant Ninja Turtles, yet bored of the non-distinct look of most other ninja clans (often derided by WSN members as being “effective but boring”), clan founders decided that a subtle yet cool ninja clan was “where it’s at”.

A uniform was quickly decided upon. Not wanting to stray too far from tradition, black was chosen as the predominant color. It was also noted by one co-founder that “black is slimming”. To maximize effectiveness in the field, while maintaining cool-non-vanilla Flava, the trim color could not be above the waist. When one co-founder noted that white tube socks could be easily acquired for low prices at many convenient locations in the metro area, the decision was unanimous and the White-Socked Ninjas were born.


Mantra

“Stealth Is Important, But So Are Style And Affordability.”


Rules & Regulations

  1. White Tube-socks must be worn, and visible, at all times. These replace the standard two-toed ninja booties most trainees are familiar with.
  2. All other Standard Ninja Rules, as dictated by the International Consortium of Ninjadom, apply unless in direct conflict with rule 1.

Methods of Sneakiness

  1. Missions should be attempted during night-time hours if at all possible.
  2. Approach targets from any angle that is not the front.
  3. No chewing gum.
  4. Know your surroundings. Grass and carpet are good. Hardwood floors and bubble-wrap are bad.
  5. When in doubt, do what a cat would do, unless the cat would purr.

The Mission That Almost Succeeded

The lights were low that fateful night,
When white-socked ninjas approached the site.
The clouds hung low and children shivered,
For soon the strike would be delivered.

The quarry lay so still and quiet,
This was the perfect night to try it!
So up the fence the members shimmied
And through the door that one guy jimmied.

The group that night it counted four:
The first guy stayed to guard the door.
The second one was stationed outside,
Because he’d borrowed his grannies’ ride.

If things went poorly, as they often did,
And if the members could not be hid,
Then slam the car into drive he would
And they’d peel out of this neighborhood.

The two that continued had their orders;
Divide the quarry into quarters.
So up the stairs they softly stepped
And down a corridor they quickly crept.

And through a door, and there they were:
Their target in sight, of that we’re sure.
But what came next is somewhat muddy,
Like a story from your drunk friend Buddy.

In most accounts, someone screamed,
The jig was up, or so it seemed.
“Honey, honey, there’s someone here!”
“Where?!? Oh where? Pray tell me dear!”

”I’m not quite certain, it’s oh so dark,
But I saw a flash, a white-ish spark.
It was low to the ground, say ankle high
Please dear believe me, I wouldn’t lie!”

Later that night in a secret place,
Where a secret leader secretly paced,
The group of four softly entered
And faced their leader front and center.

“We failed again sir” said one member
“Our fourth failure since December”
The leader shook his head and sighed
“What happened this time, that no one died?”

“Same as always, like hands on clocks,
Despite our skill they saw our socks”

Wednesday, May 28, 2008

Gateway Webcast: The Files

Things went ok on the webcast today, although I did forget a couple of things that I wanted to show in the demo. I will make a post later tonight highlighting the content that I missed in the webcast for anyone who is interested to read through.

During the webcast I mentioned that I would be putting up links to the various resources used in the webcast, so here they are:
Disclaimer: The code provided is not supported or guaranteed in any way: use at your own risk. In fact, it is not entirely complete (being that the intent is to build it out into a full project) and so you will see at least one failing test because the method it tests is not even implemented.

Related Posts: Oops, I did it again...

Monday, May 26, 2008

Webcast Dry Run

Well today was the dry run for my upcoming webcast. As I've mentioned before, this is a first for me, so it was interesting. Things went ok, but we had some audio issues which I need to resolve by Wednesday. I suspect Vista is the problem, which is nice and ironic.

The other things I learned by way of feedback as well as just things I noticed myself while speaking or listening to the recording afterwards:
  • I should explain that we won't be deep-diving into any specific areas.
  • I forgot to have SQL Server Management Studio open.
  • I didn't have server explorer connection set up (not sure why, I set it up yesterday. Guess VS forgot it, so I'll need to set it up right before the presentation on wednesday).
  • I skipped around and didn't follow my notes properly! I need to make my notes easier to follow (NOT handwritten!).
  • I forgot to explain the Lambda expressions properly.
  • I need to expand the references section a bit.
  • I should use tinyurl for long URL's.
  • I set up bookmarks in Visual Studio, and then proceeded to not use them at all.
  • I intended to use Full Screen view in Visual Studio but forgot. This resulted in lots of sideways scrolling because I had the Solution Explorer pinned. I didn't clue in on this AT ALL during the entire presentation.
The timing was pretty good, 29 minutes start to finish. I would have preferred about 25 minutes because this doesn't give me much wiggle room to stray from my notes, but I suppose this will keep things focused and moving.

Listening to the recording was interesting. I have always hated listening to my own voice, but I didn't sound quite as stupid as I thought I had, so that was positive. Of course, with the audio cutting out constantly perhaps the dumb portions were mercifully absent.

Finally, the one thing I really noticed was how I sort of 'went blank' as I spoke. I was in some kind of zombie trance, and the couple times that I tripped up because I wasn't following my notes properly left me totally dumbfounded for a few seconds. I think the audio issues hid this pretty well actually, but there were a couple times when I stared at my notes for like 5-10 seconds thinking "What the heck? Where was I? What am I doing next? OH NOES!". Hopefully this does not happen on Wednesday!

Monday, May 19, 2008

Well That Ended Quickly

The great Linux experiment of '08 is officially over. I will really miss the virtual workspaces and other nice features, but until there is a reliable Exchange mail client it just won't do the trick for me. Evolution is beyond buggy, and I can't have my email and calendering crashing constantly. Thunderbird/Lightning didn't seem any better. I couldn't get Outlook to work under Wine.

So I'm back to Windows, and I'm giving Vista a third spin. I'm going to try my darndest to keep the OS 'clean' and hopefully have something that performs reasonably well. Of course, on a fresh install with just Firefox running I'm currently using 675MB of RAM... ugh.

I'm still glad I tried, and I think I might try installing Kubuntu under Wubi and seeing how Kontact works, but I don't hold out much hope. Maybe someday I'll be able to switch back, but for now I'm stuck.

Boo.

Wednesday, May 14, 2008

Made The Switch

As of last night I'm officially an Ubuntu user. Things have gone pretty well so far, although Evolution seems to have some kind of leak because towards the end of the day I noticed my system slowing down, and a quick check in the System Monitor showed Evolution using 780MB of RAM and 25% CPU! I watched the RAM usage slowly grow for a few megs, during which time Evolution did not appear to be doing anything. I re-started it and the memory usage dropped back to the normal 20MB or so and my system became snappy again. Definitely another impetus to find an alternative.

Now lets talk about some things I like. Performance is the first thing. Everything just seems faster. Perhaps it isn't fair because I don't have nearly the list of services running and I need to use XP VM's to do a lot of tasks, but for anything I do within Ubuntu itself I really feel like the speed is much faster. Apps load faster, things respond to my actions quicker, and the file system manager (Nautilus I think) seems quicker than Explorer.

The other big plus so far is the window management. I absolutely love the virtual workspaces, and using the keyboard shortcuts to switch between them is starting to feel natural. Moving between them is quick and seamless, and it just gives the feel that I 'have all of my stuff spread out on my desk'. That's the best analogy I can think of.

Finally, tonight I've been playing with the neat desktop effects. I tried the famous Cube but I couldn't get all the effects to work (not sure why) and I find the default Wall behaviour to be more natural and efficient anyways. The zoom feature is great, I should get some use out of that, and the Expose feature might be useful as well (if all those Mac zealots can be believed). Last but not least are the eye candy effects, like wobbly-windows and whatnot, which I assumed would hurt performance but don't seem to really have any effect at all (aside from being neat).

All in all the jury is still out on how functional this can be given my Microsoft-centric career, but I would not hesitate to use Ubuntu on a home PC. Not my Mom's home PC, mind you, because despite all the fervor around how user-friendly Ubuntu is, there is a LOOOONG way to go. I may be crazy, but I'm not THAT crazy.

Webcast Update

Couple of things. First off, Steve did a great job with the first Webcast today, check out that link for all of his materials. For anyone who missed the live presentation, the recording should be available soon, I'll post a link when it's up.

Second off, the official launch of the webcast series has been put up on the Imaginet website, you can check it out here.

Last off, my own presentation is now only 2 weeks away, and that officially has me feeling nervous. Guess I better start prepping a bit eh?

Monday, May 12, 2008

Imaginet Webcasts Revealed

A couple weeks ago I mentioned that Imaginet would be presenting a weekly series of Webcasts (I called 'em Webinars back then), but I didn't know many of the details. Well, the details have been released.

Make sure to check out the first one, presented by Steve Porter, this Wednesday!

Making The Switch Part 2

I didn't have time to do the full move to Ubuntu last night, but I did decide that I would try to work exclusively out of the Wubi installation today. Things went ok, although I did have to jump to Windows in order to view a Live Meeting with audio. This was kind of annoying because MS advertises that you can view Live Meetings via a Web Browser applet, but they neglect to mention that this doesn't include audio. But hey, who needs audio, right?

I guess I'll have to install Live Meeting into one of my VPC's, or make a Live Meeting Appliance or something. I expected to have to do this for actually presenting anyways, so not the end of the world, although it would be nice to be able to accept impromptu invites within the browser.

I also came across a pretty serious bug that I need to look into more; twice today I completely lost the ability to use my shift or caps lock keys. Yep, no capital letters, underscores, question marks, or exclamation marks. How can I _WORK_ without those?!

Anyways, I did a quick search and it appears to be related to VMWare, which kind of sucks considering how reliant I will be on virtual machines for much of my day to day activities. There is supposedly a command you can type into your terminal that will restore your proper keystokes, but whenever I brought up my terminal and started to type it would disappear (something not unique to me based on the comments I was reading relating to this bug). The only solution for me was to log out and log back in. Not good.

Again, I don't want to let this stop me from moving over, but it is a SERIOUS bug that will cause me to give up and go back to windows if I can't find a fix or work around in a reasonable amount of time. Maybe VirtualBox is the answer? I mean, if I'm going 'alternative', why stop at just the OS? Of course if I start dating men you'll know I've taken this too far.

Sunday, May 11, 2008

Making The Switch

I've been curious about Linux for years. I've dipped my toe in the water in the past (installed Ubuntu on my home PC (that I never really use) a year or so ago until I flipped it to a Media Center PC), but I've never gone whole hog. I've never taken a primary machine and removed Windows. I've talked about it, I've pondered it, but I've never taken the leap.

Well, I'm about to leap.

The last week or two I've been evaluating the logistics of moving my work PC to Ubuntu. With the new Wubi installation option, I've been able to flip back and forth without needing to deal with the whole partitioning/dual-boot mess that I hate. I've managed to prove out most of my usage scenarios, and despite some frustrations and a bit of the 'sheen' coming off, I think I'm going to dive in. I'm about 99% certain that I can wipe my drive and throw Ubuntu on and still do everything I need to do, with virtual machines being my main fall back scenario where things just don't work.

I'm currently un-DRMing my purchased iTunes content, after which I should be ready to go. I don't know if I'll do it tonight, but likely sometime this week. I'll post my issues as I uncover them, but going in here are the things I'm a little disappointed about:

  • Evolution: It's the Outlook replacement, and I'm not super impressed. Seems pretty slow, I had some crashes while it downloaded my emails from exchange, and it's not real pretty. I might see if I can get connected via IMAP using Thunderbird, but I'll give Evolution more of a chance.
  • Networking: The NetworkManager app seems a little quirky, and I've had to mess with settings to get first connected wirelessly, and then again when I wanted to VPN to my office network. Even worse though, once VPN'd I can mount a windows share from work, but the file list I see is incomplete. I'm hoping I can figure this issue out, as I don't want to have to use a virtual machine to browse Windows network shares. This one almost sunk my move plans, but I've decided that there _must_ be a fix and that I'm not letting it stop me. If I can't resolve it after a few weeks, this might cause me to go back to XP. We'll see.
  • iTunes: No Linux version, and it doesn't seem like it works using Wine (at least for connecting to the iTunes store and/or actually sync-ing to my iPod). This isn't 'mission critical', so I haven't exhausted my research, so I might find a workable solution. I might try creating a VMWare Virtual Appliance thing specifically for iTunes too, see what that's all about.
  • Installing Apps: The Package Manager thing is pretty wicked, but installing apps that aren't in repositories is pretty painful. Linux needs to get that issue resolved if they ever hope to convert anyone aside from nerds.

Everything else seems pretty positive. I'm looking forward to becoming familiar with the OS as I use it on a daily basis. The speed seems pretty nice, and it's also fun to just be outside of my familiar Windows world, get out of the comfort zone and force myself to grow.

Wish me luck!

Wednesday, May 7, 2008

[Fact] vs [Test]

I got into a great discussion with Jeremy this morning on xUnit's use of the attribute [Fact] instead of a more common term like [Test]. I cringed the moment I saw [Fact]; it just felt wrong. And the more I read about the author's justifications for it, the more I cringe.

In most unit test frameworks, the word Test is used to describe or annotate the methods you write to prove your behaviour. For example, MSTest uses the [TestMethod] attribute, while NUnit and MbUnit simply use [Test]. xUnit has decided to go against convention and use [Fact]. Their reasoning seems to stem from an earlier decision they had made, which was to use [Theory] to annotate what are essentially data-driven tests, or more appropriately tests that are run against a set of inputs (think 'for-each thing in this set, do this test').

Here is what James Newkirk had to say in explaining [Fact]:
...someone in the audience said that if you were going to call "for-all" tests "Theory" then you should call a single test "Fact". Since then I have had a number of conversations with people and Fact seems to fit.

That explanation didn't exactly blow me away, so here is another one, this time from James' partner Brad Wilson:
The primary motivation is that it changes the expectations that what you do with this framework is capital-T Testing (aka, quality assurance). In reality, Test Driven Development is not really about testing at all. It's an example-driven design methodology which uses code to express the intentions of the class that is under design. The fact that it increases quality is a secondary benefit, and should not be considered a replacement for the work done by capital-T Testers. In Brian Marick's four quadrants of exploration through example, TDD-style code really only represents one of those quadrants (the technology-facing programmer support quadrant).

Additionally, as a word, [Fact] has very good symmetry with [Theory]. The two kinds of tests are fundamentally different; a [Fact] is an invariant statement which is always true, and a [Theory] is a statement which is true for all the given input values.

Now here is where my feathers start to ruffle. Brad writes about the xUnit framwork that "it's an example-driven design methodology which uses code to express the intentions of the class that is under design." Say what? Isn't that a fancy description of a unit test framework? Reading that is like going into a restaurant and having the waiter describe the ravioli as "a splendid blend of finely aged cheeses, high-quality bovine, and succulent savoy spinach, hand-sealed between two layers of circular pasta dough before being boiled in freshly salted mineral waters".

The argument that TDD is not really about testing at all does not fly with me. Of course it is about testing. Are there ways of doing TDD that provide more benefits than others? Sure, but they ALL provide the benefit of added quality (unless you are writing completely useless tests I suppose).

The entire usage of "capital-T Testing" irks me. Capital-T Testing is not the only kind of testing in a project, nor should it be. Look at it this way: we have a development environment, a QA environment, and a production environment. They are all still environments. Similarly we have developer testing and quality assurance testing. They are both forms of testing, and I've never heard anyone argue that developer (or unit testing, which is just a more structured and accurate approach than old-school test harnesses) should take the place of quality assurance testing.

Next, Brad almost spells out the exact reason why [Fact] is a poor choice: "a [Fact] is an invariant statement which is always true". Ok, except when that "example-driven code expression" fails during a build, in which case your [Fact] is no longer a fact, it is something else.

Finally, lets just see how this would work in practice:

"Hey Joe, your facts are failing in the current build".

Here is the bottom-line: all of this smells like people changing things just to be different. I can be convinced to get behind [Theory] for the 'for-all' tests, but until I hear some better rationale, the decision to switch to [Fact] seems arbitrary, and, if I may be so bold, wrong.