October 2006 - Posts

Company Policy

Start with a cage containing five monkeys. Inside the cage, hang a banana on a string and place a set of stairs under it. Before long, a monkey will go to the stairs and start to climb towards the banana. As soon as he touches the stairs, spray all of the other monkeys with cold water. After a while, another monkey makes an attempt with the same result -- all the other monkeys are sprayed with cold water. Pretty soon, when another monkey tries to climb the stairs, the other monkeys will try to prevent it.

Now, put away the cold water. Remove one monkey from the cage and replace it with a new one. The new monkey sees the banana and wants to climb the stairs. To his surprise and horror, all of the other monkeys attack him. After another attempt and attack, he knows that if he tries to climb the stairs, he will be assaulted.

Next, remove another of the original five monkeys and replace it with a new one. The newcomer goes to the stairs and is attacked. The previous newcomer takes part in the punishment with enthusiasm! Likewise, replace a third original monkey with a new one, then a fourth, then the fifth.

Every time the newest monkey takes to the stairs, he is attacked. Most of the monkeys that are beating him have no idea why they were not permitted to climb the stairs or why they are participating in the beating of the newest monkey.

After replacing all the original monkeys, none of the remaining monkeys have ever been sprayed with cold water. Nevertheless, no monkey ever again approaches the stairs to try for the banana. Why not? Because as far as they know that's the way it's always been done around here.

And that, my friends, is how company policy begins.
with 0 Comments

Teacher Arrested in New York

NEW YORK, NY - A public school teacher was arrested today at John F. Kennedy International Airport as he attempted to board a flight while in possession of a ruler, a protractor, a set square, a slide rule and a calculator.

At a morning press conference, Attorney General Alberto Gonzales said he believes the man is a member of the notorious Al-gebra movement. He did not identify the man, who has been charged by the FBI with carrying weapons of math instruction.

"Al-gebra is a problem for us," Gonzales said. "They desire solutions by means and extremes, and sometimes go off on tangents in a search of absolute value. They use secret code names like 'x' and 'y' and refer to themselves as 'unknowns', but we have determined they belong to a common denominator of the axis of medieval with coordinates in every country. As the Greek philanderer Isosceles used to say, 'There are three sides to every triangle'."

When asked to comment on the arrest, President Bush said, "If God had wanted us to have better weapons of math instruction, He would have given us more fingers and toes." White House aides told reporters they could not recall a more intelligent or profound statement by the president.

with 0 Comments

Server Side Generation Of Office Documents.

I can think of a number of projects over the years that I have had the pleasure have been forced into that this new technology, to be introduced with Office 2007, would have been a walk in the park instead of a death march.

Ladies and gentlemen, i give you after years of waiting, native server side generation of Office Documents.

http://msdn.microsoft.com/msdnmag/issues/06/11/BasicInstincts/

with 0 Comments

Why does DoNotExposeGenericLists recommend that I expose Collection{T} instead of List{T}

Ahah moment:

http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx

with 0 Comments

How to Read / Write App.config with .NET 2.0

Thanks to Alois Kraus. Great content on reading and writing config files using .NET 2.0

Read/Write App.config with .NET 2.0
http://geekswithblogs.net/akraus1/articles/64871.aspx

 

with 0 Comments

'requirePermission' attribute is not declared.

I have finnally found a solution to this nusance issue with VS2005. Many thanks go out to Peter for this fix.

with 0 Comments

Mindless drones strike again!

Just in case you haven't been keeping up on the latest from the drones who rule over our fair state.
 
FACT SHEET: Learner licence changes
 
"State Cabinet has approved the proposed three phased implementation of the new Queensland Graduated Licensing System (GLS) subject to funding of the package.
 
The first phase will take effect from 1 July 2007.."

The biggest change affecting Motorcyclists is the condition on New Learner Licenses (all ages) must hold a provisional car licence (class C/CA provisional licence) for 12 months prior to obtaining a motorbike learner licence (class RE).

While I will fully support any move to make the roads safer,  I don't know how stopping new drivers from accessing cheep efficient transport achieves this. I see no restrictions in the new system which will restrict the power or size of the vehicles which new drivers will be able to drive, no restictions on the hours of the day they can drive, no restrictions on the number of passengers they can have in a car.

I think that a 17 year old in their daddy's 6.0 litre V8 Commodore, full of their friends, hooning around at midnight is going to be a whole lot more dangerous than the same young person on a low power 250 cc motorcycle with no passengers (a current restriction for provisional motorcycle licences).

How is having a car licence for 12 months before being allowed to legally ride a motorcycle on the road make you a better rider? There are still plenty of awful motorists who try and run me off the road daily during my commute.

Maybe we should go the opposite way. Lets make people hold a motorcycle licence for 12 months before before being able to operate a car. This might at least make drivers a bit more aware of other vehicles on the road.

This system has the potential to cause hardship for many young people seeking alternative transport to places of employment or higher education facilities. In addition it denies access to an affordable and legitimate form of transport for the younger community of Queensland that is largely unable to afford the running costs associated with operating a car and the daily escalating cost of petrol.
 

with 0 Comments

Free Code Translation From VB.NET & C#

Truly Awesome tool to convert VB.Net & C#. Thanks Steve.

http://www.carlosag.net/Tools/CodeTranslator/Default.aspx

with 0 Comments

Enneagram Test Results

Main Type
Overall Self
Take Free Enneagram Personality Test
Scale (|||||||%) results:
Enneagram Test Results
Type 1 Perfectionism |||||||||||||| 58%
Type 2 Helpfulness |||||| 22%
Type 3 Image Focus |||||||||||||||||| 78%
Type 4 Hypersensitivity |||||||||||| 42%
Type 5 Detachment |||||| 26%
Type 6 Anxiety |||||||||||| 42%
Type 7 Adventurousness |||||||||||||||| 66%
Type 8 Aggressiveness |||||||||||| 46%
Type 9 Calmness |||||| 30%
Your main type is 3
Your variant is sexual
Take Free Enneagram Personality Test
with 0 Comments

Using the Visual Studio Built-in Web Server from the Command Line

Just an article that i want to remember.

http://www.devsource.com/article2/0,1895,1886246,00.asp

with 0 Comments

C# Generic Documentation Comment.

I have been struggling with this issue for a few weeks now. How to I put crefs into my C# doc comments to link generic types. this was answered well by Anson.

Generics complicate doc comments because C# uses angle brackets which would usually be associated with XML.  It’s possible just to use the normal escaping mechanisms associated with angle brackets (> &lt) in XML.  Unfortunately this turns out to look fairly ugly:

using System.Collections.Generic;

 

class Program

{

    /// <summary>

    /// DoSomething takes a <see cref="List&lt;T>"/>

    /// </summary>

    void DoSomething(List<int> al) { }

}

This can become particularly onerous when the generic type has many type arguments.  The compiler team decided to improve this by allowing an alternate syntax to refer to generic types and methods in doc comments.  Specifically, instead of using the open and close angle-brackets it’s legal to use the open and close curly braces.  The example above would then become:

using System.Collections.Generic;

 

class Program

{

    /// <summary>

    /// DoSomething takes a <see cref="List{T}"/>

    /// </summary>

    void DoSomething(List<int> al) { }

}

 

The compiler understands this syntax and will correctly bind List{T} to System.Collections.Generic.List<T>. 

 

with 0 Comments

Dump Ms Visual Source Safe

Amusing article, and useful tool to rid the world of MS VSS.

I first used this tool a couple of months ago to migrate my first project from VSS into Subversion. It has since proved invaluable on a number of small projects.

with 0 Comments