Programmer related Joke

June 26, 2011

A programmer is walking along a beach and finds a lamp. He rubs the lamp, and a genie appears. “I am the most powerful genie in the world. I can grant you any wish, but only one wish.”

The programmer pulls out a map, points to it and says, “I’d want peace in the Middle East.”

The genie responds, “Gee, I don’t know. Those people have been fighting for millenia. I can do just about anything, but this is likely beyond my limits.”

The programmer then says, “Well, I am a programmer, and my programs have lots of users. Please make all my users satisfied with my software and let them ask for sensible changes.”

At which point the genie responds, “Um, let me see that map again.”
Source : google

Software Engineer Joke

June 26, 2011

A man was crossing a road one day when a frog called out to him and said: “If you kiss me, I’ll turn into a beautiful princess”. He bent over, picked up the frog and put it in his pocket.

The frog spoke up again and said: “If you kiss me and turn me back into a beautiful princess, I will stay with you for one week.”
The man took the frog out of his pocket, smiled at it and returned it to the pocket.
The frog then cried out: “If you kiss me and turn me back into a princess, I’ll stay with you and do anything you want”. Again the man took the frog out, smiled at it and put it back into his pocket.
Finally, the frog asked: “What is the matter ? I’ve told you I’m a beautiful princess, that I’ll stay with you for a week and do anything you want. Why won’t you kiss me ?”
The man said, “Look I’m a software engineer. I don’t have time for a girlfriend, but a talking frog is cool.”
Source: google

A software engineer joke

June 26, 2011

A Software Engineer, a Hardware Engineer and a Departmental Manager were on their way to a meeting in Switzerland. They were driving down a steep mountain road when suddenly the brakes on their car failed. The car careened almost out of control down the road, bouncing off the crash barriers, until it miraculously ground to a halt scraping along the mountainside. The car’s occupants, shaken but unhurt, now had a problem: they were stuck halfway down a mountain in a car with no brakes. What were they to do?

“I know”, said the Departmental Manager, “Let’s have a meeting, propose a Vision, formulate a Mission Statement, define some Goals, and by a process of Continuous Improvement find a solution to the Critical Problems, and we can be on our way.”

“No, no”, said the Hardware Engineer, “That will take far too long, and besides, that method has never worked before. I’ve got my Swiss Army knife with me, and in no time at all I can strip down the car’s braking system, isolate the fault, fix it, and we can be on our way.”

“Well”, said the Software Engineer, “Before we do anything, I think we should push the car back up the road and see if it happens again.”
Source: google

Software Architecture – First try with office 365-Autodiscover service

June 25, 2011

Technology is moving fast and sharepoint,office,live meeting and a lot more has been moved as cloud and branded as Office 365. It is really covering (365) all angles in mathematical terms of geometry. So let hit a try with it.

Microsoft Office 365 is a commercial software plus services offering a set of products from Microsoft Corporation, with the initial plan including a Professional subscription (for organizations of 25 and smaller) and an Enterprise subscription (for organizations with more individuals). Office 365 was announced in the autumn of 2010, and is currently in beta.
Office 365 includes the Microsoft Office suite of desktop applications and hosted versions of Microsoft’s Server products (including Exchange Server, SharePoint Server, and Lync Server), delivered and accessed over the Internet, in effect, the next version of Business Productivity Online Services (BPOS).

Autodiscover service provides the configuration information that you need to create a connection to an Exchange Online server. Using Autodiscover to identify the EWS endpoint is more reliable than hardcoding the URL.
SOAP Autodiscover service, which uses SOAP as the messaging framework for communications that are sent between the client and the server. To use the Autodiscover service, set the service binding by using the AutodiscoverUrl method. Do not hard code URLs because if mailboxes move, they might be serviced by a different Client Access server. If the client cannot connect to the service, retry setting the binding by using the AutodiscoverUrl method.
Following code method return EWS URL based on:
1. service account address
2. service account password
3. user address for whom EWS url is required
4. Version of exchange under target

        private static string GetExternalEWSURL(string serviceAccountSMTPAddress, string serviceAccountPassword, string userSMTPAddress, ExchangeVersion exchangeVersion)
            // Define the credentials to use.
            var credentials = new WebCredentials(serviceAccountSMTPAddress, serviceAccountPassword);
            // Create an instance of the AutodiscoverService.
            Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService _autodiscoverService = new
            // Enable tracing.
            _autodiscoverService.TraceEnabled = true;
            // Set the credentials.
            _autodiscoverService.Credentials = credentials;
            // Prevent the AutodiscoverService from looking in the local Active Directory
            // for the Exchange Web Services Services SCP.
            _autodiscoverService.EnableScpLookup = false;
            // Specify a redirection URL validation callback that returns true for valid URLs.
            _autodiscoverService.RedirectionUrlValidationCallback = RedirectionUrlValidationCallback;
            // Get the Exchange Web Services URL for the user's mailbox.
            GetUserSettingsResponse response =
            // Extract the Exchange Web Services URL from the response.
            string url = response.Settings[UserSettingName.ExternalEwsUrl].ToString();

            return url;

  static bool RedirectionUrlValidationCallback(string redirectionUrl)
            // The default for the validation callback is to reject the URL.
            bool result = false;

            Uri redirectionUri = new Uri(redirectionUrl);

            // Validate the contents of the redirection URL. In this simple validation
            // callback, the redirection URL is considered valid if it is using HTTPS
            // to encrypt the authentication credentials. 
            if (redirectionUri.Scheme == "https")
                result = true;

            return result;

Call this method for PBOS and Office 365 as below.

	// For office 365 : exchange version is exchange 2010 SP1
             string _userSMTPAddress = ""; 
             string _serviceAccountSMTPAddress = ""; 
             string _serviceAccountPassword = "we23R";
             GetExternalEWSURL(_serviceAccountSMTPAddress, _serviceAccountPassword, _userSMTPAddress,ExchangeVersion.Exchange2010_SP1);

             // For BPOS : exchange version is exchange 2007 SP1 
              _userSMTPAddress =  "";
              _serviceAccountSMTPAddress = "";
              _serviceAccountPassword = "web33R";
             GetExternalEWSURL(_serviceAccountSMTPAddress, _serviceAccountPassword, _userSMTPAddress, ExchangeVersion.Exchange2007_SP1);