Friday, November 21, 2014

JSON Viewer. Part 2

JSON Viewer extension has now a few new features:
  • ability to print formatted data
  • ability to format input data keeping JSON markup

  • ability to compare 2 JSON data

Source code and binaries to download are here: https://github.com/marss19/json-viewer-visual-studio-extension
After installation the viewer appears in the main menu: Tools -> JSON Viewer. Applicable to VS 2012 and 2013.

Monday, November 3, 2014

JSON Viewer

Made a simple extension to Visual Studio to view JSON data in a more user-friendly format.
Source code and binaries to download are here: https://github.com/marss19/json-viewer-visual-studio-extension.
After installation the viewer is available in the main menu: Tools -> JSON Viewer.
Applicable to VS 2012 and 2013. Please note that custom VS extensions cannot be installed into Express editions of Visual Studio due to a Microsoft policy.

Sunday, October 19, 2014

Not So Primitive Types

A few nuances about the primitive types in .Net which are not so obvious:
  • If you add two shorts you will get int. The same with bytes. Arithmetic operators for these types are not implemented in .Net therefore the values are implicitly converted to int before calculation.
        short x = 2, y = 2;
        var z = x + y;
        Console.WriteLine(z.GetType()); //output: System.Int32 
    
  • Chuck Norris is not the only person who can divide by zero. Every .Net developer can do this. Just use floating point numbers.
        var z = 1.0 / 0;
        Console.WriteLine(z); //output: Infinity 
    

Sunday, June 15, 2014

Bulk Generation of Tasks in TFS


It usually took me hours to add all tasks for my team for the next sprint in TFS. Existing UIs for this purpose were too sl-o-o-o-w, both built-in Team Explorer and Web Access (I mean Web Access for TFS 2010; 2012 is better in this context). The most annoying thing is that I usually need to specify just title and estimate for tasks but have to wait until the whole complex task entry form is loaded and then closed.

I also found bulk work items generation by means of Excel is not that convenient for addition of hierarchical (parent-child) data.

So I made a small utility for this purpose. Details and source code are here:

How to use

The main form is divided in 3 parts:
  • main menu: you can select a TFS project here, specify an area and/or an iteration to filter displayed work items and select a template for tasks creation. The default template containing all required fields is created automatically for each project. You can add more templates in case of need.
  • left panel: the work items tree is displayed here; it can be filtered by area and/or iteration. You also can load a selected item specifying its ID.
  • right panel: tasks template is displayed here; fields that should be the same for all new tasks are listed in the top part (e.g. State); items that should be unique for each item (e.g. Title) are listed in the grid below. The grid supports pasting data copied from Excel.
Use Task Template -> Manage Templates menu item to create/edit/delete tasks templates.