Protected: AWS IoT Car Park Demo

This content is password protected. To view it please enter your password below:

Categories: Uncategorized | Enter your password to view comments.

How to Migrate to the Postman Native App

Google is deprecating Chrome apps.

The Postman team has created native Windows, MacOS and Linux Postman apps.

Follow these steps to migrate from the Chrome app to the native app with just a few clicks

In the Chrome Postman App …

  1. Click the spanner icon on the top right
  2. Click Settings
  3. Click the Data tab
  4. Click Download under the Export Data tab
  5. Save Backup.postman_dump.json

Download the native Postman app here 

In the native Windows, MacOS or Linux Postman app

  1. Click the Import button on the top left
  2. Choose the Import File tab
  3. Open the Backup.postman_dump.json file you saved in step 5 above

 

Categories: Uncategorized | Leave a comment

Just Migrated to WordPres from Spaces.Live.COM

Just moved my old space.live.com blog (which was my old blogs.MSDN.COM/chris.green blog) to WordPress using the automated tools. Very easy to do.

Categories: Uncategorized | Leave a comment

Updated product lifecycle Gantt chart

I create this graphical view of the publicly available product support lifecycle information published at http://support.microsoft.com/gp/lifeselectindex. I hope you find it useful. You can download the PDF ready for A3 printing here.

Thanks.

Chris.

Categories: Uncategorized | 1 Comment

Old stuff from my blogs.msdn.com/chris.green blog

Microsoft Acquires Teamprise Assets

Today Microsoft announced the acquisition of the Teamprise-related assets of SourceGear LLC.

From http://www.teamprise.com/products

Teamprise is a suite of client applications for accessing Microsoft Visual Studio Team Foundation Server from outside of the Visual Studio Integrated Development Environment (IDE). Teamprise enables software development teams to use the source control, work item tracking, build, and reporting features of Team Foundation Server from within the Eclipse IDE, and from other operating systems, including Linux and Mac OS X. 

You can expect to see elements of the Teamprise technology in the Visual Studio 2010 suite of products.

 

Welcome to Microsoft Martin!

 

Microsoft Monthly Update Sep/Oct 2009

Hi,

 

Here is my Microsoft Monthly Update covering September and October 2009. I hope you find the information useful.

 

Thanks.

Chris.

Good overview of application performance testing and management with Visual Studio 2008/2010

If you have ever been caught with performance problems you should watch this PDC 2008 session. If you have never had performance problems … you should still watch the session because you may not know you already have a problem 🙂

Improving .NET Application Performance and Scalability

You may also find this insight into the new CLR 4.0 profiling features.

CLR 4: Debugging and Profiling API Enhancements

 

Come and get it! Visual Studio 2010 and .NET Framework 4 Beta 2

 

MSDN Subscribers: Download the Beta

The Visual Studio 2010 and .NET Framework Beta 2 is available to MSDN subscribers now, with general availability on October 21st (22nd in Australia).

This c9 video is a great way to get started 10-4 Episode 33: Downloading and Installing Visual Studio 2010 Beta 2

Also check out the list of what is new in beta 2 here http://msdn.microsoft.com/en-us/library/bb385832(VS.100).aspx

Have fun and let us know what you think via the connect site https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=14625

Stay tuned!

 

BizTalk Tuning Tips

You can find a PDF copy of the slide deck Mark Burch and I presented at TechEd Australia 2009 here. If you attended TechEd you can login and find the official version on the TechEd Australia 2009 website here.

 

Windows 7 1394 Firewire devices not working?

The 1394 FireWire driver was updated in the Windows 7 and some older 1394 devices may not be compatible with the new driver. The old driver is still available as highlighted here. This solved my initial problems with a Maxtor III OneTouch drive. See this site for details http://www.microsoft.com/whdc/connect/1394_Windows7.mspx

Posted by chris.green | 7 Comments [Edit]

Filed under: [Edit Tags]

Attachment(s): Picture1.png

Windows 7 and Server 2008 R2 Technical Update-AUG-2009

I recently provided this brief update on what’s new in Windows 7 and Server 2008 R2 to a number of organisations. Please follow the attached link and download the presentation file for details.

Microsoft monthly Update

I publish this update each month. It is a summary of all the public information on the Microsoft.com website in one convenient document. I hope you find it useful. I’m not sure whether to continue to publish it to my regular contacts via email or to publish it here on my blog. Your thoughts are most welcome.

Get Started with the Microsoft Security Development Lifecycle templatefor VSTS

Microsoft SDL Process Template for Visual Studio Team System http://msdn.microsoft.com/en-us/security/dd670265.aspx

The Microsoft SDL Process Template for Microsoft Visual Studio Team System is a downloadable template that directly integrates the Security Development Lifecycle v4.1 into your software development. It generates a detailed Final Security Review report that provides an up-to-the-minute overview of security issues, testing results, and status for all security requirements associated with a project.

 

How Do I: Set Up the SDL Process Template? http://msdn.microsoft.com/en-us/security/dd819921.aspx

The Microsoft SDL Process Template for Visual Studio Team System was created to ease adoption of the SDL by automatically integrating the policy, processes, and tools of SDL v4.1 into Visual Studio Team System 2008. In this video, learn how to install the SDL Process Template, and then see how to begin using the template in your next project.

Posted by chris.green | 0 Comments [Edit]

Filed under: [Edit Tags]

Windows 7 for MSDN subscribers soon …

It’s good to be an MSDN subscriber.

On August 6th, the first public release of Windows 7 will be available to MSDN Subscribers, which is over two months ahead of the general availability date of October 22nd for retail and OEM customers.

·          All Windows 7 Client (x86 and x64) Retail and VL Editions – English only

·         Language packs, WAIKs, WDKs, SDKs, and Symbols – in all available languages

 

If you are still using the Windows 7 Release Candidate (RC) release, license expiration messages will begin appearing on Feb 14, 2010 and it will shutdown every 2 hours starting March 1, 2010.

 

Here are some useful Links

 

 

 

Looking for Team Foundation Server – Quality Center integration solutions?

You may already be aware of these resources but …

 

          You can find a pre-release version of the Microsoft TFS Quality Center Connector here https://connect.microsoft.com/Downloads/DownloadDetails.aspx?SiteID=628&DownloadID=15667. The corresponding blog post is here http://blogs.msdn.com/jimlamb/archive/2009/01/06/tfs-2008-hp-quality-center-connector-december-pre-release.aspx

 

         You can also find a commercial bug sync connector here http://www.juvander.fi/TFSQCSync.aspx

 

          Both of the above resources are references from the TFS Migration and Integration page here http://msdn.microsoft.com/en-us/teamsystem/bb840033.aspx

 

PDC 2009

 

 

ABOUT THE PDC

 

The Professional Developers Conference (PDC) is Microsoft’s premier gathering of leading-edge developers and architects.  Attendees come from around the world to learn about the future of Microsoft’s developer platform, exchange ideas with Microsoft technology experts, and network with fellow professionals.  This is the conference you need to attend if you want to stay ahead curve, and get a head start on planning your company’s products and technology investments.

 

Register by September 15th and receive $500 off your conference pass – that’s the best discount you’ll get for PDC09.  Visit us online at www.microsoftpdc.com and learn more about the future-focused content, industry-leading speakers and other great opportunities you’ll get at PDC09.

 

WHAT’S IN STORE FOR YOU AT PDC09

 

KEYNOTES

PDC is where our biggest names make the biggest announcements. Learn about the future of the Microsoft developer platform straight from the people who make it happen – Microsoft’s Chief Software Architect, Ray Ozzie, and the President of Server and Tools, Bob Muglia.

 

SESSIONS & SPEAKERS

For the first time ever, participate in a perfect storm of brilliance, insight, experience, and vision as we bring together Microsoft’s Technical Fellows for the Technical Leaders series of sessions at PDC09. These are the big brains that develop and drive technical strategies for Microsoft and the industry, and this is a series you won’t want to miss.  Visit the Sessions page for a full listing of published sessions.

 

WORKSHOPS

Join us a day early (on November 16) for a full day of in-depth content delivered by recognized industry leaders.  Workshops are available exclusively to attendees – they will not be made available online.  Don’t miss out on the opportunity to expand your developer skills at the PDC09 workshops.

 

SPECIAL EVENTS

Not only will you get great content and speakers, you’ll also get early access to the technology and opportunities to meet one-on-one with Microsoft developer technology experts and fellow professions at our special events.  Visit the Special Events page for more information.

 

BizTalk 2009 – Performance Tuning Session at Tech Ed Australia

AnnounceOnline() (I just love WCF Discovery in .Net 4.0)

Is BizTalk in your past, present or future? Mark Burch and I may be able to help you speed things up a little.

Come to our "SOA311 BizTalk 2009 – Performance Tuning Tips" session at Tech Ed Australia 2009 for some low latency, high throughput tuning tips.

In this session you will learn what the key performance factors are for BizTalk 2009; what effects those factors and how to maximise for each depending on the desired target performance. The session will focus on scenarios where high throughput and and low latency are required and how to tune for both.

AnnounceOffline()

Posted by chris.green | 0 Comments [Edit]

Filed under: [Edit Tags]

Attachment(s): BTSscaleout.png

Fast, faster, fastest.

Out of pure curiosity I ran a very simple timing test for different WCF bindings: WSHttp (default), NetNamedPipe, NetTcp and local method call (i.e. no WCF involved). I didn’t do any performance tuning. The client and server are both hosted on my laptop. This is straight "out of the box" on Windows 7 RC using Studio 2008 in debug mode. The results are:

Endpoint binding is … System.ServiceModel.WSHttpBinding
Elapsed Sec = 55.8443288
179.069212843686 calls per Sec

Endpoint binding is … System.ServiceModel.NetTcpBinding
Elapsed Sec = 32.7759526
305.101734861552 calls per Sec

Endpoint binding is … System.ServiceModel.NetNamedPipeBinding
Elapsed Sec = 27.866142
358.858431138404 calls per Sec 

Endpoint binding is … local method call
Elapsed Sec = 0.0060012
1666333.39998667 calls per Sec

Ultimately your decision of what to use when will be based on more than just performance. Loose coupling, distributed architecture, interoperability, etc will all be factors in your decision. But, as if you had any doubt, if you want to go really fast, stay in process.

How does this compare with your experience with WCF performance?

Categories: Uncategorized | Leave a comment

Old stuff from my blogs.msdn.com/chris.green blog

Installing BizTalk Server 2009 on Windows Server 2008

 

Just a few quick "note to self" type reminders when installing (not configuring, that’s a longer tale) BizTalk 2009 on Windows Server 2008 …

– RTFM which you can get from here

– Install the w2k8 service packs. You can get SP2 from here.

– Add the w2k8 IIS role

– Decide whether to manually or automatically download the BTSRedistW2K8EN{64|32}.cab as described here.

During the installation process you will have the option of automatically downloading the BTSRedistW2K8EN{64|32}.cab file. You also have the option to manually download this file, which you can get from here for 64 bit and here for 32 bit. It’s ~270MB depending on whether you use the 32 or 64 bit version. Your installation may look like it has stalled and eventually time out and fail using the auto download option if you have a low bandwidth Internet connection. Manually downloading in advance solves this problem.

 

PDC 2009 Nov 17-20 Los Angeles

Microsoft is planning another Professional Developer’s Conference (PDC) this year!

 

You can find recordings of the 2008 event and some preliminary information on the 2009 event here http://www.microsoftpdc.com/ and you can add your name to the PDC2009 mailing list to receive all the latest information.

WS-Discovery in VS 2010 .Net 4.0

AnnounceOnline()

Visual Studio 2010 beta 1 is now available to MSDN subscribers on http://www.msdn.com.

One exciting feature of .Net 4.0 is the inclusion of the WCF Discovery libraries which implement the WS-Discovery protocol. WS-Discovery provides dynamic service discovery with a very simple protocol. using WCF Discovery you can search for services with Find() and Resolve() and you can announce services with AnnounceOnline() and AnnounceOffline(). I’m sure WS-Discovery will trigger new design ideas around event driven, dynamically discovered service infrastructures.

Ron Jacobs has provided a good and (very) quick coding demo here http://channel9.msdn.com/shows/10-4/10-4-episode-19-Service-Discovery-with-WCF/

You can find preliminary API documentation here http://msdn.microsoft.com/en-us/library/system.servicemodel.discovery(VS.100).aspx

AnnounceOffline()

Tech Ed Australia 2009 now open for early bird registration

Come to Tech Ed Australia and immerse yourself in over 150 IT learning opportunities, including deep dive technical sessions, hands-on and instructor-led labs and certifications.

The BizTalk Buzz

Over the coming weeks I will be co-instructor on a facilitated BizTalk 2006 R2 self study course. I’ll make an effort to blog interesting learnings along the way. Stay tuned BizTalkers…

Posted by chris.green | 1 Comments [Edit]

Filed under: [Edit Tags]
Categories: Uncategorized | Leave a comment

Old stuff from my blogs.msdn.com/chris.green blog

Finally! – A way to manage the meta-work related to the meta-data related to the meta-design process of Enterprise Architecture!

Microsoft Enterprise Architecture Tool Kit (EATK) to the rescue! I highly recommend you take the time to check this out if you are at all involved in managing (or being managed by) architects.

  • Enables IT Transparency
  • Proactive Architecture Process
  • Provides a series of Tools and Templates to support architecture decisions
  • Empowers Architects
  • Eases Governance in the Process
  • Leverages Existing Tools

Watch Mike Walker’s blog and Microsoft Enterprise Architecture Portal for further updates.

Team SOAK Wins the Imagine Cup ’08 !

Congratulations to all the participants, finalists and winners in the 2008 Imagine Cup competition and a special hooray for the Australian SOAK Team winners of the Software Design category.

What a great achievement and a great solution!

Looking forward to the creative solutions in 2009 .

 

Virtual Earth – Experts on the road in Australia – Free event

Developers don’t miss this opportunity! Register now.

  • See how easy it is to access and integrate Virtual Earth into an existing environment
  • Hear from Johannes Kebeck, one of the world’s leading experts on the Virtual Earth platform.

Agenda and Timings

11:30 – 12:30 Registration (Light lunch available)

12.30 – 12:40 Welcome – Peter Ulm will briefly explain the format of the day

12.40 – 13.20 Introduction & Overview – Jen Forsythe/Peter Ulm will give an overview of VE, some of its capabilities and applications

13.20 – 13.50 Customer/Partner presentation

13.50 – 14.05 Break

14.05 – 14.35 Customer Presentation

14.35 – 15.35 Technical Masterclass – Virtual Earth Technology Specialist Johannes Kebeck will demonstrate some of the functionality within VE, this will include tips and tricks as well as sample code.

15.35 – 15.50  Break

15.50 – 16.50 Technical Masterclass – More from Johannes Kebeck on working with the Virtual Earth platform.

16.50 – 17.20 Pricing – Jennifer Forsythe/Peter Ulm will explain VE pricing and terms of use (TOU).

17.20 – 17.30 Q&A


Microsoft Virtual Earth home page    http://www.microsoft.com/virtualearth/ 

Microsoft Virtual Earth Developer resources http://dev.virtualearth.net/

Microsoft Virtual Earth news http://www.microsoft.com/virtualearth/resources/news.aspx


Here’s a simple example of using the Virtual Earth developer resources. Copy/paste the following example code into a *.html file and open it in Internet Explorer to see where the Virtual Earth events will be held in Australia.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html>

   <head>

      <title></title>

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

 

      <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></script>

 

      <script type="text/javascript">

         var map = null;

 

         var SYDNEY = new VELatLong(-33.79652610218218,151.1382830142975);

         var MELBOURNE = new VELatLong(-37.82230241710538,144.95917081832886);

         var BRISBANE = new VELatLong(-27.469665049241037,153.0302927314873);

                 

         function GetInitialMap()

         {

            map = new VEMap(‘myMap’);

            map.LoadMap(MELBOURNE, 6, VEMapStyle.Hybrid, false, VEMapMode.Mode2D, true, 1);

            map.AddPushpin(SYDNEY);

            map.AddPushpin(MELBOURNE);

            map.AddPushpin(BRISBANE);

         }

 

         function getInfo()

         {

               var center = map.GetCenter();

                      var info = "";

                info += "Zoom level:\t" + map.GetZoomLevel() + "\n";

                info += "Latitude:\t"   + center.Latitude    + "\n";

                info += "Longitude:\t"  + center.Longitude;

                alert(info);       

         }

        

         function PanTo(location)

         {

         map.PanToLatLong(location);

         //map.ZoomIn();

         }

      </script>

   </head>

   <body onload="GetInitialMap();">

      <div id=’myMap’ style="position:relative; width:800px; height:400px;"></div>

       <input id="btnGetInfo" type="button" value="Get Scene Information" name="getinfo" onclick="getInfo();"/>

       <input id="btnGotoSydney" type="button" value="Go To Sydney venue" name="gotoSydney" onclick="PanTo(SYDNEY);"/>

       <input id="btnGotoMelbourne" type="button" value="Go To Melbourne venue" name="gotoMelbourne" onclick="PanTo(MELBOURNE);"/>

       <input id="btnGotoBrisbane" type="button" value="Go To Brisbane venue" name="gotoBrisbane" onclick="PanTo(BRISBANE);"/>

       <br/>

   </body>

</html>

 

TechEd Australia Early Bird Registration

The Tech.Ed Australia Early Bird registration offer has been extended until 11 July ’08. Take advantage of the $250 discount before it’s too late. See you there!

Microsoft Student Partners

I have been reading up on Microsoft’s involvement in academia recently (for reasons that I hope will become obvious soon :-)).
There’s a lot on offer. One great program is the Microsoft Student Partners.

If you are a student with a passion for technology check out http://student-partners.com/Default.aspx

Who are the MSPs at your university? Find them here http://student-partners.com/Msp/Search/SearchMspProfiles.aspx

 

Where’s the value?

Today seems to have been a "where’s the value?" day for me. I was fortunate enough to sit in on a Gartner presentation today by John Roberts where he put forward the observation of cost vs value in IT. In essence most good CIOs and IT managers know the cost of their IT resources (people included) but have some difficulty quantifying the value they return to the business. It seems knowing the value that you, as an individual contributor, or the resources at your disposal as a manager, return to the business is just as important as what it costs to provide the return – yet we focus on cost, probably because our infrastructure is better set up to measure it that way.

Following that session, while working on the growing Microsoft Online offerings I stumbled across the Energizer case study video and found a particularly profound closing remark by Randy Benz, the CIO.

"There is no value to my company in me running any hardware. The value that I bring to my organisation is in how I take any of these tools and apply them to the business problem."

 

Categories: Uncategorized | Leave a comment

Old stuff from my blogs.msdn.com/chris.green blog

 

 

Why? Because they can be thousands of times slower than method return values!

Can you guess why?

First here’s an example of what not to do. (from the Patterns & Practices Guidance article)

static void ProductExists( string ProductId)
 {
 //… search for Product
 if ( dr.Read(ProductId) ==0 ) // no record found, ask to create
         {
        
throw( new Exception("Product Not found"));
         }
 }

This should have been handled with a meaningful method return value (such as ‘null’ or ‘-1′ for example) and is a bad idea for couple of reasons:

  1. Not being able to find a product is not an exceptional circumstance. The program logic should be able to handle this with a method return value rather than an Exception. I’m sure you can think of other similar cases where Exceptions have been used inappropriately.
  2. Exceptions are excellent when used correctly but they come with a price – execution overhead. The CLR is much, much slower to process Exceptions than it is to process normal program flow and method return values.

 What actually happens when an Exception is thrown?(from the ‘Exceptions Overview’ section of the .NET Framework Developer’s Guide)

"When an exception occurs, the runtime begins a two-step process:

1.  The runtime searches the array for the first protected block that:

·         Protects a region that includes the currently executing instruction, and

·         Contains an exception handler or contains a filter that handles the exception.

2.  If a match occurs, the runtime creates an Exception object that describes the exception. The runtime then executes all finally or fault statements between the statement where the exception occurred and the statement handling the exception. Note that the order of exception handlers is important: the innermost exception handler is evaluated first. Also note that exception handlers can access the local variables and local memory of the routine that catches the exception, but any intermediate values at the time the exception is thrown are lost.

If no match occurs in the current method, the runtime searches each caller of the current method, and it continues this path all the way up the stack. If no caller has a match, the runtime allows the debugger to access the exception. If the debugger does not attach to the exception, the runtime raises the UnhandledException event. If there are no listeners for the UnhandledException event, the runtime dumps a stack trace and ends the program."

That’s alot of non-program related processing going on. You can imagine how convoluted that can get with a deep call stack and nested Exceptions.

I was curious as to the real effect of all this processing compared to a plain old return value so I whipped up some embarrassingly crummy code to test it (code included below). I was astonished at the results! Here’s a copy of the results of a test run on my dual core 2.2GHz 4GB T61p Lenovo Thinkpad running Visual Studio 2008.

Return value elapsed time  = 10 uSec
Return value elapsed time  = 9 uSec
Return value elapsed time  = 8 uSec
Exception handling elapsed time  = 2104 mSec
Exception handling elapsed time  = 2066 mSec
Exception handling elapsed time  = 2078 mSec

On average return values was 231407 times faster than exception handling.
Return value elapsed time  = 8 uSec
Return value elapsed time  = 8 uSec
Return value elapsed time  = 8 uSec
Exception handling elapsed time  = 2084 mSec
Exception handling elapsed time  = 2099 mSec
Exception handling elapsed time  = 2100 mSec

On average return values was 245705 times faster than exception handling.
Completed 2 timing tests. Press any key to exit…

What a huge difference in performance! A few things to note about the output shown here:

1.       There are two timing test runs. Two is an arbitrary number. I just wanted to show that it varies slightly between runs.

2.       Each run is comprised of three return value test runs and three exception handler test runs. I did this to allow the execution environment to stabliize . You can see the slight bump in the first set of numbers.

3.       I do a quick calculation at the end of each run to estimate the overall performance difference and what a difference there is – 8 microseconds vs 2,100,000 microseconds.

Then I realised I had compiled in Debug mode. “Of course it’s going to be slow” I thought to myself. So I recompiled and ran it in Release mode … the difference was even greater!

Return value elapsed time  = 6 uSec
Return value elapsed time  = 5 uSec
Return value elapsed time  = 4 uSec
Exception handling elapsed time  = 2184 mSec
Exception handling elapsed time  = 2142 mSec
Exception handling elapsed time  = 2167 mSec

On average return values was 432866 times faster than exception handling.
Return value elapsed time  = 4 uSec
Return value elapsed time  = 4 uSec
Return value elapsed time  = 4 uSec
Exception handling elapsed time  = 2506 mSec
Exception handling elapsed time  = 2175 mSec
Exception handling elapsed time  = 2156 mSec

On average return values was 493703 times faster than exception handling.
Completed 2 timing tests. Press any key to exit…

Notice the return value timings are roughly half what they were in Debug mode. My guess is that because Debug code is full of MSIL ‘NOP’ (no-op) instructions (so break points can be inserted if needed), it takes longer to process the MSIL where every second instruction is a NOP. Maybe that slows the “return values” timing test down in Debug mode. It doesn’t seem to make much difference to the Exception processing time though.

So it’s clear to me: (A “Note to self” that I thought I’d share with you) 

“Exceptions are an exceptionally J good tool for dealing with exceptional circumstances at runtime but should rarely, if ever, be used for routine program flow control.”

Anyway, I found this little excursion into the land of Exception processing performance enlightening – I hope you did too.

 

 

Here’s the C# code I used…

using System;

 

namespace ExceptionsVsreturnValues

{

    class Program

    {

        static int itterations = 1000;

        static int nStabilizeLoops = 3;

        static int nTestLoops = 2;

        static DateTime start, end;

        static TimeSpan retElapsed, retElapsedTotal, exceptionElapsed, exceptionElapsedTotal;

 

        static void Main(string[] args)

        {

            for (int i = 0; i < nTestLoops; i++)

                  {

               // First the return value timing

                returnValueTimingTest();

 

                // Next the exception handling timing

                exceptionHandlingTimingtest();

 

                // Report the results

                Console.WriteLine("\nOn average return values was " +

                    (int)(exceptionElapsedTotal.TotalMilliseconds / retElapsedTotal.TotalMilliseconds * 1000) +

                    " times faster than exception handling.");

            }

            Console.Write("Completed " + nTestLoops + " timing tests. Press any key to exit…");

            Console.ReadKey(false);

        }

 

        private static void exceptionHandlingTimingtest()

        {

            // Run the test ‘nLoop’ times to allow the executio nenvironment to stabilise

            for (int i = 0; i < nStabilizeLoops; i++)

            {

                start = DateTime.Now;

                for (int j = 0; j < itterations; j++)

                {

                    try

                    {

                        // Deliberatley send a null in place of the expected string

                        // to cause a null pointer exception to be thrown

                        findCustomerWithExceptions(null);

                    }

                    catch //(Exception e)

                    {

                        // Uncomment this and above if you want proof that an exception is being thrown

                        // Console.WriteLine("Exception \"" + e.Message + "\" caught");

                    }

                }

                end = DateTime.Now;

                exceptionElapsed = end – start;

                if (exceptionElapsedTotal == null) exceptionElapsedTotal = exceptionElapsed;

                else exceptionElapsedTotal += exceptionElapsed;

                Console.WriteLine("Exception handling elapsed time  = " + exceptionElapsed.TotalMilliseconds + " mSec");

            }

        }

 

        private static void returnValueTimingTest()

        {

            // Run the test ‘nLoop’ times to allow the executio nenvironment to stabilise

            for (int i = 0; i < nStabilizeLoops; i++)

            {

                start = DateTime.Now;

                for (int j = 0; j < itterations * 1000 /* need to scale up the time from uSec to mSec because this is too fast for raw comparison! */; j++)

                {

                    findCustomer("fred");

                }

                end = DateTime.Now;

                retElapsed = end – start;

                if (retElapsedTotal == null) retElapsedTotal = retElapsed;

                else retElapsedTotal += retElapsed;

                Console.WriteLine("Return value elapsed time  = " + retElapsed.TotalMilliseconds + " uSec");

            }

        }

 

        private static void findCustomerWithExceptions(string p)

        {

            // causes a null pointer exception if p == null

            p.Trim();

        }

 

        private static int findCustomer(string p)

        {

            return 0;

        }

    }

}

 

P.S. The story is similar with Java. I did a quick port to JDK 6 Update 4 and found return values are in the order of 4,000 times faster than Exception handling in the Sun JVM. Not as wide a gap as the CLR but still enough to avoid using Exceptions inappropriately no matter what platform you choose.

 

 

Categories: Uncategorized | Leave a comment

Old stuff from my msdn.com blog

Presentation and demo material – An Introduction to PowerShell

Thank you to those of you who attended the Powershell session at the December 2007 Premier Briefing event in Melbourne Australia. I hope you found the session informative. I have attached the presentation slides and the demo script I used on the day. It is actually an updated version of the presentation I delivered at TechEd 2007. I ran the demo script using Jeffrey Snover’s "start-demo" script which you can find here http://blogs.msdn.com/powershell/archive/2007/06/03/new-and-improved-start-demo.aspx, although it’s not needed if you just want to see the commands that we ran on the day. Please contact me if you would like more information.

Thanks.
Chris.

 # Demo #1 – Online HELP #
##########################
help
help help
help -full help
dir
pwd
ipconfig /all
get-command *process*
get-process
get-process | where { $_.name -like "*ss" }
get-process|gm
get-service
get-service | where { $_.status -eq "Stopped" }
# Demo #2 – Getting available commands (cmd #7) #
#################################################
help get-command
get-command help
dir function:help
type function:help
man
type function:man
get-command
get-command -type function
(get-command).count
(get-command -type function).count
# get-command -type all
(get-command -type all).count
(get-command *).count
# Demo #3 – Common Paramemters  (cmd #23) #
###########################################
get-content profile.ps1
get-content profile.ps1 ; dir
get-content profile.notexist ; dir
get-content profile.notexist -erroraction continue ; dir
get-content profile.notexist -erroraction stop ; dir
get-content profile.notexist -erroraction inquire ; dir
get-content profile.notexist -erroraction silentlycontinue ; dir
$error.gettype()
$error.count
$error[0]
get-content profile.notexist -errorvariable myerrvar
$error
$myerrvar
get-process -name "*ss" -outvariable myoutvar
$myoutvar
stop-process -name "*ss" -whatif
stop-process -name "*ss" -confirm
# Demo #4 – PS Providers  (cmd #43) #
#####################################
get-psdrive
help *provider*
get-psprovider
new-psdrive -name psdocs -psprovider filesystem -root C:\windows\system32\windowspowershell\v1.0\documents\en-us
cd $home
dir
cd psdocs:
dir
cd $home
# Exploring the registry
cd hklm:\
dir
cd hardware\description\system\centralprocessor
dir
$p = get-childitem
$p
$p|gm
$p[0].getvaluenames()
$p[0].getvalue("processornamestring")
foreach ( $name in $p[0].getvaluenames() ) { write-host "$name = " + $p[0].getvalue($name) }
# Demo #5 – Results as Objects  (cmd #67) #
###########################################
$s = "a,b,c,def   "
$s
$s.gettype()
$s.split(",")
$s.split(",")|where { $_ -like "*[d-f]" }
$s.length
$s = $s.trim()
$s.length
calc
gps -name calc
$calc = gps -name calc
$calc|gm
$calc|select *
# Exit the Calc program
gps -name calc
$calc |select *
# Demo #6 – COM Objects  (cmd #77) #
####################################
$ie = new-object -com internetexplorer.application
$ie|gm
$ie|select *
$ie.visible=$true
$ie.navigate2("www.microsoft.com/powershell")
$voice = new-object -com sapi.spvoice
$voice.speak("Powershell is so good, it speaks for itself.")
# Demo #7 – Debugging    (cmd #83) #
####################################
set-psdebug -trace 2
set-psdebug -trace 0
set-psdebug -trace 0
$host
$host|gm
write-host "CONDITION=true Entering Nested prompt. Type ‘exit’ to return"
$host.enternestedprompt()
# Demo #8 – WMI Objects  (cmd #83) #
####################################
get-wmiobject win32_bios
get-wmiobject win32_bios|gm
man gwmi
gwmi -list
gwmi -list | where { $_.name -like "*eventlog*" }
gwmi win32_eventlogfile
get-eventlog -list
get-eventlog -newest 5 system
# Demo #9 – ADSI Objects  (cmd #91) #
#####################################
[adsi]""

PowerShell Session at TechEd 2007 Australia

You may find my TechEd 2007 Powershell presentation useful. See the SVR308_Green.pdf attachment below.

It covers:

  • "What is Powershell";
  • "How to get started";
  • "Examples of Powershell in action";

It also contains some Q&A and tips at the end.

Why not add some personality to your monitoring scripts….

PS> $v = new-object -com sapi.spvoice

PS> $v.speak("Powershell is so good, it speaks for itself.")

Posted by chris.green | 1 Comments [Edit]

Filed under: [Edit Tags]

Attachment(s): SVR308_Green.pdf

Are You Using PowerShell in Production?

If you are using PowerShell in a production environment I’d love to hear about it. I’m updating material for the Australian TechEd 2007 PowerShell session and I’d love to include your success story. Please drop me a line with your opinion or war/success story.

Thanks.
Chris.

Categories: Uncategorized | Leave a comment

The old stuff …

This is a cut/paste of the material that was posted to my old blog site at blogs.technet.com. The old site was nuked at my request. Some of the links may not work…

Demonstrations at Tech.Ed 2005 Australia

Well Tech.Ed Aus 2005 is now over. What a week! I had an opportunity to demonstrate some of Microsoft’s great UNIX interoperability capabilities in my UNIX Interop and Migration session.  Thanks to all of you who attended. I hope you found it interesting and went away with some new ideas. I also had the good fortune to have René Michau of the National Australia Bank join me to elaborate on the people and process aspects of integrating UNIX and Windows support teams. Nice work, thanks René!

All the demos worked (of course! Well one with a little audience participation – pointing out my typo).  If you’re interested in more information about any of these demonstrations please drop me a line.

  • Windows Server 2003 UNIX User environment provided by SFU 3.5
  • Windows Server 2003 NFS Client using SFU 3.5
  • Windows Server 2003 NFS Server using SFU 3.5
  • Windows Server 2003 AD as a NIS Master using SFU 3.5
  • UNIX host as an AD domain member using Vintela VAS
  • Monitoring UNIX syslogs with MOM 2005
  • Porting UNIX/C applications to the SFU 3.5 Interix subsystem
  • Extending UNIX/C code with .Net
  • Wrapping UNIX/C code with .Net Web Services
  • What’s new for UNIX Interop in Windows Server 2003 R2

Thanks.

Chris.

posted by chris.green with 0 Comments [Edit]

I didn’t know I was addicted until…

I have just spent 4 days in "the hills" away from it all – including Internet access. I am amazed at how dependent I have become 24/7! I have been using the Internet for work since 1987ish but on the domestic front I’ve only had broadband always on since 2002ish. In those three years my whole family has become dependent on the web. Many times during those 4 days away we caught ourselves saying "I’ll just check the {weather|email|webcam|news|search|…}" then realizing we couldn’t. Bring on global wireless broadband! I’m ready for my implant 🙂

posted by chris.green with 0 Comments [Edit]

I used Apache to prove to myself that SFU works

Last week I conducted a simple test of Microsoft’s Services For UNIX (SFU) free download. Being an old UNIX guy I was a little skeptical at the real capability SFU offered. I am pleased to say I downloaded the Apache HTTPD Server UNIX source (httpd-2.0.53.tar.gz) from apache.org and had a UNIX Apache web server compiled and running under SFU on Windows XP Pro in minutes! Here are some little tweaks I had to make to get it running…

————
Use this command line to set build vars

CPPFLAGS="-D_ALL_SOURCE -I/usr/local/include" \
CXXFLAGS="-D_ALL_SOURCE -I/usr/local/include" \
CFLAGS="-D_ALL_SOURCE -I/usr/local/include" \
LDFLAGS="-L/usr/local/lib" \
./configure –prefix=/opt/apache

————-
Add "|| defined(__INTERIX)" to the #if defined… line in the server/mpm_common.c file to avoid the _setgroups undefined error message while linking

#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || defined(TPF) || defined(__TANDEM) || defined(OS2) || defined(WIN32) || defined(NETWARE) || defined(__INTERIX)

————-
make install

————-
Change "User nobody" to a valid Windows account name (preferably one with low privileges in {INSTALLDIR}/conf/httpd.conf

————-
{INSTALLDIR}/bin/appachectl start

Simple as that!

J

posted by chris.green with 0 Comments [Edit]

Keep a journal and publish you work

I just noticed Brian Groth’s (http://blogs.technet.com/bgroth ) post linking to Tim Bray’s blog entry http://www.tbray.org/ongoing/When/200x/2005/03/08/BloggingIsGood and it reminded me of what Clifford Stoll (http://www.ocf.berkeley.edu/~stoll/ ) once said to me (and the other 300 people in the auditorium 🙂

"If you don’t write it down it didn’t happen, and if you don’t publish it you didn’t do it."

Stoll kept (keeps?) a journal on his desk and wrote notes each day. This came in very handy when he noticed some odd behavior on one of his UNIX systems one day. It turned out to be a KGB hacker! Get the full story in the Cuckoo’s Egg (http://www.amazon.com/exec/obidos/ASIN/0743411463/qid=1110634582/sr=2-1/ref=pd_bbs_b_2_1/104-1876256-4386316).

The essence and the moral of his story is (if I may paraphrase): Keep a journal and publish you work 🙂

Good advice I think.

Chris.

posted by chris.green with 0 Comments [Edit]

Using SFU? What do you think?

Do you use the Microsoft Services for UNIX interoperability toolkit?(http://www.microsoft.com/windows/sfu/)

Does it meet your needs?

Any problems?

I’ve spent quite a bit of time looking at it lately and find it quite comprehensive and robust.

Thanks.
Chris.

posted by chris.green with 2 Comments [Edit]

Migrating UNIX to Windows?

Are you migrating (or have you migrated) any UNIX apps or whole platforms to Windows? If so what type of apps/platforms.

I’m trying to guage the actual demand for UNIX/J2EE migration skills.

Thanks for your feedback.

posted by chris.green with 1 Comments [Edit]

Are developers special?

I recently read Robert Bogue’s thought provoking article on Developer Specialisation (http://www.developer.com/design/article.php/3439651) – an excellent read. I agree with the need for specialisation. The field is so broad these days, specialisation seems inevitable – just like other engineering and science fields.

I wonder if there is a specialist role missing in Robert’s article – the role of the systems integrator. Traditional EAI and contemporary WS development would fit into this category. Maybe it’s captured in Roberts’s "Technical Developer" category.

Just a (another) thought J

 

posted by chris.green with 0 Comments [Edit]

The Newbie Architect

Does this look at all familiar? Can you help?

George: You won’t believe this Jerry; I’ve landed an "Architect" position at TheFicticiousVeryBig Co.

Jerry: Wahoo! That’s excellent George, well done. From Developer to Architect. When do you start?

George: Next Monday! I’m so excited. There’s just one small catch …

Jerry: Mmm.. What’s that?

George: I don’t know what an "Architect" is supposed to do!?

Jerry: What!? Well how on Earth did you get the job? Don’t tell me – let me guess. The "Architect" title is used and abused by many and understood by few. My guess is that your interviewers assumed you shared a common understanding of the role. Right?

George: You may be on to something. So what does an Architect do? I need a plan Jerry. Can you help me prepare for Monday?

Jerry: Maybe. We don’t have much time. Meet me at the coffee shop for lunch. We can discuss your new role then.

So what does an (IT) architect do?
Can you help George?
How do you think Jerry should explain the role to George?
What does an architect do on the first day on a new project at a new organisation?
What should George’s plan be for day 1?

By the way all this is fictitious of course. Any similarity to real or other entities is unintended and purely coincidental; and this posting is provided "as is" with no warranties and confers no rights.

posted by chris.green with 6 Comments [Edit]

Web Services – Life on the Edge not the Inside.

 

This is as much a note to myself as it is a public blog entry. A word of advice – don’t try to build systems with Web Services.

 

In my travels I have seen a number of engineers and architects with good intentions, attempt to use HTTP/SOAP/WSDL at every interface without considering the need for the interface to be visible beyond the system boundary. In many cases it’s just plain wrong to use the WS technologies within the system boundary.

 

There is no WS language that can be used to implement algorithms or business logic. The growing number of Web Services specifications only provide a means for describing system interface contracts and data exchange formats. This is a simple but easily overlooked characteristic of the WS-* movement.

 

There appears to be a common misconception that Web Services are the new panacea for systems development. Well history does repeat and today’s panacea can easily become tomorrow’s anti-pattern. For example, did you witness an over use of XML for data transfer and storage in enterprise applications in the early days of XML adoption? I have seen designs (and implementations unfortunately) that needlessly use XML over HTTP at all subsystem interfaces. The end result is inter-subsystem communications bottlenecks that ultimately result in poor overall system throughput.

 

Common syndromes of technology de jure miss use that come to mind are:

  • Object Oriented Design – the opaque design technology. OOD emphasises inheritance, polymorphism, encapsulation and data hiding. Strict adherence to this emphasis can lead to the “inherit everything” syndrome. Unfortunately over use of inheritance can lead to the creation of complicated dependency chains that can have negative polymorphism ramifications when base classes are modified. The contemporary view is to design using class composition not inheritance.
  • CORBA – the distributed systems design technology. CORBA emphasises interface centric design which can lead to the “everything is remote” model. The focus on the interface is spot on in my view but the temptation to over use remote interfaces can lead to unnecessary network or IPC chatter and very busy ORBs. IDL ambiguities and version synchronisation seem to have hampered the wide spread adoption of CORBA – with the exception of Telco BSS/OSS systems.
  • XML – the data centric design technology. XML emphasises data portability which can lead to the “all data must be portable” syndrome. Data portability is only necessary when system or subsystem data has meaning beyond the current system boundary, which should be applicable to a minimal number of datasets.
  • J2EE – the platform independent design technology. The EJB model for business logic implementation, which quite frankly does not appear to be holding mindshare, emphasises portability and platform independence. The concept of expressing your company’s business logic in a vendor neutral implementation has great appeal, but the reality is that the need to port between J2EE application servers arises very infrequently. EJBs centric designs for the sake of conformant J2EE architectures can lead to "all business logic in EJB" syndrome and can result in a complicated abundance of distributed runtime objects with no real gain other than for the application server vendor. By the way take it from me J2EE vendor lock in is real. Most of the important functionality of a J2EE application, such as transaction management, messaging, database access, is vendor implementation specific. Subtle design choices can lead to inadvertent vendor lock in which can be pretty difficult to undo.

 

So, in summary, understand the different characteristics and requirements of sub-system and system boundaries and use the appropriate technologies for each. Loosely coupled well defined sub-system boundaries do not need HTTP/SOAP/WSDL to be architecturally sound. If, after careful analysis, Web Service façades are deemed necessary then so be it but the default implementation choice should be good old, fast, native wire implementations.  Native interface implementations are not brittle if the interface is well defined.

 

 

I’m all for the use of Web Services and the amazing new potential WS-* brings to our industry. However, like all relatively new technologies we must conduct some experiments in order to fully understand their appropriate use; and as is usually the case we have no time to do this other than in the heat of systems design and implementation. So take a moment to look back on our history of over enthusiasm for the next big thing and use the results of our previous experiments to make prudent design decisions today.

 

Just a thought J

 

This posting is provided "as is" with no warranties and confers no rights.

posted by chris.green with 3 Comments [Edit]

.Net/J2EE interop

Are you using J2EE to .Net interop technologies?
If yes, what specifically? Please let me know.

I am one of the many recently converted – from specific implementaiton technologies, such as J2EE, to.NET and the broader opportunity that WEB SERVICES provides.

I have a long and deep background in UNIX and J2EE and recently (a year ago?) began to truly understand the value of Web Services and the profound change the WS-* specs could have on our industry.

My current focus is interoperability, largely based on web services technologies but I’m also considering other technologies. For example I’d like to complete a matrix with proven solutions and guidance.

Eg.

.Net and Java protocol interoperability matrix Server
COM+ .Net Remoting HTTP Java RMI SOAP CORBA JMS SMTP FTP
Client COM+                
.Net Remoting                
HTTP                
Java RMI                
SOAP                
CORBA                
JMS                
SMTP                
FTP                   

If you have an interest in interop or have experiences you’d like to share please drop me a line.

Looking forward to hearing from you.

This posting is provided "AS IS" with no warranties, and confers no rights.

posted by chris.green with 7 Comments [Edit]
Published Tuesday, April 11, 2006 1:03 PM by chris.green Edit

Filed under: [Edit Tags]
Categories: Uncategorized | Leave a comment

Create a free website or blog at WordPress.com.