How To Get Your Users/GrandmaTo Send Bug Reports/Problems

This is a great introduction to the Problem Step Recorder (PSR).

It is installed by default on windows 7 and above.

You start the program on windows 7 by pressing the windows key (usually two to the left of the spacebar) then type psr and press enter.

This provides a video recorder level interface.

Once the record button is pressed it will capture all of the actions that the user performs while reproducing/demostrating an issue.

When they have finished they can simply hit the stop button where it will prompt to save the document it has created (by default it will use the desktop).

This document can then be attached to an email and sent to someone to investigate.

The only issue that I have with it is that if not run as an administrator it has a prompt about not being able to report on processes as other users – but this can be safely ignored.

Could this also be used as documentation for an application? Alternatively it could be used by developers to demonstate a given feature.

T4 Templates

Here is a sample tt template (sample.tt):

<#@ output extension=”.txt” #>
<# for(int i =0; i < 10; i++) {#>
<#=i #>
<#   }
#>
<#@ include file=”testme.t4″ #>

I can see how useful this can be in reducing repetative code.

Remote version of Get-Service

This is a powershell version of get-service that works across remote machines (provided that you have sufficient access to the box).

function Get-ServiceRemote($computerName = “.”)
{
Get-WmiObject win32_service -ComputerName . | sort Name | select SystemName,State,Name,DisplayName
}

This can be passed through ft -Auto to become more readable.
A few scripts like these could be of great use in checking the state of a remote system.

Json.Net Parsing Example

I have been looking at how to easily consume json from C#.
Given the source of the data I don’t want to create specific types (I’ll be creating a dynamic wpf control to allow editing of json read from a configuration database).
This requires newtonsoft.json to be pulled from nuget and a reference made to newtonsoft.json.


using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace SimpleJsonTest
{
class Program
{
static void Main(string[] args)
{

string json = @"[{""First"":""Chris"",""LastName"":""Pietschmann""}, {""First"":""Chris"",""LastName"":""Eyre""}]";
List<Dictionary> values = JsonConvert.DeserializeObject<List<Dictionary>>(json);

Console.WriteLine( string.Join(",", values[0].Keys));
Console.WriteLine(string.Join(",", values[0].Values));
Console.WriteLine(string.Join(",", values[1].Values));

Console.ReadLine();
}
}
}