Category Archives: dotNET

Steve Smith’s International Border Tour presentations!

Steve Smith, Mr. ASPAlliance etc is coming to speak to the Vermont.NET User Group on Monday night, Feb 9th and then he is on to Montreal for the GUVSM.NET User Group on Tuesday night. His Tuesday night talk in Montreal is an INETA sponsored event. Monday is a Julie & Rich’s Bed & Breakfast sponsored event. Steve is coming (sans Michelle boo hoo) on Saturday and we are going to have some Vermont fun with him. I have decided not to make him ski since I don’t want to be blamed for broken bones. We will take Steve snowshoeing in the Green Mountains as we have done with Chris Kinsman and Stephen Forte before. Steve is going to do a presentaion on Caching in ASP.NET and Whidbey. I (and many) are really looking forward to this.

BCL … Literally

When I started working on my Edge East presentation (that I have written about a lot lately) I was really focusing on the fundamentals of the BCL. The conference organizers had picked the same title as Kit George’s talk at PDC which was absolutely about the fundamentals. But the more bounced some questions around the more I realized that because the literal definition of the Base Class Libraries is ALL of the classes, that this is what most people also tend to lean towards.

So I really struggled with trying to decide if I should aim “high” – for those people who might be expecting a wide variety of things from the classes including System.Windows or System.Data (lots of interesting new things in system.data!) – or aim low at those who are in fact looking for the fundamentals.

I am not duplicating Kit’s presentation. Even if I wanted to it would be impossible since he used different bits (and knows this stuff a little better, heh)!

I rewrote my abstract 4 times. But as I wrote earlier, I eventually decided where I wanted to be and finally got going on it.

Though 80% of my choices are still from the fundamentals, I currently do have in there some of the new System.Data classes/methods as well as a mention of a property that falls into the windows name space.

Kit George has been kind enough to talk with me about this and I am again inspired to stay low and focus on those classes that do fit in to the Fundamentals area that I look at every day on my beautiful WinFX poster.

The real problem goes back to here – so many new great and interesting things and only an hour or so to talk about them.

All of this angst for an hour long talk. But really it’s fun because I am learning a lot of things that I might not have taken the time to focus on right now. And it is only going to make the presentation that much better.

Whidbey BCL the Easy Way #3: One line File Reading

Here is another item that I am putting in my BCL talk. It’s not earth shattering but it’s sure to bring a round of applause! 🙂

I have a presentation I have done a few times on Streaming in .NET Tips and Tricks. Trying to explain the ins and outs of streamreaders and streamwriters, that they are not containers – just transporters, that you use Read to write and Write to read (think about it…). All VERY confusing to non-plumbers. If you are using streaming to open a file up and see it’s contents or create file, you have a lot of concepts to understand and a lot of lines of code. And then don’t forget to close the file stream or is it close the file or …oh god. I better go look at my slides again.

Which is why, even if it is one of the more seemingly pedestrian changes in .NET, File.ReadAll and File.WriteAll are very welcome new methods in the Base Classes.

With this one short line of code:

Dim str as string=File.ReadAll(“c:\mynicefile.txt”)

(and you can do this in C# too and in this.net and that.net cause it’s in the BCL…)

I now have a string filled with the contents of my text file. I don’t even have to instantiate an object. I don’t have to close any resources.

No research, no acrobatics.

One very good point that Kit George makes about this is that it’s intuitive. Certainly you have started by typing “File.” and looked up and down the intellisense list for something that would do this. Well, now it’s there. Thanks guys and gals!

DevDays Speakers Action Items

It is amazing the amount of coordination that is going to happen to get the various speakers in 32 different cities all on the same page.

If you are anything like me you get a gazillion emails a day and set some aside to read later. Better not do that with the one you got from the DevDays coordinator. There are some serious action items that need to be attended to pretty quickly. Just thought I’d mention it here in case your email is buried already. It was only yesterday afternoon, but it feels like it was days and days ago already!

 

New Server, New WebServer all the old problems

How often do you have to set up IIS on a remote server and configure it to be accessible from a client box using Visual Studio.NET? Daily? No. Monthly? No. Maybe once every year or two? More like it. I just want to kick myself when I have to go through all of the same problem solving! Oh yeah, forgot to install remote debugging. Oh yeah, forgot to include myself as a VSDebugger group member. The most interesting one this time was getting my webserver to show up in the windows explorer on my client box. I think I am almost back to programming now!

Whidbey BCL the Easy Way #2: Shifting how we look at the Base Class Library on the road to Avalon

Here is another point that I will be making in my Whidbey BCL talk.

Most people have seen this Base Class Library diagram many times. Here’s a picture you have seen a thousand times before where the namespaces are organized hierarchically. There seems to be an attempt to stack them as though they were building blocks, with the fundamentals on the bottom and the UI stuff at the top.

If you look at the WinFX namespace diagram (to which Whidbey is an evolutionary step) you can see that the classes are now grouped not by namespace, but by functionality. I don’t recall seeing the classes organized like this before I went to the PDC, though I could be wrong.

Thanks to the Chilean MVP website, I was able to find some jpgs of this poster that I have on my wall. Here is a small one , click on it to get a HUGE one that you can actually read (warning the big one is almost 1MB)

What you will see is, for example, pieces of System.Web in the “presentation” bucket, in the  “Data” bucket in the “Communication” bucket and even in the “Fundamentals” bucket.

Though of course, it will always be important to understand the hierarchy of the classes, this shift in perception will make a developer’s evolution to Avalon easier.

DevDays and DevDays Bloggers


Though I wrote about DevDays 2004 eons ago (and that attendees will be getting Whidbey!!), since I am speaking at two events (Hartford 3/2 and Boston 3/16) I just signed up for the devdaysbloggers.net site.  Here is my little “I’ll be there” graphic. It doesn’t really give me the same jitters as going to PDC, but it’s a very important event, because it will reach a lot of developers that would never get to a TechEd or PDC.

Whidbey BCL the Easy Way: Memory Pressure

I thought I would share some of the things I am putting in my talk. They may already be old news to some of you (which seems such a funny statement considering the product is only in alpha!) but to those of you who haven’t ventured in, I would love to leave a crumb trail to entice you to look further.

The class for Garbage Collection, System.GC, has two new methods: AddMemoryPressure and RemoveMemoryPressure.

Although the way GarbageCollecton works is pretty complex (and fascinating) here’s a simplified explanation. GarbageCollection is triggered by the amount of memory being used by your managed objects and based upon different triggers, it goes and cleans up objects that are no longer being used. If one of those managed objects owns an unmanaged object, that unmanaged object’s memory allocation is not taken into account. Imagine the confusion (and inefficiency and possibly worse…) created when a small managed object instantiates a very large unmanaged object.

Using these new methods, you can add or remove a value that is used in the GC’s calculations that help trigger it’s functionality. The value that you pass in could literally represent the size of the unmanaged object, or just be your own value that helps to almost “rate” or “rank” the priority of the object.

If you don’t have the Whidbey alpha, you can still read more about these methods online in the SDK Documentation. AddMemoryPressure  RemoveMemoryPressure . I have to say that the explanations in the documentation are really very clear and I recommend that you look into them for further details. Also Brad Abrams wrote a much more indepth explanation of Memory Pressure in December.

BCL Talk Deck – GO STUDY THE CLASS LIBRARY!!!

No, I’m not announcing it’s availability. I just shipped it off to Sys-Con but it’s not where I want it to be. By the time the conference rolls around it will be a thing of beauty. The process of doing this talk (What’s new in the Whidbey BCL) has been incredibly educational. It has forced me to dig much more deeply into the documentation to explore what is in there than is my nature. Having now been through that experience, I highly recommend it to everyone who really wants to learn about the tools that they are trying to use! I sure hope that brings a smile to Sam’s face! 🙂