INETA Champs Program

An XBox or MSDN Subscription to the 10 Most Active Contributors in the User Group Community each quarter.

How?  By doing what you are doing already, you stand to win:
a) Valuable Prizes: An MSDN Subscription.  And, if you already have one, you can choose an XBox instead.

XBoxMSDN Subscription

b) The Fame and Prestige of having an award to hang on your wall that shows that INETA recognizes your contributions to the User Group Community.

Champion Award

c) Official Recognition on the INETA Website  for one year.

All of your peers will be able to see that you stand out above the crowd. If the opportunity presents itself for you to show your dedication to the User Group Community in a public way, there is no better way than to show off your name highlighted on the website of a highly respected organization like INETA.

d) A Badge for your website showing that you are a Community Champion.

When folks visit your website, blog or any other place where you publicly post your work, they will see that you are a Community Champion.

Oooohhhh. Recognition by INETA? Valuable Prizes? An award to hang on my wall? A Badge?  How can I participate?

Well, I am glad that you asked.

INETA has long been known for it's support of User Groups and this year, there are a number of great new programs supporting the User Group Community.  The Community Champs program is one of them.  INETA wants to recognize individuals who are demonstrating their involvement in the User Group community.  The program is aimed at rewarding those that are the most active with the prizes and award mentioned above.  It is INETA's way of recognizing the ones that really bring the community together.  So, in short, if you are the kind of person who helps to run user group meetings, codecamps, or helps out in any number of other ways, you should let INETA know the kind of activities that you are involved in.  If you are very active, you may be recognized by INETA in a very public and spectacular way for the activities that you currently do to help the user group community.

INETA and Community-Credit are making it happen.

Community Credit has been helping to recognize fellow developers for the past number of years for their accomplishments and INETA has been the mainstay of User Groups for many years, so it is no surprise that the two would be working together to make this great program possible.  Best of all, the contributions that you record will also count toward Community Credit prizes, so you may even have a chance to be rewarded with a Geeky, Community Credit prize as an added bonus.

How do I submit my contributions?

Visit the INETA website and go to the Champions section, sign in and let INETA know what you are doing by recording your contributions.  The current quarterly period counts for contributions during period of  June 30th, 2007 to June 30th, 2008.  The final submissions can be made until July 14th.  Keep in mind that the end of this current quarter is coming up pretty soon, so if you have been very active over the last year, be sure to enter them soon so that you don't miss this great opportunity.

What are the benefits of participating?

If you are an individual who is always contributing to the User Group Community, you do it because you like it.  You don't do it because you expect to be rewarded.  At the same time, if you just happen to be rewarded and recognized then that makes it that much better.  Imagine playing on an XBox that you received as a thanks for all of your hard work.  It makes the games just a little bit more fun.  Using your MSDN subscription that you "earned" makes the tools just a little bit better and seeing the award hanging on your wall is a reminder to you and your colleagues just how committed you are.

Can anybody participate?

Unfortunately, the current period (being our first) is for participants in North America only.

Posted by sweisfeld | with no comments
Filed under:

Generics , Extension Methods, and XML Serialization

At the Jax SQL Saturday I was asked to turn a .NET object into an xml file and then reverse the process.

Step 1: Serialization with extension methods
C# 3.0 comes with this cool feature called extension methods. This is syntactical sugar for static methods that allows for you to “add” methods to other objects. To write one of these write a static class with a static method that takes the type you want to extend as the first parameter. The only difference from what you would do normally is to add the keyword “this” before the first parameter. The beauty is that it feels very natural for developers to just type the variable name and press dot and they get your new method in the statement completion in VS. (BTW you can still call the method the way you would in C# 2.0) So with the method below we now have added a Serialize method to Object thus it is inherited everywhere in the entire object model!

public static void Serialize(this object o, string filename)
{
    Type t = o.GetType();
    if (t.IsSerializable)
    {
        XmlSerializer serializer = new XmlSerializer(t);
        using (TextWriter tw = new StreamWriter(filename))
        {
            serializer.Serialize(tw, o);
            tw.Close();
        }
    }
    else
    {
        throw new InvalidOperationException(string.Format("Objects of type {0} are not serializable.", t.Name));
    }
}


Step 2: De-serialization with generics
I like generics for the process of de-serializing, this allows my method to return a strongly typed copy of the object that was serialized to the file.

public static T DeSerializeObject<T>(string filename)
{
    T t;
    XmlSerializer serializer = new XmlSerializer(typeof(T));
    using (TextReader tr = new StreamReader(filename))
    {
        t = (T)serializer.Deserialize(tr);
        tr.Close();
    }
    return t;
}

Use the method like this:
Serializer.DeSerializeObject<Customer>("customer.xml")

Customer c = new Customer { FirstName = "Shawn", LastName = "Weisfeld" };
c.Serialize("customer.xml");

Posted by sweisfeld | 3 comment(s)
Filed under: ,

C# 3.0 (.NET 3.5) Language Features & Delegates

Two more questions from the floor at TechEd.
Perhaps the most frequent question at TechEd is “What are the new features of C# 3.0?” Here is the short list:
• Implicitly typed local variables 
• Extension methods 
• Lambda expressions 
• Object and collection initializers 
• Anonymous types 
• Implicitly typed arrays 
• Query expressions 
• Expression trees 
Check out Anders presentation from last years TechEd here: http://www.microsoft.com/emea/msdn/spotlight/sessionh.aspx?videoid=319
And all the details in this word document:
http://download.microsoft.com/download/5/8/6/5868081c-68aa-40de-9a45-a3803d8134b8/CSharp_3.0_Specification.doc or this URL http://msdn.microsoft.com/en-us/library/bb383815.aspx

Also got a question about what a Delegate was. Here is the definition from the documentation. A delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be invoked like any other method, with parameters and a return value. (http://msdn.microsoft.com/en-us/library/ms173171.aspx)

Posted by sweisfeld | with no comments
Filed under: ,

Silverlight Deep Zoom (aka SeaDragon)

In my second in the series of TechEd Questions I have a good one. Unfortunately it had nothing to do with C#, but that doesn’t diminish its cool factor.

The attendee, lets call her Suzie, volunteered to help organization working with an artist that recently passed away catalogue his work on the internet. She wanted a good way to post high resolution images on the web allowing the public to enjoy this persons artistic contribution. The first thing that jumped to mind with the Hard Rock Demo from Mix (http://memorabilia.hardrock.com) you have got to check this out! You can see the scratches on the guitars. Scott Hanselman has a great blog post with a how to if you want to create your own deep zoom images (http://www.hanselman.com/blog/DeepZoomSeadragonSilverlight2MultiScaleImagesAtMix.aspx). Remember to note that this technology is only as good as the original image so you will need good HighRes images to start with.   

 

Posted by sweisfeld | with no comments
Filed under: ,

Building a solution with many projects is SLOWWWWWWW

This week I am attending TechEd in Orlando FL and I was honored to be requested to work the C# booth by the MVP and C# teams. I got many great questions from attendees and I thought I would post some of the more interesting ones. So here goes.

An attendee, let’s call him Bob, came up and said that his builds were very slow. After some chatting Bob told me that he has a huge number of projects in his solution all “joined” together using project references. This is a convent feature of Visual Studio that provides for “cascading” builds. By that I mean if you change some code in a business library when VS does the build it will build that library first, copy the dll into any projects that reference it, then build those projects. This is very convent but as Bob noted when he changes one line of code in a method it causes the entire project to rebuild. This is not a big deal if the project is small and the builds are quick but if the project is large this could be a very painful experience. So we tossed around some things I would classify as workarounds like for example writing some post build steps that would move dll’s around and the like. But in my opinion the best solution is a properly architected solution. To that end I pointed Bob to an article put together by the P&P group at Microsoft that provides guidance for the architecture of large application with many projects and how to break them up into manageable chunks.

Structuring Projects and Solutions
http://www.codeplex.com/VSTSGuidance/Wiki/View.aspx?title=Chapter%203%20-%20Structuring%20Projects%20and%20Solutions%20in%20Source%20Control

 

Posted by sweisfeld | with no comments

Did Windows loose a Window?

Got a good question today and thought I would share the result incase someone else has a problem.  My college was bringing up Netmeeting’s Find Someone window and while it would appear in the Task Bar it was not visible on the screen. After a search for “Windows XP” and “Window Placement” (also tried “Window Location”) no results came up. So we started guessing at a solution. We noticed that when we right clicked on the button in the task bar we got a option for Maximize and then we could see the window but when we pressed restore it went away again. So now we are thinking that it is defiantly off the screen somewhere, but how do we get it back. Well, through some more trial and error we clicked the move dialogue and then mashed on the arrow keys for a while and flying in from the left hand side of the monitor came the window. After we closed the application and reopened it, it remembered the new window placement (in the visible area of the monitor). YEA Problem solved. Happy Computing.

Posted by sweisfeld | with no comments
Filed under: ,

SQL Saturday Jax May 3 2008

Tomorrow will be the long awaited third installment of SQL Saturday in Jacksonville FL. I want to thank Brian, Andy and the team for all their hard work putting the event together. If you attended my talk or just want to see some cool stuff about using the CLR in SQL Server check out my presentation (http://cid-e6edc1213d79e105.skydrive.live.com/self.aspx/Public/2008_05_03_SQL_CLR.zip).

Posted by sweisfeld | with no comments
Filed under:

Need to delete lots of data, do it in small chunks

By adding a top clause to your delete statement you can delete a chunk of records at a time. By combining it with a while you can put it in a loop and wipe the entire table.

WHILE EXISTS (SELECT * FROM Foo)

BEGIN

DELETE TOP(100) FROM Foo

END

Had someone send me an email telling me that it might be better to use a TRUNCATE TABLE command then this method, and in most cases this is preferable. Conversly not always do us "evil" developers get TRUNCATE permissions from our DBA's. You can read more about TRUNCATE here (http://msdn2.microsoft.com/en-us/library/aa260621.aspx).

Posted by sweisfeld | with no comments
Filed under:

Chage the colors on a button

Got a question from an attendee at the Orlando Launch Event, he wanted to know how to change the colors of a button from code (i.e. the click event). Both of these items are properties on the button and can be changed easily with the following code.  

button1.ForeColor = System.Drawing.Color.Blue;
button1.BackColor = System.Drawing.Color.Yellow;

Posted by sweisfeld | with no comments
Filed under: ,

Forcing Windows Auth on WCF services

At the last ONETUG meeting a question came up how to force WCF to use Windows Auth (i.e. Kerberos). By default WCF is in negotiate mode. While this is good for many cases where you cannot ensure that Kerberos will be available if you are in an intranet environment where you know it will be you can speed up your service by skipping the negotiation phase.  Matevz Gacnik has a good sample in his blog (http://www.request-response.com/blog/PermaLink,guid,4b5f46cd-3c15-4213-9570-1a235c4a615e.aspx) using certificates, the only change is to set the clientCredentialType to “Windows”.

<bindings>
   <wsHttpBinding>
      <binding name="MySecureBinding">
         <security mode ="Message">
            <message clientCredentialType="Windows" negotiateServiceCredential="false"/>
         </security>
      </binding>
   </wsHttpBinding>
</bindings>

Posted by sweisfeld | with no comments
Filed under:

Drop Me!

I was trying to get rid of all the objects (tables, procedures, views) in my database and whipped up this little script and while it is far from perfect it is well worth sharing. . .

SELECT
 CASE WHEN type = 'P' THEN 'DROP PROCEDURE ' + name
      WHEN type = 'U' THEN 'DROP TABLE ' + name
   WHEN type = 'V' THEN 'DROP VIEW ' + name
      WHEN type = 'FN' THEN 'DROP FUNCTION ' + name
    ELSE '' END AS dropSQL, *
FROM sys.objects
WHERE type != 'S' AND type != 'IT' AND type != 'SQ'

Posted by sweisfeld | with no comments
Filed under:

2008 College Tour: 7 classes in 5 days

In preparation for Code Camp I thought it important to get out the word to the newest members of the developer community here in Orlando. With the help of the faculty at Seminole Community College and the University of Central Florida I will be attending classes this week to introduce the students to the .NET community and get the word out about Code Camp. Below is my schedule for the week.

Monday - SCC COP 2830 — Web Programming I (Lusk)
Tuesday - SCC COP 1000 — Principles of Computer Programming (Taylor)
Wednesday - SCC COP 1000 — Principles of Computer Programming (White) and SCC COP 2224 — C++ Programming (Evenson)
Thursday - SCC COP 2822 — Web Applications (Ward) and UCF ISM 3253 MIS Techniques  (Shim)
Friday - UCF ISM 3253 MIS Techniques  (Shim)

Download the presentation here: http://drowningintechnicaldebt.com/files/folders/576/download.aspx

 

Posted by sweisfeld | with no comments

TechEd Birds of a Feather

Attending TechEd in Orlando in June? Every year INETA organizes Birds of a Feather session allowing us an opportunity to learn from each other. Check out Rob's Blog (http://www.robzelt.com/blog/2008/02/26/Call+For+Topics+TechEd+BirdsofaFeather.aspx) for all the details on submitting ideas and/or volunteering to be a moderator.

Posted by sweisfeld | with no comments

and simply fixed it

I got this letter from one of my clients recently and I thought I would share. . .

-------------------------------------------------------------------------------------

To whom it may concern,
 
I am writing this letter so Small Business Owners can know that there is a solution to technical issues.  As a small business owner , I am painfully aware to stay in business, the owners are also the marketing department, the admin department, the accounting department and the technical department.
 
This sounds overwhelming but if you do an emotional, educational and honest inventory of your talents and what you can manage and then secure the talents of resources outside your team to manage what you cannot, you have a better chance of reaching your goals.  Our business needs to be online, needs to be operational and current. We are computer literate, educated and motivated but we needed help and our weakest talent was the technical portion of the website and online marketing which was also one of the most important aspects of our business.
 
Our personal experience in trying to outsource the technical responsibilities or even technical support was  a nightmare.  Significant delays in getting our website up and staying up; $1,000 of dollars spent for promises that did not come close to meeting our deadlines or needs.  Our frustration level was effecting other aspects of the business and we questioned our ability to continue.
 
Then an acquaintance - a college professor - told us about a young man, incredibly talented, who just happened to grow up in a family of small business owners who was willing to meet with us immediately.  He evaluated our mess and simply fixed it - made it better and stayed with it so we could do our jobs.  Our businesses are doing well because of this man.  Our savior is Shawn Weisfeld. We recognize there may be many technically astute IT resources but for us and other business owners, Shawn brings the whole package. He listens, he learns, he adapts and though he is a technical genius he speaks in English.  Now add to that patience and availability and you have our savior.  I do think our secret is out, Shawn is very busy these days, however, he is still giving back - he shares his knowledge and talents with all ages so small businesses everywhere can know there is a solution.
 
Thank you, Shawn. We wish you well and success in all your endeavors.
 
Barbara

Posted by sweisfeld | with no comments
More Posts Next page »