<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight.com/community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Reflections</title><link>http://www.pluralsight.com/community/blogs/dougwa/default.aspx</link><description>by Doug Walter</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>AsyncCalls and Internet Explorer / JavaScript</title><link>http://www.pluralsight.com/community/blogs/dougwa/archive/2006/07/28/32645.aspx</link><pubDate>Fri, 28 Jul 2006 16:02:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:32645</guid><dc:creator>doug-walter</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/dougwa/rsscomments.aspx?PostID=32645</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/dougwa/archive/2006/07/28/32645.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Tahoma&gt;A friend of mine asked me recently if I knew of an elegant way to handle&amp;nbsp;asynchronous calls in Internet Explorer. Basically the problem starts with some event&amp;nbsp;like &amp;#8220;load a page&amp;#8221;&amp;nbsp;then &amp;#8220;do something&amp;#8221; after the page is done loading.&amp;nbsp;With the emergence of AJAX-style applications which exploit this asynchronous behavior quite heavily, it's interesting to have some way to write code that handles async calls. This is especially true if you want to write automated test scripts.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;In any case, I sat down this morning and wrote up the following. It's&amp;nbsp;only the solution. I'll let you work out how to integrate it in with a real problem:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;function AsyncCall(action, condition, callback, timeout) {&lt;BR&gt;&amp;nbsp; action();&lt;BR&gt;&amp;nbsp; window.setTimeout("onTimer(" + condition + ", " + callback + ", " + timeout + ")", timeout);&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;function onTimer(condition, callback, timeout) {&lt;BR&gt;&amp;nbsp; if (condition()) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; callback();&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;&amp;nbsp; else {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.setTimeout("onTimer(" + condition + ", " + callback + ")", timeout);&lt;BR&gt;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;You would then introduce a call like:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;AsyncCall(setUrl, checkFrame, notifyDone, 100);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;This invokes the &amp;#8220;action&amp;#8220; function, then periodically checks the &amp;#8220;condition&amp;#8220; function. When the condition returns true, then it calls the &amp;#8220;callback&amp;#8220; function.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Here's a simple web page that lets you set the SRC property of an IFrame, then notifies you when the page is completely loaded:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;lt;html&amp;gt;&lt;BR&gt;&amp;lt;head&amp;gt;&lt;BR&gt;&amp;lt;title&amp;gt;Async Test&amp;lt;/title&amp;gt;&lt;BR&gt;&amp;lt;/head&amp;gt;&lt;BR&gt;&amp;lt;script language="JScript" src="asynccall.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt;script language="JScript"&amp;gt;&lt;BR&gt;function updatePage() {&lt;BR&gt;&amp;nbsp; AsyncCall(setUrl, checkFrame, notifyDone, 100);&lt;BR&gt;}&lt;BR&gt;function setUrl() {&lt;BR&gt;&amp;nbsp; document.all["myFrame"].src=myForm.url.value;&lt;BR&gt;}&lt;BR&gt;function checkFrame() {&lt;BR&gt;&amp;nbsp; return document.all["myFrame"].readyState == "complete";&lt;BR&gt;}&lt;BR&gt;function notifyDone() {&lt;BR&gt;&amp;nbsp; alert("Done!");&lt;BR&gt;}&lt;BR&gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt;body&amp;gt;&lt;BR&gt;&amp;lt;form id="myForm"&amp;gt;&lt;BR&gt;&amp;lt;input type="text" name="url" /&amp;gt;&lt;BR&gt;&amp;lt;input type="button" value="Go" onClick="updatePage()" /&amp;gt;&lt;BR&gt;&amp;lt;/form&amp;gt;&lt;BR&gt;&amp;lt;iframe id="myFrame" src="about:blank" height="100%" width="100%"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;BR&gt;&amp;lt;/body&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Happy async calling!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;-Doug&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=32645" width="1" height="1"&gt;</description></item><item><title>Application Identity</title><link>http://www.pluralsight.com/community/blogs/dougwa/archive/2005/12/13/17448.aspx</link><pubDate>Wed, 14 Dec 2005 04:36:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:17448</guid><dc:creator>doug-walter</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/dougwa/rsscomments.aspx?PostID=17448</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/dougwa/archive/2005/12/13/17448.aspx#comments</comments><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;There&amp;#8217;s this fantasy that applications will someday be able to identify themselves. That is, they will be able to act as a &amp;#8220;principal&amp;#8221;, just like you or me. This doesn't make sense.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;In reality, applications are agents; agents of a real user. That is, applications (aka. code) acts because a user told it to. If this was not universally true, then someone has figured out true AI (artificial intelligence) and the landscape of computer systems as we know it is forever changed. I&amp;#8217;ve been watching the 5 O&amp;#8217;clock news. There haven&amp;#8217;t been any major breakthroughs in AI lately. Until that day, software is simply an agent of a user, period.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;Some people think that if only you could identify the app, then you cold hold the app-writer accountable and therefore hold harmless the user who unwittingly invoked the app.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;But wait a second, how dumb could a crook be to let you know who he is? Let&amp;#8217;s say he writes this awesome worm that completely messes with everything in your system. Is he going to sign the app as &amp;#8220;Crook&amp;#8221;? Is he going to place a return address on his app? &amp;#8220;Here, I&amp;#8217;m at &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:Street w:st="on"&gt;&lt;st1:address w:st="on"&gt;1111 Stupid Lane&lt;/st1:address&gt;&lt;/st1:Street&gt;, come and get me!&amp;#8221; Absolutely not! Hackers have always focused on those vulnerabilities which leave no trace back to them. That&amp;#8217;s just common sense.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;Let&amp;#8217;s say you&amp;#8217;re a good company, conscientious in every way. What&amp;#8217;s the first thing you&amp;#8217;re going to place on your license agreement? I&amp;#8217;m no lawyer, but I expect it will read something like &amp;#8220;XXX corporation is not responsible for any damages the user might encounter while using this software&amp;#8230;&amp;#8221; etc. etc. etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;Now back to application IDs. I&amp;#8217;m not saying that signing software isn&amp;#8217;t a good idea. On the contrary! More and more applications are being delivered online. Signing the application manifest including a digest of all binaries is just common sense. But remember the disclaimer. The signatures are just there to enable you to 1) make an informed decision about whether the package you got came from who you thought it did and 2) that any attempt to modify the application in transit can and will be detected. You can also use the manifest to ensure that the application remains unchanged over time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;What I object to is the notion that an application can act on its own. I object to the notion that an app can authenticate to a remote party. This makes no sense. On the other hand, if the user (eg. person) wants to cough up the manifest associated with the application he&amp;#8217;s running, that&amp;#8217;s certainly his prerogative. In fact, a relying party may require this. However, the trust, the liability, the responsibility is on the user to ensure that A) his system is functioning within parameters, B) the application he&amp;#8217;s running is the one he wants and C) the actions taken on his behalf by the application are ultimately his responsibility.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;Won&amp;#8217;t this mean that users will be held accountable for stuff they have no control over? No. They can always choose not to run a piece of software, not to use a computer, or to use a different operating system. In fact, because software runs under the context of the user and the user most likely has the potential to do whatever it wants with the software, this actually creates a completely new problem. What&amp;#8217;s to prevent a malicious user from intentionally modifying the software in such a way as to damage the reputation of the software publisher, or even to hold the software publisher accountable for actions taken with that software?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"&gt;In short, applications are not principals. They do not act on their own. Software publishers are not responsible for the actions taken by a user. Users must always be held accountable for the actions they take, no matter the agent. Let&amp;#8217;s make operating systems and software that enable users to make informed decisions about which agents to invoke, and allow them to control the rights and privileges afforded to the agent. This makes sense.&lt;/SPAN&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=17448" width="1" height="1"&gt;</description></item><item><title>PDC2005 - COM214 - What happened?</title><link>http://www.pluralsight.com/community/blogs/dougwa/archive/2005/09/29/15091.aspx</link><pubDate>Thu, 29 Sep 2005 18:28:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:15091</guid><dc:creator>doug-walter</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/dougwa/rsscomments.aspx?PostID=15091</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/dougwa/archive/2005/09/29/15091.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Verdana&gt;If you attended John Shewchuck's talk COM214 - you probably remember all sorts of things going wrong with my demo. I know this is going to sound largely apologetic, but my real intent is to highlight what &lt;EM&gt;not &lt;/EM&gt;to do with a demo in front of a whole bunch of people.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Here's what I learned:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;1. Don't run on beta versions of the OS unless you have to!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;2. Split screen demos just don't work! Craning my neck to see what the audience was seeing, pop-up dialogs appearing on the wrong screen, and finding the mouse pointer made it all but impossible to show what was going on.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;3. Have a backup machine that's booted, and ready to resume your demo!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;4. If your demo involves writing code, keep snapshots of all key points along the way! See #3.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;5. Tech check all machines you might use, backups included!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;6. Don't share demo machines! It's tempting, especially if it's a 64-bit Ferrari; nonetheless, resist!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;7. Show less, not more!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;I want to thank Nigel Watling&amp;nbsp;who, in a moment of brilliance and forethought, reminded me that InfoCard would only draw on the primary screen of the demo machine. Had I continued running on the backup machine, along with its split screen configuration, the InfoCard part of the demo would have been a complete flop! Imagine, me holding a laptop high over my head, and pointing &amp;#8220;See, isn't it beautiful&amp;#8221;?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Anyways, lessons learned...&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=15091" width="1" height="1"&gt;</description></item><item><title>PDC 2005 - COM430 Demos posted</title><link>http://www.pluralsight.com/community/blogs/dougwa/archive/2005/09/29/15087.aspx</link><pubDate>Thu, 29 Sep 2005 16:42:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:15087</guid><dc:creator>doug-walter</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/dougwa/rsscomments.aspx?PostID=15087</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/dougwa/archive/2005/09/29/15087.aspx#comments</comments><description>&lt;P&gt;It's taken a while, but it's finally there.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://commnet.microsoftpdc.com/downloads.aspx"&gt;http://commnet.microsoftpdc.com/downloads.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Look for COM430.zip&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=15087" width="1" height="1"&gt;</description></item></channel></rss>