Monthly Archives: September 2006

Vermont IT Jobs: ASP.NET, C#, VT.NET, Java, WinForms contract developers in Williston VT

Daybreak ICS, in Williston VT, is looking for software developers (1099s) for short-medium term projects over the next 6 months starting in September 2006, with potential for ongoing work.

Projects will include design/build/test/implementation of applications for various aspects of Content Management. Anticipated skill sets include experience coding in Java, C#, ASP.net, VB, and Win GUI development. Project duration could be from a few weeks to a few months, and will include at least part of the time in our Williston, Vermont offices. There is a potential for limited national travel for a short-term project for requirements definition, but that should be minimal.

Any interested candidates should forward their resumes to Andy at alowe@daybreakICS.com.

yes Virginia, SqlConnection.Dispose CALLS SqlConnection.Close

I was recently involved in an ASPAdvice thread about close and dispose – an age old .NET debate. (Okay, the “age old” part is relative.)

As backup, I quoted the msdn documentation that says “close and dispose are functionally equivalent” and someone pointed out not to believe everything I read and that in .NET 1.1, it was known to be “broken”.

With a hint from Angel Saenz-Badillos from the ADO.NET team, I opened up reflector to find proof that dispose will close as well . See the guts of dispose and close below.

I don’t see anythingn wrong with still calling close *and* dispose, just to be completely explicit. I’ve seen people do it inside of using blocks with a connection, even though the end of the block will call SqlConnection.Dispose which in turn calls close. So it’s redundant. And you would think that C# programmers would celebrate the use of less code.

Are there truly known cases where this fails?

This is SqlConnection’s Dispose method:

protected override void Dispose(bool disposing){if (disposing){this._userConnectionOptions = null;this._poolGroup = null;this.Close();}this.DisposeMe(disposing);base.Dispose(disposing);}
And just for fun…SqlConnection’s Close method. Don’t get confused by that Dispose at the end.
That’s for a different object, not the actual connection.
 
public override void Close(){IntPtr ptr1;Bid.ScopeEnter(out ptr1, “<sc.SqlConnection.Close|API> %d#”, this.ObjectID);try{SqlStatistics statistics1 = null;RuntimeHelpers.PrepareConstrainedRegions();try{statistics1 = SqlStatistics.StartTimer(this.Statistics);lock (this.InnerConnection){this.InnerConnection.CloseConnection(this, this.ConnectionFactory);}if (this.Statistics != null){ADP.TimerCurrent(out this._statistics._closeTimestamp);}}catch (OutOfMemoryException exception3){this.Abort(exception3);throw;}catch (StackOverflowException exception2){this.Abort(exception2);throw;}catch (ThreadAbortException exception1){this.Abort(exception1);throw;}finally{SqlStatistics.StopTimer(statistics1);}}finally{SqlDebugContext context1 = this._sdc;this._sdc = null;Bid.ScopeLeave(ref ptr1);if (context1 != null){context1.Dispose();}}}

More on DevReach Bulgaria

I see that DevReach has two new sponsors, CoDe Magazine and MSDN Magazine. This is great news. And even greater, I have learned that Malek Kemmou, who I have not seen since he made the transition from Regional Director (which enabled him to travel to many conferences in the U.S.) to a Microsoft employee (Techology Architect in SOA and Business Process for Microsoft MEA), a job which does not allow us to see him over here any more. Boo hoo. So I’m very happy to hear he will be in Sofia as it has been tooooo long.

This is going to be a fantastic conference. I’m truly looking forward to it and then galavanting around Bulgaria with my friends in Tourista mode.

One of my prepration tools is here.

Thinking about Code Camp 6 in Waltham? Hotel info

Thom announced 10/21 & 10/22 as the dates for Code Camp 6!

I just tried to book a room at our favorite Code Camp hotel (Waltham Westin) for just Saturday night and there are no rooms for one night stand-ers.

You can book a room for the weekend for a pricey $318 if you go through their special fall 20% off package offer on the web.

What happened to the $119/night of earlier code camps? Baah!

Maybe it’s time to find another hotel (with an adequate bar/lounge) for us all to camp out at!

Leave suggestions in the comments.

Hilton Garden Inn (newly renovated, has a lobby and restaurant) is $125/night.  Or $137/night for 2 beds and full breakfast for two. Total with tax is about $150 per night which is closing in on the Westin rate except for the breakfast.

Now that’s a great way for Vermont to make CNN’s home page

Some teens in Brattleboro (southern part of the state) have decided that 1970’s style flashing wasn’t quite rebellious enough. So they are just hanging around in the middle of town buck naked. Egad. It’s a little ridiculous (easy to say now that I’m so far past those rebellious years) and to make it worse – CNN had it on the home page today.

The town is waiting for the weather to get cold enough for them to give up this particular form of expression of freedom. “As soon as winter comes, there won’t be a story anymore”.

Async in asp.net 2.0- don’t forget that iAsyncResult!

One of the points of confusion I’ve seen wrt these new asp.net features is people trying to use them (and getting no farther than head banging) with random functions.

.NET 2.0 makes a lot of asynchronous stuff much easier with the Event Driven Asynchronous Pattern.

The BackgroundWorker sets up the entire package for  you and is a great solution for Windows Forms.

But with the ASP.NET 2.0 methods, you must call out to methods that already have BeginInvoke/EndInvoke and that return IAsyncResult. It’s easy to do with classes that already do this – like the new SQLCommand Async functions (eg. BeginExecuteReader/EndExecuteReader) or calls using HTTPRequest to pull down data from another website (eg an RSS Feed). But what about doing long running processes that don’t have .NET (or 3rd party) calls that implement the async pattern? What if you have a website that does the ever popular Fibonacci calculation? (Not really “ever-popular”, though it is the common example of long running method used in MSDN docs ;-)).

The grown-up way is to create a delegate for your synchronous method and then call BeginInvoke and EndInvoke. Here’s some help with that.

An easy way that doesn’t require mucking with delegates is to stuff the function into a web service then use the web services async functionality (which come for free when you build a web service proxy through Visual Studio). Prior to VS2005, we had only the Begin/End methods availalbe. VS2005 has those plus a new pair that ift into the Event Driven Async Pattern: myMethodAsync & myMethodCompleted. You can see both of these in the above link.

Productive Procrastination

How about attempting to sort out and file away 8 months of bills, etc that have been piling up in my filing in-box?

It’s hard to tell by the picture, but there is a LOT of paper in these piles. On CSI, of course, you’d be able to zoom in on this image …

…and then “enhance” it, to make it perfectly legible and clear. Of course, you wouldn’t think of that unless Horatio Caine was standing over your shoulder, looking in the other direction, saying, “hmmmmmmmmmm, what I want you to do…. what I want you to do, is zoom in on that picture. Yes. Now enhance it.”. Then slide his head around to give you the snake eyed glare. God that makes us laugh… ever predictable.

If that total fantasy isn’t the fantasy that I think it is, I guess I’m pretty much screwed.