Google Android Development Agency SASS

Friday 22 January 2010

Using C# 3.0 and LINQ with Kentico

I just encountered a weird problem with a custom webpart in Kentico CMS v4.

Our project is configured in VS.NET as a .NET 3.5 website; web.config references 3.5.0 assemblies and there's plenty of references to System.Linq in classes.

This morning I cane across an instance where I thought it might be useful to use a LINQ query to extract a filtered List from another List. I wrote my code

var filtered = (from m in data where m.DepartmentID = 1 select m)

VS.NET syntax highlighting was happy and showed no errors. However, when I browsed to the website I got the error "the type or namespace name 'var' could not be found" and varyingly various different "missing )" errors.

Clearly IIS wasn't treating this website as a 3.5 site. Easy to fix thankfully, I just added the following to web.config:


<system.codedom>
<compilers>
<compiler language="c#;cs;csharp"
extension=".cs"
warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>

Wednesday 20 January 2010

37 Signals - An unashamed testimonial

There's always a difficult balance in software engineering and the management thereof between choosing a toolset which is feature rich enough to be useful and lightweight and usable enough to make it, well, usable.

When it comes to project/development management I've tried everything from Microsoft Project Server to a whiteboard stuck to the development office wall.

Whilst Microsoft Project gives undeniable control over every minute detail of a project, it's not exactly lightweight and project plans can become cumbersome once you start adding progress tracking and expenditure.

On the flip side, a whiteboard on the wall is infinitely flexible, immediately visible and easily updated. Plus, you can draw all manner of rude things on it when you're bored and pin posters of your favourite Hotrod in my case to it. The downside is it's not inside one of them darned new-fangled computer machines so it can't send you a message to say you forgot to test yesterdays build on IE6 before releasing it you ningcompoop.

For the past year or so I've been trying to drag the easy-wipe marker from my hand and get everything electronic so that I can get reminders and such, and the toolset I've come to rely on is by those masters of lightweightness 37Signals.com.

We're now using their Basecamp product almost exclusively to manage our day to day tasks. Here's our setup:

We create Date-related Milestones for any deliverables. That way the deliveries appear on everyone's dashboard so noone can claim that they didn't know about it.

We create task lists for every milestone, tied to that milestone.
Now everyone knows what tasks need to be done to meet the milestone.

We add a due date to each task.
It's not exactly going to make a gannt chart, but now at least we've got some semblance of a plan. (That's a plerrrrrn if you speak geordie like me).

We turn on daily email digests
Now every morning at 9am we all get digest in our email of what's happened and what's coming up. Because everyone is too lazy to open Basecamp and check everyday and everybody opens their email in the morning to check for the latest hervia.com newsletter. Or is that just me?

We sync our Google Calendar with Basecamp
Praise be! Google Calendar syncs via iCalendar so all of our milestones appear in Google Calendar and we can add additional reminders if we think we're really going to forget about testing on IE6. (And god knows we're trying...)

So the moral of this outburst is, if you're not operating in a hardcore PM environment and are looking for some lightweight tools to manage your development activities, checkout http://basecamphq.com/ from 37Signals.

And no I don't work for them. But if you're listening Jason Fried I would not say no.