Tuesday, November 15, 2005

The recently signed Australia-US Free Trade Agreement forces both countries to enact certain laws.

One such is regarding copyright protection technologies. Australia is debating the "modding" of game consoles. Read on:

http://australianit.news.com.au/articles/0,7204,17239019%5e16123%5e%5enbv%5e,00.html
posted on Tuesday, November 15, 2005 9:52:35 AM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [0] Trackback
 Thursday, November 10, 2005

I'm finding the whole copyright thing on the web more and more hilarious everyday.

Read this - http://www.lessig.org/blog/archives/003202.shtml - and enjoy!

posted on Thursday, November 10, 2005 12:40:05 PM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [0] Trackback
 Thursday, June 09, 2005

I've recently been wondering why Microsoft, in their infinite wisdom, has decided to provide helper code in both C# & VB.Net that promotes bad OOP coding.

Have you ever implemented an interface in either language?

Well, Visual Studio - in 2002, 2003 & Whidbey - auto-creates the implementation signatures in both languages and marks them "Public". I'm sure you know that.

Now this is a big problem in both C# & VB.Net. Let's see why in C# first.

If I write this code:

      class Module
      {

            [STAThread]
            static void Main(string[] args)
            {
                  ClassY InstanceY = new ClassY();
                  ((IFoo)InstanceY).DoMethod();
                  ((IBar)InstanceY).DoMethod();
                  InstanceY.DoMethod();
                  Console.ReadLine();
            }
      }
 
      public interface IFoo {void DoMethod();}
      public interface IBar {void DoMethod();}
 
      public class ClassX : IFoo   
      {
            public void DoMethod() {Console.WriteLine("IFoo.DoMethod");}
      }
 
      public class ClassY : ClassX, IBar
      {
            public void DoMethod() {Console.WriteLine("IBar.DoMethod");}
      }

Visual Studio complains with "The keyword new is required on 'ConsoleApplicationCSharp.ClassY.DoMethod()' because it hides inherited member 'ConsoleApplicationCSharp.ClassX.DoMethod()'".

So I insert "new" on "DoMethod()" in "ClassY", like this:

      public class ClassY : ClassX, IBar
      {
            public new void DoMethod() {Console.WriteLine("IBar.DoMethod");}
      }

My output becomes:

IFoo.DoMethod
IBar.DoMethod
IBar.DoMethod

Pretty much what I should expect, but I'm a conscientious programmer so I want to avoid "new" (or "shadows" in VB.Net) so I mark the "ClassY" method as "private" rather than "public", like so:

      public class ClassY : ClassX, IBar
      {
            private new void DoMethod() {Console.WriteLine("IBar.DoMethod");}
      }

The output now becomes:

IFoo.DoMethod
IFoo.DoMethod
IFoo.DoMethod

When I explicitly call the "IBar" interface method it calls the method of the class that doesn't even implement the interface. That's crazy!

So, to avoid the problem I declare the implementation explicitly:

      public class ClassX : IFoo   
      {
            void IFoo.DoMethod() {Console.WriteLine("IFoo.DoMethod");}
      }
 
      public class ClassY : ClassX, IBar
      {
            void IBar.DoMethod() {Console.WriteLine("IBar.DoMethod");}
      }

Now, of course, the code that calls the "DoMethod()" on the native "InstanceY" object can't see either method. But isn't that what we really would want to do? It avoids any ambiguity.

Let's look at a similar thing in VB.Net. My code is now this:

    Module Main
        Sub Main()
            Dim InstanceY As New ClassY
            CType(InstanceY, IBar).DoBar()
            CType(InstanceY, IFoo).DoFoo()
            InstanceY.DoBar()
            InstanceY.DoFoo()
            Console.ReadLine()
        End Sub
    End Module
 
    Public Interface IFoo
        Sub DoFoo()
    End Interface
 
    Public Interface IBar
        Sub DoBar()
    End Interface
 
    Public Class ClassX
        Implements IFoo
        Public Sub DoBar() Implements IFoo.DoFoo
            Console.WriteLine("IFoo.DoFoo")
        End Sub
    End Class
 
    Public Class ClassY
        Inherits ClassX
        Implements IBar
        Public Sub DoFoo() Implements IBar.DoBar
            Console.WriteLine("IBar.DoBar")
        End Sub
    End Class

Notice that since I'm being a nasty programmer I've swapped the Names of the method implementations. Think of it like replacing "Save" with "Delete".

Now of course, what happens? My dear user runs this code and gets the following:

IFoo.DoFoo
IBar.DoBar
IBar.DoBar
IFoo.DoFoo

Again, the answer is to explicitly declare both implementations "Private". It avoids any ambiguity.

But the answer is not to enforce the use of "Private". Apart from the times when "Protected" is needed, there may well be a need for the developer to make an implementation of an interface "Public" or "Friend".

So, my open question, why has Microsoft made "Public" the default for implementation of interfaces?

posted on Thursday, June 09, 2005 7:21:00 PM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [0] Trackback
 Monday, June 06, 2005

I've just recently discovered the cool set of Wikicities (http://www.wikicities.com/wiki/List_of_Wikicities).

Some are junk and useless, but others, like the Star Wars wiki (http://starwars.wikicities.com/wiki/Main_Page) are very cool and comprehensive. They are all very much like the venerable Wikipedia (http://www.wikipedia.com).

Now, let's bring Groove into this picture.

Groove Virtual Office (http://www.groove.net) is about setting up a workspace for collaboration within a group of people. The richness of Groove is, in some ways, far better than the wikis. You get threaded discussions, group calendars, forms, etc. But in other ways the wiki is king. I know that I can find out very excellent information from a wiki just by searching it. Groove is poor at searches.

So, now with Microsoft purchases Groove I think there is an interesting possibility here.

Microsoft has SharePoint - the intranet collaboration tool. Groove can be used to sync SharePoint spaces into a Groove workspace that can be shared with Groove users across the web. There is a clear link between a smart client and a web site.

Why not have the same between a wiki and Groove? Can you imagine a corporate wiki that can be synched into Groove and taken on the road. Each update silently makes its way through the internet to keep all Groove Wiki users up-to-date with all the coporate knowledge, procedures, clients, projects, etc, etc, etc.

Cool huh?

(Microsoft, please open a new Groove space and/or blog to tell us where Groove is going. Please?)

posted on Monday, June 06, 2005 11:03:48 AM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [2] Trackback

I get a very odd thing with this new dasBlog.

I have to click the "Add Entry" tab twice for it to work. Not a double-click, instead the first time I click it I get a message saying that an internal error has occured. The second time I click it all is good.

Me thinks that there is something amiss with the new caching stuff.

posted on Monday, June 06, 2005 10:54:01 AM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [2] Trackback
 Wednesday, May 18, 2005
Here's hoping that I've finally got my old dasBlog site upgraded. The bugger just didn't want to behave nicely. But I think I'm there.
posted on Wednesday, May 18, 2005 9:33:29 AM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [0] Trackback
 Wednesday, March 30, 2005

Groove Space Spam is almost an oxymoron.

Almost.

There are three principles of Groove that I feel make the oxymoron case.

Groove has, as key to its design, spaces that people are *invited* in to. Depending on the level of authorisation required this may be specific person to person invites, or just a "open invitation" file. In other words, there is some degree of control as to whom may enter and hence whom may post messages.

Next, each user has a strong key that provides their identity. It is possible to change identities and to create "false" accounts, but in general I use Groove for a specific purpose with my specific account so it is "inconvenient" for me to use multiple accounts.

Finally, unlike anonymous email or blog spam, Groove has the ability to *uninvite* nasty people from spaces. This is a big stick that can't be applied to other forms of spam.

However, the "almost" part of the oxymoron statement is that Groove does not allow me to block an user from instant messaging me. Once they have my account in their contact list a spammer can really go to town spamming me. I am sure though, that Groove Networks would jump in at some point and disable this type of user.

Anyway, I hope this is considered spam in any way. ;-)

posted on Wednesday, March 30, 2005 10:41:05 AM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [0] Trackback
 Tuesday, March 08, 2005

Google Maps - Not only a Website nor only a Service - It's also Developer Platform.

I'm in the US doing a consulting assignment at the moment. As previously mentioned Adelaide, South Australia is home. So I'm a long way from home and this is only the second time I've been to the States. The last was in 1997.

So image how important Google Maps is for me. I can whack in my hotel's address and then that of my client site and bam! I can find the way there with ease.

But I haven't limited my use of Google's maps to just using the service. I've been reading Blogs about it. I found some interesting links all over the place regarding how it works. Here's a good one: http://jgwebber.blogspot.com/2005/02/mapping-google.html

But “mini-app“ that I thought was very neat is a little tour of Keene (a small town in MA, USA). The final comment made in the screencast about GPS being the tool to “annotate the planet“ is really quite funky.

Bring on the future - oh, and Google Maps for Australia please!

posted on Tuesday, March 08, 2005 4:24:04 AM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [0] Trackback
 Friday, March 04, 2005

I'm currently a long way from home. I'm in the United States of America. Right now I'm on a flight from Dallas-Fort Worth heading to Denver and then on to San Francisco before arriving in Sacramento to do some business there for the next couple of weeks.

Home is Adelaide, South Australia.

The US is an interesting place for me. Being an Aussie it's a lot like home, but with some differences. Let me give some examples.

English is the lingua prima - although we tend to spell words the international way and not the US way. "Colour" instead of "color" (which in some ways is annoying because my spell checker - even though it  is set to "English (Australia)" in Windows many programs just only seem to work in "English (US)". But I can get over it.

The cars (or automobiles) we drive are similar, although we drive on the left-hand side of the road. US cars are larger - much larger - and get filled by the gallon and we fill by the litre (which, of course, must be spelt "liter" in the US as my spell checker just bitched about my normal spelling).

The when the weather forecast in the US says it's 32 degrees it's cold. When it's 32 degrees in Australia it's hot. It seems that in both places we forget the add the "F" and "C".

But one area where things are more than a little different is the growing ubiquity of wireless internet access. Australia has hotspots, but most are not free. My home town has "Citilan" which has free access, but you must be a client of one of around half-a-dozen or so internet service providers to get these invisible bits of data.

In the US it seems that free access is free. I just spent half-an-hour waiting in Dallas-Fort Worth airport where T-Mobile provides free access Wi-fi (although it didn't work - I got an IP address but received no data).

I'm lead to believe that Starbucks, McDonald's and numerous other companies are providing free access just to get people in the door. Even entire cities, like San Francisco, provide Wi-fi clouds for free roaming access.

So here's the question of ethics: when I turn on my laptop and Skype automatically connects should I expect this wireless benefactor to be free or do I need to perform due diligence to determine the difference between a public service and a poorly or unsecured private network?

I ask this question because for the last three days I've been connecting to a wireless network called "linksys" in Lewisville, TX. Who is providing that link?

So where's the line drawn on free access and theft?

If began littering the local neighbourhood (aka neighborhood) with a handful of cash should I cry foul if people take my money? Is it my money or I have I made it public domain? Is there implicit permission given when one doesn't secure their Wi-fi?

Are "they" breaking the terms of their ISP contract by allowing others to share the connection? Does that change anything?

Over time will the ethics change? I mean three years ago Wi-fi hardware defaulted to open and you had to explicitly secure it. Now the default is closed and you must explicitly open it. So does that mean that when there is an open access connection that the owner has explicitly opened it or are they just using old technology?

Ah well, I got to get my email and to make some Skype calls thanks to "linksys" in Lewisville, TX. Thank you, whomever you may be.

posted on Friday, March 04, 2005 3:54:30 PM (Cen. Australia Standard Time, UTC+09:30)  #    Comments [0] Trackback