Saturday, August 26, 2006

This stop motion movie called Game Over has to be one of the coolest stop motion movies I have seen. It uses house hold items to recreate old school video games.

Chech out the other movies while you're there. They are pretty cool.

Fun
Saturday, August 26, 2006 7:31:27 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

I was pretty impressed with my girl today. I came home from work and sitting there waiting for me to  install it on her computer was an extra gig of ram. :)

The reason for the upgrade, so she could play WoW. Does this make her geekier than me?

[ Currently Playing : Blackstar - Radiohead - The Bends ]

Saturday, August 26, 2006 1:24:10 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
Friday, August 25, 2006

A lot of people want to use mock objects in their code, but have a hard time because of the steep  learning curve it takes to learn how to use mock objects.

Today at work, I accidentally stumbled upon an easy way to learn the syntax of Rhino Mocks. Keep in mind that this is not the proper way to do test driven development, this method should only be used to understand the Rhino Mocks way of doing things.

Say we have a presenter class which needs to call another layer in order to do it's work like so:

Public Sub Save() _task.UpdateSettings() End Sub

 This is a pretty contrived example but it helps get my point across. In order to see what Rhino Mocks is expecting to happen you can set up an empty test like this:

Dim _mockery As MockRepository = new MockRepository _task = CType(_mockery.CreateMock(GetType(ISettingsTask)), ISettingsTask) _mockery.ReplayAll() _presenter.Save()

Now when you run the tests, Rhino will tell you that it expected the task layer to get called when the save method in the presenter was invoked. You can satisfy Rhino with the following code:

Dim _mockery As MockRepository = new MockRepository _task = CType(_mockery.CreateMock(GetType(ISettingsTask)), ISettingsTask) _task.UpdateSettings() LastCall.IgnoreArguments() _mockery.ReplayAll() _presenter.Save() _mockery.VerifyAll()

Once you get the hang of Rhino's syntax and how it works you can change your mindset and do the code here in reverse with red, green refactor and you will reach mocking zen. If you have any questions please leave a comment or email me and I will try my best to answer it.

 Update: Mike, let me know this morning that I was missing a VerifyAll() after my _presenter.Save(). I take it for granted because I have it in my TearDown but I have added it for clarity.

[ Currently Playing : Oh, Me - Nirvana - MTV Unplugged in New York (03:26) ]

Friday, August 25, 2006 5:20:30 AM (GMT Standard Time, UTC+00:00)  #    Comments [2]  | 
Thursday, August 17, 2006

The latest Hanselminutes Dynamic vs Compiled Languages is a must listen for all software developers. Scott does a great job of breaking it down.

My favorite quote:

"Really awesome tests within an interpreted dynamic environment can actually take the place of the compiler...all that the compiler does is syntax check your intent, but a test is a really great way of expressing your intent."

To me, a test is a great way of expressing your intent in a very specific way that is applicable to your domain. The only compiler that I know of that can help can check that intent is the human pairing beside you.

In fact, the domain just happens to be the problem you are trying to solve in the first place. A client could care less how you convert a string to an integer, what they want to see is their business logic working.

Let me know your thoughts on Dynamic vs Compiled Languages.  I think it is an interesting conversation that requires an open mind.

Thursday, August 17, 2006 2:09:07 AM (GMT Standard Time, UTC+00:00)  #    Comments [4]  | 
Tuesday, August 15, 2006

I have a bunch of free code camp posters for anyone that would like one. If you would like to  put up a code camp poster at work contact me and I will get you one.

Alternatively, you can also download one from here.

Thanks to Justice for creating them

Tuesday, August 15, 2006 12:14:51 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Monday, August 14, 2006

I have been trying out Colibri for the last little while, it is a perfect companion to SlickRun. Both launchers have their strengths and weaknesses and if you combined them into one you would have a kick ass launcher.

Colibri is nice because it can automatically determine what programs you have installed, there is no need to setup tons of magic words like SlickRun. The downside to Colibri is that it can't replace Start->Run like SlickRun can and the default hotkey (Ctrl->Space) is not a good idea if you are a developer that uses Visual Studio.

Monday, August 14, 2006 4:49:40 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Wednesday, August 09, 2006


Registration for Edmonton Code Camp is now open!!!!!! Hurry on over to http://www.edmontoncodecamp.com and sign up because once we are full, well we are full. Seating is limited because of fire regulations or else I would have the library packed to the rafters.

In addition to the great speakers that are going to be presenting at the code camp, there is going to be a lot of great swag that we will be giving away for free at the end of the day. So register now!

Tuesday, August 08, 2006 11:55:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [12]  | 
Saturday, August 05, 2006
Getting started with Ruby is really easy, there is a lot of resources out there to help you learn the language. Once you have Ruby mastered, or at least a weak understanding of Ruby you should try out Rails. Here is how to get started so you can see what all the fuss is about.

First go to http://rubyinstaller.rubyforge.org and download the Ruby one click installer. Next, next next through the installer dialog. Once everything is installed, Ruby should be located at C:\Ruby (unless you changed the path).

To ensure everything installed correctly open a command prompt and type: ruby -v

If the command prompt tells you the version of Ruby you just installed you should be good.


Once you have Ruby installed, there are a number of good free sources to learn Ruby from:

Programming Ruby : The Pragmatic Programmer's Guide Ebook

Why's Poignant Guide to Ruby EBook (possibly the funniest computer book ever written)

Try Ruby! (in your browser) You don't even need to install Ruby to try it.


If you don't have the patience to read a book on Ruby, I recommend downloading WATIR at http://wtr.rubyforge.org/ and hacking the examples to test a webpage. For example, type the following in notepad and save the file as stevensearch.rb

   require 'watir'   # the watir controller

   # set a variable
   test_site = 'http://www.stevenrockarts.com/blog/default.aspx'
 
   # open the IE browser
   ie = Watir::IE.new
  
   ie.goto(test_site)
   ie.text_field(:id, "searchString").set("ruby")
   ie.button(:id, "_ctl168_Button1").click  
  
   if ie.contains_text("Ruby") 
      puts "Test Passed. Found the test string: 'Ruby'. Actual Results match Expected Results."
   else
      puts "Test Failed! Could not find: 'Ruby'"
   end

Now open a command prompt and go to the location where you saved the file. Type the following into the command prompt: ruby stevensearch.rb

The Watir Ruby script will open a new instance of Internet Explorer, come to this page, type ruby into the search textbox, click the search button and then ensure that the word "Ruby" shows up on the page.

If you thought typing into notepad and runnning Ruby through the command prompt was too much work, go to http://sapphiresteel.com and download the latest version of Ruby in Steel for Visual Studio 2005. This will allow you to create Ruby projects and Ruby files right inside Visual Studio.

Now we are on a roll. Lets try out Rails. The fastest and easiest way to get started with Ruby on Rails is to go to http://instantrails.rubyforge.org and download InstantRails. InstantRails contains everything you need to run Rails, prepackaged and configured in a zip file. All you need to do is to extract it to a directory and Rails is ready to go. To try it out go follow along to the screencast by Matt Griffith located here.
Saturday, August 05, 2006 10:09:45 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Friday, July 28, 2006

edmug

Richard gave a great presentation yesterday. As a developer, I learnt a lot about SQL Server. If you are interested the sample code from his session is located here. I highly recommend having Richard out to your user group, he is a great presenter with a very laid back style.

As always, if there is anything you would like to see improved at Edmug or if there is a speaker you would like to see let us know and we will do our best to make it happen.

Friday, July 28, 2006 2:32:15 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: