Using Virtual PC

by Mike Linnen 14. June 2006 14:48
Using Virtual PC

I have been using Virtual PC for various reasons around software development.  I find it very useful to maintain old development environments.  One of the big gotchas that I have run across is copying virtuals and attempting to use them on the network at the same time.  A copied virtual assumes the same machine identity so it ends up colliding with the original virtual on the network.  I know you can prepare a virtual image to prompt you for a new machine name when it first comes up but I have never looked into how it is done.  I found this article on using Virtual PC in a development environment.  It has a number of tips and tricks I have been using for a while but more importantly it has the instructions on how to make a virtual unique on the network.  http://coolthingoftheday.blogspot.com/2006/06/using-vpc-for-development-and.html

Tags:

Software

Another Wiki

by Mike Linnen 14. June 2006 11:03
Another Wiki
Even MSDN is using a wiki to share information.  I like the fact that you can use the tree control to quickly navigate the content.

Tags:

Software

Added RSS Feed to the site

by Mike Linnen 8. June 2006 02:39
Added RSS Feed to the site

I went ahead and added a single RSS feed to my site.  I ended up using the RSS Toolkit that can be found on Dmitryr's blog.  It was very easy to get the tool kit to publish RSS.  I need to bounce the RSS XML format against the 2.0 specifications to be sure I am emitting decent RSS. 

I had one problem with the control that comes with the tool kit.  I attempted to create multiple channels based on the Blog Catagories that I have defined in case someone would want to subscribe to only a specific catagory.  However when I placed this control in a repeater whenever a post back occurs I get an error stating this "is not a valid virtual path".  I suspect it has something to do with the control when it is trying to append the ChannelName to the query string.  For now I just removed the subcatagory RSS feeds.

Moving off of .Text blogging software

by Mike Linnen 7. June 2006 03:33
Moving off of .Text blogging software

Well I decided to move my blog off of .Text and onto a custom blog application that I am writting from scratch.  I didn't really have any problems with .Text but I wanted to create some new features and I did not have the source.  So as it stands right now I have limited blogging features in my custom solution.  I was able to migrate my data out of .Text and into the new schema without much issue.  I have some old links to the old blog that will have to be changed.

I will be slowly adding the following features:

  • RSS Feeds - Done 6/4/2006
  • Ability to add comments
  • Blog search
  • Support for blogging API so that I can add blog entries from a smart client application
  • Submit blog entry by email
  • Ability to create blog entries but delay the publishing of the entries - Done 6/10/2006

Code Coverage of web applications in .Net 2.0

by Mike Linnen 2. May 2006 22:36
Code Coverage of web applications in .Net 2.0

In my day job at JDA Software I have been looking at code coverage options for determining the effectiveness of our testing.  My team uses four types of tests to test the software we write.

  • Unit Tests - Tests focused on a single component of the application.  These tests are MSTests that exercise a specific software component and typically mock out any dependant components.
  • Integration Tests -  Tests focused on multiple components of the application.  These tests are MSTests that exercise a component and it's dependencies to ensure the components work together.
  • Manual Tests - Tests that are executed by are testers manually from a GUI interface. 
  • Automated functional test - Tests that are scripted in a fashion that can be repeated build after build to ensure the build is still functional.  Sometimes referred to regression testing.

The goal of implementing a code coverage process was to determine the effectiveness of the types of tests listed above.  Visual Studio 2005 Team Edition (for testers and developers) provides some nice code coverage features we wanted to tap into.  Code coverage of unit tests and some integration tests worked fine from the visual studio IDE.  But for the integration, manual and automation tests that used web services we began to run into problems.  The web services that where hosted under IIS where not getting covered.  After some research I determined that code coverage under ISS was not going to work.  So I started looking into alternatives.  One thing I noticed is that web service projects that where not hosted under IIS had no problem getting covered.  These types of projects used the development web server that comes with ASP.NET 2.0.   So I decided to look into using the same development web server in place of IIS for code coverage purposes.

 

The generic steps for establishing code coverage for web services is as follows:

  1. Turn on instrumentation for the binaries that you want to cover
  2. Start the coverage monitor
  3. Start the development web server for a specified unused port pointing to the folder that is supposed to represent the web service.
  4. Execute your tests
  5. Stop the development web server
  6. Stop the coverage monitor
  7. Review the results in Visual Studio 2005

For the following commands use the Visual Studio Command prompt.

 

Turning on instrumentation of assemblies from the command line is done by the following command:

vsinstr -coverage myassembly.dll

 

To start the coverage monitor you use the follwoing command:

start vsperfmon -coverage -output:mytestrun.coverage

 

To start the development web server use the following command:

start WebDev.WebServer /port:8080 /path:c:\mypath

 

To stop the development web server simply right click on the task bar icon for the web server and select stop

 

To shutdown the coverage monitor use the following command:

vsperfcmd -shutdown

 

We were now able to do code coverage of all types of tests that we planned on implementing.  Some of our test runs are going to executed by the build and some will be executed by the testers.  Since VS.Net 2005 supports the ability to merge code coverage results this should not be a problem to combine all runs into a single report that now shows how effective our tests really are.

 

Some references to articles that help me come to this conclusion:

Command Line code coverage:

http://blogs.msdn.com/ms_joc/articles/406608.aspx

 

Using WebDev.WebServer from the command line:

http://www.devsource.com/article2/0,1895,1886246,00.asp

Putting XP on a USB key

by Mike Linnen 3. March 2006 00:36
Putting XP on a USB key

I found this today http://www.informationweek.com/shared/printableArticle.jhtml?articleID=177102101

I have not tried it myself but if I get a chance I might give it a whirl.

Tags:

Software

More updates on copy podcasts program

by Mike Linnen 2. March 2006 00:16
More updates on copy podcasts program
Well I have been using my Copy Podcast to memory card utility for over 6 months now.  Even though it is only a command line program I have enjoyed using it because it makes moving the podcasts I like to listen to onto my Pocket PC a lot easier.  Only thing I wish I had is a feature to rank some of the podcasts higher than others so that they would get onto my player faster than the podcasts I rank lower.  I think I will go ahead and migrate the program to .Net 2.0 and add in this feature.

Interfacing a PC to the outside world Part 2

by Mike Linnen 24. November 2005 20:26
Interfacing a PC to the outside world Part 2

In Interfacing a PC to the outside world Part 1 I mentioned that I wanted to work on a set of articles to discuss interfacing your PC to the outside world.  In part 2 I am going to continue the series and talk about what my first connection to the outside world is going to be. 

 

There are a number of devices that are designed to communicate over I2C.  I2C is a serial interface developed in the 1980's at Phillips Semiconductor.  The architecture allows for multiple devices to co-exist on the same 2 wire bus.  You can get more information on the I2C bus at the following: http://www.esacademy.com/faq/i2c/. 

 

There are a considerable number of devices that support the I2C bus.  A compass can be used to determine direction.  A sonar module can be used to detect obstacles.  A motor controller can be used to drive motors on a robot.  A servo controller to drive hobby servo motors.  All of these I2C capable devices (and several more) can be found at www.acroname.com.  I have done some research on PC I2C devices but so far everything I have found is fairly expensive.  I believe I can make a device that will bridge the PC to I2C gap and open up the world of I2C devices to PCs.

 

So a .Net I2C library is going to be the first project that I will do.  The library will support communicating on the I2C bus to other devices.  The consumers of this library should not care how the I2C communication is actually implemented.  So the primary goal of this exercise is to architect a provider model for communicating to these devices.  The benefits of this model allows for different I2C providers to be used without affecting the consumers. 

 

The first provider I will be creating will be a micro controller RS232 I2C Provider.  This will be  a small device that sits between the PC and the I2C devices.  The micro-controller's job is to intercept the serial commands from the PC and convert them into I2C commands.  I will be using a BX24 from Netmedia as this micro controller.  Later I will create a parallel port I2C provider that can be used in place of the micro controller RS232 provider.

 

The PC to BX24 I2C solution is a little more expensive than I intended to start with.  However I have a few BX24s lying around from other projects so it won't take a dent out of my pocket.  Also I have a Deventech compass to try the library out on.  Besides I also intend to use the BX24 for other interfacing projects.

 

    

Tags: , , ,

Robotics

Interfacing a PC to the outside world Part 1

by Mike Linnen 23. November 2005 10:15
Interfacing a PC to the outside world Part 1
 

I have been reading some of the Coding4Fun articles that are on MSDN.  Several of the articles are focused on connecting your computer up to external devices and writing .Net code to interface with the devices.  This has always been a main interest of mine since I am interested in robotics and home automation.  The resent release of .Net 2.0 has made some nice features available for doing serial communications.  Also Microsoft has made the Visual Studio Express editions freely available for 1 year.  This makes up a great solution for the general hobbyist to play with software and hardware.  So I thought it was time that I start my own set of articles on building software and integrating it to hardware devices.

 

So I gave it some thought on where to begin.  What project will be a prime candidate?  How would I build the foundation so I could leverage different hardware solutions to a given interface problem.  So I decided on a few goals to keep in mind about the project:

  • Provide a solution to an interfacing problem that could be used in many projects.
  • Build the library using .Net 2.0.
  • The library should extract the consumer from any hardware implementation.
  • The library should be testable without hardware implementation. 
  • The library can use external pluggable components to fulfill the interface to the hardware itself.  So 3rd party components can be built and plugged into the library.

 

Stay tuned for a series of articles on this project

Tags: , ,

Robotics

.Net 2.0 Serial Port

by Mike Linnen 19. November 2005 17:53
.Net 2.0 Serial Port

Hey looks like the new .Net 2.0 supports a serial class that makes serial communications a snap.

http://msmvps.com/coad/archive/2005/03/23/39466.aspx

I need to get going on some project to try this out.  Maybe a PC to BX24 project that will be useful in my house.  I need to give it some thought. 

About the author

Mike Linnen

Software Engineer specializing in Microsoft Technologies

Month List