Nick Parker
My ramblings on .NET...

Meebo

Wednesday, 21 December 2005 23:41 by nickp
Meebo is a web-based instant messenger application with similar functionality to Trillian. It appears to be another great implementation of AJAX. Do you find yourself integrating more AJAX type support into your online applications? As a whole are we becoming more concerned with the overall usability factor for our end user? Is the concern for usability becoming more important as it becomes easier to provide solutions to the masses or are the demands of our end users becoming more stringent? I'm interested in your thoughts?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Software
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Fun with Ruby

Friday, 16 December 2005 16:32 by nickp

Some of you may know that I like to play around with other programming languages, one of those being Ruby. I came across a t-shirt the other day and thought it was pretty funny. I modified it just a tad so you can run it from the console. Here it is:


class Programmer
def initialize(language)
@language
= language
end
def happy?
@language
=~ /ruby/ ? true : false
end
def make_happy!
puts @language
= 'Ruby'
end
end
you
= Programmer.new(gets)
unless you.happy?
you.make_happy!
end

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Ruby
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Casting in C#

Friday, 16 December 2005 15:23 by nickp

Garrett Smith of ThoughtWorks discusses his thoughts on the two different ways of performing casting in C#. Garrett states that he prefers the C-style mechanism of casting as it "crashes early". Here's the distinction, when a cast is performed in C# using the C-style casting syntax such as the following:


SomeObject s = (SomeObject)hashTable[i];

An InvalidCastException will be thrown if the cast fails. So, with defensive programming techniques, we are encouraged to wrap our code in a try/catch block. Garrett then mentions that using the "as" operator to perform casting is problematic due to the fact that no exception is thrown. While this is true, when looking at the documentation for the "as" operator, it is noted that when the type conversion fails, null is returned. So in our particular case, we would want to write it as follows:

SomeObject s = hashTable[i] as SomeObject;
if
(s != null)
{
// continue on...
}
else
{
// decide what to do here.
}

Given this option, we now have the opportunity to control whether or not to create and throw an expensive exception or possibly dispatch control back to our application another way without continuing on with a null object reference. We could even further augment our check by using the “is” keyword to check to see if a type conversion will work before making the attempt to cast.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Rat Race

Thursday, 15 December 2005 00:20 by nickp
Google just release an API to allow you to create modules that can be plugged into your personalized Google page. These modules can then be published to their module directory for others to use. Live.com at this time does support a feature this rich, however I'm sure it's just a matter of time. Is this just another sign of web 2.0 knocking on our doorsteps?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Software
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Test Driven Development on Google Groups

Saturday, 3 December 2005 01:05 by nickp
I have recently created a Google group for test driven development. If you want to discuss test driven development, regardless of the technology, feel free to stop by and join in!

http://groups.google.com/group/test-driven-development

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Design Patterns | TDD
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed