Tony has a very cool series of Monad-oriented blog entries at: http://mshforfun.blogspot.com/ . I was fascinated by this one: http://mshforfun.blogspot.com/2005/12/ncbi-blastn-under-msh-command-line.html which exposes the NCBI BLAST tool via a command line. Tony’s log explains what this tool does but what I found so cool was that it submitted a query for a Website, waited for results, retrived those results and then displayed them.
Tony’s script is a rewrite of a Perl Script using traditional concepts. In particular, it outputs error, progress, and results all to the same channel on the console. I did a light rewrite of the script to leverage Monad ability to put this information into different channels. In particular, progress information can be displayed in a Console ProgressBar via Write-Progress. This is the preferred way to display this information. It provides a much better user experience and it forces you to think about what information you should be providing the user to set their expectations. The other cool thing is that these Progress records are also available to GUI hosts so if this script where hosted in a GUI, it could use a GUI progressBar.
Run the original script and then try this one and compare the difference.
I’ve attached the script.
Jeffrey P. Snover