... all I'm offering is the truth. Nothing more. RSS 2.0
# Tuesday, June 24, 2008

I was reading some source code recently and saw the word 'updation' used in a sentence (as in 'Failure in Updation of this product'). I paused for a moment ... that *almost* sounded ok, but clearly this is a an egregious error!

While Dictionary.com suggests that the word is somewhat valid, my preferred sites of Merriam-Webster and Oxford dictionary do not seem to agree. I should do the needful and perform a search and replace ;)

Technorati tags:
Tuesday, June 24, 2008 10:30:50 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [1] - Trackback
Other things

I have written a couple of app's that use LINQ, however, I realized that in order to talk about LINQ I would really have to have a brief look at the ICollections pattern and extension methods.

So extension methods are a really neat way to spot weld additional methods to existing classes in the .NET Framework. So for example, I recently talked about the HttpUtility.UrlEncode being buried in the System.Web namespace. Let us say that I wanted the UrlEncode method to be available where ever I use the String type, then I could do the the following:

    public static class MDUtilities
    {
        //Indicates that this method should be associated string
        public static string EncodeMyUrl(this string s) 
        {
            return System.Web.HttpUtility.UrlEncode(s);
        }
    }

So by including the above class definition you now have a supercharged version of the string type as shown below.

extension method

Extension methods are littered throughout .NET 3.5 Framework and specifically in the ICollections pattern. These extension give us all the access to the LINQ goodness that we are starting to enjoy. So you can imagine somewhere in the .NET Framework would be a definition above that spot welds the new LINQ methods to ICollections.

Tuesday, June 24, 2008 7:31:31 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] - Trackback
.NET | C#
# Monday, June 23, 2008

I complained several months ago about expiration of DRM under MSN music, as a result I refuse DRM music at every turn. There appears to be an about face on the original notification. 

On April 22, Microsoft notified you that as of August 31st, 2008, we would be changing the level of support for music purchased from MSN Music, and while your existing purchased music would continue to play, you would no longer be able to authorize new PCs and devices to play that music.


After careful consideration, Microsoft has decided to continue to support the authorization of new computers and devices and delivery of new license keys for MSN Music customers through at least the end of 2011, after which we will evaluate how much this functionality is still being used and what steps should be taken next to support our customers. This means you will continue to be able to listen to your purchased music and transfer your music to new PCs and devices beyond the previously announced August 31, 2008 date.


Microsoft continues to recommend that you back up your music on CD or hard drive along with other important data.

Sincerely,

MSN Music team

 

I am not willing to bet (with my money) that the Zune experiment will continue to work. I am officially out of the DRM business.

 

Technorati tags:
Monday, June 23, 2008 4:06:45 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] - Trackback
DRM | Music
# Sunday, June 15, 2008

I do not normally comment on particular artists or films, however, this weekend I had the misfortune of seeing 'The Happening'.

I can say with a clear and truthful heart that The Happening is the worst film I have ever seen. Worse than Howard the Duck, Dreamcatcher and Rocky V combined!!!!

Technorati Tags:
Sunday, June 15, 2008 4:08:52 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [1] - Trackback
Movies
# Sunday, June 08, 2008

I like poking fun at code only because I hope to help highlight simple errors and make our programming world a better place ;) I am sure there is a trail of awful code littered behind my career, however, I am grateful for the fact that I do not have to look at it.

So the latest faux pas was seen in a piece of code that required a string to undergo URL encoding. This is a simple process that requires one to remove all the illegal characters from a URL. The following are considered illegal (reserved) characters:

! * ' ( ) ; : @ & = + $ , / ? % # [ ]

This led to the following code snippet...

String HttpPost = GetRawHttpString();
HttpPost = HttpPost.Replace("%","%25");
HttpPost = HttpPost.Replace("|", "%7C");
HttpPost = HttpPost.Replace("/", "%2F");

Now the basic concept is to identify the reserved characters and replace them with their percentage encoded equivalent. This is not wrong just a little off ... It is the kind of thing you do when you are, for example, an expert C programmer converting to the .NET Framework. It is really easy to fall into traps of how to solve the problem verses the idea of learning the more about .NET Framework. This is probably what I would have done:

String HttpPost = GetRawHttpPostString();
HttpPost = HttpUtility.UrlEncode(HttpPost);

I think the real reason why HttpUtility was not used was because this was not a Web application and in that scenario you are required to import System.Web.dll as a reference manually.

Technorati tags:
Sunday, June 08, 2008 10:33:31 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] - Trackback
C#
# Thursday, June 05, 2008

If you are not using SharedView for interactive demonstrations then I urge you to take up the cause while the day is still young and the application is free. It provides the same kind of display features as Live Meeting, however, you are able to allow viewers to interact with the presentation in a more direct and intuitive way.

Unfortunately as far back as last year I have been seeing issues with some demos where the video was completely scrambled, this was a problem with both SharedView and Live Meeting. Being a remote employee this kind of issue will simply not do.

The problem is apparently related to the the hardware acceleration options. The presenter should update the Hardware acceleration slider to None as shown below and everything should work as designed!

Hardware acceleration Settings for SharedView and Live Meeting

For more troubleshooting tips check out the SharedView forum.

Thursday, June 05, 2008 3:56:20 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [2] - Trackback
Tools
Blogroll
Statistics
Total Posts: 330
This Year: 18
This Month: 2
This Week: 0
Comments: 30
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Mark Downie
Sign In
All Content © 2010, Mark Downie
DasBlog theme 'Business' created by Christoph De Baene (delarou)