Skip to content


Networking is important–or what we are really not good at

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

virtualbusinessMany of us a software developer work with computers to avoid contact with people. To be fair, we all had our fair share of clients that would not understand why we couldn’t draw red lines with green ink. I understand the reason why would rather stay away from people who don’t understand what we do.

However… (there’s always an however) as I recently started my own business recently, I’ve really started to understand the meaning of building your network and staying in contact with people. While being an MVP has always lead me to meet great people all around Montreal, the real value I saw was when it was a very good contact of mine that introduced me to one of my first client. He knew they needed someone with my skills and directly introduced while skipping all the queues.

You can’t really ask for more. My first client was a big company. You can’t get in there without either being a big company that won a bid, be someone that is renowned or have the right contacts.

You can’t be the big company, you might not ever be someone but you can definitely work on contacts and expanding the amount of people you know.

So what can you do to expand your contacts and grow your network?

Go to user groups

This is killing 2 birds with one stone. First, you learn something new. It might be boring if you already now everything but let me give you a nice trick.

Arrive early and chat with people. If you are new, ask them if they are new too, ask them about their favourite presentation (if any), where they work, whether they like it, etc. Boom. First contact is done. You can stop sweating.

If this person has been here more than once, s/he probably knows other people that you can be introduced.

Always have business cards

I’m a business owner now. I need to have cards. You might think of yourself a low importance developer but if you meet people and impress them with your skills… they will want to know where you hang out.

If your business doesn’t have 50$ to put on you, make your own!  VistaPrint makes those “Networking cards” where you an just input your name, email, position, social network, whatever on them and you can get 500 for less than 50$.

Everyone in the business should have business cards. Especially those that makes the company money.

Don’t expect anything

I know… giving out your card sounds like you want to sell something to people or that you want them to call you back.

When I give my card, it’s in the hope that when they come back later that night and see my card they will think “Oh yeah it’s that guy I had a great conversation with!”. I don’t want them to think I’m there to sell them something.

My go-to phrase when I give it to them is “If you have any question or need a second advice, call me or email me! I’m always available for people like you!”

And I am.

Follow-up after giving out your card

When you give your card and receive another in exchange (you should!), send them a personal email. Tell them about something you liked from the conversation you had and ask them if you could add them on LinkedIn (always good). Seem simple  to salesman but us developers often forget that an email the day after has a very good impact.

People will remember you for writing to them personally with specific details from the conversation.

Yes. That means no “copy/paste” email. Got to make it personal.

If the other person doesn’t have a business card, take the time to note their email and full name (bring a pad!).

Rinse and repeat

If you keep on doing this, you should start to build a very strong network of developers in your city. If you have a good profile, recruiters should also start to notice you. Especially if you added all those people on LinkedIn.

It’s all about incremental growth. You won’t be a superstar tomorrow (and neither am I) but by working at it, you might end-up finding your next job through weird contacts that you only met once but that were impressed by who you are.


So here’s the Too Long Didn’t read version. Go out. Get business cards. Give them to everyone you meet. You intention is to help them, not sell them anything. Repeat often.

But in the long run, it’s all about getting out there. If you want a more detailed read of what real networking is about, you should definitely read Work the Pond by Darcy Rezac. It’s a very good read.

Categories: Blogs

Massive Community Update 2014-07-04

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

So here I go again! We have Phil Haack explaining how he handle tasks in his life with GitHub, James Chamber’s series on MVC and Bootstrap, Visual Studio 2014 Update 3, MVC+WebAPI new release and more!

Especially, don’t miss this awesome series by Tomas Jansson about CQRS. He did an awesome job and I think you guys need to read it!

So beyond this, I’m hoping you guys have a great day!

Must Read

GitHub Saved My Marriage - You've Been Haacked (

James Chamber’s Series

Day 21: Cleaning Up Filtering, the Layout & the Menu | They Call Me Mister James (

Day 22: Sprucing up Identity for Logged In Users | They Call Me Mister James (

Day 23: Choosing Your Own Look-And-Feel | They Call Me Mister James (

Day 24: Storing User Profile Information | They Call Me Mister James (

Day 25: Personalizing Notifications, Bootstrap Tables | They Call Me Mister James (

Day 26: Bootstrap Tabs for Managing Accounts | They Call Me Mister James (

Day 27: Rendering Data in a Bootstrap Table | They Call Me Mister James (


Nodemon vs Grunt-Contrib-Watch: What’s The Difference? (


Update 3 Release Candidate for Visual Studio 2013 (

Test-Driven Development with Entity Framework 6 -- Visual Studio Magazine (


Announcing the Release of ASP.NET MVC 5.2, Web API 2.2 and Web Pages 3.2 (

Using Discovery and Katana Middleware to write an OpenID Connect Web Client | on (

Project Navigation and File Nesting in ASP.NET MVC Projects - Rick Strahl's Web Log (

ASP.NET Session State using SQL Server In-Memory (

CQRS Series (code on GitHub)

CQRS the simple way with eventstore and elasticsearch: Implementing the first features (

CQRS the simple way with eventstore and elasticsearch: Implementing the rest of the features (

CQRS the simple way with eventstore and elasticsearch: Time for reflection (

CQRS the simple way with eventstore and elasticsearch: Build the API with simple.web (

CQRS the simple way with eventstore and elasticsearch: Integrating Elasticsearch (

CQRS the simple way with eventstore and elasticsearch: Let us throw neo4j into the mix (

Ending discussion to my blog series about CQRS and event sourcing (


Michael Feathers - Microservices Until Macro Complexity (

Windows Azure

Azure Cloud Services and Elasticsearch / NoSQL cluster (PAAS) | I'm Pedro Alonso (


Monitoring (

Search Engines (ElasticSearch, Solr, etc.)

Fast Search and Analytics on Hadoop with Elasticsearch | Hortonworks ( This Week In Elasticsearch | Blog | Elasticsearch (

Solr vs. ElasticSearch: Part 1 – Overview | Sematext Blog on (

Categories: Blogs

Community Update 2014-06-25

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

So not everything is brand new since I did my last community update 8 days ago. What I suggest highly is the combination of EventStore and ElasticSearch in a great article by Tomas Jansson.

It’s definitely a must read and I highly recommend it. Of course, don’t miss the series by James Chambers on Bootstrap and MVC.

Enjoy all the reading!

Must Read

Be more effective with your data - ElasticSearch | Raygun Blog (

Your Editor should Encourage You - You've Been Haacked (

Exploring cross-browser math equations using MathML or LaTeX with MathJax - Scott Hanselman (

CQRSShop - Tomas Jansson ( – Link to a tag that contains 3 blog post that are must read.

James Chambers Series

Day 18: Customizing and Rendering Bootstrap Badges | They Call Me Mister James (

Day 19: Long-Running Notifications Using Badges and Entity Framework Code First | They Call Me Mister James (

Day 20: An ActionFilter to Inject Notifications | They Call Me Mister James (

Web Development

Testing Browserify Modules In A (Headless) Browser (


Fredrik Normén - Using Razor together with ASP.NET Web API (

A dynamic RequireSsl Attribute for ASP.NET MVC - Rick Strahl's Web Log (

Versioning RESTful Services | Howard Dierking (

ASP.NET vNext Routing Overview (


Exceptions exist for a reason – use them! | John V. Petersen (

Nuget Dependencies and latest Versions - Rick Strahl's Web Log (

Trying Redis Caching as a Service on Windows Azure - Scott Hanselman (

Categories: Blogs

Massive Community Update 2014-06-17

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

So as usual, here’s what’s new since a week ago.

Ever had problem downloading SQL Server Express? Too many links, download manager, version selection, etc. ? Fear not. Hanselman to the rescue. I’m also sharing with you the IE Developer channel that you should definitely take a look at.

We also continue to follow the series by James Chambers.

Enjoy your reading!

Must Read

Download SQL Server Express - Scott Hanselman (

Announcing Internet Explorer Developer Channel (

Thinktecture.IdentityManager as a replacement for the ASP.NET WebSite Administration tool - Scott Hanselman (


Why Use Node.js? A Comprehensive Introduction and Examples | Toptal (

Building With Gulp | Smashing Magazine ( James Chambers Series

Day 12: | They Call Me Mister James (

Day 13: Standard Styling and Horizontal Forms | They Call Me Mister James (

Day 14: Bootstrap Alerts and MVC Framework TempData | They Call Me Mister James (

Day 15: Some Bootstrap Basics | They Call Me Mister James (

Day 16: Conceptual Organization of the Bootstrap Library | They Call Me Mister James (


Owin middleware (

Imran Baloch's Blog - K, KVM, KPM, KLR, KRE in ASP.NET vNext (

Jonathan Channon Blog - Nancy, ASP.Net vNext, VS2014 & Azure (

Back To the Future: Windows Batch Scripting & ASP.NET vNext | A developer's blog (

Dependency Injection in ASP.NET vNext (


Here Come the .NET Containers | Wintellect (

Architecture and Methodology

BoundedContext (

UnitTest (

Individuals, Not Groups | 8th Light (

Open Source

Download Emojis With Octokit.NET - You've Been Haacked (


Elasticsearch migrations with C# and NEST | Thomas Ardal (

Categories: Blogs

Massive Community Update 2014-06-12

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

So I’ve been doing a bit of an experiment. I’ve seen that those community updates are normally rather small. I’ve waited a whole week before posting something new to see if we have better content.

I like the “Massive Community Update” for the amount of links it provides and for the occasion to put James Chambers whole series in perspective.

If you’re still thinking about it… read it. It’s worth it.

Visual Studio “14” CTP

TWC9: Visual Studio "14" CTP Episode (

NDC Oslo 2014

0-layered architecture on Vimeo (

Monitoring your app with Logstash and Elasticsearch on Vimeo (

James Chambers Series

Day 7: Semi-Automatic Bootstrap – Display Templates | They Call Me Mister James (

Day 8: Semi-Automatic Bootstrap – Editor Templates | They Call Me Mister James (

Day 9: Templates for Complex Types | They Call Me Mister James (

Day 10: HtmlHelper Extension Methods | They Call Me Mister James (

Day 11: Realistic Test Data for Our View | They Call Me Mister James (

Web Development

NDC 2014: SOLID CSS/JavaScript & Bower talks | Anthony van der Hoorn (

Browserify: My New Choice For Modules In A Browser / Backbone App (


Final Thoughts on Nuget and Some Initial Impressions on the new KVM | The Shade Tree Developer on (

C# - A C# 6.0 Language Preview (


Host AngularJS (Html5Mode) in ASP.NET vNext (

ASP.NET: Building Web Application Using ASP.NET and Visual Studio (

jaywayco » Is ASP.Net vNext The New Node.js (

Learn How to Build a Modern Web Application with Client Side JavaScript and ASP.NET (

Fire and Forget on ASP.NET (

ASP.NET vNext Moving Parts: OWIN (

POCO controllers in ASP.NET vNext - StrathWeb (

Jon Galloway - A 30 Minute Look At ASP.NET vNext (


FIXED: Blue Screen of Death (BSOD) 7E in HIDCLASS.SYS while installing Windows 7 - Scott Hanselman (

Guide to Freeing up Disk Space under Windows 8.1 - Scott Hanselman (

GitHub for Windows 2.0 - You've Been Haacked (

Simplified Setup and Use of Docker on Microsoft Azure | MS OpenTech (

Categories: Blogs

Community Update 2014-06-04 ASP.NET vNext, @CanadianJames MVC Bootstrap series and what we learned from C++

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

So the big news is that Visual Studio 14 actually reached CTP. Of course, this is not the final name and is very temporary.

If you want to install it, I suggest booting up a VM locally or on Windows Azure.


Visual Studio “14”

Visual Studio "14" CTP Downloads (

Announcing web features in Visual Studio “14” CTP (

Visual Studio "14" CTP (

ASP.NET vNext in Visual Studio “14” CTP (

Morten Anderson - ASP.NET vNext is now in Visual Studio (

James Chambers MVC/Bootstrap Series

Day 4: Making a Page Worth a Visit | They Call Me Mister James (

Web Development

To Node.js Or Not To Node.js | Haney Codes .NET (


aburakab/ASP-MVC-Tooltip-Validation · GitHub ( – Translate MVC errors to Bootstrap notification

Download Microsoft Anti-Cross Site Scripting Library V4.3 from Official Microsoft Download Center (

ASP.NET Web API parameter binding part 1 - Understanding binding from URI (

Cutting Edge - External Authentication with ASP.NET Identity (

Forcing WebApi controllers to output JSON (


What – if anything – have we learned from C++? (

Search Engine Elasticsearch 1.2.1 Released | Blog | Elasticsearch ( Marvel 1.2 Released | Blog | Elasticsearch (

Dealing with human language (

Categories: Blogs

Late Community Update 2014-06-02 REST API, Visual Studio Update 3, data indexing, Project Orleans and more

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

So I was at the MVP Open Days and I’ve missed a few days. It seems that my fellow MVP James Chambers has started a great initiative about exploring Bootstrap and MVC with lots of tips and tricks. Do not miss out!

Otherwise, this is your classic “I’ve missed a few days so here are 20,000 interesting links that you must read” kind of day.


Must Read

AppVeyor - A good continuous integration system is a joy to behold - Scott Hanselman (

This URL shortener situation is officially out of control - Scott Hanselman (

James Chambers Bootstrap and MVC series

Day 0: Boothstrapping Mvc for the Next 30 Days | They Call Me Mister James (

Day 1: The MVC 5 Starter Project | They Call Me Mister James (

Day 2: Examining the Solution Structure | They Call Me Mister James (

Day 3: Adding a Controller and View | They Call Me Mister James (

Web Development

How much RESTful is your API | Bruno Câmara (

Data-binding Revolutions with Object.observe() - HTML5 Rocks (


ASP.NET Moving Parts: IBuilder (

Supporting only JSON in ASP.NET Web API - the right way - StrathWeb (

Shamir Charania: Hacky In Memory User Store for ASP.NET Identity 2.0 (


Missing EF Feature Workarounds: Filters | Jimmy Bogard's Blog (

Visual Studio/Team Foundation Server 2013 Update 3 CTP1 (VS 2013.3.1 if you wish) (

TWC9: Visual Studio 2013 Update 3 CTP 1, Code Map, Code Lens for Git and more... (

.NET 4.5 is an in-place replacement for .NET 4.0 - Rick Strahl's Web Log (

ASP.NET - Topshelf and Katana: A Unified Web and Service Architecture (

Windows Azure

Episode 142: Microsoft Research project Orleans simplify development of scalable cloud services (



Search Engines

The Absolute Basics of Indexing Data | Java Code Geeks (

Categories: Blogs

Incompatibility between Nancy and Superscribe

Decaying Code - Maxime Rouiller - Thu, 07/24/2014 - 05:16

So I’ve had the big idea of building an integration of Nancy and Superscribe and try to show how to do it.

Sadly, this is not going to happen.

Nancy doesn’t treat routing as a first class citizen like Superscribe does and doesn’t allow interaction with routing middleware. Nancy has its own packaged routing and will not allow Superscribe to provide it the URL.

Nancy does work with Superscribe but you have to hard-code the URL inside the NancyModule. So if you upgrade your Superscribe graph URL, Nancy will not respond on the new URL without you changing the hardcoded string.

I haven’t found a solution yet but if you do, please let me know!

Categories: Blogs

Skills Matrix & Development Plan - Template Walkthrough

Yet another bloody blog - Mark Crowther - Thu, 07/24/2014 - 00:33
One thing we'll get asked at some point is to assess the skills and competencies of the test team. To do that we need to understand what the skills competencies actually are and how we're going to assess them. We also need to decide what we're going to do with the information we gather.

Skills and competencies come in many shapes and forms. They draw on hard learning from the team members study up to raw experience gained over many years and projects delivered. As such we need to agree how to group them, then break them down into our Skills Matrix.


In the Skills Matrix on the site, we have the following examples:

  • Technical - Tools and Technology
  • Testing
  • Application

Clearly you could break these down in many ways, but these are a good start. Under each category we have entered specific examples such as;

  • Tools: ALM, UFT, Jira, Toad, PuTTY

Technology is more general and could include scripting languages, protocols or maybe servers and operating systems. As with all templates, it provides a guide but it's up to you to interpret and apply it to your unique testing or management problem.

In order for the team to be ranked (or rank themselves), we need to understand what those ranks are and what 'value' we're assigning. On the About tab, you'll see this has been defined as:

  Level   Definition 1 No knowledge   No practical, working knowledge, should be able to use if provided clear guidance 2 Awareness   Can work with existing solutions and practices, understand what to do but perhaps not fully why 3 Proficiency    Can maintain and provide minor improvements, notable skill in some areas 4 Competency   Full understanding of existing solutions and practices required for day to day work 5 Expertise   Able to critically assess and improve on current use and build future capability
Clear definitions are essential, but in no way perfect. Use these as a guide but encourage the team not to labour too much over them.

A word of warning...
When rolling out the Skills Matrix and asking the team to rank themselves, the first question will be 'Why?'. It isn't unreasonable that you'll spook the team into wondering what it might mean to rank low on the items you want to assess. You wouldn't be getting them to complete it if it wasn't relevant.

Be sure to reassure them, that this is to help identify the skill base of the team, to make assignment of testing tasks more effective, to identify ways in which the team members can be trained and so increase the team's capability. 

Professional Development Planning
You would do well to introduce a strong process of review and assessment of the team, before you roll out the Skills Matrix.

To help with this, grab a copy of the PDP Scratch Pad template and have a read through of the Developing the Team paper to learn more about implementing an appraisal process, both are on the main site.


Liked this post?Say thanks by Following the blog or subscribing to the YouTube Channel!

Categories: Blogs

Seeking the Light – A question from a recent TDD training attendee

James Grenning’s Blog - Wed, 07/23/2014 - 21:51

Here is a good question, and my reply, from a recent attendee of my Test-Driven Development for Embedded C training.

Hi James,

As I work more with TDD, one of the concepts I am still struggling to grasp is how to test “leaf” components that touch real hardware. For example, I am trying to write a UART driver. How do I test that using TDD? It seems like to develop/write the tests, I will need to write a fake UART driver that doesn’t touch any hardware. Let’s say I do that. Now I have a really nice TDD test suite for UART drivers. However, I still need to write a real UART driver…and I can’t even run the TDD tests I created for it on the hardware. What value am I getting from taking the TDD approach here?

I feel like for low-level, hardware touching stuff you can’t really apply TDD. I understand if I didn’t have the hardware I could write a Mock, but in my case I have the hardware so why not just write the real driver?

I am really confused about this…and so are my co-workers. Can you offer any words of wisdom to help us see the light?


Seeking the Light

Hi Seeking the Light

I am happy to help. Thanks for the good question.

Unit tests and integration tests are different. We focussed on unit testing in the class. You test-drove the flash driver Tuesday afternoon. That showed you how to test-drive a device driver from the spec. You mocked out IORead and IOWrite, not the flash driver. You test-drove the flash driver so that when you go to the hardware you have code that is doing what you think it is supposed to do.

The unit tests you write with mock IO are not meant to run with the real IO device, but with the fake versions of IORead and IOWrite. You could run the test suite on the real hardware, but the unit tests would still use mock IO.

I think the flash driver exercise illustrated the value. Pretty much everyone that does the flash driver exercise cannot get the ready loop right without several attempts. Most end up with an infinite loop, or a loop that does not run at all. With the TDD approach, we discover logic mistakes like that during off-target TDD. We want to find logic mistakes during test-driving because they are easy to identify and fix with the fast feedback TDD provides. Finding the problem on-target with a lot of other code (that can be wrong) is more difficult and time consuming. If your diver ready check resulted in an infinite loop, that can be hard to find. Maybe your watchdog timer will keep resetting the board as you hunt for the problem. Bottom line, it is cheaper to find those mistakes with TDD.

TDD can’t find every problem. What if you were wrong about which bit was the ready bit? An integration test could find it. An integration test would use the real UART driver with the real IORead and IOWrite functions. These tests make sure that the driver works with the real hardware. These are different than the unit tests and are worth writing. You could put a loopback connector on your UART connector. Your integration test could send and receive test data over the loopback. If your was looking at the wrong bit for the ready check, you would still have an infinite loop, but that happens only if you mis-read the spec. You’d have to find that mistake via review or integration test.

An integration test may be partially automated. You don’t need to run these so often so, partial automation should be OK. You would only rerun them when you touch the driver or are doing some release. (Loopback is probably better in this case as it can run unattended.) So the test might output a string to a terminal and wait for a string to be entered. Depending on other signals that your driver supports, you may want to breakout and control those signals in a physical test harness.

An integration test for the flash driver would exercise the flash device through the driver. You might read and write blocks of values to the real flash device. You might do the flash identification sequence. You might protect a block and try to write to it. Your integration test would make sure modification is prevented and generates the right error message. These tests use the real versions of IORead and IOWrite and run on the hardware only. When integration problems are found, solve them and then go back to the unit tests and make them reflect reality. You will know which tests need to be changed, because once the integration problems are fixed, the associated unit test will fail.

Some other words in your question makes me want to talk about a fake UART driver. You will want a fake UART driver when you are test-driving code that uses the UART driver. For example a message processor that waits for a string will be much easier to test if you fake the get_string() function. You can build that fake with mocking or hand crafted, depending upon your needs.

All that said, in general the test above the hardware abstraction layer (the layer your UART driver is part of) are the most valuable tests. They should encompass your product’s intelligence and uniqueness. Hardware comes and then it goes, as do the drivers as the components change. Your business logic has, or should have, a long useful life. The business logic for a successful product should last longer than any hardware platform’s life. Consequently those test have a longer useful life too. If I was creating a driver from scratch, I would use TDD because it is the fastest way for me to work, and results in code that can be safely changed as I discover where my mistakes are.

I hope this helps.


Categories: Blogs

Conventional HTML in ASP.NET MVC: Data-bound elements

Jimmy Bogard - Wed, 07/23/2014 - 19:03

Other posts in this series:

We’re now at the point where our form elements replace the existing templates in MVC, extend to the HTML5 form elements, but there’s still something missing. I skipped over the dreaded DropDownList, with its wonky SelectListItem objects.

Drop down lists can be quite a challenge. Typically in my applications I have drop down lists based on a few known sets of data:

  • Static list of items
  • Dynamic list of items
  • Dynamic contextual list of items

The first one is an easy target, solved with the previous post and enums. If a list doesn’t change, just create an enum to represent those items and we’re done.

The second two are more of a challenge. Typically what I see is attaching those items to the ViewModel or ViewBag, along with the actual model. It’s awkward, and combines two separate concerns. “What have I chosen” is a different concern than “What are my choices”. Let’s tackle those last two choices separately.

Dynamic lists

Dynamic lists of items typically come from a persistent store. An administrator goes to some configuration screen to configure the list of items, and the user picks from this list.

Common here is that we’re building a drop down list based on set of known entities. The definition of the set doesn’t change, but its contents might.

On our ViewModel, we’d handle this in our form post with an entity:

public class RegisterViewModel
    public string Email { get; set; }

    public string Password { get; set; }

    public string ConfirmPassword { get; set; }

    public AccountType AccountType { get; set; }

We have our normal registration data, but the user also gets to choose their account type. The values of the account type, however, come from the database (and we use model binding to automatically bind up in the POST the AccountType you chose).

Going from a convention point of view, if we have a model property that’s an entity type, let’s just load up all the entities of that type and display them. If you have an ISession/DbContext, this is easy, but wait, our view shouldn’t be hitting the database, right?


Luckily for us, our conventions let us easily handle this scenario. We’ll take the same approach as our enum drop down builder, but instead of using type metadata for our list, we’ll use our database.


// Our modifier
public class EnitityDropDownModifier : IElementModifier
    public bool Matches(ElementRequest token)
        return typeof (Entity).IsAssignableFrom(token.Accessor.PropertyType);

    public void Modify(ElementRequest request)
        request.CurrentTag.Append(new HtmlTag("option"));

        var context = request.Get<DbContext>();
        var entities = context.Set(request.Accessor.PropertyType)
        var value = request.Value<Entity>();

        foreach (var entity in entities)
            var optionTag = new HtmlTag("option")

            if (value != null && value.Id == entity.Id)


Instead of going to our type system, we query the DbContext to load all entities of that property type. We built a base entity class for the common behavior:

public abstract class Entity
    public Guid Id { get; set; }
    public abstract string DisplayValue { get; }

This goes into how we build our select element, with the display value showed to the user and the ID as the value. With this in place, our drop down in our view is simply:

<div class="form-group">
    @Html.Label(m => m.AccountType)
    <div class="col-md-10">
        @Html.Input(m => m.AccountType)

And any entity-backed drop-down in our system requires zero extra effort. Of course, if we needed to cache that list we would do so but that is beyond the scope of this discussion.

So we’ve got dynamic lists done, what about dynamic lists with context?

Dynamic contextual list of items

In this case, we actually can’t really depend on a convention. The list of items is dynamic, and contextual. Things like “display a drop down of active users”. It’s dynamic since the list of users will change and contextual since I only want the list of active users.

It then comes down to the nature of our context. Is the context static, or dynamic? If it’s static, then perhaps we can build some primitive beyond just an entity type. If it’s dynamic, based on user input, that becomes more difficult. Rather than trying to focus on a specific solution, let’s take a look at the problem: we have a list of items we need to show, and have a specific query needed to show those items. We have an input to the query, our constraints, and an output, the list of items. Finally, we need to build those items.

It turns out this isn’t really a good choice for a convention – because a convention doesn’t exist! It varies too much. Instead, we can build on the primitives of what is common, “build a name/ID based on our model expression”.

What we wound up with is something like this:

public static HtmlTag QueryDropDown<T, TItem, TQuery>(this HtmlHelper<T> htmlHelper,
    Expression<Func<T, TItem>> expression,
    TQuery query,
    Func<TItem, string> displaySelector,
    Func<TItem, object> valueSelector)
    where TQuery : IRequest<IEnumerable<TItem>>
    var expressionText = ExpressionHelper.GetExpressionText(expression);
    ModelMetadata metadata = ModelMetadata.FromLambdaExpression(expression, htmlHelper.ViewData);
    var selectedItem = (TItem)metadata.Model;

    var mediator = DependencyResolver.Current.GetService<IMediator>();
    var items = mediator.Send(query);
    var select = new SelectTag(t =>
        t.Option("", string.Empty);
        foreach (var item in items)
            var htmlTag = t.Option(displaySelector(item), valueSelector(item));
            if (item.Equals(selectedItem))

        t.Attr("name", expressionText);

    return select;

We represent the list of items we want as a query, then execute the query through a mediator. From the results, we specify what should be the display/value selectors. Finally, we build our select tag as normal, using an HtmlTag instance directly. The query/mediator piece is the same as I described back in my controllers on a diet series, we’re just reusing the concept here. Our usage would look something like:

<div class="col-md-10">
    @Html.QueryDropDown(m => m.User,
        new ActiveUsersQuery(),
        t => t.FullName,
        t => t.Id)

If the query required contextual parameters – not a problem, we simply add them to the definition of our request object, the ActiveUsersQuery class.

So that’s how we’ve tackled dynamic lists of items. Depending on the situation, it requires conventions, or not, but either way the introduction of the HtmlTag library allowed us to programmatically build up our HTML without resorting to strings.

We’ve tackled the basics of building input/output/label elements, but we can go further. In the next post, we’ll look at building higher-level components from these building blocks that can incorporate things like validation messages.

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

Categories: Blogs

How do you take notes? Want to share it?

The Social Tester - Wed, 07/23/2014 - 13:53
As some of you may know I’ve been doing some on and off research over the last five years on note taking. I’ve been interviewing people, gathering notes, observing people and studying about note taking. I’m bringing all of this together in an upcoming book. The book will be released next year via Lean Pub... Read More
Categories: Blogs

The Deadline to Sign up for GTAC 2014 is Jul 28

Google Testing Blog - Wed, 07/23/2014 - 02:53
Posted by Anthony Vallone on behalf of the GTAC Committee

The deadline to sign up for GTAC 2014 is next Monday, July 28th, 2014. There is a great deal of interest to both attend and speak, and we’ve received many outstanding proposals. However, it’s not too late to add yours for consideration. If you would like to speak or attend, be sure to complete the form by Monday.

We will be making regular updates to our site over the next several weeks, and you can find conference details there:

For those that have already signed up to attend or speak, we will contact you directly in mid August.

Categories: Blogs

Test Status Report - Template and Walkthrough

Yet another bloody blog - Mark Crowther - Wed, 07/23/2014 - 02:27
As mentioned in the End of Day Reporting - Worked Example article, EoD reporting is something we'll get asked to do as software testers, on virtually all our projects. In fact it should be literally all our projects, even when we're not asked we should provide it.

In order to do so, we need a means to capture the data that will be included in a report. That data is just data though and we need to convert it into easily digestible information. Be mindful that raw numbers may be accurate and are valuable, but they are often devoid of meaning. When reporting, don't be shy about including context and narrative - your report may be unreadable without it!

The previous article on End of Day reporting covered some points around presentation, so let's look at capturing and interpreting the raw data here. When reading through this article, have a copy of the template open in front of you. We'll walk-through each of the key sections here, but it's best to watch the YouTube video and refer to the template for a more in depth look at the Workbook.

Get a copy of the Test Status Tracker Template

Oh, watch out for formulas, there are plenty of them on the Worksheets!


Project Details
Enter the following details about the application. This data is used throughout the Workbook.

Project Name: [Enter the name of the project or application under test]
Start Date: [Enter the date as nn-mmm, e.g. 21-Jul]
Total No of Cases: [Enter the total Test Cases in scope]

Daily Tracker
There is nothing you need to enter on this tab. It is generated from the Data Table and Issue Tracker tabs. However, you will need to manually edit chart symbol colours. Refer to the status table and review variance against plan on the chart. You'll then need to select the individual data point on the green Actual line, then fill the correct colour into the point.

Data Table
There are two main sections, Planned and Actual, where you need to enter data. Before completing the table, enter the names of the testing staff in the left hand column. When planning out the amount items that will be worked on each day, enter the total in the above 'Total No. Of Test Cases' box first. Then map out what can be delivered on a day by day basis, for each member of staff.

At the end of each day, enter the Actual numbers achieved by each team member.
With the data in place you will need to select the calculation cells at the bottom of the 'Actual' table and using the fill handle, populate the cells under the day you have just entered data for

This is done daily to avoid showing zero figures on the chart, making progress easier to see.

Issues Tracker
Where an issue or risk emerges during delivery, track it on this tab if your project has no other central place to record the data.

Downtime Tracker
Each time the team are unable to progress with delivery due to some issue, this is 'downtime' and should be recorded on the Downtime Tracker tab.

The tracker forms a historic record of time lost and allows reconciliation of lost time against plan, to support reporting and re-scheduling activities.


As stated above, watch the video for a clearer run-down of the tracker. This is one worked example to show some tricks and tips of how you can make your own. If you make any interesting changes be sure to let us know!


Liked this post?
Say thanks by Following the blog or subscribing to the YouTube Channel!

Categories: Blogs

Conventional HTML in ASP.NET MVC: Replacing form helpers

Jimmy Bogard - Tue, 07/22/2014 - 17:51

Other posts in this series:

Last time, we ended at the point where we had a baseline behavior for text inputs, labels and outputs. We don’t want to stop there, however. My ultimate goal is to eliminate (as much as possible) using any specific form helper from ASP.NET MVC. Everything we need to determine what/how to render input elements is available to us on metadata, we just need to use it.

Our first order of business is to catalog the expected elements we wish to support:

  • Button (no)
  • Checkbox (yes)
  • Color (yes)
  • Date (yes)
  • DateTime (yes)
  • DateTime Local (yes)
  • Email (Yes)
  • File (No)
  • Hidden (Yes)
  • Image (No)
  • Month (No)
  • Number (Yes)
  • Password (Yes)
  • Radio (Yes)
  • Range (No)
  • Reset (No)
  • Search (No)
  • Telephone (Yes)
  • Text (Yes)
  • Time (Yes)
  • Url (Yes)

And the other two input types that don’t use the <input> element, <select> and <textarea>. This is where convention-based programming and the object model of HtmlTags really shines. Instead of us needing to completely replace a template as we do in MVC, we only need to extend the individual tags, and leave everything else alone. We know that we want to have a baseline style on all of our inputs. We also want to configure this once, which our HTML conventions allow.

So how do we want to key into our conventions? I like to follow a progression:

  • Member type
  • Member name
  • Member attributes

We can infer a lot from the type of a member. Boolean? That’s a checkbox. Nullable bool? That’s not a checkbox, but a select, and so on. Let’s look at each type of input and see what we can infer to build our conventions.


Labels can be a bit annoying, you might need localization and so on. What I’d like to do is provide some default, sensible behavior. If we look at a login view model:

public class LoginViewModel
    [Display(Name = "Email")]
    public string Email { get; set; }

    [Display(Name = "Password")]
    public string Password { get; set; }

    [Display(Name = "Remember me?")]
    public bool RememberMe { get; set; }

We have a ton of display attributes, all basically doing nothing. These labels key into a couple of things:

  • Label text
  • Validation errors

We’ll get to validation in a future post, but first let’s look at the labels. What can we provide as sensible defaults?

  • Property name
  • Split PascalCase into separate words
  • Booleans get a question mark
  • Fallback to the display attribute if it exists

A sensible label convention would get rid of nearly all of our “Label” attributes. The default conventions get us the first two, we just need to modify for the latter two:

Labels.ModifyForAttribute<DisplayAttribute>((t, a) => t.Text(a.Name));
    .ModifyWith(er => er.CurrentTag.Text(er.OriginalTag.Text() + "?"));

With this convention, our Display attributes go away. If we have a mismatch between the view model property and the label, we can use the Display attribute to specify it explicitly. I only find myself using this when a model is flattened. Otherwise, I try and keep the label I show the users consistent with how I model the data behind the scenes.


This one’s easy. Checkboxes represent true/false, so that maps to a boolean:

Editors.IfPropertyIs<bool>().Attr("type", "checkbox");

// Before
@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe)

// After
@Html.Input(m => m.RememberMe)
@Html.Label(m => m.RememberMe)

Not very exciting, we just tell Fubu for bools, make the “type” attribute a checkbox. The existing MVC template does a few other things, but I don’t like any of them (like an extra hidden etc).


With some model binding magic, we can handle this by merely looking at the type:

Editors.IfPropertyIs<Color>().Attr("type", "color");

Date/Time/DateTime/Local DateTime

This one is a little bit more difficult, since the BCL doesn’t have a concept of a Date. However, NodaTime does, so we can use that type and key off of it instead:

Editors.IfPropertyIs<LocalDate>().Attr("type", "date");
Editors.IfPropertyIs<LocalTime>().Attr("type", "time");
Editors.IfPropertyIs<LocalDateTime>().Attr("type", "datetime-local");
Editors.IfPropertyIs<OffsetDateTime>().Attr("type", "datetime");


Email could go a number of different ways. There’s not really an Email type in .NET, so we can’t key off the property type. The MVC version uses an attribute to opt-in to an Email template, but I think that’s redundant. In my experience, every property with “Email” in the name is an email address. Why not key off this?

Editors.If(er => er.Accessor.Name.Contains("Email"))
    .Attr("type", "email");

This one could go both ways, but if I want to also/instead go off the DataType attribute, it’s just as easy. I don’t like being too explicit or too confusing, so you’ll have to base this on what you actually find in your systems.


Hiddens can be a bit funny. If I’m being sensible with Guid identifiers, I know right off the bat that any Guid type should be hidden. It’s not always the case, so I’d like to support the attribute if needed.

Editors.IfPropertyIs<Guid>().Attr("type", "hidden");
Editors.IfPropertyIs<Guid?>().Attr("type", "hidden");
Editors.IfPropertyHasAttribute<HiddenInputAttribute>().Attr("type", "hidden");


Number inputs are a bit complicated. I actually tend to avoid them, as I find they’re not really that usable. However, I do want to provide some hints to the user as well as some rudimentary client-side validation with the “pattern” attribute.

Editors.IfPropertyIs<decimal?>().ModifyWith(m =>
    .Data("pattern", "9{1,9}.99")
    .Data("placeholder", "0.00"));

I’d do similar for other numeric types (integer/floating point).


We’ll use the same strategy as our hidden input – key off the name if we can, otherwise check for an attribute.

Editors.If(er => er.Accessor.Name.Contains("Password"))
    .Attr("type", "password");
Editors.If(er =>
    var attr = er.Accessor.GetAttribute<DataTypeAttribute>();
    return attr != null && attr.DataType == DataType.Password;
}).Attr("type", "password");

We had to get a little fancy with our attribute check, but nothing too crazy.


Radio buttons represent a selection of a group of items. In my code, this is represented with an enum. Since radio buttons are a bit more complicated than just an input tag, we’ll need to build out the list of elements manually. We can either build up our select element from scratch, or modify the defaults. I’m going to go the modification route, but because it’s a little more complicated, I’ll use a dedicated class instead:


// Our modifier
public class EnumDropDownModifier : IElementModifier
    public bool Matches(ElementRequest token)
        return token.Accessor.PropertyType.IsEnum;

    public void Modify(ElementRequest request)
        var enumType = request.Accessor.PropertyType;

        request.CurrentTag.Append(new HtmlTag("option"));
        foreach (var value in Enum.GetValues(enumType))
            var optionTag = new HtmlTag("option")
                .Text(Enum.GetName(enumType, value));

Element modifiers and builders follow the chain of responsibility pattern, where any modifier/builder that matches a request will be called. We only want enums, so our Matches method looks at the accessor property type. Again, this is where our conventions show their power over MVC templates. In MVC templates, you can’t modify the matching algorithm, but in our example, we just need to supply the matching logic.

Next, we use the Modify method to examine the incoming element request and make changes to it. We replace the tag name with “select”, remove the “type” attribute, but leave the other attributes alone. We append a child option element, then loop through all of the enum values to build out name/value options from our enum’s metadata.

Why use this over EnumDropDownListFor? Pretty easy – it gets all of our other conventions, like the Bootstrap CSS classes. In a system with dozens or more enumerations shown, that’s not something I want to repeat all over the place.


We’ll treat the telephone just like our password element – check for a property name, and fall back to an attribute.

Editors.If(er => er.Accessor.Name.Contains("Phone"))
    .Attr("type", "tel");
Editors.If(er =>
    var attr = er.Accessor.GetAttribute<DataTypeAttribute>();
    return attr != null && attr.DataType == DataType.PhoneNumber;
}).Attr("type", "tel");

If we want to enforce a specific pattern, we’d use the appropriate data-pattern attribute.


This is the default, so nothing to do here!


Just like our password, we’ll look at the property name, then an attribute:

Editors.If(er => er.Accessor.Name.Contains("Url"))
    .Attr("type", "url");
Editors.If(er =>
    var attr = er.Accessor.GetAttribute<DataTypeAttribute>();
    return attr != null && attr.DataType == DataType.Url;
}).Attr("type", "url");

If we get tired of typing that attribute matching logic out, we can create an extension method:

public static class ElementCategoryExpressionExtensions
    public static ElementActionExpression HasAttributeValue<TAttribute>(
        this ElementCategoryExpression expression, Func<TAttribute, bool> matches)
        where TAttribute : Attribute
        return expression.If(er =>
            var attr = er.Accessor.GetAttribute<TAttribute>();
            return attr != null && matches(attr);

And our condition becomes a bit easier to read:

Editors.If(er => er.Accessor.Name.Contains("Url"))
    .Attr("type", "url");
    .HasAttributeValue<DataTypeAttribute>(attr => attr.DataType == DataType.Url)
    .Attr("type", "url");

Wrapping up

We knocked out most of the HTML5 input element types, leaving out ones that didn’t make too much sense. We can still create conventions for those missing elements, likely using property names and/or attributes to determine the right convention to use. Quite a bit more powerful than the MVC templates!

Next up, we’ll look at more complex element building example where we might need to hit the database to get a list of values for a drop down.

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

Categories: Blogs

End of Day Reporting - Worked Example

Yet another bloody blog - Mark Crowther - Tue, 07/22/2014 - 14:25

Reporting the status of testing, at whatever stage, is critical to effective management and ensuring the business is confident about our ability to deliver. Reporting accurately, consistently and frequently are key. It would be great to have a tool that did all the reporting for us, but often we don't have a test management and reporting tool in place. In fact, sometimes the tools we get burdened with are more trouble than they're worth, being unable to produce the reporting we want. Either in the style we need or with the ease we'd like to see. In that case, Excel and Word along with a simple email become our best friends. If we do revert to this simpler approach, we still need to ensure accuracy and consistency.

When working as a member of a team or as a consultant, my preference is always to send an end of day report out.
The benefits of doing so include:

* Ensuring you have a think-through of what the status actually is, what you need to be doing and any issues that you need to raise
* Providing information to the line manager and stake-holder that they can take into their own meetings and reporting
* Creating a record that can be referred to in post implementation reviews, to help identify areas to be improved on

The main trick with these reports is to keep them short. My rule-of-thumb is that if it takes more than 5 to 10 minutes to complete, it's too long. The EoD update should be simply collating what you already know and information you already have, into an easily digestible email or post on some internal forum perhaps. There are many ways to structure these EoD updates, but here's what I'd typically expect to include, in the style I'd provide it.

The objective is to keep them informed at a high level. Imagine they're stopped by the project sponsor and asked "How are things going?", the below should be enough to answer the question. Remember, it's just a snapshot. If the audience for this wants more information they need to dig.

In the next post, we'll look in detail at a Excel Daily Status Tracker workbook that can be used for this.


Example Project - EoD Update: Tuesday 22nd July, 2014

Current RAG: Amber
Planned Complete Date: Mon 21st July, 2014
Expected Complete Date: Thu 24th July, 2014

Due to environment downtime, caused by network outage, progress for execution is 10 Test Cases behind schedule. The issue was escalated and is now resolved. Expectation is delivery will be back on plan by Friday 25th.

Of 126 Test Cases in scope:
- Execution is 10 Test Cases behind plan
     - Total executed to date is 87 (+7) or 69% (+6%) , of which;
        - 65 (+6) Passed
        - 12 (-2) Failed
        - 10 (+3) Blocked

- 3 Test Cases Blocked due to test data being for transactions already expired. Will create new data tomorrow and execute as a priority
- 12 Cases in a Fail state with Development, 2 Fails retested and passed
- Team will conclude Feeds testing tomorrow and move onto Reporting and Transactions areas
- Pleas note: David is out of the office Thursday, therefore no Test Cases for Reconciliations will be executed

Daily Tracker Chart
Liked this post?
Say thanks by Following the blog or subscribing to the YouTube Channel!
Categories: Blogs

Ruby - If Ternary, Until, While

Yet another bloody blog - Mark Crowther - Tue, 07/22/2014 - 01:58
We’re making good progress getting some of the key basics of Ruby understood. Variables are of course central, Arrays allow a more complete way of data handling, Case and If statements are the building blocks of ‘flow control’ in our program.
In looking at these, we’ve also learned a few tricks with getting, printing, chomping and interpolating data and a few neat tricks to present and evaluate data in different ways, to get a True or False state so we know what to do next. That’s quite a bit in a few hours, congratulations if you’ve followed along so far!
With this stuff understood, let’s loop back on ourselves somewhat and add in more detail on a couple of things. To start with, let’s finish off a few more aspects of flow control.The if statement as we saw it before also has a shorter version, called the ternary or base three operator. Here’s an example:
a = 2a == 1 ? (puts "Banana") : (puts "Cheese")
Here we set the value of our variable a to 2, in the next line we ask does a equal 1? If True then puts Banana, else puts “Cheese”. In the brackets we could include whatever code we wish to, just like the longer form If statement. However, the ternary or base three version easily gets difficult to read and should only be used for small tasks. This might be concatenating two string or doing a quick piece of math.
In addition to Case and If statements, we also have Until and While loops available to us. These allow us to execute a block of code until a certain condition is trueor false.

·         For Until, the code executes so long as a condition is evaluated to false·         For While, the code executes so long as a condition evaluates to true
First, here’s an example of Untilin action:
c = 1
 until c == 6
   puts "C = #{c}"
   c +=1
We’ll see five lines printed to screen, stopping when c evaluates to 6, as the condition is now true. Note in the last line how we increment the value of our variable.Let’s look at an example ofWhile in use:
d = 1
 while d < 5 do
   puts "D = #{d}"
   d +=1
As with the Until, here we’ll see five lines printed and the code will stop executing once the condition is false. The do keyword is optional. However, it’s more correct to use it, just like adding then in our If statements.
Read More


Categories: Blogs