<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Asim Jalis: Programming Notes</title><link>http://blogs.msdn.com/asimj/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>CSBat: The C# Interpreter</title><link>http://blogs.msdn.com/asimj/archive/2006/01/20/515628.aspx</link><pubDate>Sat, 21 Jan 2006 04:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:515628</guid><dc:creator>asimj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/asimj/comments/515628.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=515628</wfw:commentRss><description>&lt;P&gt;Just to try out this idea I wrote out CSBat.cs, which allows C# code in bat and cmd files. &lt;/P&gt;
&lt;P&gt;Here is the problem this solves: Frequently I just want to write a short C# snippet. I don't want to write it as a source file, compile it, and run it. I'd rather just put the snippet in a bat file and run the bat file. I want to shorten the code-compile-execute loop to just code-execute. CSBat solves this problem. (Note: The in-memory compiler code was taken from Don Box's CSRepl from his blog. Also you will need the Whidbey 2.0 runtime to play with this sample.)&lt;/P&gt;
&lt;P&gt;Here is how to use the sample:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Save the hello.cmd code below into hello.cmd 
&lt;LI&gt;Save the csbat.cs code into csbat.cs 
&lt;LI&gt;Type: csc.exe csbat.cs /r:System.dll 
&lt;LI&gt;Type: hello.cmd 
&lt;LI&gt;The hello.cmd script should print "Hello...". Now edit the script and run it again. It should run with the changes.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Here are the contents of hello.cmd:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" face="Courier New" color=#000000 size=2&gt;@echo off&lt;BR&gt;csbat.exe Chk %~f0 %*&lt;BR&gt;goto :EOF&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" face="Courier New" color=#000000 size=2&gt;#! -*- csharp script start -*-&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" face="Courier New" color=#000000 size=2&gt;using System;&lt;BR&gt;public class Chk&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void Main(string[] args)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Hello world from CSBat.");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Argument count was: " + args.Length);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (string arg in args)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("arg = " + arg);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here are the contents of csbat.cs:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;using System;&lt;BR&gt;using System.Collections.Generic;&lt;BR&gt;using System.Reflection;&lt;BR&gt;using System.Text;&lt;BR&gt;using System.Text.RegularExpressions;&lt;BR&gt;using System.IO;&lt;BR&gt;using System.CodeDom;&lt;BR&gt;using System.CodeDom.Compiler;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;namespace CSBat&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static string Eval(string program, string className, string[] args) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICodeCompiler compiler = CodeDomProvider.CreateProvider("C#").CreateCompiler();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CompilerParameters cp = new CompilerParameters();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cp.GenerateExecutable = false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cp.GenerateInMemory = true;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CompilerResults results = compiler.CompileAssemblyFromSource(cp, program);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (results.Errors.HasErrors) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ApplicationException(results.Errors[0].ErrorText);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assembly assembly = results.CompiledAssembly;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type target = assembly.GetType(className);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MethodInfo method = target.GetMethod("Main");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object[] parameters = new object[]{ args }; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object result = method.Invoke(null, parameters);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result == null ? null : result.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (args.Length &amp;lt; 2) { throw new ArgumentException("Usage: csbat CLASS FILE ARGS"); }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string className = args[0];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string filePath = args[1];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;string&amp;gt; argList = new List&amp;lt;string&amp;gt;(args);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.RemoveAt(0);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.RemoveAt(0);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; args = argList.ToArray();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string fileContents = File.ReadAllText(filePath);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileContents = &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Regex.Replace(fileContents, "^.*?\n#![^\n]*csharp script[^\n]*\n", "", RegexOptions.Singleline);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string result = Eval(fileContents, className, args);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch(Exception e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Error: " + e.Message);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=515628" width="1" height="1"&gt;</description></item><item><title>Use CLR Profiler for C# Call Graphs and Optimization</title><link>http://blogs.msdn.com/asimj/archive/2004/12/01/273355.aspx</link><pubDate>Thu, 02 Dec 2004 01:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273355</guid><dc:creator>asimj</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/asimj/comments/273355.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=273355</wfw:commentRss><description>&lt;p&gt;I recently had the need to debug some code and was looking for an easy way to generate the call graph of the application. For a given function I wanted to see who its callers were and who the callers of the callers were, etc. Turns out Microsoft has a free tool called the CLR Profiler that does precisely this.&amp;nbsp; Here is how to use it:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Download and run the executable from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=86CE6052-D7F4-4AEB-9B7A-94635BEEBDDA&amp;amp;displaylang=en"&gt;this URL&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;Click on "Start" and select "Run".&lt;/li&gt; &lt;li&gt;Type C:\CLR Profiler\Binaries and click "OK". &lt;/li&gt; &lt;li&gt;Click on ClrProfiler.exe.&lt;/li&gt; &lt;li&gt;Click on "Start Application".&lt;/li&gt; &lt;li&gt;Select the application you want to analyze.&lt;/li&gt; &lt;li&gt;Then click on "Kill Application".&lt;/li&gt; &lt;li&gt;To view the call graph click on View and select "Call Graph".&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;This can also be used to profile the program and to improve and optimize its performance. Also it works with ASP.NET applications. Overall, an extremely cool application.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=273355" width="1" height="1"&gt;</description></item><item><title>Ward Cunningham on Simplicity</title><link>http://blogs.msdn.com/asimj/archive/2004/11/23/269020.aspx</link><pubDate>Wed, 24 Nov 2004 05:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:269020</guid><dc:creator>asimj</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/asimj/comments/269020.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=269020</wfw:commentRss><description>&lt;p&gt;Ward Cunningham has some interesting comments about simplicity in his interview with Bill Venners. &lt;a href="http://www.artima.com/intv/simplest.html"&gt;Here is a link&lt;/a&gt;. Here is an excerpt: &lt;/p&gt; &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt; &lt;p&gt;A friend of mine once said that there are problems and there are difficulties. A problem is something you savor. You say, "Well that's an interesting problem. Let me think about that problem a while." You enjoy thinking about it, because when you find the solution to the problem, it's enlightening. &lt;p&gt;And then there are difficulties. Computers are famous for difficulties. A difficulty is just a blockage from progress. You have to try a lot of things. When you finally find what works, it doesn't tell you a thing. It won't be the same tomorrow. Getting the computer to work is so often dealing with difficulties. &lt;p&gt;The complexity that we despise is the complexity that leads to difficulty. It isn't the complexity that raises problems. There is a lot of complexity in the world. The world is complex. That complexity is beautiful. I love trying to understand how things work. But that's because there's something to be learned from mastering that complexity. &lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=269020" width="1" height="1"&gt;</description></item><item><title>Password Managers</title><link>http://blogs.msdn.com/asimj/archive/2004/11/23/269019.aspx</link><pubDate>Wed, 24 Nov 2004 05:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:269019</guid><dc:creator>asimj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/asimj/comments/269019.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=269019</wfw:commentRss><description>&lt;p&gt;Here are some neat password manager products:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.microsoft.com/hardware/mouseandkeyboard/features/fingerprint.mspx"&gt;Microsoft's Fingerprint Reader&lt;/a&gt;: Microsoft now has a&amp;nbsp;cool hardware-based password manager,&amp;nbsp;that uses your thumb print to figure out who you are and then automatically types in your internet passwords. This addresses the two big problems with passwords: (a) writing&amp;nbsp; passwords&amp;nbsp;on paper is unsafe -- someone else might see them, (b) remembering lots of passwords is hard. &lt;/p&gt; &lt;p&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/04/07/SecurityBriefs/"&gt;Keith Brown's .NET Password Manager&lt;/a&gt;: If you prefer a software password manager, Keith's program is an option. Note: the program requires the .NET framework. At the bottom of Keith's article is a link to a password manager that does not require the .NET framework.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=269019" width="1" height="1"&gt;</description></item><item><title>Adam Bosworth on Simplicity</title><link>http://blogs.msdn.com/asimj/archive/2004/11/22/268159.aspx</link><pubDate>Tue, 23 Nov 2004 01:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:268159</guid><dc:creator>asimj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/asimj/comments/268159.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=268159</wfw:commentRss><description>&lt;p&gt;Here is a talk by Adam Bosworth on &lt;a href="http://www.adambosworth.net/archives/000031.html"&gt;software simplicity&lt;/a&gt;. His assertion is that simple sloppy systems with weak rules are more likely to be useful in unforeseen scenarios and therefore are more likely to succeed in unexpected ways than systems with strong rules.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=268159" width="1" height="1"&gt;</description></item><item><title>Learning to Fly in Halo2</title><link>http://blogs.msdn.com/asimj/archive/2004/11/22/268123.aspx</link><pubDate>Tue, 23 Nov 2004 00:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:268123</guid><dc:creator>asimj</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/asimj/comments/268123.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=268123</wfw:commentRss><description>Here is a video demo on the &lt;a href="http://files.mythica.org/halo/darkhelmet/learningtofly.wmv"&gt;experience of flying in Halo2&lt;/a&gt;.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=268123" width="1" height="1"&gt;</description></item><item><title>Free Visual Studio and SQL Server Downloads</title><link>http://blogs.msdn.com/asimj/archive/2004/11/01/250734.aspx</link><pubDate>Mon, 01 Nov 2004 23:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:250734</guid><dc:creator>asimj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/asimj/comments/250734.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=250734</wfw:commentRss><description>You can now download free beta versions of Visual Studio. Here is a link to the &lt;a href="http://lab.msdn.microsoft.com/express/vcsharp/"&gt;Visual C# Express Edition Beta&lt;/a&gt;. Here is the link to all the &lt;a href="http://lab.msdn.microsoft.com/express/"&gt;Express Edition products&lt;/a&gt; (Visual Basic, C++, J#, etc). Also while you are at it you can also grab the free &lt;a href="http://lab.msdn.microsoft.com/express/sql/"&gt;SQL Server Express Edition Beta&lt;/a&gt;.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=250734" width="1" height="1"&gt;</description></item><item><title>Lunar Eclipse Video</title><link>http://blogs.msdn.com/asimj/archive/2004/11/01/250721.aspx</link><pubDate>Mon, 01 Nov 2004 22:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:250721</guid><dc:creator>asimj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/asimj/comments/250721.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=250721</wfw:commentRss><description>&lt;p&gt;John Archer has made a really neat time lapse &lt;a href="http://www.null-routed.net/eclipse.wmv"&gt;video&lt;/a&gt; of the recent lunar eclipse using Microsoft Movie Maker 2. Click &lt;a href="http://www.null-routed.net/eclipse.wmv"&gt;here&lt;/a&gt; to see it.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=250721" width="1" height="1"&gt;</description></item><item><title>Sometimes Barney Appears on the Screen and Sometimes He Doesn't</title><link>http://blogs.msdn.com/asimj/archive/2004/11/01/250692.aspx</link><pubDate>Mon, 01 Nov 2004 22:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:250692</guid><dc:creator>asimj</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/asimj/comments/250692.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=250692</wfw:commentRss><description>Another humorous KB (knowledge base) &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;172657"&gt;whitepaper&lt;/a&gt;; this one's on Barney.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=250692" width="1" height="1"&gt;</description></item><item><title>The Crabby Lady Is For Real</title><link>http://blogs.msdn.com/asimj/archive/2004/11/01/250689.aspx</link><pubDate>Mon, 01 Nov 2004 22:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:250689</guid><dc:creator>asimj</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/asimj/comments/250689.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=250689</wfw:commentRss><description>See &lt;a href="http://office.microsoft.com/en-us/assistance/HA011537421033.aspx"&gt;videos&lt;/a&gt; of the Crabby Lady taking on reader's comments about Microsoft Office tools.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=250689" width="1" height="1"&gt;</description></item><item><title>Visual Studio and .NET Framework Feedback</title><link>http://blogs.msdn.com/asimj/archive/2004/11/01/250688.aspx</link><pubDate>Mon, 01 Nov 2004 22:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:250688</guid><dc:creator>asimj</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/asimj/comments/250688.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=250688</wfw:commentRss><description>&lt;p&gt;The Developer Division now accepts direct feedback (feature suggestions, bugs) about VS (Visual Studio), the .NET framework, and other developer tools, here on their &lt;a href="http://labs.msdn.microsoft.com/productfeedback/"&gt;LadyBug site&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=250688" width="1" height="1"&gt;</description></item><item><title>Literate Programming and XP</title><link>http://blogs.msdn.com/asimj/archive/2004/09/01/224416.aspx</link><pubDate>Thu, 02 Sep 2004 05:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:224416</guid><dc:creator>asimj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/asimj/comments/224416.aspx</comments><wfw:commentRss>http://blogs.msdn.com/asimj/commentrss.aspx?PostID=224416</wfw:commentRss><description>&lt;p&gt;I recently read Don Knuth's "Literate Programming". It seems to me that a lot of writing on the web ignores the main point of literate programming. The main point is not to mix comments and code. That is pretty easy to do in most languages.&lt;/p&gt; &lt;p&gt;What Don is really talking about is how to lay out your program so that it's layout matches the way we think rather than the way a compiler works.&lt;/p&gt; &lt;p&gt;When I write a program (when I am not using XP and when I am not pairing) I spend some time writing notes to myself, reflecting on the program, and exploring what different parts of it will do.&amp;nbsp; The final product is still vague. I am just getting a feel for the conceptual space around the program. I am also trying to poke around my understanding of the problem I am trying to solve. My notes consist of a lot of English, some of it transformed into pseudo-code, and some of this translated into actual code. It also contains data definitions.&lt;/p&gt; &lt;p&gt;Eventually when I have a reasonable grip on what needs to be done I start coding. At this point I throw away all my notes.&lt;/p&gt; &lt;p&gt;Don is proposing a system in which I can run my notes through a pre-compiler (which he calls WEB) to produce my program. This way the notes stay connected to the code. &lt;/p&gt; &lt;p&gt;In these notes the flow of reasoning is neither top-down nor bottom-up. In fact it bounces around between components -- like a web. Each time I pin down a detail on one side I have to come back and talk about how this will impact other decisions in other components. So its a winding iterative process.&lt;/p&gt; &lt;p&gt;Compilers do not permit this kind of flimsiness. The require that you talk about one thing at a time. They cannot talk about something else for a while and then come back to the original point. Compilers can only follow one train of thought at a time.&amp;nbsp; They have tunnel vision. They are incapable of taking a global view of the system. They are focused on getting the job done and if you leave out the smallest detail or try to change the subject midstream in the conversation they completely freak out. &lt;/p&gt; &lt;p&gt;The ability to add comments does not change this basic fact about how compilers expect code to be laid out. You are only allowed to talk about one thing at a time. And once you start talking about a class you cannot change the subject till you have said everything there is to be said about the class.&lt;/p&gt; &lt;p&gt;In my mind Literate Programming is a way to get around this incompatibility in thinking. I don't know how well Don's system does this job. But whether he succeeds or not, it seems like a worthwhile goal to make the layout of computer code more compatible with the way we (humans) think, explain things to each other and understand new things.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=224416" width="1" height="1"&gt;</description></item></channel></rss>