The Importance Of Sprint Planning

Sprint planning is the first ceremony in the SCRUM cycle. I’ve seen varying implementations of sprint planning depending on the client I’m working and often it works very well. Occasionally however, I have worked with clients where the entire team including the management decide to prioritize it under everything else.  For me this just screams tragedy, so here comes my perspective on the importance of sprint planning.

Wait…I thought I was the striker?

A team without sprint planning is kind of like a football team without a tactics drill session and game strategy.  You could knock a team together, buy the kit and then when it comes to the first game everyone is running amok the entire time.  I’ve seen this happen in scrum teams.

Dedicated time assigned to planning allows the team to focus on the business requirements. This is the time where gaps in requirements are raised, misunderstandings are brought to the surface and most importantly solutions are created as a team.

Let me just get on with it

Often without planning, developers will start coding immediately in isolation without taking into consideration the other in-progress user stories.  Potentially these clashes don’t appear until much later in the sprint and then there is a rush to refactor code conflicts and address requirement conflicts – This increases exponentially when there are more dependencies between stories.

Isolated developers will also create solutions using patterns best suited to their experience.  If not agreed upon within the planning session, you will find similar & related business requirements implemented in several different ways. These can result in increased code duplication, complexity in refactoring and adding to technical debt.

Suck it up princess

From a moral perspective, sprint planning is an excellent time to get the team on the same page.  The team decide which user stories are committed to the sprint – not the lead developer, not the product owner…the team.  The sprint is delivered as a team,  so commitments must be made as a team.  By allowing the team to decide what can be delivered will give a sense of responsibility and ownership.  I have often found teams that feel this, will achieve more and higher quality.

Some managements will try and push more into the sprint at the beginning and this only creates negative feeling and lack of control.  The team must feel the committed stories are achievable else efficiency will suffer before the sprint has even started. Remember more back log items can always be added to the sprint if the team is achieving and capacity across all roles is there.

Incomplete work from the previous sprint can also tempt developers to skip the session in the following sprint.  Not only will they have to play catch up in term of understanding the requirements, they will also lose their participation in estimates and any valuable experience they have gained as an individual will not be available to the rest of the team whilst solutions are being discussed.

Why don’t we try

Sprint planning is a part of agile and that in-itself should be subject to constructive criticism. If you find your current way of planning isn’t working then discuss the problems and draw actions from them. Does the product owner or scrum master need to attend the entirety of the session? Can the session be split up into parts? Maybe the PO and BA can spend the first hour discussing the user stories so that the scrum team can be left to work out the solutions and task breakdown.

Visual Studio 2017 – Add, Remove or Update DotNetCLITools references – 7th March 2017

Visual Studio release notes as of 7th March release notes state that the DotNetCLITools packages cannot currently be managed by the Nuget Package Manager and must be edited manually in the csproj.

After migrating my current projects, I finally figured out that it wasn’t just me that was struggling to find the place to manage these packages. There’s no intellisense in this area either. Eventually I replaced my pre-release references with the following:

In your csproj file: 

<ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
    <DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0" />
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" />
    <DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.301" />
 </ItemGroup>

This allows visual studio to run the dotnet commands for building, database, bundling and publishing!

Sources: https://www.visualstudio.com/en-us/news/releasenotes/vs2017-preview-relnotes

EPiServer 10 – Restrict any Block Types on XHtmlString property using the Validation Attribute

I couldn’t find a similar solution online as I believe there is an emerging pattern where we are now instructing clients to drag EPiServer Blocks into Rich Text editors.

Requirement:

As an Editor I want to limit certain blocks types from being dragged into the rich text editor

Solution #1:

Apply this attribute to any of your xhtml properties to enable to validation functionality

[Display(Name = "Text", GroupName = SystemTabNames.Content)]
[XHtmlStringAllowedBlockTypes(new[] { typeof(TextBlock), typeof(ImageBlock) })]
public virtual XhtmlString RichText { get; set; }

 

Implement the following attribute where your other validation attributes reside.

 public class XHtmlStringAllowedBlockTypes : ValidationAttribute
{
private readonly Type[] allowedTypes;
public XHtmlStringAllowedBlockTypes(Type[] allowedTypes)
{
this.allowedTypes = allowedTypes;
}

protected override ValidationResult IsValid(object value, ValidationContext context)
{
var contentData = context.ObjectInstance as IContentData;

if (contentData != null &amp;&amp; contentData.Property[context.MemberName].Value is XhtmlString)
{
var richTextProperty = (XhtmlString)contentData.Property[context.MemberName].Value;

foreach (ContentFragment fragment in richTextProperty.Fragments.Where(x =&gt; x is ContentFragment))
{
var content = ServiceLocator.Current.GetInstance&lt;IContentRepository&gt;().Get&lt;IContentData&gt;(fragment.ContentLink);

foreach (var allowedType in allowedTypes)
{
if (allowedType.IsInstanceOfType(content))
{
return new ValidationResult(string.Format("You cannot add {0} to {1}", content.GetType(), context.MemberName));
}
}
}
}

return ValidationResult.Success;
}
} 

 

References:

http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/Content/Properties/Property-types/Writing-custom-attributes/

http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/Content/Validation/