Tuesday, November 1, 2005

MS Access - kill the competition, win the space, then move on

Okay, I know up front I'm not going to get brownie points for this but I'm going to do it any way. First point here is the apparent demise of Access. I know I'm late to this game but between MSDE and now SQLExpress it seems that ol' Access is headed for the scrap heap. Second point here is rooted in my love of Paradox. It was the first relational database I learned in 1985 back when ANSA came out with 1.1.

My father had a copy which was bundled with his true blue IBM AT and I began playing around with it. First I learned the basic table stuff then it was forms and eventually QBE. It also took very little scripting with PAL to get a complete solution working. I went so far as to build a rudimentary RPG II source editor using separately designed forms for each specification type (much snazzier than SEU - see Tony Green's screenshots) and earned my first consulting check using it. Having Paradox meant I poo-poo'd dBase and Clipper for I had the better tool. Fast forward to early 90's and the (Borland) world waited in anticipation for the new Paradox for Windows due out soon - like kids trying to sleep on Christmas eve. Microsoft beat them out the door by 6 months with what was arguably an inferior product. By the time Access 2.0, VB 3.0, and Excel 4.0 were out I had quietly put away my favorite tools - Paradox, Borland Pascal, and Quattro. Most magazine and bookshelf space was going to Microsoft products and the job listings for my tools were rare - the writing was on the wall.

20+ years later, I can still stand by my decision intellectually but my heart was always a bit torn and sad for the better Borland community. Access never really grew beyond its initial feature set - just beat the competition to death and now it's heading off the playing field a tired, worn player that never really moved beyond its hype.

Original post

Monday, October 31, 2005

First SQLExpress and now Oracle Express?

Free Oracle Database Takes On MySQL, SQL Server Express story by CRN.

"Oracle Database 10g Express Edition, or XE, targets hobbyists, new database developers and others who might want to try out the technology, said Andy Mendelsohn, senior vice president of database server technologies for the Redwood Shores, Calif., company."

Original post

Sunday, October 30, 2005

VS 2005 RTM Initial Impressions

Here are my initial impressions on the released version of VS2005. I attended PDC 03 and played with both Longhorn and Whidbey but as time went on I found it hard to keep up with the releases and all the nuances of the near "black magic" it seemed it took to get the CTPs, betas, and release candidates installed correctly and working. Being on a full-time project with deadlines and trying to develop a software product on the side meant I had to be careful about my focus.

Installation

Having worked with SQL since 6.5 and all versions of .NET and Visual Studio, I knew I wanted to install SQL 2005 first. My test environment was a Windows XP SP1a Virtual PC image I had saved off as a baseline (hadn't gotten around to making an SP2 one). First thing I did was install SP2 and reboot to ensure a clean foundation. I tried installing SQL and received an error 193 while trying to install .NET Framework 2.0. Since it was Thursday evening, there was little to find online for help with either Google or MSDN searching (still too soon?). I then found that the .NET Framework 2.0 Redistributable was now available so I installed that and tried SQL 2005 again. Same error. At this point, I gave up on SQL 2005 since I was initially interested in VS 2005. The VS2005 install went smoothly including SQL Express.

First Surprises

I confess that I hadn't had time to pay much attention to SQL 2005 so when I went looking around for an Enterprise Manager type of application I was surprised to find nothing. Also, I had stepped back from the beta stuff before the express editions came out so I hadn't tried or followed anything with them. A little hunting around lead me to the VS Express Editions page where I learned there's something called "XM" for Express Manager (a 'lite' version of Enterprise Manager) but it wasn't ready yet. Since I had an existing VS 2003 application with a database I first needed to figure out how to get it brought over.

Setting Up A Database

I found out you can use a new command window utility called 'sqlcmd' which gives you a command line interface. Having worked with Oracle's Server Manager for years as well as DB2, I wasn't too worried. Interesting side note, Oracle finally removed SvrMgr in version 8 forcing people to use the newer Java-based graphical UI which some complained about. Now we find Microsoft which has always had Enterprise Manager since 6.5 (earlier?) is now introducing a command environment. Since we use a database project, I tried to update the connection but couldn't get it to work. I finally resorted to using sqlcmd to create an empty database. With a little poking around I found the default instance is referenced via '.\SQLExpress' so you launch it with 'sqlcmd -S .\SQLExpress'. Note that the -S is case sensitive so if you use a lowercase -s it'll hang for a long while before it finally returns an error. Upon successful connection, you'll receive a cryptic '1>' prompt so if this is your first time, don't be alarmed. Just start issuing T-SQL commands. Here's one I used to create an empty database:

USE [master]
GO
CREATE DATABASE [ComposerDb] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ComposerDb.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ComposerDb.ldf' )
FOR ATTACH;
GO

After that, I deleted the connection in the database project, created a new one using the "new" server name in place of (local) and was able to run our scripts to create the tables, views, and stored procedures without a hitch. Skipping ahead, when I tried to run the web service project, I received a security error - unable to connect. Not a problem, I forgot to grant the ASPNET account (for XP w/ IIS 5.1) permission. Back to the sqlcmd window for a CREATE LOGIN using the example in the online help. However, at this point I became stuck. I couldn't seem to get a CREATE USER to work so I couldn't get the ASPNET user into the new database. After a lot of hunting on MSDN newsgroups, and Google searches, I finally gave up and tried installing just the client tools for SQL 2005. It went without a hitch although it took a long time to run. When it was finished, I could launch the new Enterprise Manager (it recognized the SQLExpress instance) and was able to add the ASPNET user to the database. Finally the web service test page came up and I was off and running.

Project Conversions

In between the above SQL bumps, I opened my existing VS2003 solution and the conversion wizards worked great. When all was done I had the following projects converted: a data access layer, a business model layer, two business model factories (direct connection and web service interface), a web service layer, and an admin UI. We were using NUnit for our tests and I needed to install it. I had 2.2.0.0 dated 8/8/2004 and when I ran the MSI it complained that it needed .NET Framework version 2.0.40607. Since it didn't like the RTM version, I opted to simply copy my existing implementation from my VS 2003 machine and followed the instructions for manual registering.

Conclusion

The VS2005 installation and conversions of the existing projects went extremely smoothly and I'm very pleased with the quality and the experience. The SQL 2005 (Express and Standard) I think is due to just being early. If I had invested time with the betas and CTPs it no doubt would've been a no-brainer. I'm sure that as weeks go by, more and more information will be published and answers to any questions will be easy to come by. Having a graphical admin tool such as Express Manager will go a long way to curing any hiccups.

Original post

Wednesday, October 26, 2005

Been there, seen that - Big Blue's got a black eye

Tristan Yates has posted a scathing report of IBM's actions at "one of the biggest defense contractors in the world". I found it via Dave Oliver who said that he didn't find it hard to believe. I've witnessed similar actions at "a major insurance company on the west coast". :)

I was a senior architect in the consulting group of a software vendor selling e-business type applications that ran on J2EE. The two primary platforms at the time were Weblogic/Oracle and Websphere/DB2. The sales folks brought me in for an afternoon presentation and q&a on our architecture. On the way to the meeting came the "oh, by the way IBM is going to be there too". There were four of us from my company - myself, a business analyst, a project manager and the sales person. There was about a dozen managers from the prospect as a recall. Everybody was business casual and relaxed. IBM had packed the room with about a dozen "experts" from various technology groups (MQ Series, DB2, WebSphere, etc.) - all wearing suits and wingtips. Now, this was "our show" - each software vendor met the customer panel, gave their pitch and answered questions. At the time in 2000 our technology was ahead of the curve and we had way more "boxes checked" than the competitors.

IBM managed to speak first and show pretty Powerpoint slides with all their various technologies and hardware tied together and working nicely. The thing is, they had taken our materials and overlaid them with all their technology in and around it - however unnecessary it was. That annoyed me, as I said, because it was our time to talk about our product. So I showed a few slides and began interacting with the customer audience - using the whiteboards to draw simpler diagrams of what was needed and how our things fit together. As time went on and they probed deeper, it became apparent that all the IBM stuff was fluff. No, you didn't need to buy/install MQSeries as we built our product over JMS so any messaging would work. No, you technically didn't need WebSphere as our stuff was J2EE compliant and ran on several Java application servers. In fact, our developers preferred to use WebLogic as it was easier, lighter and had more features (little dig). Etc., etc., etc.

In the end the customer bought licenses and, under IBM's direction, implemented everything themselves - with lots of IBM consultants writing unnecessary code to tie in IBM solutions. Folks who had never seen much less been trained on our application. Over two years later, after I had left the company, my partner and I were contacted to rush out and help troubleshoot problems. They were just trying to go live and there were major issues that needed deep technical skills to unravel and stabilize. We said, "no thanks" ;)

Original post

The Sloppy Quickbooks Security Saga Continues

As the title says, it doesn't get better with 2006. I went through my first round of non-admin security issues with QuickBooks 2004 for my own company. Later, I had to implement Susan's recommendations for QuickBooks 2005 when my wife needed help setting up a computer for doing our church's books. Now, according to Susan it still needs these hacks for the 2006 version. Here's the link to the posting how to fix it up.

Original post

Tuesday, October 25, 2005

Using the built-in searching features of the DataSet

Mohammad Azam posted Searching in the DataSet to save a Database trip showing a simple technique for searching a DataSet. As he said "Then I asked myself why not search the DataSet instead of going to the Database." however the technique he showed was a hand-crafted, walk the rows approach that compared the column value in each row and, if they matched, he copied the row into a new DataTable instance. In the end he'd have a DataTable containing the matching rows. He may not be aware that DataTables are searchable already via the DataTable.Select Method. Here's a snippet from the MSDN docs showing how it would work...

string strExpr;
string strSort;
strExpr = "id > 5";
// Sort descending by column named
CompanyName. strSort = "name DESC";
// Use the Select method to find all rows matching the filter.
DataRow[] foundRows = customerTable.Select( strExpr, strSort, DataViewRowState.Added );

Obviously, his example and my response both lack context of the problem being solved. If his goal was to return a DataTable then the array of DataRows isn't exactly what he needs. However, the search (filtering) technique is still valid for consideration even without context.

Original post

Sunday, October 23, 2005

Robert Frost’s West Running Brook

We live less than a mile from Robert Frost's farm. At this time of the year when the leaves begin to change you can see where things like yellow wood were inspired. Just into the woods behind our house is “West Running Brook“ seen below. I managed to catch my wife walking the dog, a miniature schnauzer.

yellowwoodsbrook3  kirefritz

Original post

Friday, October 14, 2005

Saving web pages for offline viewing

Gina Trapani posted a nice how-to for Slogger which is a Firefox extension. I figured I'd pop a little comment in for PC Magazine's Web Historian but apparently you have to be *invited* by someone before you're granted the privilege of posting comments! Nah! Not interested in registering for one more web thing. I wonder how much of my undelivered mail is sitting in Beverly Hills CA 90210? :)

Save your personal Web with Slogger by Gina Trapani Web pages change. They disappear. They move to new URLs. They get lost or they're password-protected or they're only available on private intranets. Firefox extension Slogger... [Lifehacker]

Original post

Monday, October 3, 2005

Detecting end of a list in XSLT using position()

Apparently Mohammad Azam has recently discovered using XSLT for code generation. One of the issues he's learned is that when using XSLT to generate code you have to be aware of where you are in the list of nodes that's currently being traversed. The particular problem he's got is that looping through a list of fields and tacking on a comma afterwards leaves one stray comma on the end of the list.

The way I solved this problem was a combination of a “switch” statement and using the built-in position() and last() functions to know where you are:

<xsl:choose>
<xsl:when test=”position() = 1”>emit code here for first node in list</xsl:when>
<xsl:when test=”position() = last()>emit code here for last node in list</xsl:when>
<xsl:otherwise>emit code here for all other nodes in list</xsl:otherwise>
</xsl:choose>

I have been successful in building various templates for code generation over the years using XSLT. However, as the complexity of the generated code increases (think multi-tiered, layered application) then it becomes harder to manage (you can go crazy from staring at XSL for many hours!). Kathleen Dollard does a good job of pulling together various technologies (XSL, Code Dom, Db Info Schema, XSD) in her book Code Generation in Microsoft .NET. Unfortunately, it came out a few months too late for me! Why? Because I had already hit my head many times and worked through most all the issues she does in her book by the time it was published.

Instead, I had already decided to give CodeSmith a try and haven't looked back since. Not only is the familiar ASP/ASP.NET style more “natural“ for developers, but the built-in support for database schemas as well as Xml-based schemas/input and copious samples makes getting off the ground much, much easier.

Original post

Monday, September 5, 2005

Subversion and TortoiseSVN Installation Cookbook

After reading several good things regarding Subversion and TortoiseSVN I decided to give it a try. The “final straw” came while looking into Ajax.NET which is housed in SVN and required installing TortoiseSVN to obtain the source. The process was so smooth and easy I decided it was worth a shot. The scm options facing my little company are very typical:

  1. Continue using VSS with it's warts - extremely slow client, requires either VPN access to servers in office or a 3rd party product such as SourceOffsite to make remote access feasible, etc.
  2. Purchase another solution such as Vault.
  3. Migrate to Team Foundation Server - not only is the new pricing model a “step-up“ for small ISVs but there's hidden costs as well. It requires 3-tier deployment, must install/use Active Directory, requires SQL Server 2005. Can I really afford to update memory, buy licenses, and dedicate at least three servers for what used to take just one?
  4. Try something else such as Subversion.

I decided to try door #4. Below is a quick “cookbook” style approach of what it took to get it up and running. Following that are a variety of links that I found.

  1. Install Apache 2 (2.0.54):
    1. Change httpd.conf to use non-default port (Listen 81 or Listen 8080).
    2. Create Windows user account ApacheUser.
    3. Grant ApacheUser modify rights to C:\Program Files\Apache Group\Apache2\logs
    4. Change Apache service to run as ApacheUser and restart.
  2. Install Subversion (1.2.1):
    1. Run Subversion installer.
    2. Modify httpd.conf to add /svn virtual root (see TortoiseSVN docs - 3.1.4)
    3. Create svn root directory somewhere (e.g. F:\svn). Note the multiple warnings that you should NOT use the Berkley DB repository format for network shares (including UNC names, mapped drives, etc.).
    4. Grant ApacheUser full control rights to svn root directory (e.g. F:\svn).
    5. Create Apache passwd file and add users (can optionally configure for SSPI to Windows domain - see TortoiseSVN docs).
      1. bin\htpasswd -c passwd
      2. bin\htpasswd passwd
    6. Restart Apache and test (http://localhost:81/svn/repos)
  3. Install TortoiseSVN (1.2.2.4299 VS.NET - ASP.NET version) which is an excellent Windows shell extension for using SVN.
    1. Re-boot to get shell extension icons working.
    2. Right-click on repository (e.g. F:\svn\repos) and Create Repository...
  4. Install AnkhSVN (0.5.5.1653) for VS.NET integration.
    Edit \Application Data\AnkhSVN\ankhsvn.xml - uncomment
              <AdminDirectoryName>_svn</AdminDirectoryName>
           to match TortoiseSVN patch for ASP.NET files.
  5. Final note for properly backing up the repository:
    svnadmin hotcopy path/to/repository path/to/backup --clean-logs

Here's a list of links I found very helpful in addition to both the Subversion documentation and especially the TortoiseSVN documents (since it is a Windows client).

Cory Foy, Getting Subversion running with .NET
Michael Flanakin,  Subversion and Windows Authentication with Subversion on Windows
Jonathan Malek, NAnt, Subversion and VS.NET
Fritz Onion, ASP.NET Application without Web Projects ** It seems a lot of folks like this one however I did not take this route - instead I used the “patched” version of TortoiseSVN which uses “_svn” instead of “.svn” for local admin directories.

One interesting piece of information I found was buried in the replies of this post. Specifically, “The important thing to note is: The initial copy you used to import is not a checked out copy. It cannot be used to work with subversion. You need to check out your own copy. (Even though you already have all the files)”.

Original post

Wednesday, August 31, 2005

Windows for Workgroups 3.11 on Virtual PC - Screenshots

I've uploaded various screen shots from my MS-DOS / Windows for Workgroups 3.11...

Tuesday, August 30, 2005

Windows for Workgroups 3.11 on Virtual PC

Although I've never met them personally, I blame Dave Burke and Ben Armstrong for my little jaunt down memory lane this past weekend. It all started when I was cleaning out the basement...I came to a box on one of the shelves that was still sealed up from when we moved in five years ago. Since this box had come from the garage at the old house, it must have really been "useless" stuff. When I opened it, I found two boxed sets of Lotus 1-2-3: 2.0 and 2.01 (still sealed in shrink wrap!) as well as WordStar 6.0. Doing mindless work like sorting and hauling old stuff off to the dump is a great time to let your mind wander. I remembered Dave's post here as well as Ben's here, here, and here. That was my undoing and before I knew it I was rummaging in the attic for some old DOS boot disks. I managed to get DOS 6.22 and Windows for Workgroups 3.11 up and running (screen shots below). But that wasn't enough - it's as though I couldn't stop myself. I spent a few hours over the course of two days and managed to install:

Some things I left off installing:

  • After Dark for Windows
  • Norton Utilities 6, 7 and 8
  • Norton Desktop for Windows 1.0, 2.1and 3.0
  • Paradox 3.5, 4.5 and 1.0 for Windows
  • Quattro Pro 5 for Windows
  • Turbo Pascal for Windows 1.5
  • WordPerfect 5.1
  • WordStar 6.0

What I found amazing was how "little" everything was. After working with virtual machines for various betas with 512+ meg of memory and 5+ Gb virtual disk sizes it was incredible to see a "whopping" 32 meg of RAM for a machine. I recalled that DOS had an upper limit of 2 Gb for disk size and, since I wanted to see how much I could install, I chose a "safe" 1.5 Gb fixed disk size. I had truly forgotten how little space things took (relatively speaking). Even after choosing "full installations" for everything above, I had barely topped 400 meg of disk space!

Of everything I tried installing Windows gave me the most trouble. I tried going to WfW 3.11 directly but the machine kept hanging at the detect networking stage even after I had disabled the network adapters in VPC - perhaps I was too impatient? I finally installed Win 3.1 from floppies. I then set about trying to tweak it as Ben described here and here. Soundblaster was cute - remember the little "ding" when you did something you shouldn't? I found that the S3/Trio card and the EMM386 settings were difficult. I could get most stuff loaded into high memory using Ben's settings and the suggested replacements for the mouse and MSCDEX - DOS ran just fine. However, after switching Win 3.1 over to the S3/Trio adapter I kept getting GPFs as soon as Program Manager would begin painting the groups and icons. I tried eliminating some of the include regions in EMM386 but Win 3.1 complained of low resources so I finally gave up and switched back to VGA mode. On a whim, I went back and tried upgrading from Windows 3.1 to Windows for WfW 3.11 and managed to get that to work. After that, Ben's instructions for networking and IE 5.01 worked like a charm.

Another thing that surprised me a bit was how much software was on 5 1/4" floppies. I had to pull out my old 386 SX 20 Mhz (woo-hoo) since it was the only machine I had with a 5 1/4" drive. Turbo Pascal 6.0 as well as some utilities were the only things I bothered to copy to 3 1/2" so I could load them into the virtual machine. Even then, I had to hunt around and find the removable floppy drive for my "old" laptop (Inspiron 8200) so I could read the 3 1/2" disks since my new laptop doesn't even come with a floppy drive!

What comes next? I think I'll shrink the fixed disk down to 650 Meg and burn it to a CD.

Original post

Thursday, August 18, 2005

Quickbooks’ sloppy security holes

It seems from reading other posts, such as Keith Brown's Hall of Shame and Hall of Shame Honorees for Admin Rights, that Quickbooks is a sloppy piece of software when it comes to security rights. However, Susan's post really shows how bad it is - just take a look at all the things you have to open up in her first link for standalone. Her Hall of Shame piece lists various KB articles and Intuit's apparent ambivalence toward the whole issue.

Why am I bringing this up? Because I used BHO Demon and SpywareBlaster recently to make sure things were tightened and all was well for several days UNTIL I happened to run QuickBooks. The “stupid software” has the audacity to tell me that my security settings are too high and I should lower them so that it runs properly. Um...if you take the trouble to put code in your product to detect this condition then why not take the time to actually fix the problem! Requiring lower browser settings, writing to various parts of the registry and to folders under \Program Files has been a well-known “no-no's” for quite some time now.

Glad to see Microsoft is getting in the game with their Small Business Accounting product. After using Quicken since V2.0 in the late '80s and QB since 2000, I'm glad to see Intuit is about to get some serious competition. Nothing like falling sales, layoffs, and taking fat profits out of the pockets of management (they sure don't spend it on improving their products!!) to wake up a sloth!

Original post

Thursday, August 11, 2005

Another reminder that I’m getting older

While catching up on blog reading I noticed Sara Ford's post about remembering the Challenger disaster. What caught my attention was that she was in FIRST GRADE when it happened. I've never thought of myself as being “old” - my parents are “old” as are my aunts and uncles, etc. but not me. For some reason this year has driven home the point that I'm getting older too. My son has graduated from high school and is off to college in a month, while my youngest daughter is entering 8th grade and will be in high school a year from now. Plus I had my first bout with kidney stones, my doctor put me on Lipitor to control my cholesterol as well as an aspirin a day to help keep my “border-line” blood pressure in check. Sheesh! Once you cross that 40 mark, things start falling apart :)

For the record I was 22 when the Challenger disaster occurred. I had already finished a tour in the Army after high school and was working in my first programming job on an IBM System/34 using RPG II. I had a radio near my desk because I love to listen to the Red Sox on the radio and when they news broke in I went out to tell my co-workers and they thought I was joking around. It took somebody's spouse calling in from home before folks believed me. I tended to play lots of practical jokes.

Friday, June 3, 2005

I am a Gauntlet Adventurer

What Video Game Character Are You? I am a Gauntlet Adventurer.I am a Gauntlet Adventurer.

I strive to improve my living conditions by hoarding gold, food, and sometimes keys and potions. I love adventure, fighting, and particularly winning - especially when there's a prize at stake. I occasionally get lost inside buildings and can't find the exit. I need food badly.
What Video Game Character Are You?

Original post

Monday, May 23, 2005

A memorable metaphor

I first started teaching technical classes in 1992 when I joined a software company. At that time, NT 3.51 was just coming out and our mainstream software product was written in Cobol for the VAX and AS/400. I had experience in both Cobol and RPG at the time and taught the same material to two different audiences. Over the last 13 years, I've developed materials and delivered training for VB (and ASP), C++, Java, .NET (C# and ASP.NET) and even taught part-time evenings and weekends at UNH for several semesters. One thing I've learned when trying to convey new concepts and materials is to find ways to relate to the audience and their experiences. Another technique is to use memorable analogies and metaphors that really jog your mind and cause you to stop the stream of consciousness and take notice. Which brings me to the subject at hand. Rebecca has done just that with her MetaData Metaphor post. Not only is she very smart and dynamic (I've been in the audience when she spoke at an Xml East DevCon, her TechEd keynote last year, and Chris Sells' Applied Xml last fall) but she has the gift of communicating ideas which cause you to pause and take notice.

P.S. Thanks for the explanation Rebecca - I honestly said “huh?” when I first saw “SWF” so that means I confess to being married for some time and ignorant to the ways of the dating world.

Original post

How well traveled are you?

I spent 10 years as a “road warrior” consultant working for software companies and pure consulting companies. Most of my travel was inside the U.S. One side of the story it doesn't tell is how much time away from home all this travel cost. Found this via Scott Reynold's blog:

Your Travel Profile:

You Are Very Well Traveled in the Midwestern United States (75%)
You Are Very Well Traveled in the Southern United States (62%)
You Are Well Traveled in the Northeastern United States (57%)
You Are Well Traveled in the Western United States (53%)
You Are Somewhat Well Traveled in Canada (40%)
You Are Somewhat Well Traveled in the United Kingdom (25%)
You Are Mostly Untraveled in Latin America (7%)
You Are Untraveled in Africa (0%)
You Are Untraveled in Asia (0%)
You Are Untraveled in Australia (0%)
You Are Untraveled in Eastern Europe (0%)
You Are Untraveled in New Zealand (0%)
You Are Untraveled in Scandinavia (0%)
You Are Untraveled in Southern Europe (0%)
You Are Untraveled in Western Europe (0%)
You Are Untraveled in the Middle East (0%)

Monday, May 9, 2005

Beware Virtual PC Differencing Disks!

Ah, now that I have your attention, please let me elaborate :)

I just read a post by Russ Nemhauser, Virtual PC - Beyond the Basics, and it reminded me of some caveats I had picked up in my trials. I too thought differencing disks were the way to go and in fact set up several “base” installs to test it out. One of my early reasonings was simply because each .vhd image had about 1 - 2 gigs of duplicate information - that is, a base OS plus tools and assorted service packs. I figured I could free up 10 gigs or so with a single base image.

The reality is that the differencing drives quickly grew to 3 - 4 gigs in size themselves! Considering things like the paging file, event logs, IIS logs, temp directories, etc. it made sense why this was. However, in the long run I ended up using just as much disk space if not more as if I stuck with individual images. Plus it meant I had to remember to always cart along the base image or the differencing image was useless. Yes, I know about the new compacting tool but it's waaayyy too hard to do all this for each image to free up space - just check out these posts by John Howard and Rob Eberhardt.

In the end I stuck with having a single baseline image of an OS which I copy and rename to start a new image. I followed Megan's tips on sysprepping virtual machines with the baseline beforehand. This does mean that a new service pack might have to be rolled out to multiple virtual machine images but I would have to do that anyway with differencing drives since the base drive cannot be touched ever again or the differences become invalidated and meaningless.

Original post

Friday, May 6, 2005

BizTalk Project / Assembly Organization Gotcha

I have a real-world experience to share for organizing your BizTalk projects and assemblies. I think the natural tendency is to group “like things” together so if you have an orchestration with a schema or two and a custom pipeline you'd define all these artifacts in the same project. This way they're always kept together in source control, on disk and deployed together.

That same “benefit” is also the “gotcha” to watch out for. In my case, the custom pipeline is used to specify a schema formatted as a flat-file. The problem comes mostly during development and testing. If you update the orchestration you must stop, unenlist, undeploy, rebuild, deploy, bind, enlist, start - we've all done that hundreds of times. The problem is when undeploying the *assembly* containing the orchestration you're also undeploying the custom pipeline attached to the send port that's in the same assembly. BizTalk will then fallback to the standard Xml pipeline adapter on that port by default. Then, when you redeploy you're adding back the custom pipeline again which is where I get tripped up - I keep forgetting to switch the send port back to the custom pipeline.

The moral of this story is to use separate projects/assemblies for your custom pipelines and schemas. While this creates lots of little assemblies running around in your GAC, it can greatly reduce the failed tests because you forgot to rebind things!

Last note: Jon Flanders has more to say about pipeline components. Too bad this came out during the last phases of development for my current project - not enough time and too much to do!

Original post

Monday, May 2, 2005

Running with a clean machine as non-admin

I've been intrigued with the idea of non-admin since around the time I went to PDC 2003. While I had dabbled around with VMWare it wasn't until I loaded Virtual PC that I took virtual machine technology for a serious tryout. At the time, it gave me a chance to play around with Longhorn but it wasn't long before I realized it could be a big part of a consultant's toolkit.

Before VPC, my average for re-paving a machine was usually 6-12 months. In that timeframe, I would end up adding and configuring software for at least a couple of clients as well as a few different development projects I was working on. Add to that the plethora of utilities and typical desktop software and you can see why it started to look like my home office desktop before long! Let's just say my wife doesn't like to go in there and swears it's impossible for me to find anything. My OS would never seem to hold up long; looking back to Win 3.1, that's a lot of repaving over the last 14 years!

Jason's article on his current setup reminded me of what I set out to do when I recently repaved. I made a point to load only the full Office suite and a bunch of essential utilities and did the following:

  • Each client “gets“ their own VPC image - separate configuration, versions, tools etc.
  • One VPC image for our own internal development.
  • One VPC image for each test/play environment (e.g. VS2005 Beta 2)
  • My primary logon account for the host machine is non-admin. I make use of Aaron's MakeMeAdmin and PrivBar tools for those utilities and times that require it.
  • I have resisted installing any development tools into my host machine with the exception of Dreamweaver MX 2004 - which is almost like another “Office“ tool to me.

One caveat - I make my logon account in the development images Admin mostly because it's still too hard not to and be effective. I know there are workarounds but when I'm in “development mode” it has got to be seamless or I become frustrated too quickly. I did, however, manage to last 4 days developing as non-admin about a year and a half ago! Looking forward to, and hoping that VS 2005 can make it truly seamless.

Original post

Specifying the output filename from a BizTalk orchestration

Once again, I needed a short simple answer but found either examples that didn't match exactly or newsgroup posts that were cryptic. In my case, the target system I was feeding data to required me to specify a filename that included the month and day of posting as well as the next sequential number. Thus the format is MyOutputFile_mmdd-nnn.out where mm is the month, dd is the day and nnn is the next sequential number (in the case of multiple runs during the same day). To do this, within the message assignment block you specify:

OutgoingMsgName(FILE.ReceivedFileName) = BTSHelper.GenerateOutputFilename();

Here you are setting one of the message's context properties so it must be within the scope of the construct message. Then, in the SendPort configuration you can use the macro %SourceFileName% and it will be replaced with the filename you set in the message's context.

In this simplified example, BTSHelper.GenerateOutputFilename() is a method on a .NET helper class that contains logic for creating the filename.

Original post

Wednesday, April 27, 2005

Changing a VPC Computer Name with BizTalk

Alan Smith asked about the steps to take to change a VPC computer name when distributing the same preloaded VPC image to multiple developers...”We have network problems if two or more images with the same computer name are started with network access (to SourceSafe). So I attempted to change the computer name in an image.”

While the BizTalk reload steps are painful, Megan Davis put together notes on sysprepping the VPC image before distributing so that it will do a “mini-install” when first starting up similar to how OEMs do it before shipping. Thus you can allow the computer name to be changed when starting up the image for the first time!

Original post

Wednesday, April 13, 2005

Accessing input queue name in an orchestration

The name of the queue that a message was received on can also be obtained through the message context:

IncomingMsgName(BTS.InboundTransportLocation)

Original post