<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>jaybaz [MS] WebLog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jaybaz_ms/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/feed.xml</link>
    <description>We believe in nothing.</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:05:34 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Parting words for dear friends</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/parting-words-for-dear-friends</link>
      <pubDate>Fri, 09 Nov 2007 11:56:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/11/09/parting-words-for-dear-friends/</guid>
      <description><![CDATA[I have a few thoughts that I'd like to express about Microsoft's software development&nbsp;before I...]]></description>
      <content:encoded><![CDATA[<P>I have a few thoughts that I'd like to express about Microsoft's software development&nbsp;before I go.</P>
<P><STRONG>Clearest code wins</STRONG>.</P>
<P>Most developers at Microsoft haven't yet learned the incredible value of writing the clearest code possible.&nbsp; Once I saw a someone make a checkin that added 200 lines in the middle of a 600 line function. I'm thinking it was already about 597 lines too long.&nbsp; <STRONG>Use Extract Method</STRONG> to break them in to bit-sized chunks.&nbsp; <STRONG>Use Extract Class</STRONG> to manage the plethora of methods you suddenly produce.&nbsp; Don't stop there.</P>
<P><STRONG>OO isn't a fad</STRONG></P>
<P>Microsoft has pushed hard over the last ~5 years to make its software secure.&nbsp; Security is <EM>hard</EM>, but there's no reason to make it harder.&nbsp; For example, countless security issues came down to buffer overruns in C++ code where a buffer was passed without a corresponding length.&nbsp; The response?&nbsp; Let's write tools that help you find places you pass buffers, and make sure you pass a length along side.&nbsp; </P>
<P>Hey, when you find yourself passing two or more values around together, why not put them in to a class?&nbsp; Just start there.&nbsp; Polymorhism, inheritance, and encapsulation can come later.&nbsp; </P>
<P>(Hey Windows: I'm looking at you!)</P>
<P><STRONG>It's OK to use someone else's code</STRONG></P>
<P>At one point, the Visual Studio code base had about a dozen implementations of&nbsp;a C++ String class, most of them hacked&nbsp;out of MFC.&nbsp; That's a&nbsp;vast improvement over passing the buffers around, but hey... these library writers&nbsp;are paid to work on these things full time!&nbsp;&nbsp;&nbsp;Why aren't you using STL or ATL yet?</P>
<P>This isn't just in C++... in the original implementation of the .Net Framework, there were countless implentations of hash tables. Woah, guys!&nbsp; Let's get some libraries!</P>
<P><STRONG>Design your problems away</STRONG></P>
<P>Every time you run in to a problem, step back &amp; ask "How can I make sure this never, ever happens again?"&nbsp; </P>
<P>Got buffer overruns?&nbsp; Using a buffer class makes them go away.&nbsp; Having trouble with refcounts? Try CComPtr.&nbsp; Is your cache getting corrupted?&nbsp; Remove it, or encapsulate it.&nbsp; </P>
<P>When we did this in my last C++ project, we found our C++ code started to look remarkably like C#.&nbsp; That's a clue: C# has already designed away most of the tedium of C++.</P>
<P><STRONG>Most importantly: we can do better.</STRONG>&nbsp;</P>
<P>The above complaints are specific, local issues.&nbsp; In time they can be addressed indivdually, and this blog post will become obsolete.&nbsp; But there's one thing that Microsoft developers should always be working on: doing their job better.&nbsp; Ask yourself questions like:</P>
<UL>
<LI>"How can I make sure this problem goes away forever?"&nbsp;</LI>
<LI>"How can I produce fewer bugs?"</LI>
<LI>"How can I make it easier to fix the bugs I have?"</LI>
<LI>"How can I make it easier to respond to change quickly?"</LI>
<LI>"How can I make it easier to make my software fast enough?"</LI></UL>
<P mce_keep="true">I once managed&nbsp;a team that did this very well.&nbsp; They were largely new hires, mostly straight out of college.&nbsp; But after a year, they were <STRONG>rocking</STRONG>.&nbsp; They produced features faster, had fewer bugs, fixed bugs faster, and reliably beat the schedule every time.&nbsp; They far outperformed teams of experienced developers working on familiar code bases, often with well-understood problems.&nbsp; It was amazing.</P>
<P mce_keep="true">EDIT: I wish I could have addressed these issues while I was at Microsoft, but that's hard, and I wasn't successful.&nbsp; This blog post is about the last chance I have to do anything here; now it's up to you to decide if you can use this.</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Lastday</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/lastday</link>
      <pubDate>Fri, 09 Nov 2007 11:49:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/11/09/lastday/</guid>
      <description><![CDATA[Today is my last day at Microsoft.
This morning I bike to work &amp; shower.&nbsp; There's a lunch...]]></description>
      <content:encoded><![CDATA[<P>Today is my last day at Microsoft.</P>
<P mce_keep="true">This morning I bike to work &amp; shower.&nbsp; There's a lunch out with the team.&nbsp; In the afternoon there's an "exit interview".&nbsp; Then I leave early for a doctor's appointment, while I'm still insured. :-)</P>
<P mce_keep="true">Last night I tried to log in to work from home and couldn't.&nbsp; Looks like they were a little overzealous with the permissions!&nbsp;</P>
<P mce_keep="true">What's next?&nbsp; <A href="https://jbazuzi.blogspot.com/2007/10/new-adventure.html">https://jbazuzi.blogspot.com/2007/10/new-adventure.html</A></P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>How to make a bootable USB flash drive</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/how-to-make-a-bootable-usb-flash-drive</link>
      <pubDate>Wed, 24 Oct 2007 18:25:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/10/24/how-to-make-a-bootable-usb-flash-drive/</guid>
      <description><![CDATA[This can be useful with Windows Home Server in a number of ways.
- If you are building your own WHS...]]></description>
      <content:encoded><![CDATA[<P>This can be useful with Windows Home Server in a number of ways.</P>
<P>- If you are building your own WHS in a small case, and don't have a DVD drive, you can transfer the WHS software to a USB flash drive of WHS to install from.</P>
<P>- If you are building your own WHS and require special drivers for your mass storage devices or network connection, you can make a USB flash drive of WHS w/ drivers.&nbsp; You'll especially want this if the primary drive fails, and you want to use the "Server Recovery" option.</P>
<P>- If your PCs that are connected to the WHS require special drivers for your mass storage devices or network connection, you can make a USB flash drive of the recovery CD which includes these drivers.</P>
<P>Here are instructions for making such beasts.&nbsp; Written for WinPE, but applicable to WHS. <A href="https://www.realtime-vista.com/general/2007/05/preapring_windows_pe_to_boot_f.htm" mce_href="https://www.realtime-vista.com/general/2007/05/preapring_windows_pe_to_boot_f.htm">https://www.realtime-vista.com/general/2007/05/preapring_windows_pe_to_boot_f.htm</A></P>]]></content:encoded>
    </item>
    <item>
      <title>My Windows Home Server</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/my-windows-home-server</link>
      <pubDate>Wed, 17 Oct 2007 19:34:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/10/17/my-windows-home-server/</guid>
      <description><![CDATA[I built my own Windows Home Server box.&nbsp; You can buy some decent pre-built units, but I wanted...]]></description>
      <content:encoded><![CDATA[<P>I built my own Windows Home Server box.&nbsp; You can buy some decent pre-built units, but I wanted to build my own.&nbsp; I wanted a small, quiet, low-power device.&nbsp; I was willing to compromise on performance &amp; capacity to get it.&nbsp; I decided that my collection of movies should live on my media center, just because I wanted to have a small WHS.</P>
<P><STRONG>Dell D600 laptop</STRONG></P>
<P>A laptop meets the small &amp; low-power requirements without effort.&nbsp; They also have a built-in keyboard/mouse/display and battery backup, while still being small.</P>
<P>Dell leases these to corporations.&nbsp; After the lease expires, they are sold for cheap.&nbsp; I bought mine at a popular auction site for ~$300.&nbsp; It had a 1.4GHz P4 and&nbsp;512MB RAM.&nbsp; Most have USB 2.0 (important for adding storage) and GigE (important for pushing a lot of data back and forth).&nbsp; Many have Wi-Fi, which may be useful.</P>
<P>D600 parts are easy to come by, and their online manuals are very good.</P>
<P mce_keep="true"><STRONG>Pair of 160GB 2.5" drives</STRONG></P>
<P mce_keep="true">Hard drive prices (per GB)&nbsp;follow a "saddle" curve.&nbsp; At the time of building, 120GB were at the bottom of the curve; 160GB were a bit higher.&nbsp; Above 160GB were much higher.&nbsp; I knew that I wanted space for 100GB today; 160GB would give me a little breathing room.&nbsp; Since replacing drives is expensive (and replacing the primary drive is annoying), breathing room seemed wise.</P>
<P mce_keep="true">For the secondary drive, I bought a 2nd HD caddy, which replaces the DVD drive.</P>
<P mce_keep="true"><STRONG>Great print server!</STRONG></P>
<P mce_keep="true">It's small enough that it can fit comforably under my printer on my desk.&nbsp; (I was careful to leave a little venting room.)&nbsp; I like simple, obvious names, so my printer path is now <A href="file://server/Printer" mce_href="file://server/Printer">\\SERVER\Printer</A>.&nbsp; The USB cable from server to printer only spans ~6 inches.</P>
<P mce_keep="true"><STRONG>What if I need more storage?</STRONG></P>
<P mce_keep="true">&nbsp;One of these days I will probably decide that my movies should be moved to the server.&nbsp; I rip my DVDs lossless, and currently have ~400GB, so I'm going to need more room.&nbsp; Upgrading the internal 2.5" drives won't be feasible for a while - they're still too small.&nbsp; Until then, I will need to add external storage.&nbsp; </P>
<P mce_keep="true">I can use the pair of USB 2.0 ports.&nbsp; With these, an external enclosure with a pair of large 3.5" drives are a good choice.&nbsp; (Two drives means I can fully use the USB bandwidth without dramatically overloading it.).&nbsp; </P>
<P mce_keep="true">Another option is to get a PCMCIA card (there's only one slot) with USB 2.0 or eSATA.&nbsp; </P>
<P mce_keep="true">One downside is that the external drives won't be on the battery that's built in.&nbsp; That means I will need a separate UPS if I want them protected.</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Windows Home Server on a virtual machine</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/windows-home-server-on-a-virtual-machine</link>
      <pubDate>Wed, 17 Oct 2007 19:17:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/10/17/windows-home-server-on-a-virtual-machine/</guid>
      <description><![CDATA[Here at Microsoft, when we talk about Windows Home Server, one of the things that comes up pretty...]]></description>
      <content:encoded><![CDATA[<P>Here at Microsoft, when we talk about Windows Home Server, one of the things that comes up pretty often is a question about hosting WHS in a virtual machine under Virtual Server.&nbsp; Most often people want this because they already have one always-on machine (a doman controller, a media center PC, etc.), and they don't want another.</P>
<P>In discussing the problem, a few key bits of advice have come up, and I thought it would be a good idea to write them down here.</P>
<P>One of the key problems appears when you consider using the WHS to back up the host.&nbsp; It can certainly be done, but when the host goes down, restoring it is a catch 22.</P>
<P><STRONG>Dedicate whole drives</STRONG></P>
<P>Take whole drives &amp; put only one file on&nbsp;each - the .VHD.&nbsp;&nbsp;Make it as large as possible.</P>
<P><STRONG>Use external drives</STRONG></P>
<P>Make all of WHS's drives external.&nbsp; Consider putting them all in a single enclosure for convenience.&nbsp; eSATA w/ port multipliers may be a good choice.</P>
<P><STRONG>Have a 2nd physical&nbsp;machine ready</STRONG></P>
<P>It should already have&nbsp;Virtual Server or Virtual PC installed.&nbsp; A laptop is fine.&nbsp; Make sure it has appropriate ports for the WHS drives.&nbsp; </P>
<P><STRONG>Recovery strategy</STRONG></P>
<P>When the regular host goes down:</P>
<OL>
<LI>Unplug the WHS drives</LI>
<LI>Carry them to the 2nd host, and plug in</LI>
<LI>Boot the WHS virtual machine.&nbsp; (You may need to create a new VM with the existing .VHD files.)</LI>
<LI>Restore the primary host</LI>
<LI>Unplug the WHS drives</LI>
<LI>Carry them back to the primary host, and plug in</LI>
<LI>Boot the WHS virtual machine</LI></OL>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Screenshot of Select-GraphicalFilteredObject.ps1 in action</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/screenshot-of-select-graphicalfilteredobject-ps1-in-action</link>
      <pubDate>Wed, 12 Sep 2007 15:53:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/09/12/screenshot-of-select-graphicalfilteredobject-ps1-in-action/</guid>
      <description><![CDATA[A picture would be helpful in understanding what this script does.

dir $pshome |...]]></description>
      <content:encoded><![CDATA[<P>A picture would be helpful in understanding what <A class="" href="https://blogs.msdn.com/jaybaz_ms/archive/2007/09/12/powshell-gui-for-selecting-objects-in-a-pipeline-select-graphiphicalfilteredobject-ps1.aspx" target=_blank mce_href="https://blogs.msdn.com/jaybaz_ms/archive/2007/09/12/powshell-gui-for-selecting-objects-in-a-pipeline-select-graphiphicalfilteredobject-ps1.aspx">this script</A> does.</P>
<BLOCKQUOTE>
<P><TT>dir $pshome | Select-GraphicalFilteredObject.ps1 -title "Jay's blog is the best!"</TT></P></BLOCKQUOTE>
<P>gives this UI:</P>
<P mce_keep="true"><IMG src="https://blogs.msdn.com/jaybaz_ms/attachment/4883638.ashx" mce_src="https://blogs.msdn.com/jaybaz_ms/attachment/4883638.ashx"></P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/04/88/36/38/Select-GraphicalFilteredObject.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-04-88-36-38/Select_2D00_GraphicalFilteredObject.png">Select-GraphicalFilteredObject.png</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Powshell GUI for selecting objects in a pipeline ("Select-GraphiphicalFilteredObject.ps1")</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/powshell-gui-for-selecting-objects-in-a-pipeline-select-graphiphicalfilteredobject-ps1</link>
      <pubDate>Wed, 12 Sep 2007 15:39:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/09/12/powshell-gui-for-selecting-objects-in-a-pipeline-select-graphiphicalfilteredobject-ps1/</guid>
      <description><![CDATA[This is an enhanced version of a script from Lee Holmes' book Windows PowerShell Cookbook...]]></description>
      <content:encoded><![CDATA[<P>This is an enhanced version of a script from Lee Holmes' book <EM>Windows PowerShell Cookbook</EM> (O'Reilly).&nbsp; The original script takes a pipeline &amp; presents a GUI that lets you select which elements to pass on to the next step in the pipeline.&nbsp; That's unchanged, but my enhanced script does a little more:</P>
<UL>
<LI>Added 'All' and 'None' buttons</LI>
<LI>A little space around the checked list box</LI>
<LI>Option to set the title to something domain-specific</LI>
<LI>Turn off CheckOnClick behavior because I think it's annoying but leave it as an option, if you like that sort of thing.</LI></UL>
<P mce_keep="true">EDIT: Fix the attachment.</P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/04/88/36/24/Select-GraphicalFilteredObject.ps1" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-04-88-36-24/Select_2D00_GraphicalFilteredObject.ps1">Select-GraphicalFilteredObject.ps1</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Domain-Specific Languages</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/domain-specific-languages</link>
      <pubDate>Tue, 19 Jun 2007 12:57:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/06/19/domain-specific-languages/</guid>
      <description><![CDATA[I'm quite attracted by the idea of domain-specific languages, but so far I haven't found a...]]></description>
      <content:encoded><![CDATA[<P>I'm quite attracted by the idea of domain-specific languages, but so far I haven't found a satisfactory way to create them.</P>
<P>For a while I was writing a lot of MSBuild tasks.&nbsp; I found the programming model for a MSBuild tasks to be a bit awkward.&nbsp; You have to write properties where fields should be sufficient.&nbsp; For MSBuild to see a property accessor, it has to be 'public', even though you don't want anyone else to ever use the accessor (not even yourself!).&nbsp;&nbsp; </P>
<P>So, I wrote a tool that generates the boilerplate MSBuild task code.&nbsp; (I also took the opportunity to convert T[] to List&lt;T&gt; in your code, which is usually nicer to code against.) I wrote it as an MSBuild task, which is convenient when it comes time to hook it in to the build system. The input language is MSBuild, which is XML.&nbsp; XML is an awkward language for humans to read &amp; write, though, so it wasn't quite satisfactory.&nbsp; </P>
<BLOCKQUOTE>
<P>(Yes, the task is built with itself.&nbsp; Not the latest version, but a last-known-good ("LKG") version.)</P></BLOCKQUOTE>
<P>I later needed to write a lot of Windows Workflow Activities.&nbsp; When you want to add a property to an activity, you have to write a lot of code.&nbsp; You want to express a simple idea (type, name, and comment:) and you have to write all this:</P>
<DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-alt: solid windowtext .5pt">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;summary&gt;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> DependencyProperties allow input parameters to be bound at runtime to any class member property<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> of compatible type in the workflow/activity hierarchy.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;/summary&gt;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>[System.Diagnostics.CodeAnalysis.<SPAN style="COLOR: #2b91af">SuppressMessage</SPAN>(<SPAN style="COLOR: #a31515">"Microsoft.Usage"</SPAN>, <SPAN style="COLOR: #a31515">"CA2211:NonConstantFieldsShouldNotBeVisible"</SPAN>, Justification = <SPAN style="COLOR: #a31515">"WF requires this."</SPAN>)]<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> DependencyProperty SkuNameProperty = System.Workflow.ComponentModel.DependencyProperty.Register(<SPAN style="COLOR: #a31515">"SkuName"</SPAN>, <SPAN style="COLOR: blue">typeof</SPAN>(<SPAN style="COLOR: blue">string</SPAN>), <SPAN style="COLOR: blue">typeof</SPAN>(ComputeRpsInputsActivity));<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;summary&gt;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> Input parameter.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The name of the SKU that is being tested.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>E.g., 'vs_vsts'.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;/summary&gt;<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>[Description(<SPAN style="COLOR: #a31515">"The name of the SKU that is being tested.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>E.g., 'vs_vsts'."</SPAN>)]<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>[Browsable(<SPAN style="COLOR: blue">true</SPAN>)]<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">string</SPAN> SkuName<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> (<SPAN style="COLOR: blue">string</SPAN>)<SPAN style="COLOR: blue">base</SPAN>.GetValue(MyActivity.SkuNameProperty);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">set<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">base</SPAN>.SetValue(MyActivity.SkuNameProperty, <SPAN style="COLOR: blue">value</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; LINE-HEIGHT: normal; PADDING-TOP: 0in; BORDER-BOTTOM: medium none; mso-layout-grid-align: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Consolas; mso-no-proof: yes; mso-bidi-font-family: 'Times New Roman'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P></DIV>
<P>So, using my task-generating task, I wrote a new MSBuild task that would generate this sort of property definition code.&nbsp; It went pretty quickly, since I already had the task generator code in hand, and CodeCom still fresh in my mind. It was a big win, cleaning up the activity code dramatically.&nbsp; However, I'm still disappointed by the use of XML as an input language.&nbsp; </P>
<P>In both cases, the work of writing the DSL tool was difficult to justify.&nbsp; In a general-purpose programming language, it makes sense to make a big investment in the tools &amp; design of the language.&nbsp; You want the use of the language to go smoothly, the language should be powerful, and the result should be readable.&nbsp; However, in a DSL, you have to balance those goals against the need to make the DSL cheap.&nbsp; Cost of entry is a big deal in DSLs.</P>
<P>In a couple places (<A class="" href="https://www.manning.com/payette/" target=_blank mce_href="https://www.manning.com/payette/">his book</A>, <A class="" href="https://channel9.msdn.com/showpost.aspx?postid=309510" target=_blank mce_href="https://channel9.msdn.com/showpost.aspx?postid=309510">his interview</A>), Bruce Payette talks about using PowerShell&nbsp;to create&nbsp;a DSL.&nbsp; I'm&nbsp;hopeful that this technique can meet the goals above.&nbsp;</P>
<P>What have you used to create DSLs?</P>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell polyglot</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/powershell-polyglot</link>
      <pubDate>Thu, 26 Apr 2007 13:20:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/04/26/powershell-polyglot/</guid>
      <description><![CDATA[Here's an example of a CMD script that is implemented in PowerShell.
@@:: This prolog allows a...]]></description>
      <content:encoded><![CDATA[<P>Here's an example of a CMD script that is implemented in PowerShell.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: black; FONT-FAMILY: Consolas"><FONT size=3>@@:: This prolog allows a PowerShell script to be embedded in a .CMD file.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: black; FONT-FAMILY: Consolas"><FONT size=3>@@:: Any non-PowerShell content must be preceeded by "@@"<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: black; FONT-FAMILY: Consolas"><FONT size=3>@@setlocal<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: black; FONT-FAMILY: Consolas"><FONT size=3>@@set POWERSHELL_BAT_ARGS=%*<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: black; FONT-FAMILY: Consolas"><FONT size=3>@@if defined POWERSHELL_BAT_ARGS set POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"%<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: black; FONT-FAMILY: Consolas"><FONT size=3>@@PowerShell -Command Invoke-Expression $('$args=@(^&amp;{$args} %POWERSHELL_BAT_ARGS%);'+[String]::Join(';',$((Get-Content '%~f0') -notmatch '^^@@'))) &amp; goto :EOF<o:p></o:p></FONT></SPAN></P>
<P>If you don't need to support quoted arguments, you can even make it a one-liner:</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">@PowerShell -Command Invoke-Expression $('$args=@(^&amp;{$args} %*);'+[String]::Join(';',(Get-Content '%~f0') -notmatch '^^@PowerShell.*EOF$')) &amp; goto :EOF<o:p></o:p></SPAN></P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Is Virtual Memory dead?</title>
      <link>https://docs.microsoft.com/archive/blogs/jaybaz_ms/is-virtual-memory-dead</link>
      <pubDate>Thu, 19 Apr 2007 15:36:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jaybaz_ms/2007/04/19/is-virtual-memory-dead/</guid>
      <description><![CDATA[To figure out whether virtual memory makes sense, you have to look at the following factors:

RAM...]]></description>
      <content:encoded><![CDATA[<P>To figure out whether virtual memory makes sense, you have to look at the following factors:</P>
<UL>
<LI>RAM size</LI>
<LI>Disk size</LI>
<LI>RAM speed</LI>
<LI>Disk speed</LI></UL>
<P>It's the relationship between these values that matter.&nbsp; (All of these are considered in the context of a fifth factor: price.&nbsp; For example, you can usually find a way to buy more RAM, but it may mean replacing the motherboard, switching to a 64-bit OS, etc.)</P>
<P>In the last decade or two, we've seen RAM and disk sizes grow steadily.&nbsp; RAM speed has increased quite a bit, as well, but disk speed has lagged behind.&nbsp; For example, in 1994 I bought a PC for personal use for $3000.&nbsp; Of that, and $1000 was for a 1 GB hard drive (I don't know the speed, let's guess 5400 RPM).&nbsp; I had 16 MB of RAM, and 33 MHz front-side bus.</P>
<P>Today, if I try to spend the same money on a PC, it's pretty hard to do.&nbsp; If I adjust for today's dollars, it's even harder.&nbsp; But we can look at a high-end PC today.&nbsp; Let's say 4 GB RAM, 500 GB hard drive @ 7200 RPM, 800 MHz FSB.&nbsp; This PC will probably cost $800-$1000.&nbsp; So, by comparison:</P>
<BLOCKQUOTE>
<P>HD size&nbsp;&nbsp; 500X<BR>RAM size 256X<BR>HD speed 1.3X<BR>RAM speed 24X<BR>Price 0.3X</P></BLOCKQUOTE>
<P>As you can see, price has dropped dramatically, the HD and RAM sizes have grown at close to the same rate, but their relative speeds have not.</P>
<P>So, I ask, why is virtual memory still ubiquitous?&nbsp; If I have 4 GB of RAM, I probably only need the virtual memory if I'm doing "big" things, like compiling all of Visual Studio or editing video.</P>
<P>Perhaps what's missing here is something in between.&nbsp; Some kind of solid-state storage, faster than hard disk, cheaper than RAM.&nbsp; Making up numbers, give me 24 GB of it today, at 100X the speed of a HD, for $100.&nbsp; Use it for page file, and perhaps HD caching.</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
  </channel>
</rss>