Sunday, 29 May 2011

Rubymine Ruby on Rails IDE makes me feel more at home

Working without an IDE makes me shudder at the memory of my days coding PHP in BBEdit, and then classic ASP using some other win-based text editor whose name escapes me. Since moving into C#.NET I've led a privileged life of code completion, syntax checking, snippets, and a multitude of other killer-functionality that makes me highly productive and feel warm and fuzzy inside.

So it's of some surprise to me that a good proportion of the Ruby on Rails community appear to favour text editors (such as TextMate) and command-line activity to an IDE. It may be due to old-skool stubbornness, like one of my colleagues whose core job is javascript development, yet he uses a simple text editor without even any syntax colouring...yikes. It could be lack of choice, but when I recently installed Rubymine I breathed a deep sigh of relief, and could see that me and RoR could get on well together.

On first appearances, and having read reviews, it seems to do everything I'd want of an IDE and the productivity gains it will provide are well worth the small license fee. I have little doubt I'll be buying it after my 30 day trial.

Wednesday, 18 May 2011

Iterate through a SharePoint list (SPList)

SPList list = web.Lists["TestTasks"];
SPListItemCollection listItems = list.Items;

foreach (SPListItem item in listItems)
//do stuff

Determine if your SPFieldUserValue is a user or group

SPFieldUserValue field = new SPFieldUserValue(web, item["AssignedTo"].ToString());

 // Test for a user or group value (null indicates a group)
      if (field.User != null)

Thursday, 12 May 2011

IIS .NET globalization settings affecting date displays

I had a strange problem today - a site I recently deployed to live from my local dev environment was displaying dates in American formay (mm/dd/yyyy), yet when running locally it was fine (dd/mm/yyyy). At first I thought I must have had the wrong default language for the db user, but everything was as it should be.

Later I discovered that the live website in IIS had a culture setting of "Invariant Language (Invariant Country)". Changing this to "English (United Kingdom) (en-GB)" resolved the problem. It adds an entry to the system.web entry your web.config like so:

globalization culture="en-GB"

I don't recall ever having to do this before, and this entry isn't present in my local webconf, but it's one I'll look out for in the future.

Tuesday, 10 May 2011

Community Kit for SharePoint

"The Community Kit for SharePoint: Development Tools Edition extends the Visual Studio 2010 SharePoint project system with advanced templates and tools. Using these extensions you will be able to find relevant information from your SharePoint environments without leaving Visual Studio. You will have greater productivity while developing SharePoint components and you will have greater deployment capabilities on your local SharePoint installation."

Thursday, 5 May 2011

Setting up SharePoint - note to self

Setting up a new SharePoint installation today on a virtual machine, and I came across a couple of problems that will probably repeat themselves next time.

First off, I never set up a password for my Win Server 2008 account. This was later to cause problems with the subsequent SharePoint installation. In the end I uninstalled SharePoint, setup a password for the user, then started again.

Secondly, Network Discovery and File and Printer in Win Server 2008 sharing was off by default, meaning I couldn't browse to my SharePoint sites across the network. Switching these on resolved the issue.