Navigation

Search

Popular Posts

My Dot Net Developer’s tools
Removing unused CSS
Using Test Impact Analysis
Creating MSDN like help

Twitter Updates

Categories

On this page

Getting Started with Mocking - Part 1 - The Basics
CodeMash 2010: Review
Dallas CSharp SIG Presentation Code And Slides
Using Test Impact Analysis in Visual Studio 2010
Working with Visual Studio on a Mac
My New MacBook Pro
Using a productivity tool like ReSharper or CodeRush
The Big Design Conference in Dallas
My Dot Net Developer’s tools list, and more…
Creating MSDN like help using Sandcastle

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 34
This Year: 3
This Month: 0
This Week: 0
Comments: 17

Sign In

 Wednesday, February 10, 2010
Wednesday, February 10, 2010 6:50:58 AM (Mountain Standard Time, UTC-07:00) ( mocking | MOQ )

Download Code.

This 2 part blog post series is based on a talk I gave at the Dallas C# SIG last month. In this post, I describe general mocking concepts that are independent of mocking frameworks. In the next post, I’ll describe how using a mocking framework (like MOQ) can reduce development time and effort.

You are probably familiar with Unit Tests, but let’s spend a little time revisiting them. As per Roy Osherove 
              “A unit test is a fast, in-memory, consistent, automated and repeatable test of a functional unit-of-work in the system.”
This is different from writing Integration Tests, which can talk to external resources such as the filesystem, webservices, database and are inherently slow. A common mistake is to create a Unit Test Suite but fill it with Integration tests. This increases the test execution time and discourages developers from running the Unit Tests on a regular basis (Ideally, each time before checking in code or more frequently).

For the purpose of this series, lets assume that you are a senior developer at a firm with plenty of work on your hands. Your pointy haired manager stops by to tell you that he has a new project for you. Seeing that you are busy, he offers to assign you an intern, Adam. You reluctantly agree and talk to Adam who seems like a sharp, reserved guy with a good grasp over OOPs concepts. You go over the project requirements with him, which consist of building a simple Shopping Cart. The Shopping Cart should

  1. have the capability to add a product and update price accordingly,
  2. have some sort of logging functionality.
Adam seems confident that he can build this project, When asked about Unit Testing, he admits not having any prior experience with it. You tell him to look it up, and write Unit Tests for his code as well. So Adam goes into his cave, and starts working on the Shopping Cart app.He informs you after 2 days that he has now completed the application and his code is ready for review. The basic design looks like this

MOQ_ClassDiagram[1]

The code for the ShoppingCart class is pretty simple. It has a Total property denoting the total price of the Shopping Cart, and an AddProduct() function, which adds the price of the product to the total and logs a message. The logger object is passed to the ShoppingCart via constructor injection. Also, the ShoppingCart is coded against IProduct and ILogger interfaces rather than concrete implementations, which makes testing easier.

   1:   public class ShoppingCart
   2:      {
   3:          public ShoppingCart(ILogger logger)
   4:          {
   5:              this._logger = logger;
   6:          }
   7:   
   8:          private ILogger _logger;
   9:          public decimal Total { get; set; }
  10:   
  11:          public void AddProduct(IProduct product)
  12:          {
  13:              Total = Total + product.Price;
  14:              if (_logger != null)
  15:                  _logger.Log(String.Format("Product {0} has been added.",product.Name));
  16:          }
  17:      }

We don’t really care about the Logger and Product implementation, but just know that the Logger logs to a text file in “C:\temp”, and the Product class retrieves the product’s price from the database. Adam has created 2 unit tests, one to check that the Shopping Cart updates its price correctly, and the second one to ensure that logging is done.

   1:          [TestMethod]
   2:          public void AddProduct_AddingProductWithPrice10_ShouldMakeTotal10()
   3:          {
   4:              var target = new ShoppingCart(null);
   5:              //make sure product with ID =1 in database has Price = 10.00
   6:              var product = new Product {ID = 1, Name = "Product1"};
   7:              target.AddProduct(product);
   8:              Assert.AreEqual(target.Total, 10.00M);
   9:          }
  10:   
  11:          [TestMethod]
  12:          public void AddProduct_AddingProduct_ShouldCallLogger()
  13:          {
  14:              var logger = new Logger();
  15:              var target = new ShoppingCart(logger);
  16:              var product = new Product {ID = 2, Name = "Product2"};
  17:              target.AddProduct(product);
  18:              //Open log file and make sure corresponding log was added.
  19:          }

Clearly, his Unit Tests leave a lot to be desired. They depend on the state of the database and the filesystem and therefore are not fast or in-memory. For the same reasons, they are also not repeatable or automated. These are in fact, more close to Integration Tests than Unit Tests. This is a very common mistake. You advise him to mock his dependencies, and since the ShoppingCart class interacts with interfaces rather than concrete implementations, this should be easy to accomplish.

Stubs VS Mocks

The definition of stubs and mocks and their differences has been debated many times before. The Mocks Aren’t Stubs article by Martin Fowler is a good resource to get started (The concepts really hit home for me after reading Roy Osherove’s The Art of Unit Testing. I highly recommend the book if you are getting started with Unit Testing). A few guidelines to remember about Mocks and Stubs are:

  • You can have many stubs in a unit test, but you should have only one mock object.
  • Stubs help in getting the unit test set up, but you’ll never assert against the stub object. You’ll assert against the class under test. 

stub[1]

If you are using mocks, you will assert against the mock object. Stubs lend themselves more naturally to state based unit testing and mocks to interaction based unit testing.

mock[1]

Adam now understands what he is doing wrong, and works on isolating his unit tests to test only the ShoppingCart class. He creates new implementations for IProduct and ILogger that he can use for Unit Testing. Note that in the new implementations, he only has to put in logic needed to get his unit tests to work.

   1:      public class ProductStub:IProduct
   2:      {
   3:          public string Name { get; set; }
   4:          public decimal Price { get; set; }
   5:          public string GetProductCategory()
   6:          {
   7:              throw new NotImplementedException();
   8:          }
   9:      }
  10:      public class LoggerMock:ILogger
  11:      {
  12:          public int NumberOfTimesLoggerCalled { get; set; }
  13:          public void Log(string text)
  14:          {
  15:              NumberOfTimesLoggerCalled++;
  16:          }
  17:      }

And he revises his Unit Tests accordingly

   1:          [TestMethod]
   2:          public void AddProduct_AddingProductWithPrice10_ShouldMakeTotal10()
   3:          {
   4:              var cart = new ShoppingCart(null);
   5:              var stubProduct = new ProductStub(){Price=10.00M};
   6:              cart.AddProduct(stubProduct);
   7:              Assert.AreEqual(cart.Total, 10.00M);
   8:          }
   9:   
  10:          [TestMethod]
  11:          public void AddProduct_AddingProduct_ShouldCallLogger()
  12:          {
  13:              var loggerMock = new LoggerMock();
  14:              var cart = new ShoppingCart(loggerMock);
  15:              int oldNumberOfTimes = loggerMock.NumberOfTimesLoggerCalled;
  16:              cart.AddProduct(new ProductStub());
  17:              Assert.AreEqual(oldNumberOfTimes + 1, loggerMock.NumberOfTimesLoggerCalled);
  18:          }

Adam’s Unit Tests now pass and he has done a good job of keeping them free from external resources such as the filesystem or database by manually mocking his classes. Note how the first Unit Test uses the new IProduct implementation (a Stub) to support the Unit Test but asserts against the Shopping Cart object, whereas the second one asserts against the new ILogger implementation (a Mock).

In the next post, we’ll see how Adam can achieve the same granularity in his Unit Tests by using a mocking framework rather than creating manual mocks.

Download Code.

kick it on DotNetKicks.com
 Saturday, January 16, 2010
Saturday, January 16, 2010 3:20:00 AM (Mountain Standard Time, UTC-07:00) ( community | conference )

I am sitting at the Cleveland airport right now, waiting for my flight back to Dallas. I spent the last 3 days at the CodeMash conference held at the Kalahari resorts in Sandusky, Ohio. This was the biggest (and longest) conference that I have been to. It was exhilarating to be surrounded by and talk to such passionate developers. You could feel the high energy levels throughout the conference. Some of the highlights for me were:

  • Bootstrapping your business session with Nate Kohari and James Avery: I have great respect for entrepreneurs, and more so for those with a coding background. Nate and James shared things that worked for them in their ventures, and a lot of things that didn’t. The session was very interactive, and a great start to the conference for me.
  • Ruby/IronRuby: One of my goals for going to CodeMash was to decide if I am going to spend any significant amount of time trying to learn Ruby/IronRuby this year. The passion that a lot of the developers (especially the EdgeCase folks)  had for Ruby was definitely contagious and hard to ignore. I ended up attending a couple of Ruby sessions and I hope to spend more time with it in the next couple of months. The best Ruby session for me was “Ruby and Rails for the .Net developer” by Matt Yoho.
  • Meeting more geeks: I got to meet a bunch of great people I knew from twitter, and some more.
  • Amazon Ninja puzzles: Amazon had the best vendor booth IMO. They had programming related puzzles for you to solve, and I found myself in front of the question board every few hours (even missed some sessions because of this :). This is me hacking away in the halls with the Amazon Ninjas next to my laptop.ninja_[1]
  • Enter the Haggis concert: There was a live concert by Enter the Haggis on Thursday night, and they played some great fusion music. This was an awesome way to unwind. enter the haggis

There was plenty of food and caffeine at the conference, though the Wifi could have been better. Thanks to all the organizers for doing such a great job. I hope to be there again next year.

kick it on DotNetKicks.com
 Thursday, January 07, 2010
Thursday, January 07, 2010 12:42:34 PM (Mountain Standard Time, UTC-07:00) ( MOQ | presentation )

I’ll be presenting at the Dallas C# SIG later today, and am uploading a draft of the code and slides, in case somebody wants to work on the code during the presentation. I’ll update the attachment after the presentation if there are any changes.

Download here.

kick it on DotNetKicks.com
 Saturday, November 07, 2009
Saturday, November 07, 2009 9:35:24 PM (Mountain Standard Time, UTC-07:00) ( Visual Studio 2010 )

A tweet this morning from David O'Hara about wanting something on the lines of Autospec for Visual Studio motivated me to look into the Test Impact Analysis feature in Visual Studio 2010. Test Impact Analysis allows you to see what unit tests have been impacted by your latest code changes. This means that you need to run only the affected tests rather than the whole test suite to ensure that you have not made any breaking changes. This is clearly a big productivity win, especially if you have a big test suite.

I created a small Calculator Class and corresponding unit tests to work with. Here's what you need to do to get started with Test Impact Analysis.

  1. Open your project in Visual Studio 2010 and open "Test Impact View" window (Test->Windows->Test Impact View). You should see something like this.

  2. Enable test impact data collection by clicking on the link in the "Test Impact View" window. You can also do the same by going into Test->Edit Test Settings->Test Settings->Data And Diagnostics->Test Impact.

  3. To generate baseline data, you need to rebuild your solution and run all tests in your test projects. You can do this using the "Test View Window". Your "Test Impact Window" should now look like this.
  4. Make code changes that you are working on. Since I am just testing here, I modify my Add() method to do multiplication instead of additon. Now when I Save the code and Rebuild the project, the "Test Impact Window" automatically updates to show what tests need to be re-run. In this case, I need to re-run my "AddTest". I do so using "Run Tests" link in the "Test Impact View" or the keyboard shortcut Ctrl +R,Y.
  5. Running "AddTest" causes it to fail since I introduced a bug in the last step.
  6. Since my test failed, it still shows up under "Impacted Tests". I now fix my Add() method, rebuild my project and rerun the unit test. My unit test passes and the "Test Impact View" becomes empty again, indicating that my code is in good shape and safe to check in.

While this is not as powerful as running affected unit tests automatically in the background like AutoSpec does for Ruby, it's defintely a step in the right direction. I can totally see this becoming a part of my workflow.

A couple of other things

  • Since Visual Studio only recognizes MSTest unit tests, I am not sure if this would work with other frameworks like NUnit. If you know of a way to do so, please leave a comment.
  • The Test Impact Analysis feature is available in Premium and Ultimate versions but not in the Professional version. See this for feature comparison between different versions.
  • I tested this with Beta 2 of Visual Studio 2010.
kick it on DotNetKicks.com
 Saturday, August 15, 2009
Saturday, August 15, 2009 3:50:57 PM (Mountain Standard Time, UTC-07:00) ( .net | Mac | Visual Studio )

When I recently purchased a Macbook Pro, I had a couple of options to set up my .Net development environment on there. I could use a Virtual Machine based solution such as Parallels or VMware Fusion, or run Windows natively using BootCamp. My first preference was to stay inside the Mac OS if possible. I spent some time researching which product other developers are having more success with and Fusion seemed to be  more stable and responsive for the majority of them. I downloaded the trial version from their website and took it for a spin, and have been really happy with it.

I have used both XP and Windows 7 in a VM with Fusion, and the performance has been pretty flawless. I allocate both processors, 40 GB of hard disk space and 2 GB of RAM to a VM. Some of my peers have long been advocating the advantages of developing using VMs, and now I totally get how cool this way of working is. I can create and restore snapshots at any point of time, create a new VM to try out any beta software, and keep my development environment isolated from softwares/utilities that it does not need (avoiding software bloat). I am using a Windows 7 VM right now for the most part and playing around with Visual Studio 2010 on it. I intially found the Unity feature in Fusion (it gives the illusion of running Windows apps natively on the Mac OS)  to be really cool, but I don't really use it much. I have dedicated a Space to my VMs, and tend to work in full screen mode.

If you end up going the same way as me, I would recommend looking at multiple vendors before purchasing Fusion. I bought if off Amazon, and it cost me $23.49 (including a $10 mail-in rebate). Other sites,including VMware, offer it for upto $80.

kick it on DotNetKicks.com
 Friday, July 31, 2009
Friday, July 31, 2009 11:26:05 AM (Mountain Standard Time, UTC-07:00) ( Mac | gadgets )

It all started when I got my new IPhone (3gs) about a month ago. I had been using a Nokia E71 since the start of this year, and have owned a couple of Windows mobile based phone before that. To describe my experience with the new IPhone briefly, its usability and slick interface just blew me away. I could not believe I had missed out on owning this marvellous device for so long. My previous cell phones offered most of the features that my IPhone does, but there's a big difference in the user experience. It would not be a stretch to say that the IPhone serves most of the functions that I had recently bought a netbook for. After playing with some really well designed IPhone apps (facebook, tweetdeck etc), I really wanted to check out the development environment and get familiar with the basics at least. Unfortunately, you can develop an IPhone app only on an Intel based Mac. When I dug for more information on the interwebs, I discovered that a bunch of other .Net developers have been using a Mac as their primary workstation for quite some time using either Bootcamp or a VM based solution such as VMware Fusion or Parallels. I decided to take the plunge and ordered a 15 inch Macbook Pro with a 2.53GHz Intel Core 2 Duo processor, 4 gigs of memory and a 320GB 7200 rpm hard disk. Here's my experience so far with the new Macbook Pro.

To put things in context, my primary workstation at home right now is a Dell desktop with 2.5 GHz Core 2 Duo processor, 6 gigs of Ram and running the latest 64 bit Windows 7 RC. I am very happy with the that machine and use it with a dual monitor setup (see image below, the one on the right is a an Asus netbook).

To get upto speed with my new Macbook Pro, I shut down the Windows based desktop completely and have been using the Macbook as my primary computer for more than a week now. The device itself is a pleasure to use and looks very slick. I like the spacious keyboard and am really digging the trackpad. It has excellent battery life (>5 hours) in my usage so far. This is the most responsive machine I have ever owned. It takes around 2 seconds to revive the system from sleep mode, and unlike my Windows experience, I do not have to keep an eye on memory and processor usage all the time. I do prefer desktops over laptops for working for longer time periods because a laptop forces me into a slouching posture and puts more strain on the wrists. I tried to find a good docking station for the Macbook but was mostly unsuccessful. The only docking station I found was from BookEndz which had mixed reviews and a very high price tag (~$300).  I ended up buying a lapstop stand instead and currently attach my 20" monitor, ergonomic keyboard and trackball when working at home. On weekends, I usually work from a coffee shop and carry the laptop around with me. I tried pairing the Macbook with my 24" monitor, but it did not feel comfortable to use due to the big difference in screen size. Here's a picture of my updated setup.

 

The Leopard OS is pretty easy to get used to. I did have some trouble initially understanding how applications are installed and kept on launching them from the Downloads folder rather than copying them to my Applications. I like the Spaces feature and it gives the experience of a larger screen area. I use different spaces for the Windows VM, web browser, chat/twitter clients right now. The biggest issue I am facing right now is constant switching between the keyboard and mouse/trackball. On windows, I use slickrun and any available shortcuts to keep my hands on the keyboard as much as possible. I found a great free app called Quicksilver for the Mac which is an application lancher (and more). Other useful applications are AppZapper (application uninstaller), Adium (chat client) and Textmate(text editor). For editing blogs, I am using a free editor called Qumana right now. I have always used the Firefox plugin FireFtp for FTP purposes, and the same suffices for my needs right now.

I have installed the IPhone SDK and am checking out Objective C and the XCode IDE right now. I plan to write another post soon describing how I set up my Windows development environment on the Mac soon. Stay tuned.

kick it on DotNetKicks.com
 Saturday, June 06, 2009
Saturday, June 06, 2009 2:07:17 PM (Mountain Standard Time, UTC-07:00) ( )

At the C# SIG meeting in Dallas last week, David mentioned something really interesting about using a productivity add-on such as ReSharper or CodeRush. I think his exact quote was:

“If your not using a productivity tool, you’re ripping off your customers and wasting your time”

While I have met and worked with many ReSharper/CodeRush users in the past and talked about the value that such tools add, the sentiment has never been so strongly expressed. I have been playing around with both the tools over the last several months and am a happy ReSharper user now. I found CodeRush to have a lighter memory footprint, but the graphics and effects just got in the way of my work. ReSharper, on the other hand, was very usable and intuitive and had a minimal learning curve. Your experience might vary, but I would encourage you to take both the tools for a spin and try using one, if you are not already doing so.

Coming back to David’s statement, I think I agree with him more or less. Not only can you save some serious time by using such a tool, these add-ons generally encourage you to write cleaner code. You also deliver more value to the client in less time, and that could possibly lead to better feedback, more projects or recommendations to other  clients.

kick it on DotNetKicks.com
 Saturday, May 30, 2009
Saturday, May 30, 2009 6:32:09 PM (Mountain Standard Time, UTC-07:00) ( )

I just came back from the Big Design Conference held today in Dallas, and my brain is just flooded right now with all the information I picked up on different design and development topics. It was one of the most well organized conferences I have been to, with 4 parallel tracks (Social Media, Code Development, User Experience and Strategy) going on throughout the day. The hardest part was to pick a session out of the different choices to go to. I ended up attending Chris Koenig’s session on touch based apps, Stephen Anderson’s talk on seductive interactions, Caleb Jenkins’ Silverlight 3 talk and Todd Wilken’s session on saying No and learning. All sessions had great content and I even got to play with a Microsoft Surface Unit, which was again very impressive but is still very expensive (~$12K-15K) to own a personal unit.

There were lots of Macbooks (designer conference, duh) and netbooks being used in the audience, and the conference twitter stream was buzzing throughout the day with reviews and feedback from the attendees. The conference organizers even had the twitter stream displayed to the public in the hallway.

bigd[1]

This just goes on to show the increasing importance of social media like twitter at such events. Overall, it was a great experience and I got to meet some really interesting people in the Dallas area as well as attend great presentations. A big thanks to the organizers for arranging this.

kick it on DotNetKicks.com
 Saturday, May 23, 2009
Saturday, May 23, 2009 4:42:33 PM (Mountain Standard Time, UTC-07:00) ( asp.net | Better Developer | utilities )

I gave a brownbag presentation at my current client recently about the common tools (in addition to Visual Studio), that I use on a regular basis for working with .NET or web development in general. I also threw in some non-development tools that are a part of my day to day life and make things easier. Here’s the complete list:

Note: For a completely awesome and Ultimate Developer’s tool list, be sure to check out Scott’s blog post.

 

.NET

 

Name

Description

Comments

ClrProfiler

The CLR Profiler includes a number of very useful views of the allocation profile, including a histogram of allocated types, allocation and call graphs, a time line showing GCs of various generations and the resulting state of the managed heap after those collections, and a call tree showing per-method allocations and assembly loads.

Working with Cassini

DebugDiag

The Debug Diagnostic Tool (DebugDiag) is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or fragmentation, and crashes in any Win32 user-mode process. The tool includes additional debugging scripts focused on Internet Information Services (IIS) applications, web data access components, COM+ and related Microsoft technologies.

Troubleshooting .Net 2.0 memory leaks.

FxCop

FxCop is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines.

 

LibCheck

This tool allows you to compare two versions of an assembly, and determine the differences. The tool reports the differences as a combination of 'removed' and 'added' APIs.

 

NDepend

NDepend is a tool that simplifies managing a complex .NET code base. Architects and developers can analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code.

Has Academic, commercial versions.

PEX

Right from the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage. Pex performs a systematic analysis, hunting for boundary conditions, exceptions and assertion failures, which you can debug right away. Pex enables Parameterized Unit Testing, an extension of Unit Testing that reduces test maintenance costs.

Reflector

.NET Reflector enables you to easily view, navigate, and search through, the class hierarchies of .NET assemblies, even if you don't have the code for them. With it, you can decompile and analyze .NET assemblies in C#, Visual Basic, and IL.

Be sure to check out the Addins

Regulator

The Regulator is an advanced Regular expressions testing tool, featuring syntax highlighting and web-service integration with Regexlib.com's database of online regular expressions.

 

Resharper

ReSharper provides solution-wide error highlighting on the fly, instant solutions for found errors, over 30 advanced code refactorings, superior unit testing tools, handy navigation and search features, single-click code formatting and cleanup, automatic code generation and templates.

  • Free 30 day trial, Full Edition: $199, C# Edition: $149.
  • CodeRush Express is a similar free alternative, but I prefer Resharper.

SandCastle

Enables managed class library developers to easily create accurate, informative documentation with a common look and feel.

Simple how-to.

ViewState Helper

Lets you debug ViewState issues by displaying Page and viewstate details for an asp.net page.

Alternative

Web Development Helper

Web Development Helper is a free browser extension for Internet Explorer that provides a set of tools and utilities for the Web developer, esp. Ajax and ASP.NET developers. The tool provides features such as a DOM inspector, an HTTP tracing tool, and script diagnostics and immediate window.

 

WinDbg

Microsoft Windows Debugger (WinDbg) is a powerful Windows-based debugging tool. It is capable of both user-mode and kernel-mode debugging.

Excellent blog to learn more.

 

 

Web Development

 

Name

Description

Comments

CssCleaner

Detect unused css classes in your website (static analysis).

Written by yours truly :). Need to add more features to this and maybe change the UI to WPF.

Design

Design is a suite of web-design and development assistive tools which can be utilised on any web-page. Encompassing utilities for grid layout, measurement and alignment, Design is a uniquely powerful JavaScript bookmarklet.

 

Fiddler

Fiddler logs all HTTP(S) traffic between your computer and the Internet and Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Firebug

Firebug integrates with Firefox to put a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

JSLint

With JavaScript Lint, you can check all your JavaScript source code for common mistakes without actually running the script or opening the web page.

 

XRAY

XRAY is a bookmarklet for Internet Explorer 6+, and Webkit and Mozilla based browsers (including Safari, Firefox, Camino or Mozilla). Use it to see the box model for any element on any web page.

 

Xenocode.com

Run any browser (IE 6-8, FF 2,3, Opera, Chrome, Safari) directly from the web.

  • This is the best and easiest way I have seen to run multiple versions of IE on your box, but their service seems to be down lately.
  • Other options are to use a virtual machine or a program like Multiple IE.

 

 

SQL Development

 

Name

Description

Comments

AnjLab SqlProfiler

SQL Server Express Edition Profiler provides the most of functionality standard profiler does, such as choosing events to profile, setting filters, etc.

This is good while working with Sql Server Express, which does not come with a profiler.

SqlAssist

Adds Sql Intellisense to Sql Server Management Studio and Visual Studio.

  • Free 30 day trial, pricing here.
  • Sql Server 2008 has inbuilt intellisense.
  • SqlAssistant is a good alternative for working with multiple database environments.

 

 

Generic Useful Tools

 

Name

Description

Comments

AutoHotKey

Automate sending keystrokes and mouse clicks by creating/recording macros.

 

Bart's Preinstalled Environment (BartPE) bootable windows CD/DVD

Bart's PE Builder helps you build a "BartPE" (Bart Preinstalled Environment) bootable Windows CD-Rom or DVD from the original Windows XP or Windows Server 2003 installation/setup CD, very suitable for PC maintenance tasks.

 

Daemon Tools

To use virtual drives.

 

Instapaper bookmarklet

Instapaper allows you to easily save urls for later, when you have time, so you don’t just forget about them or skim through them.

 

IrfanView

IrfanView is a very fast, small, compact graphic viewer.

 

KDiff

Compare, Merge files and directories.

 

Notepad++

Notepad++ is a free source code editor and Notepad replacement that supports several languages.

 

Paint.Net

Paint.NET is free image and photo editing software for computers that run Windows.

I use this instead of MS Paint for simple tasks.

Portable Apps

Carry your favorite computer programs along with all of your bookmarks, settings, email and more with you. Use them on any Windows computer. All without leaving any personal data behind.

 

ProcessExplorer

Process Explorer shows you information about which handles and DLLs processes have opened or loaded.

This has replaced my task manager for the last couple of years.

SlickRun

SlickRun is a free floating command line utility for Windows. SlickRun gives you almost instant access to any program or website.

 

Synergy

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It's intended for users with multiple computers on their desk since each system uses its own monitor(s).

 

Videora Converter

Videora Converter is a free video converter that converts video files, YouTube videos, movies and DVD's so you can play them on your video playing device.

 

VLC media player

Multimedia player.

Plays most video formats out of the box.

Winamp music player

Mp3 music player.

This supports global hotkey bindings, so I can use use my keyboard to change track, volume without bringing it in focus.

Windows Live Mesh

Keep files and folders in sync on multiple devices.

 
kick it on DotNetKicks.com
 Friday, April 17, 2009
Friday, April 17, 2009 6:19:14 AM (Mountain Standard Time, UTC-07:00) ( .net | sandcastle )

Just follow these simple steps ( I am using the Ajaxcontroltoolkit library as an example here)

 

1. Download Sandcastle (http://www.codeplex.com/Sandcastle).

2. Download and install Sandcastle Help File Builder (http://www.codeplex.com/Wiki/View.aspx?ProjectName=SHFB).

3. Check http://www.ewoodruff.us/shfbdocs/Index.aspx?topic=html/8c0c97d0-c968-4c15-9fe9-e8f3a443c50a.htm for other requirements. If you have Visual Studio installed, you should probably be good.

4. Run SandcastleBuilderGUI.exe, Create a new project and save it in the same location as your solution file. You can add it to the solution for easier version control maintenance.

5. Add your main assemblies to be documented using the Add button. Make sure your Visual studio project for that assembly is set up to generate xml documentation file (Project->Properties->Build->XML Documentation file should be checked).

6. In Project Properties within Sandcastle Help File Builder

a. Under Build -> Dependencies, Add the folder containing all the referenced assemblies, or add them individually.

b. Select the correct version under Build ->FrameworkVersion.

c. Under Build -> HelpFileFormat, choose the output type (chm and/or website).

d. Under Help File, you can add things like copyright, header, footer, feedback email address etc.

e. Set visibility for different type of members under Visibility.

7. At this point you can build project within Sandcastle Help File Builder to create help file manually. You can see an example of sample output here.

8. To create the help file from the command prompt, use SandcastleBuilderConsole.exe and pass the path to the help project file as a parameter. E.g.

"C:\Program Files\EWSoftware\Sandcastle Help File Builder\sandcastlebuilderconsole.exe" "C:\utils\libs\ajaxcontroltoolkit_help.shfb".

This can be used in a post-build event to automate the generation of help files.

kick it on DotNetKicks.com