Missing AsyncGetResponse in WebRequest

Disclaimer: I am not well versed with the various cool features that the .NET programming framework provides. So, when someone says, oh well, I wrapped it into a delegate and passed it into another, I am not sure if they mean they just created an anonymous function and passed it to another or if it is something more than a lambda expression.

So, when I was trying the code that Luca Bolognese showed on the tutorial for F# and uses WebRequest.AsyncGetResponse, wrapping it under an async, to demonstrate how easy it is to run code in asynchronous mode, and in parallel, I didn’t know where to find the AsyncGetResponse. When I tried the intellisense, all it showed was WebRequest.GetResponse. I knew I was missing some library, but I was not sure about it. Not sure, till I saw the post by Nick Hodge wherein he talks about the Microsoft Parallel Extensions to .NET Framework. That is when I thought, may be these parallel extensions are the ones that will auto-magically wrap the GetResponse into an AsyncGetResponse.

So, I download the CTP version, and when I wrap the ticker data retrieval code in an async block, I see the WebRequest.AsyncGetResponse() in the intellisense popping up. Long story short – you need the parallel extensions to the .NET framework 3.5 to be able to use WebRequest.AsyncGetResponse.

Penalty of arriving early at the airport ?

Have you realised how one runs into a loss of time when one reaches early at the airport. Consider this situation, you have finished your business meeting earlier than expected. You then decide to come to the airport so that you can avoid the check-in line and the security check line. All fine till now. As you are early, the checkin counter lets you choose a window / aisle seat. And surprise, they put you in the first of the seats. They also let you board the flight early (more often than not ignored on Indian flights, however much their boarding announcement mentions that).

Once you are on the plane, you are thinking about the destination and when you can leave it. Now is the catch. You came early to the airport, checked in early and boarded the flight early (if you were lucky i.e.). But, you can’t leave early. The people who checked in last have the advantage of disembarking the aircraft before you do. And this is especially true for smaller aircraft like the ATR. So, anytime you might have gained by checking in early, might be offset by the time that you spend for everyone to get their cabin baggage out, and get off the plane. Oh well ! Is this the cosmic¬†karma¬†in action ?