I will no longer be posting to DotNetJunkies

As of today all of my post will be made at http://claytonfirth.wordpress.com/. I'm also going to make a more consience effort to post more often (at least twice a week).

with 0 Comments

Renaming a VMWare Virtual Disk

To rename a virtual disk, first remove it from any virtual machine that contains the disk (choose VM > Settings > <virtualdisk>, then click Remove).

Then use the following:

vmware-vdiskmanager -n myDisk.vmdk myNewDisk.vmdk

Very useful for cleaning up a virtual disks created by using the importer, which creates really useful names like W2KR2_WSS3_CFirth (2).vmdk, where the (2) indicates that the drive was D drive on the MS Virtual Server image.

with 1 Comments

Install favorite applications with less fuss

InstallPad can help you. It takes a list of your favorite programs and will download and install the ones you pick. It doesn't need to ask any questions, so you can go do more important things. InstallPad can resume downloads you've canceled, and can even try and find the latest version of your program online.

If you administrate or develop for Windows, InstallPad can help you get a machine set up with service packs, applications or development tools without the need for CDs or running lots of scripts. With it you can quickly install a host of programs silently, pass arguments to the installers, and run post-installation scripts.

with 0 Comments

WSS3 Virtual Machine

Well I've finally bitten the bullet and started to learn about SharePoint, and god forbid I'm starting to see how I may actually want to integrate it into some projects. WSS3 sure has come a long way since my last foray into the SharePoint stack (Team Services).

Inspired by this post by Alistair the first item on my list of todo's in learning sharepoint was to create a virtual machine that I could easily distribute to other members on my team. The classic approach that we have used is to save a copy of our VM, and when anyone on the team has needed a clean dev image copy the image, start it up, NewSID, and join the machine onto the developers domain. All in all this was a cumbersome process. This process has been rendered obsolete with the introduction of WSS3 as the act of NewSIDing the image totally destroys WSS.

Anyway I set out  to learn about how to use SysPrep. After a lot of trial and error I finally created a SysPrep.inf file which would only prompt me for as few properties as possible and successfully rename my VM. Unfortunately the WSS instance still came out the other side of the transform, buggered.

Not to be deterred I started having a dig around for information on how to re-configure WSS after a change of machine name. What I ultimately found was that it only takes a few easy steps to completely rebuild the WSS configuration database.  Just open a command prompt at \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN and run the following commands.

  1. PSCONFIG.EXE -cmd configdb disconnect
  2. PSCONFIG.EXE -cmd configdb create
  3. PSCONFIG.EXE -cmd setup

The real gem comes when you realize that as part of the SysPrep process allows you to run a series of commands after the SysPrep'd image has been started for the first time through the [GuiRunOnce] section, completely automating the configuration of WSS in this case.

As a result of all I've learned in this exercise I can now configure an image of any type of configuration SysPrep it an throw it into the library for anyone to download and use.

To use SysPrep successfully download SysPrep and extract it to c:\SysPrep. Create a file called SysPrep.inf and add the following text into the file, finally run SysPrep with the arguments -reseal -mini -shutdown. Once that VM has shutdown take a copy. The next time the VM is started it will prompt for acceptance of the EULA and machine name and proceed to join the image to your domain. On the first login WSS is configured.

;SetupMgrTag
[Unattended]
InstallFilesPath=C:\SysPrep\i386

[GuiUnattended]
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=260
AdminPassword="Password123"
OemSkipWelcome=1

[UserData]
ProductKey=P7RCM-P7RCM-P7RCM-P7RCB-ITEME
FullName="Blah Blah"
OrgName="Generic Company Name"
ComputerName=

[SetupMgr]
DistFolder=C:\sysprep\i386
DistShare=windist

[GuiRunOnce]
Command0="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\PSCONFIG.EXE -cmd configdb disconnect"
Command1="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\PSCONFIG.EXE -cmd configdb create"
Command2="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\PSCONFIG.EXE -cmd setup"

[Identification]
JoinDomain=generic.com
DomainAdmin=administrator
DomainAdminPassword=password

[Networking]
InstallDefaultComponents=Yes

with 1 Comments

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 (&gt; &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

The top 10 unintentionally worst company URLs.

Everyone knows that if you are going to operate a business in today’s world you need a domain name. It is advisable to look at the domain name selected as other see it and not just as you think it looks. Failure to do this may result in situations such as the following (legitimate) companies who deal in everyday humdrum products and services but clearly didn’t give their domain names enough consideration.

The top 10 unintentionally worst company URLs.

 

with 1 Comments

Conceptual, Logical, Physical

One of the frustrations of data modeling is the regularity with which the same problems re-surface, and our propensity to tackle them from first principles (or no principles) rather than building on an understanding of established work. 

Know the feeling? Go have a look at this must read article by Graeme Simsion.

 http://www.tdan.com/i036fe02.htm

with 0 Comments

Clicked Off

I'm starting to feel old. Not quite old enough to have ever had to program with punch cards, just old enough to remember the good old days of the command line utility. Yes I know that the command line is still alive and well today, what I am noticing on an increasing scale is younger people around me not even attempting to use, and learn about a tools if it does not come with a windows GUI.

aspnet_regiis, OSQL, bcp, net *, adsutil, csc, god forbid I’ve even worked with some juniors who didn't know how to use those old favorites copy, move, ren.

 

Over the next few weeks I am going to write several entries on how I use the tools readily available to everyone, more effectively.  In summary I will show you how to work smarter not harder.

 

I consider these optimizations a value add to whoever is signing my paycheck at any given point in time. instead of getting someone who wastes a good portion of their day clicking, double clicking and wasting energy moving there hand between keyboard, mouse and... Maybe that’s another discussion. All that energy is much better spent walking to the kitchen for coffee and back. I guess what it comes down to is that the more effectively I can perform my duties the more time I can spend feeding my body the caffeine it requires on a daily basis.

with 0 Comments

Better Data Models Today

I had the pleasure to see Graeme Simsion talk at the local SQL server user group last week. It was really quite enlightening to here some quite unique views on how as data modellers & as software architects we approach database design.
Here is an article written by Graeme in which he goes into detail on the points discussed in his talk.

Rated Excellent [5 out of 5]. with 0 Comments