March 2008 Entries

Unless you configure the drive from a few levels under Administrative Tools, the drive will appear to randomly select a letter.  For example, one day when you plug your USB drive in, you'll see E: and on another occassion you'll see F:.  It's not really random--its actually tied to which USB ports are available and the internal definitions of the ports by sequence. This can be troublesome should you have shortcuts on your desktop that point to programs on your USB drive. The install packages would have dubbed the starting and target destinations with whatever letter the USB drive had at the time--so when the drive letter changes, the shortcuts don't work!

To solve this heartburn, do the following:

  1. Go to Start>Control Panel>Administrative Tools>Computer Management>Storage>Disk Management
  2. Highlight the drive and select Change Drive Letter and Paths..."
  3. Click on Change.
  4. Type a higher letter (e.g. S,T,U,V..) so that if you were to get a new internal disk drive, the assignment won't conflict.

Once the save is changed, go through your desktop and your program shortcuts by right clicking on the shortcut's icon. Select Property. Reassign any icons, targets and starting destinations with the drive letter you assigned.

 

 

If you are getting an error message with the phrase LockClrVersion could not be located in the dynamic link library mscoree.dll  it is probably because you don't have the correct .net framework loaded. For the newer versions of C#/VB/etc.express (Visual Studio 8.0), you'll need to load the v2.0 .net framework.

If you're trying to execute Visual Studio from a location that isn't associated with your machine's installation, you'll probably move the error to some other error--at which point, a reinstall of vs will be your best bet.

truncated Microsoft WindowIf an application window, like the one to the left, keeps you from being able to enter data because it cannot be maximized or it is not enabled to scroll up or down, it is usually because the programmer made some assumptions about the display settings.

To compensate for that, you'll have to change the display settings  on your computer.

To do this, follow these steps:

  1. 1. Start>Control Panel>Display> Appearance>Color Scheme 
  2.  
  3. 2. Choose something like Desert, which displays at a smaller font.
  4. 3. Apply the change.

Your screen should refresh with the new color scheme--allowing you to be able to work within the confines of the fixed window space!

As long as you (or your colleagues) don't have any serious test data you've been working on that needs recovering, it's pretty simple to generate a fresh instance!

First, search for the SQL Server script that builds the demo database under \Mssql\Install. The name of the script is called: instnwnd.sql .  If the script isn't found there, an alternative place to look is under the Visual Studio SDK path(s), for example:  C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Samples\Setup . If the script is still missing in action, try searching for the file. Once you have located the file, open a command window and navigate to that directory path. Once there, type:

osql -Usa -Psapassword -SMyComputerName\MyDBServerName -iinstnwnd.sql -oinstnwnd.log

(READ: -U = username, -P = password, -S = DB Server Name -i = input script -o = output log.)

To be sure that the script executed correctly, open the instnwnd.log file and review the results.

That's it!

 

As I continue with writing the manuscript on rules engines, I've isolated my examples to be coincidental with the overall theme of engineering decision support applications. Today, I am taking a close look at the seemingly simple act of identifying and rejecting unattractive alternatives when competing projects are under review to determine whether or not a given project will warrant funding.

Some of the determining factors are well known algorithms in the financial world. Specifically I am thinking about the rate of return on investment (roi), present worth (pw), annual cost (euac), annual benefit (euab), benefit-cost ratio (bc), net present worth (npw).  Overall, these calculations can quickly help decide whether the minimum level of economic attractiveness is met by a project. I will elaborate on each of these later. For now, any of the methods may be used independently or collectively to ultimately reject a candidate project.

Before we translate this decision process to a specific rule engine implementation, Let's look at a class stub I wrote to think it through:

using System;
using System.Collections.Generic;
using System.Text;

namespace CapitalExpendProjProp
{
    public class ProjectProposal
    {
        // MARR = minimum attractive rate of return
        public int ProjectReview(string Project, string[] alternative, int MARR)
        {
            int roi, pwb, pwc, euac, euab, bc, npw, rejTally = 0;

            foreach(string alt in alternative)
            {
                roi = rateOfReturn();
                if (roi < MARR)
                { rejTally = rejTally + 1; } // REJECT

                pwb = presentWorthBenefits();
                pwc = presentWorthCosts();

                if (pwb < pwc)
                { rejTally = rejTally + 1; } //REJECT

                euac = AnnualCost();
                euab = AnnualBenefit();

                if (euac > euab)
                { rejTally = rejTally + 1; } //REJECT

                bc = BenefitCostRatio();

                if (bc < 1)
                { rejTally = rejTally + 1; } //REJECT

                npw = NetPresentWorth();
                if (npw < 0)
                { rejTally = rejTally + 1; } //REJECT
            }

            return rejTally;
        }
    }
}