Welcome to MSDN Blogs Sign in | Join | Help

Calling a PowerShell Script From Your .NET Code

 

Well, Mike F. reminded me to write this article on 5/29 and I am FINALLY getting around to doing it.  Also wanted to give a shout out to Max T. who provided some inspiration on this one as well.  For the code, I borrow very heavily from the article written by Jean-Paul Mikkers found at: 

http://www.codeproject.com/KB/cs/HowToRunPowerShell.aspx

 

NOTE:  There is an async version of his code that he does as a follow up.  I don't use it because I want to remove extra code noise to focus on the act of calling the script itself.  If you want to take a stab at the async version (and there are LOTS of good reasons to do so) then you can go here:

http://www.codeproject.com/KB/threads/AsyncPowerShell.aspx 

 

So, on to the goodness!

 

First, you need to make sure you have Visual Studio (any version) installed and have PowerShell installed.  You can get PowerShell from here:

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

 

You will also need to do this (WARNING:  MAJOR SECURITY ISSUE HERE AND THIS IS JUST FOR TESTING SO DON'T DO THIS ON PRODUCTION MACHINES):

http://www.cubiczone.com/Articles/tabid/65/EntryID/17/Default.aspx

 

 

 

1.   Now, let's crank out a simple PoweShell script that we are interested in calling.  We will call a simple script that takes a couple of numbers and returns the sum of those numbers.  This may seem overly simplistic but it is an easy way to demonstrate a complete round-trip between our app and the script without getting bogged down in extra BS that comes with a fancier script.  I'll call the script AddItUp.ps1 and it is included in the source code download, just put it anywhere you can get to easily.  Feel free to dig into the guts of it later on but for now just assume it does what we need it to do. 

 

Here is the code for the script if you just want to make your own real quick:

 

# begin

function AddStuff($x,$y)
{
   $x + $y
}

 

AddStuff 6 5

# end

 

NOTE:  Some inspiration and just a cool site for scripts came from http://www.powershellpro.com just as an fyi

 

 

 

2.  Test the script by opening PowerShell and navigating to the directory where it is and typing what you see in the graphic, you should get the expected result.

image

 

 

 

 

3.  Okay!  We have a script that works but now what?  Well we have to call that puppy from our code so let's create a project and get ready to make our magic happen.  Crank out a new Windows App for us to use.  Call the Project CallMeCS or CallMeVB depending on your language.

 

 

image

 

 

 

 

4.  For the interface, just gimme a button and a label.  Resize the form a bit so we don't have wasted space.  Real simple stuff...

 

image

 

 

 

5.  Double-click on the button to go into our code.

 

C#:

image

 

VB:

image

 

 

 

6.  Now we need to add an assembly that is one of a set we got with our install of PowerShell.  You can find these assemblies at C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0

 

image

 

7.  Right-click on your project and choose Add Reference...

 

image

 

 

8.  Select the Browse Tab and locate these assemblies then add a reference to the System.Management.Automation.dll

NOTE:  If you want to dig deeper into the contents of this namespace, you can check it out here:  http://msdn.microsoft.com/en-us/library/system.management.automation(VS.85).aspx

 

image

 

 

9.  Now that we have our reference we need to add some using/imports statements to make getting to the classes we want to use easier.  Make sure to put these at the top of your code page outside any other code. 

 

C#:

using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.IO;

 

VB:

Imports System.Collections.ObjectModel
Imports System.Management.Automation
Imports System.Management.Automation.Runspaces
Imports System.Text
Imports System.IO

 

 

10.  Okay, this next part is a little funkier.  While I liked the code that Mikkers had, I wanted to be able to load up a file from my file system and use it instead of just putting code into a textbox.  That created some VERY interesting new challenges but the end result worked out well.  So, to that end, we will create two helper methods:  RunScript and LoadScript.  RunScript is the code essentially unchanged from Mikkers' article and LoadScript is my helper function that will load the contents of a script file and return a string.

 

 

11.  Let's begin with the RunScript method.  We will add this method to the Form1 class to make our life easier. 

 

C#:

private string RunScript(string scriptText)
   {
       // create Powershell runspace
       Runspace runspace = RunspaceFactory.CreateRunspace();

       // open it
       runspace.Open();

       // create a pipeline and feed it the script text
       Pipeline pipeline = runspace.CreatePipeline();
       pipeline.Commands.AddScript(scriptText);

       // add an extra command to transform the script output objects into nicely formatted strings
       // remove this line to get the actual objects that the script returns. For example, the script
       // "Get-Process" returns a collection of System.Diagnostics.Process instances.
       pipeline.Commands.Add("Out-String");

       // execute the script
       Collection<PSObject> results = pipeline.Invoke();

       // close the runspace
       runspace.Close();

       // convert the script result into a single string
       StringBuilder stringBuilder = new StringBuilder();
       foreach (PSObject obj in results)
       {
           stringBuilder.AppendLine(obj.ToString());
       }

       // return the results of the script that has
       // now been converted to text
       return stringBuilder.ToString();
   }

 

VB:

' Takes script text as input and runs it, then converts
    ' the results to a string to return to the user
    Private Function RunScript(ByVal scriptText As String) As String

        ' create Powershell runspace
        Dim MyRunSpace As Runspace = RunspaceFactory.CreateRunspace()

        ' open it
        MyRunSpace.Open()

        ' create a pipeline and feed it the script text
        Dim MyPipeline As Pipeline = MyRunSpace.CreatePipeline()

        MyPipeline.Commands.AddScript(scriptText)

        ' add an extra command to transform the script output objects into nicely formatted strings
        ' remove this line to get the actual objects that the script returns. For example, the script
        ' "Get-Process" returns a collection of System.Diagnostics.Process instances.
        MyPipeline.Commands.Add("Out-String")

        ' execute the script
        Dim results As Collection(Of PSObject) = MyPipeline.Invoke()

        ' close the runspace
        MyRunSpace.Close()

        ' convert the script result into a single string
        Dim MyStringBuilder As New StringBuilder()

        For Each obj As PSObject In results
            MyStringBuilder.AppendLine(obj.ToString())
        Next

        ' return the results of the script that has
        ' now been converted to text
        Return MyStringBuilder.ToString()

    End Function

 

 

12.  Now we want to add in our LoadScript method to make getting the script into a variable easier.

 

C#:

// helper method that takes your script path, loads up the script
        // into a variable, and passes the variable to the RunScript method
        // that will then execute the contents
        private string LoadScript(string filename)
        {
            try
            {
                // Create an instance of StreamReader to read from our file.
                // The using statement also closes the StreamReader.
                using (StreamReader sr = new StreamReader(filename))
                {

                    // use a string builder to get all our lines from the file
                    StringBuilder fileContents = new StringBuilder();

                    // string to hold the current line
                    string curLine;

                    // loop through our file and read each line into our
                    // stringbuilder as we go along
                    while ((curLine = sr.ReadLine()) != null)
                    {
                        // read each line and MAKE SURE YOU ADD BACK THE
                        // LINEFEED THAT IT THE ReadLine() METHOD STRIPS OFF
                        fileContents.Append(curLine + "\n");
                    }

                    // call RunScript and pass in our file contents
                    // converted to a string
                    return fileContents.ToString();
                }
            }
            catch (Exception e)
            {
                // Let the user know what went wrong.
                string errorText = "The file could not be read:";
                errorText += e.Message + "\n";
                return errorText;
            }

        }

 

VB:

' helper method that takes your script path, loads up the script
    ' into a variable, and passes the variable to the RunScript method
    ' that will then execute the contents
    Private Function LoadScript(ByVal filename As String) As String

        Try

            ' Create an instance of StreamReader to read from our file.
            ' The using statement also closes the StreamReader.
            Dim sr As New StreamReader(filename)

            ' use a string builder to get all our lines from the file
            Dim fileContents As New StringBuilder()

            ' string to hold the current line
            Dim curLine As String = ""

            ' loop through our file and read each line into our
            ' stringbuilder as we go along
            Do
                ' read each line and MAKE SURE YOU ADD BACK THE
                ' LINEFEED THAT IT THE ReadLine() METHOD STRIPS OFF
                curLine = sr.ReadLine()
                fileContents.Append(curLine + vbCrLf)
            Loop Until curLine Is Nothing

            ' close our reader now that we are done
            sr.Close()

            ' call RunScript and pass in our file contents
            ' converted to a string
            Return fileContents.ToString()

        Catch e As Exception
            ' Let the user know what went wrong.
            Dim errorText As String = "The file could not be read:"
            errorText += e.Message + "\n"
            Return errorText
        End Try

    End Function

 

13.  Finally, we just need to add some code for our button's click event.

 

C#:

private void button1_Click(object sender, EventArgs e)
        {
            // run our script and put the result into our textbox
            // NOTE: make sure to change the path to the correct location of your script
            textBox1.Text = RunScript(LoadScript(@"c:\users\zainnab\AddItUp.ps1"));
        }

 

VB:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'run our script and put the result into our textbox
        'NOTE: make sure to change the path to the correct location of your script
        TextBox1.Text = RunScript(LoadScript("c:\users\zainnab\AddItUp.ps1"))
End Sub

 

14.  That's it!!  You should be able to run your code and you should get this:

image

 

 

Don't sweat it if you think this is a lot to type.  I have included the source code for you to use.  Enjoy!

Posted by zainnab | 1 Comments

Attachment(s): CallingPowershellFromCode.zip

In Memory of Randy Pausch (Oct. 23, 1960 - July 25, 2008)

A luminary in the virutal world space and truly inspiring.  His last lecture at Carnegie Mellon...

 

 

Posted by zainnab | 2 Comments
Filed under:

Microsoft Research Stuff

Constellation: automated discovery of service and host dependencies in networked systems
Paul Barham; Richard Black; Moises Goldszmidt; Rebecca Isaacs; John MacCormick; Richard Mortier; Aleksandr Simma
April 2008
14 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1484
In a modern enterprise network of scale, dependencies between hosts and network services are surprisingly complex, typically undocumented, and rarely static. Even though network management and troubleshooting rely on this information, automated discovery and monitoring of these dependencies remains an unsolved problem. In the system we describe in this paper computers on the network cooperate to make this information available to all users of the network. Constellation uses machine learning techniques to infer a network-wide map of the complex relationships between hosts and services using little more than the timings of packet transmission and reception. Statistical hypothesis testing on the resulting models provides a guaranteed confidence level for the accuracy of the result. The system is demonstrated against a substantial packet trace from an enterprise network.

 

 

A Case for Adapting Channel Width in Wireless Networks
Ranveer Chandra; Ratul Mahajan; Thomas Moscibroda; Ramya Raghavendra; Paramvir Bahl
April 2008
14 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1482
We study a fundamental yet under-explored facet in wireless communication -- the width of the spectrum over which transmitters spread their signals, or the channel width. Through detailed measurements in controlled and live environments, and using only commodity 802.11 hardware, we first quantify the impact of channel width on throughput, range, and power consumption. Taken together, our findings make a strong case for wireless systems that adapt channel width. Such adaptation brings unique benefits. For instance, when the throughput required is low, moving to a narrower channel increases range and reduces power consumption; in fixed-width systems, these two quantities are always in conflict. We then present a channel width adaptation algorithm, called SampleWidth, for the base case of two communicating nodes. This algorithm is based on a simple search process that builds on top of existing techniques for adapting modulation. Per specified policy, it can maximize throughput or minimize power consumption. Evaluation using a prototype implementation shows that SampleWidth correctly identifies the optimal width under a range of scenarios. In our experiments with mobility, it increases throughput by more than 60% compared to the best fixed-width configuration.

 

 

TrafficSense: Rich Monitoring of Road and Traffic Conditions using Mobile Smartphones
Prashanth Mohan; Venkata N. Padmanabhan; Ramachandran Ramjee
April 2008
29 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1475
We consider the problem of monitoring road and traffic conditions in a city. Prior work in this area has required the deployment of dedicated sensors on vehicles and/or on the roadside, or the tracking of mobile phones by service providers. Furthermore, prior work has largely focused on the developed world, with its relatively simple traffic flow patterns. In fact, traffic flow in cities of the developing regions, which comprise much of the world, tends to be much more complex owing to varied road conditions (e.g., potholed roads), chaotic traffic (e.g., a lot of braking and honking), and a heterogeneous mix of vehicles (2-wheelers, 3-wheelers, cars, buses, etc.). To monitor road and traffic conditions in such a setting, we present TrafficSense, a system that performs rich sensing by piggybacking on smartphones that users carry around with them. In this paper, we focus specifically on the sensing component, which uses the accelerometer, microphone, GSM radio, and/or GPS sensors in these phones to detect potholes, bumps, braking, and honking. TrafficSense addresses several challenges including virtually reorienting the accelerometer on a phone that is at an arbitrary orientation, and performing honk detection and localization in an energy efficient manner. We also touch upon the idea of triggered sensing, where dissimilar sensors are used in tandem to conserve energy. We evaluate the effectiveness of the sensing functions in TrafficSense based on experiments conducted on the roads of Bangalore, with promising results.

 

 

I Sense A Disturbance in the Force: Mobile Device Interaction with Force Sensing
James Scott; Lorna Brown; Mike Molloy
April 2008
10 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1473
We propose a new type of input for mobile devices by sensing forces such as twisting and bending applied by us-ers. Deformation of the devices is not necessary for such “force gestures” to be detectable. Our prototype implemen-tation augments an ultra-mobile PC (UMPC) to detect twisting and bending forces. We detail example interac-tions using these forces, employing twisting to perform application switching (alt-tab) and interpreting bending as page-down/up. By providing visual feedback related to the force type applied, e.g. of an application window twisting in 3D to reveal another and of pages bending across, these force-based interactions are made easy to learn and use. We also present a user study exploring users’ abilities to apply forces to various degrees, and draw implications from this study for future force-based interfaces.

 

 

Horizon: Balancing TCP over multiple paths in wireless mesh network
Bozidar Radunovic; Christos Gkantsidis; Dinan Gunawardena; Peter Key
March 2008
13 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1470
There has been extensive work on network architectures that support multi-path routing to improve performance in wireless mesh networks. However, previous work uses ad-hoc design principles that cannot guarantee any network-wide performance objectives such as conjointly maximizing resource utilization and improving fairness. In parallel, numerous theoretical results have addressed the issue of optimizing a combined metric of network utilization and fairness using techniques based on back-pressure scheduling, routing and flow control. However, the proposed theoretical algorithms are extremely difficult to implement in practice, especially in the presence of 802.11 MAC and TCP. We propose Horizon, a novel system design for multipath forwarding in wireless meshes, based on the theoretical results on back-pressure. Our design works with an unmodified TCP stack and on the top of the existing 802.11 MAC. We modified the back-pressure approach to obtain a simple 802.11-compatible packet-forwarding heuristic and a novel, light-weight path estimator, while maintaining global optimality properties. We propose a delayed reordering algorithm that eliminates TCP timeouts while keeping TCP packet reordering at a minimum. We have evaluated our implementation on a 22-node testbed. We have shown that Horizon effectively utilizes available resources (disjoint paths). In contrast to previous work our design can not only avoid bottlenecks but also optimally load-balances traffic across them when needed, improving fairness among competing flows. To our knowledge, Horizon is the first practical system based on back-pressure.

 

 

Revealing Uncertainty for Information Visualization
Meredith Skeels; Bongshin Lee; greg smith; George Robertson
April 2008
8 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1465
Uncertainty in data occurs in domains ranging from natural science to medicine to computer science. By developing ways to include uncertainty in our information visualizations we can provide more accurate depictions of critical datasets. One hindrance to visualizing uncertainty is that we must first understand what uncertainty is and how it is expressed. We reviewed existing work from several domains on uncertainty and created a classification of uncertainty based on the literature. We empirically evaluated and improved upon our classification by conducting interviews with 18 people from several domains, who self-identified as working with uncertainty. Participants described what uncertainty looks like in their data and how they deal with it. We found commonalities in uncertainty across domains and believe our refined classification will help us in developing appropriate visualizations for each category of uncertainty.

Posted by zainnab | 0 Comments

"Not Rooting for Reuters" or "How I Learned About Journalistic Integrity the Hard Way"

 

So, I finally had my first bad experience with journalism in my efforts as the guy who does Virtual World Evangelism and I wanted to share it with you.  Not only because it is a great example of what journalism should NOT be but also because I wanted to set the record straight.  To that end, here is where you can find the original "article" written by Eric Reuters (his avatar name):

 

http://secondlife.reuters.com/stories/2008/07/18/microsoft-eyes-integration-between-opensim-and-windows-live-id/

 

And now to my reaction to it.  First, let me begin by saying that LiveID was NOT the topic of discussion at all we were talking about Virtual World Evangelism and how I was helping the community.  Eric took it upon himself to latch on to the LiveID topic without even digging into the details.  In the hour-long conversation we had probably only 5-10 minutes of the conversation about integration this.  So, without further ado, here are my comments on the Reuters article (NOTE my comments are preceded by //):

 

SECOND LIFE, July 17 (Reuters) - No one’s really sure yet how avatar identities will be managed in a chaotic world filled with thousands of interoperable OpenSim grids. But Microsoft believes it has a solution: its own Windows Live ID.

// This isn't a Microsoft effort, it is a community effort.  Microsoft has no articulated strategy with regard to avatar identity management at this point.

 

Zain Naboulsi, a “developer/evangelist” at Microsoft looking closely at OpenSim, said the company seeks to integrate at least three of its free services into the evolving open source package: coding tool C Sharp Express; SQL server express, Microsoft’s database platform to handle OpenSim’s inventory calls; and Windows Live ID, a identity-management tool.

// Okay, first of all, I'm a Developer Evangelist without the "/" and, yes, we--the community and I--are absolutely looking at OpenSim as one of many alternatives to the virtual world space.  We love Second Life as a venue but realize that there are other emerging worlds and want to explore them.  Second, Microsoft isn't doing anything of the sort.  The .NET Community led by Kyle (http://www.sldnug.net) is making all this happen.  I just help out by asking questions of the product teams or the like as needed.  Finally, C# Express is a free IDE and I'm not sure how you would integrate it with OpenSim.  As for SQL Server Express and Windows LiveID, the community wants to make that happen and they have in fact done it recently with SQL Server by getting the supporting code into the OpenSim trunk.  The credit for that goes to our very own Chris Hart (http://blogs.ipona.com/chris/Default.aspx) for helping make that happen.

 

 

Naboulsi insists he’s not out to sell software — all three of the technologies are free. But as OpenSim continues to gain traction, tying Microsoft technology into OpenSim’s code increases the pool of developers allied with Redmond. And if OpenSim takes off, a Windows Live ID-based avatar identity gives Microsoft a leg up against the identity management tools offered by Google, Yahoo, and OpenID.

//  Yeah, I don't sell software we have sales people to do that.  Nowhere in my job description does it say I have any sales commitment of any kind.  My job is simple, engage with and help the community of .NET Developers that exists.  I suppose we get a "leg up" if people use LiveID, but it is less about that in my mind than just making it easier to log into a virtual world.  Personally, I hate not having a more unified login experience for all kinds of things not just virtual worlds.

 

 

In an interview with Reuters last week, Linden Lab VP Joe Miller said he expected OpenSim to grow rapidly in the future, but said Linden will target monetizable “value-added services.” A Microsoft move into avatar identity management could potentially put Linden Lab in competition with Redmond.

//Okay, once again, Microsoft is NOT moving into the avatar identity management space as far as I know.  I work with the community and this entire conversation I was telling Eric this he somehow conveniently forgot to mention the community was doing this and not Microsoft.  I know sensationalism sells but it really has to take a back seat to the truth.

 

 

Internet giant Google opened its own line of attack against Linden Lab with the introduction of its “Lively” virtual world last week.

 

“We want to come out with a shipping version of OpenSim that integrates Live services and SQL Server,” Naboulsi said.

// Again, implying that Microsoft is going to ship a products here.  No, the COMMUNITY wants to get this stuff in there and I am helping them.  For the record, the community also wants to put in OpenID and other stuff as well so this isn't a Microsoft thing going on with the desire to have a simplified login experience.

 

 

Microsoft has already made rapid steps. Reactiongrid, an OpenSim area, is now running on SQL Server, Microsoft’s offering in the highly-competitive database market.

// Microsoft has helped the community make rapid steps, yes.  I am very proud of that fact, by the way, and absolutely couldn't be happier with the amazing progress the community has made.

 

 

Naboulsi, a four-year veteran of Second Life, said Microsoft’s first entrance into virtual worlds was random and uncoordinated. The company had set up a “Microsoft Island” for a one-off event before abandoning it, and was planning on ending its Second Life presence.

// Yeah I never said this.  In truth, it was sort of uncoordinated in that there were multiple MS islands but they didn't seem to communicate with each other much but there was nothing random about going into Second Life.  If you know Microsoft at all you know that we don't do anything randomly.  We research, gather metrics, have committees meet with sub-committees, and then more meetings with data then we move.  Nothing random about it so that part is just patently false.

 

 

He tied his company back into the virtual worlds space by holding meetings of Microsoft developers in Second Life, and grew .NET user groups from 20 to almost 800 members. “We’ve been going like gangbusters on meetings here,” he said.

// Yes I did.  After they held a big event the folks who bought Microsoft Island were just going to "turn it off".  Naturally I thought that was a bad idea so they agreed to give it to me.  I have "run" the island since Sept 2007.  I put run in quotes because I really don't run jack.  The community runs it, Microsoft just pays for the island the community has done everything else including make it look a million times better than when we first got it.

 

 

But where Naboulsi differs from Linden’s vision is that he’s emphatic 3D technology is not about having an alternate identity divorced from your real life self. Microsoft views virtual worlds as the natural evolution of online presence.

// I never, EVER said this.  You are talking to a lifetime subscriber to "2600 The Hacker Quarterly" (http://www.2600.com) , do you honestly believe I would not consider privacy issues?  Where the hell he got this I have no idea.  I did mention that, in the future, I believe we will have more 3D integration with our desktop apps and that when you want to have a conference you will just go down a virtual hall to a conference room but that was clearly talking about inside the workplace not out on the Internet in general.  For anyone to suggest that there should not be adequate levels of protection for your identity in this day and age is pure insanity and I personally have been a champion of online privacy for a very long time.

 

 

“I have zero interest in gaming,” Naboulsi said. “The future is a simplified 3D world on your desktop.”

// For me, this is actually true.  I have no interest in virtual worlds as a gaming venue.  I know they make great games, don't get me wrong but my passion is around education and business.  So I want to see virtual worlds become the way we do distance learning or have meetings with co-workers around the world.  I do it myself today with the community and it works great, I hope to see the whole planet use it this way one day. 

 

 

// Let me just add one more thing to my response to this "article".  Throughout the entire conversation, Eric missed the one big point I was trying to make about OpenSim and technologies like it:  they will empower regular people to have a virtual world anywhere they want it.  I have a dream that one day every person will have a little virtual world of their own if they want it and then can hook it into the main "grid" to hang out with other folks.  This isn't just my dream the Virtual World community that Kyle runs has it, the OpenSim folks have it, and many other do as well.  We are all working toward the same goal to achieve the dream of virtual worlds for everyone.  I look forward to that day :)

Posted by zainnab | 3 Comments

Keith Combs Does It Again: Tons of VM's Using Hyper-V

 

14OperatingSystems

 

Readers of my blog know about my buddy Keith Combs.  Well, he has done some very cool stuff with Hyper-V in the past and now he has loaded up his laptop to see how many VM's he can run.  Check out his results here:

 

http://blogs.technet.com/keithcombs/archive/2008/06/07/new-laptop-windows-vista-sp1-virtual-machine-world-record.aspx

Posted by zainnab | 1 Comments

String Comparison Love: Which way is the best for comparing strings?

 

 

Just came across this really great article on which method is best for string comparisons.  If you ever wanted to dig into string comparisons this is the way to do it!

 

http://akutz.wordpress.com/2008/07/20/stringing-along-in-net/

Posted by zainnab | 1 Comments
Filed under: , , , ,

Final Version of My Links for the Visual Studio 2008 Webcast Series

I thought I would break out the final version of my links for folks to have from my earlier webcast series
Posted by zainnab | 3 Comments

Attachment(s): Links.zip

XNA: Dream, Build, Play!

 

The XNA Team has launched Dream-Build-Play 2008.

In Dream-Build-Play 2008 you can build your dream game to compete with other game developers around the world.  This year’s contest will feature Xbox360 development only and to ensure that everyone has access we will be giving away one free 12-Month XNA Creators Club Trial membership to everyone that registers.  Contestants will compete for $75,000 in prizes and the bragging rights to say their game was the best.  Additionally, one of the top ten finalists will win an opportunity for an Xbox LIVE publishing contract.  For more information log on to www.dreambuildplay.com

Posted by zainnab | 1 Comments
Filed under: , ,

Seriously, Marlon Needs Your Help...

I just got done emailing with Marlon about his mother.  You may recall that I did a post a while back to ask for help as she recently was diagnosed with Leukemia:

http://blogs.msdn.com/zainnab/archive/2008/07/07/help-for-marlon-s-mother.aspx

You all know me as a no BS guy so let me lay it out for you now.  I don't donate much if at all.  I think the main reason I don't do it is because I am never 100% sure how much goes to the people in need and how much goes for "administrative" purposes.  That's a failing on my part and not much of an excuse but there it is anyway.  I'm not asking you to take out a second mortgage to donate, in fact, even if you can only donate a buck at least Marlon knows there is someone out there that cares.  This time you know who the money is going to and what it is going for there is no ambiguity.  So please, give something, anything to let Marlon know that there are people out there that really do care.

Right now there have only been 3 people who have given to this cause.  THREE!  Wow.  Obviously I'm one of them but what I want is for YOU to be one of them.  If everyone of my readers just gave a dollar it would be major cool and if you can give more go for it.  To give you some perspective, I donated a lot of money to this cause because I believe it is a very worthy one.  So give if you can and make sure to put a note in telling Marlon that you are pulling for his mom to make it through this.

Posted by zainnab | 2 Comments

More Research Goodness -- You Know You Love It!!

 

My regular stuff on some coolness from MS Research:

 

Spending Moore’s Dividend
James R. Larus
May 2008
19 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1486
Thanks in large measure to the improvement in semiconductors predicted by Moore’s Law, CPU performance has increased 40-50% per year over the past three decades. The advent of Multicore processors marks an end to sequential performance improvement and a radical shift to parallel programming. To understand the consequences of this change, it is worth looking back at where the thousands-fold increase in computer performance went and looking forward to how software might accommodate this abrupt shift in the underlying computing platform.

 

HomeMaestro: Order from Chaos in Home Networks
Thomas Karagiannis; Elias Athanasopoulos; Christos Gkantsidis; Peter Key
May 2008
15 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1501
We present HomeMaestro, a distributed system for monitoring and instrumentation of home networks. HomeMaestro performs extensive measurements at the host level to infer application network requirements, and identifies network-related problems through time-series analysis. By sharing and correlating information across hosts in the home network, our system automatically detects and resolves contention over network resources among applications based on predefined policies. Finally, HomeMaestro implements a distributed virtual queue to enforce those policies by prioritizing applications without additional assistance from network equipment such as routers or access points. We outline the challenges in managing home networks, describe the design choices and architecture of our system, and highlight the performance of HomeMaestro components in typical home scenarios.

 

What is Autonomous Search?
Youssef Hamadi; Eric Monfroy; Frederic Saubion
May 2008
15 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1497
Autonomous search is a particular case of adaptive systems that aims at improving its solving performance by adapting itself to the problem at hand. We propose a general definition and a taxonomy of search processes w.r.t. their computation characteristics. This formalism is expressed by some computation rules between computation states. The sequence of application of these rules (i.e., the strategy) then characterizes the search process itself. Using these rules we then classify some well known solvers and try to answer the question that was raised during the first workshop on Autonomous Search: ``What is Autonomous search?''

 

 

Email Information Flow in Large-Scale Enterprises
Thomas Karagiannis; Milan Vojnović
May 2008
14 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1493
We present analysis results of email communications in a large-scale enterprise network. Our study first focuses on understanding the social graph induced by email communications between individual users. Specifically, we examine how email communication flows are correlated with user profiles, the organization structure, and how outside information penetrates the enterprise. We then concentrate on understanding the information processing load imposed to users and the strategies applied by users in email triage. To the best of our knowledge, this is the first measurement study of email communications of a global enterprise network comprising email data from over 100,000 employees spread across multiple continents. Our analysis results inform the design of network applications that takes into account typical user behaviour in social interactions and solitary information processing. Our large-scale dataset further allows us to examine the validity of several hypotheses suggested by the social network theory.

 

 

Some sample programs written in DryadLINQ
Yuan Yu; Michael Isard; Dennis Fetterly; Mihai Budiu; Ulfar Erlingsson; Pradeep Kumar Gunda; Jon Currey; Frank McSherry; Kannan Achan
May 2008
37 p.
http://research.microsoft.com/research/pubs/view.aspx?tr_id=1491
DryadLINQ is a system and a set of language extensions that enable a new programming model for large scale distributed computing. This technical report contains annotated listings of several example programs written using DryadLINQ, illustrating typical usage.

Dark City Rulez

 

Just had to get it out there.  I LOVE this movie!  And the trailer kicks ass, too!

 

 

And great music too from the album:

Posted by zainnab | 0 Comments

Fiddler 2: Return of the Cool Tool!

 

 

If you haven't checked out Fiddler yet, you need to.  It's a great debugging tool!

 

http://www.fiddlertool.com/Fiddler2/version.asp

Posted by zainnab | 1 Comments

SQL Server vs. Access: Which is right for you?

 

This question came up the other day from Craig P. and I thought it was such a good one I wanted to blog about it.  I think many of us take it for granted that upgrading from Access to SQL is a natural progression but we sometimes forget the "why" of it all.  the bottom line is that sometimes the answer is to upgrade but sometimes the answer is to keep using Access.  Making informed decisions is important and being able to convince management plays a critical role to your success.  So with that I present two articles:

 

1)  Microsoft Access or SQL Server 2005: What's Right in Your Organization?

http://www.microsoft.com/sql/solutions/migration/access/sql-or-access.mspx

 

2) And, to help compare SQL 2005 vs SQL 2008, "SQL 2005 vs. SQL 2008 Part 1"

http://www.sqlservercentral.com/articles/Compression/62746/ 

 

Yes, you have to register at that last site unless, of course, you use something like BugMeNot.com:  http://www.bugmenot.com/

Posted by zainnab | 4 Comments

Bartlesville .NET User Group, Yeah Baby!!!

 

So, after my visit with my buds in Tulsa, I went to Bartlesville on Friday to speak to the wonderful DNUG there (http://bdnug.com/).  All I can say is "WOW".  It is without a doubt one of the most impressive user groups I have seen in a small geography.  The group is led superbly by Jason Townsend (http://www.linkedin.com/pub/2/511/3A5).  The people totally kicked major butt and were as nice as they could be.  I am absolutely looking forward to getting out there again!

Tulsa DNUG Totally Rocks!!!

 

You know I have the best time with every visit to the Tulsa .NET Users Group (http://www.tulsadnug.org) led by that MVP of MVP's, David Walker (http://www.davidlwalker.com/).  If you live in and around that area make sure to join these great folks and give David a hard time from me muhahahah!

Posted by zainnab | 0 Comments
More Posts Next page »
 
Page view tracker