2009-11-22

f-Laws of Management

I was going to copy and add my own, but the truth is you'd all be better served by going to the source of f-Laws and I don't have to plagiarize or quote.
f-Laws are a series of common management flaws that seems to permeate today's companies.
I encourage everyone who works with more than a couple of people to read the big book or even the FREE little book.


Example - Word for word copied from the Little book.

Russell & Herbert f-Law:

The more important the problem a manager asks consultants for help on, the less useful and more costly their solutions are likely to be.

Consultants begin their engagements by gathering very large amounts of data, much more than can be transformed into useful information. No wonder! Their fees are proportional to the amount of time they devote to a problem, not to the amount of good that they do.

The most successful consultants are the ones who are smart enough to see what managers want and give it to them after an extended effort, and do so in long, impressively formatted reports. They provide sanctions for a fee.

The principal finding obtained by all studies conducted by consultants, regardless of the issues involved, is the need for more study. The success of a consultant’s effort is not measured by the amount of good it does for the client, but the amount of good it does for the consultant.


Sally - Response:

It’s astonishing that, in these days of obsession with return in investment, consultants are not held to account more than they are. There are three reasons for this:


  1. Executives are seduced by data – the more they have, even if it’s useless, the more it makes them feel in control.
  2. The CEO or someone else very senior usually hires the expensive consultants. Who is going to challenge the CEO’s decision?
  3. Consultants set themselves up as experts. This provides the executive with another hiding place. “If the expert says so who am I to disagree”?

Consultants - unlike the rest of us - do indeed manage to escape being accountable. The higher their fee, the less accountable they become. The more complex and costly their solutions, the more unlikely it is that they’ll be challenged.

Who’s going to want to point out that some senior executive’s decision to hire consultants has been a huge waste of money? 


The best organizations, by the way, are more likely to use internal consultants, form employee problem-solving teams or hire customers and suppliers to solve problems for them.

2009-11-17

SharePoint 2010 beta first impressions.


Maybe it's my scifi interest, but I think SPF 2010 & SPS 2010 roll off the tongue nicer than WSSv3 & MOSS 2007.




    The email Microsoft sent me contained product keys for 2 versions:
  1. SharePoint Server for Internet Sites 2010

  2. SharePoint Server 2010


    My setup is all x64:
  1. VMWare Guess with 2.4GB RAM/ 80GB HDD

  2. Win2008R2 SE

  3. SQL 2008 + SP1

  4. SharePoint Server for Internet Sites 2010


After installing Win2008 and SQL2008, I launched the SP installer.

The package extracts and you're presented with an SQL2005 type menu with Prepare/Install/Other Info. I skipped the reading and went directly to "Install SharePoint Server" and it failed because IIS 6 Compatibility Prerequisite was missing.

This time I clicked "Install Software Prerequisites" and it installed quite a few more things.


Back to "Install SharePoint Server" and after a while it failed again:





Google'd KB970315, downloaded and installed the Hotfix.

Away we go again.



A few new things...

  • the setup asks for a pass phrase to secure the farm.

  • there's now a Wizard option to guide you through the Services configuration.


I select all options bar "Lotus Notes Connector"... enter a new account, and after a couple minutes the first error:


Errors occured.


The service application proxy "User Profile Service Application" could not be provisioned because of the following error: Unrecognized attribute 'allowInsecureTransport'. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56)



Corelation Id: 95684294-0888-46dd-8242-df5860c5188e



Central Administration, its all new and it has pretty icons like a Control Panel.




Let's add some user accounts and start using it... the Shared Service Provider doesn't seem to exist anymore and in its place is the much more logical Service Applications Management screen.





User Profile Service Application is my guess for adding users.



I guess this was the error being reported before... I google'd "95684294-0888-46dd-8242-df5860c5188e", nothing, then tried "allowInsecureTransport" which lead me to MSDN Forum after reading through it I
tried replacing the attribute with enableUnsecuredResponse, that didn't work... I noticed other security nodes didn't have this attribute so I commented them all out and it worked after an IISReset.

More new things...

  • Review problems and solutions


  • JQuery type popups/functions everywhere


  • Ribbon menus everywhere


  • Theme Gallery; Now themes are CAB files with an .thmx extension



  • Solution Gallery with upload, woohoo... I guess you'll have to be more vigilant with assigning Site Collection Admins :)... browse Office.com uses Silverlight

  • SharePoint Designer Settings, now I don't have to blanket disable SPD access!


All in all SharePoint 2010 is more logically laid out and has a refreshing dynamic look.

I'll delve in to SP2010 more in the future.

2009-11-03

SharePoint List in SQL


I was recently tasked with Exporting a SharePoint list to Excel for users logging in using Forms Authentication.
I scratched my head for a minute and I came up with creating a Reporting Services report that queries the SP DB directly.

Issues: I wanted the query to be dynamic and use the exact same SP columns. So if a user adds a field or changes a column name I don't need to amend the SSRS report.

Solution: I created a Stored Proc, that takes 1 parameter (ListID). The proc gets the fields for the list then builds a query and executes it. The Stored Proc needs to reside on the same Content DB.

Code:


CREATE procedure [dbo].[usp_PrintList] (@ListId uniqueidentifier)
AS
BEGIN
  DECLARE @XMLFields TABLE (Row INT IDENTITY, Field XML);
  DECLARE @xFields XML; 
  SELECT @xFields = (SELECT cast(
      replace(cast(tp_Fields as varchar(max)),'<FieldRef','<Field') 
      as XML) as Fields
      FROM Lists 
      WHERE (tp_ID = @ListId))
 
  INSERT INTO  @XMLFields
    SELECT Tbl.xFlds.query('.') from @xFields.nodes('/Field') as Tbl(xFlds)
 
  DECLARE @sql VARCHAR(8000), @field XML, 
    @colname VARCHAR(30), @Type VARCHAR(30), @dispname VARCHAR(255);
  
  SET @sql = 'SELECT '
 
  DECLARE tmpCursor CURSOR FOR
    SELECT Field, 't1.'+ Field.value('(/Field/@ColName)[1]', 'varchar(max)') , 
      Field.value('(/Field/@Type)[1]', 'varchar(max)'), 
      ' as ['+ isnull(Field.value('(/Field/@DisplayName)[1]', 'varchar(max)'), 
      Field.value('(/Field/@Name)[1]', 'varchar(max)')) +'], '
    FROM @XMLFields
 
  OPEN tmpCursor
  FETCH NEXT FROM tmpCursor INTO @field, @colname, @Type, @dispname
    WHILE @@FETCH_STATUS = 0
    BEGIN
      IF(@colname IS NOT NULL)
      BEGIN  
 
        SET @sql = (CASE @Type
          WHEN 'Lookup' THEN 
            @sql + '(SELECT nvarchar1 FROM UserData WHERE tp_ListId = '''+ 
            (@field.value('(/Field/@List)[1]', 'varchar(max)')) +
            ''' AND tp_ID = '+ @colname +')' + @dispname    
          
          WHEN 'User' THEN 
            @sql + '(SELECT tp_Title FROM 
            UserInfo WHERE tp_ID = '+ @colname +')' + @dispname            
          
          ELSE @sql + @colname + @dispname
          END)
  
      END
      FETCH NEXT FROM tmpCursor INTO @field, @colname, @Type, @dispname
    END
  CLOSE tmpCursor
  DEALLOCATE tmpCursor  
   
  --strip off last comma
  SET @sql = SUBSTRING( RTRIM(@sql), 1, LEN(@sql) - 1 )
  SET @sql = @sql + ' FROM UserData t1 WHERE t1.tp_ListId = '''+ 
      CAST(@ListId AS VARCHAR(50)) +''' AND t1.tp_RowOrdinal = 0'
 
  PRINT @sql
  EXEC(@sql)
END

Limitations:

  1. It doesn't get the Display Name for field references (ie not customized field)

  2. It only looks at the Title of the lookup list/user, and then only on custom look up.

Example:


MS SQL Management Studio View




SharePoint View




Keywords: Export to spreadsheet, SQL field view, AllUserData

File link




2009-06-22

Dr. W. Edward Deming's 14 points for management and transforming business effectiveness


Today we live in a post "credit boom" era... we've spent the last 2 decades inebriated with cheap or even free credit. And like an "all you can eat" banquet, we've had little respect for the credit we used. Now change has been forced on us and we must adapt.

After a recent company memo about improving the business and compulsory annual reviews; I decided to do some research in to ways of improving my effectiveness as a manager and the best way is usually to look at what the best of the best have done in the past.
In my quest for the best of the best I came across William Edwards Deming (you can google his name for more info).

In one of his books Out of the Crisis he describes 14 points for management and transforming business effectiveness, none of them are catchy phrases, but any GM/COO interested in more than short term share holders could do worse...


  1. Create constancy of purpose toward improvement of product and service, with the aim to become competitive and stay in business, and to provide jobs.

  2. Adopt the new philosophy. We are in a new economic age. Western management must awaken to the challenge, must learn their responsibilities, and take on leadership for change.

  3. Cease dependence on inspection to achieve quality. Eliminate the need for inspection on a mass basis by building quality into the product in the first place.


  4. End the practice of awarding business on the basis of price tag. Instead, minimize total cost. Move towards a single supplier for any one item, on a long-term relationship of loyalty and trust.

  5. Improve constantly and forever the system of production and service, to improve quality and productivity, and thus constantly decrease costs.

  6. Institute training on the job.

  7. Institute leadership. The aim of supervision should be to help people and machines and gadgets to do a better job. Supervision of management is in need of overhaul, as well as supervision of production workers.

  8. Drive out fear, so that everyone may work effectively for the company.

  9. Break down barriers between departments. People in research, design, sales, and production must work as a team, to foresee problems of production and in use that may be encountered with the product or service.

  10. Eliminate slogans, exhortations, and targets for the work force asking for zero defects and new levels of productivity. Such exhortations only create adversarial relationships, as the bulk of the causes of low quality and low productivity belong to the system and thus lie beyond the power of the work force.

  11. a. Eliminate work standards on the factory floor. Substitute leadership.
    b. Eliminate management by objective. Eliminate management by numbers, numerical goals. Substitute workmanship.

  12. a. Remove barriers that rob the hourly worker of his right to pride of workmanship. The responsibility of supervisors must be changed from sheer numbers to quality.
    b. Remove barriers that rob people in management and in engineering of their right to pride of workmanship. This means, inter alia," abolishment of the annual or merit rating and of management by objective.

  13. Institute a vigorous program of education and self-improvement.

  14. Put everybody in the company to work to accomplish the transformation. The transformation is everybody's job.

Another set of management principals is The Deming System of Profound Knowledge which advocates:

  1. Appreciation of a system: understanding the overall processes involving suppliers, producers, and customers (or recipients) of goods and services (explained below);

  2. Knowledge of variation: the range and causes of variation in quality, and use of statistical sampling in measurements;

  3. Theory of knowledge: the concepts explaining knowledge and the limits of what can be known (see also: epistemology);

  4. Knowledge of psychology: concepts of human nature.


I thought I would share this tid-bit.

2009-04-23

Redirect groups to a specific site or url


I created 2 web parts for aiding the redirection of users to specific area I would like to share with y'all.



  1. Group Page Redirector; this has a group property, a URL and redirect once property.

    If you belong to the selected group it will redirect you to the specified URL. This can be handy if you want to show specific content to a group; like an announcement or terms and conditions. Just add more web parts for other groups.



  2. SubSite Redirector; this doesn't any properties... it just checks which Sub Sites you have access to, and if you only have access to one it will redirect you to it.


They're both simple Web Parts with the source/project code and wsp.

Also you can set them to Minimized and no Chrome, so that they're not visible.



Keywords: Sharepoint Redirect Redirector Web Part once Usage policy ToolPart[]



2009-04-21

Item level permission checking web part


So you want to know what a specific user can and can't see in your SharePoint site?... well for that you'll need to perform an eye examination.


OK really you want to know what items/list/sites for which a specific user has access?
Well believe it or not you can't with the standard SharePoint tools, but it's a fairly simple exercise to create a web part that does, and to save time here's one I made before.




It's fairly simple... get the SPUser > Check what groups he/she belongs to > loop through all the lists > items then the sub sites...

I show an icon for SPBasePermissions instead of the usual Full Control, Contribute, ect. The tree goes down to items, but won't fetch them until you click on the list expand icon to aid performance.
Since I'm using SPUser it also works for forms authentication.
If you don't have permission to check permissions on an object you can set a web part property to show this or not.

In any event the whole project source is included, so feel free to play and recommend changes.


Keywords: Check User Permission Inherited Unique Access RenderPreText RenderPostText TreeNode PeopleEditor SPUser TreeView SPGroup HasUniqueRoleAssignments TreeNodePopulate



2009-04-02

Moving your Windows Installer Directory

I mostly work with Virtual Machines and I like to pre-allocating the disk size. When I created my VM I figured 10GB would be enough for C:\ with Win2003 Server and a couple of SDK's and if I needed more I could always add another drive. I was wrong.

After 2 years my faithful Win2003 dev VM is out of space on C: and I can't shuffle any more files around.

My C:\windows\installer directory is >2GB so this is my prime candidate to move.
Luckily there are always solutions to problems... no I'm not going to delete the directory, or change my registry to point to a new location.

I'm going to add a symbolic link from C:\windows\installer to F:\installer.


  1. Download Junction from http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

  2. Copy OR move C:\windows\installer to F:\installer

  3. Delete all the files in C:\windows\installer

  4. Close all your Explorer windows

  5. Run > cmd> C:\junction C:\WINDOWS\Installer F:\installer
That should do it. I wrote a batch (run.bat) script to do the whole procedure.
@set src=C:\WINDOWS\Installer
@set trg=F:\Installer
::copy %src%\* %trg%
::detele %src%\*
move /y %src%\* %trg%
junction %src% %trg%
pause

This should work for most directories. The batch file should be in the same directory as junction.exe.

2009-01-27

Unable to connect publishing blob caching.


01/27/2009 16:23:40.23
w3wp.exe (0x0114)
0x00E8
CMS
Publishing Cache
6p4o
Warning
Unable to connect publishing blob caching. Web.Config is not set up correctly. Cache is not valid. WebId is '1303494830', Url is 'http://vmmossdev:8088/_themes/myTheme/viewheadergrad_mt.gif'.


You may see the above warning in your event log, if the "BlobCache" configsection is declared without been defined... well I did, and I google and could find a single valid explanation.




The Fix: Just add a node in the node like...



<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" enabled="false" />

2009-01-22

Visual Studio 2008 extensions for SharePoint 1.3 Jan 2009 CTP


So here I was checking to see if there was a new VS Extentions for WSS, and Google revealed a link to: VSeWSS 1.3 and now with x64 support... woohoo.


Yeah what ever, my life is sad... but it helps us all along the way to an x86 free world.


SharePoint solution Generator - MaxStringContentLength error



The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:GetSiteTemplateExportFilesResult. The InnerException message was 'There was an error deserializing the object of type Microsoft.SharePoint.Tools.SPServiceReference.ExportFilesResponse. The maximum string content length quota (819200) has been exceeded while reading XML data...




The Fix: Go to> Programs(x86)\Microsoft SharePoint Developer Tools 9.0\ssg 1.3\SPSolGen.exe.config

Multiply all the max values by 4 eg: maxStringContentLength="32768" ,maxArrayLength="65536", maxBytesPerRead="16384", maxNameTableCharCount="65536"