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

My Resharper license just expired…renew or not to renew

It’s that time of the year again when the licenses on my third party products start lapsing and I pull out my card to renew for another year. Although having used Resharper for a long time, the line between it and Visual Studio has blurred for me. So instead I’ve decided not to renew and use VS2015 vanilla style.

Off the bat, VS 2015 suddenly became blistering fast. The start up, loading a solution and even the vanilla refactoring tools became almost instant. I don’t seem to remember having this problem when I was using VS 2013 but I have definitely felt it in VS 2015. I am rocking a SSD & i7, I can’t help but feel Resharper was slowing me down which is the opposite reason as to what I bought it for in the first place. Out of the thousands tools it does offer, I felt I was only using maybe 10 of them?

I’ve been off Resharper for a few days and I am actually enjoying the change. Two features I do miss so far is Continuous code analysis using StyleCop and Continuous Testing using dotCover. VS 2017 enterprise edition introduces Live Unit Testing which should hopefully fill this void.

I’m going to give vanilla VS2015 another week or so then I’ll try some of the open source options. I did come across this little gem as a free alternative to the paid providers: http://vsrefactoringessentials.com/

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/

Creating a SQL Alias

To help standardize the connectionstrings across your team’s development machines. You can all use the same sql alias, database name, username and password. The last three are easily configurable however the sql alias isn’t so obvious. Here’s a simple set of instructions to get it working.

My environment at time of this post is Windows 8.1, SQL Server 2014 Express.

  • First you must find the port your server is using through tcp/ip.
  • Open SQL Server Network Configuration
  • Click on the server in question
  • in the right hand pane, right click TCP/IP and select Properties
  • Hit the IP Addresses tab and scroll all the way to the bottom
  • The TCP Dynamic Ports is the port you need to use in the next section.

sqlalias_portconfig

  • Open up Sql Server Configuration Manager
  • Expand SQL Native Client. Choose 32-bit or 64-bit depending on your setup
  • Expend Aliases and create a new entry
  • The port must match the port you found above

sqlserver_sqlalias

Sources:

Disabling NuGet Package Restore

You’ve enabled NuGet Package Restore and want to reverse that decision? Follow the steps below for every csproj in your solution:

  • Close down the solution
  • Delete the .nuget folder on the solution level
  • Open up each csproj in a text editor
  • Find the following XML tags and delete them:
<RestorePackages>true</RestorePackages>  
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />  
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">  
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>