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

DateTimePicker control and its DateTimeKind setting

I got this information from one of my ONETUG members (thanks JT) and I thought I would share.

There's a "feature" in the .NET 2.0 framework for the DateTimePicker control.  When you assign it a value for the DateTime, it will inherit the DateTimeKind setting (Local, UTC, or Unspecified).  When you change the date or time, the Value member then gets its DateTimeKind member set to Unspecified.  As you can imagine, if you are trying to deal with both UTC and Local times, that can really mess up your times.

As a remedy for that I'm currently just assuming the same "kind" as I started out with.  So in my case, I'm starting with Locals and when I change the time or date, I treat the time as Local, even though it's now Unspecified.  So when I convert to UTC, rather than checking to see if the value is currently Local, I either have to additionally check for Unspecified, or check to see if it is NOT UTC.

In my case, since I'm dealing with all times in the forms as Local, if Microsoft updates the DTP to retain the "kind" when you make changes, it won't break my code, but someone not aware of this anomaly that is dealing with Local and UTC at the same time might not be so lucky.

Posted by sweisfeld | with no comments
Filed under: ,

2008 SQL Saturday Tampa

SQL Saturday Tampa 2008 was great, a big thank you to the organizers Pam, Wes, and team, great job guys! To those that attended my session on the SQL CLR I have uploaded my presentation here (http://cid-afc22ba66ea68f7d.skydrive.live.com/self.aspx/Public/2008_02_16_SQL_CLR.zip)
Posted by sweisfeld | with no comments
Filed under: , ,

Dallas Community Leadership Summit

Recently INETA asked me to attend the Dallas Community Leadership Summit (http://www.barcamp.org/CommunityCamp). The event was interesting and a great chance for me to see beyond the borders of Florida. I flew out of Orlando Friday morning to Huston, and then caught a commuter jet to Dallas. Before the event on Friday night the event organizer Caleb Jenkins (http://www.calebjenkins.com), Rob Zelt (http://www.robzelt.com/blog/) from INETA, myself and some of the other attendees got a chance to hang out at a few adult beverage establishments and talk shop.

The next day we got up bright and early and walked over to the Improving Enterprises (http://improvingenterprises.com/) offices as they were so kind as to donate the facilities for the event. Caleb gave the first talk, gave a general overview of lots of topics (see notes below). Besides the technical difficulties he was having with his laptop I enjoyed his presentation. It had lots of good content and was well organized. After his talk a gentleman (sorry I am bad with names) from Sabre talked about some software developed with Ruby to allow for Web 2.0 style online community building. The software was very interesting. The best part of there implementation of karma points. Yes I said it karma like My Name is Earl (http://www.nbc.com/My_Name_Is_Earl/). They use karma as a mechanism to encourage and reward participation in the site. The more karma you have the more features you can unlock on the site.

After a great lunch  sponsored by INETA (http://www.ineta.org), we picked up with even more sessions. First up was a talk by David Walker from Tulsa on Running your UG like a Business. I found this presentation very interesting for many reasons but namely the fact that much of what David is doing is what we are doing here in Orlando (getting a 501c3, running large events, etc.) I enjoyed his perspective on things. After David was a girl from the local Dallas pod casters group, and again I apologize for forgetting her name. I enjoyed her talk a lot since she doesn’t run a .NET group. Heck she is not even a programmer. She is going through the growing pains of spinning up a new group and trying to build her base. In her talk she told us her story allowing us to draw parallels to each of us has gone through. After the pod cast lady was another lady that did something with handhelds professionally. She showed us a community browser, basically a replacement for FireFox that had all sorts of cool features to more easily work with community sites like Flickr and blogs. I wish I could remember the name of the software package, but I don’t think I am going to be giving up my IE any time soon.

The day concluded with an huge round table where everyone in the room brought up topic that were important to them. We talked about everything from getting venues and the participation of educational instructions to encouraging participation through the use of things like Community Credit (http://www.community-credit.com).

After the event we took the opportunity to continue the discussion at a local Mexican restaurant.

After attending this event and helping INETA run the 2007 User Group Leader Summit, I have learned a few things that I feel would make these events better. These thoughts are meant to help the community as whole improve in the future and not designed to diminish the work done by everyone that worked so hard to put both events together. I think these events have 2 goals. The first is obvious to share ideas about how to run user groups. The less obvious but perhaps more important is the fact that UG leaders from a given area have a chance to meet and build relationships. These relationships are very important in the business of running a user group as it is only with the help of the surrounding communities can you build big events like the 5 annual CodeCamps we have in Florida.

It is great to get a bunch of UG leaders in a room. We all seem to have something to say, boy do we. It is very important at these events to find the balance between presentation and participation. As is always the case when I give a presentation there is someone smarter then me in the audience, but unlike technical presentations I feel that it is important to give everyone a chance to voice there opinions about the topic at hand. I not only want to hear how the speaker solved a given problem, I want to hear how everyone in the room solved the same problem. It is also good that INETA has the ability to cross pollinate these events to prevent idea incest in a given community. (idea incest what a great term!!) Basically when people are brought in from other areas it gives the local community a chance to see another viewpoint instead of the same things over and over again. That is also why I enjoyed seeing people from outside the .NET community at the event. Just as people from different locations bring in new ideas, people from different technology areas can help avoid idea incest.

Now that we have an opportunity to get ideas from all over the community, we need a little scaffolding to help keep us organized and ensure that we have enough time to cover many different aspects of running a user group. I feel that having an outline of what should be covered at one of these events prevents it from becoming a free for all and helps to spur the imaginations of the wealth of information available at one of these events.

My final idea for improving these events is to designate a scribe. I know it sounds silly but ideas were flying around so fast that it was impossible for me to get them all, that is why it would be great to be able to get a “transcript” of the event at the end of the day that can be used not only to refresh the memory of those that attended, but to build upon for the next event. This would allow the building of a knowledge base information on how to run user groups. While I am as good as the next guy at reinventing the wheel, I prefer to not.

All that being said it was a great weekend. A big thanks goes out to Caleb for putting it together, and to the sponsors for providing the stuff to make it happen. I know I learned a lot and cannot wait for the next one.


Notes:
Leadership
Single strong leader
Committee of leaders
Incentive
For the members?
For the leadership?
How do you promote leadership growth?
Longevity/Health of the group
What can be done to promote group health
Membership
What can be done to increase membership?
What can be done to sustain membership?
Connections
What do you do to support member to member connections?
Sponsors
Where do you draw the line between the need for money and the desire not to turn into a marketing company
Longevity
How do you promote longevity of your group?
Give people ownership of the group
5 min talk about what you are doing
Have board meeting after the normal meeting
Pictures at the meeting/event - give a person responsibility
Different channels of communication
Study group
Three v’s
Voice
Vote
Vocation - put people to work
Give people title and email address
Facilities
When is the best time for meetings, day vs night, weekday vs weekend
New membership card with questions
Don’t create a center of excellence create a culture of excellence
$250 per day for event insurance
Income tax form?

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

C# Tutorials

I was asked to provide some links to online C# Tutorials. I threw the list below together in 5 min, I know I have missed some great sites so please augment my list by leaving a comment.

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

CodeCamps and Sponsorships

In some circles using the word sponsorship in the same sentence as CodeCamp can get you a firm dressing down. People talk of manefestos and the like and while I can understand the desire to keep CodeCamp from turning into a day of marketing, I am also a realist and realize the CodeCamps need donations to operate. These donations take many forms from facilities, to swag, to let’s face it cold hard cash. Additionally it is the responsibility of those running these events to realize that they need the resources of others, and if they wish to receive them year after year they need to show value to the sponsors. We have done this by putting logos on the website and in the program and even allowed sponsors to set up a table to talk to attendees at the event. But this must be balanced with the idea that we are always looking to provide the attendee with value. Many attendees enjoy the ability to talk to a recruiter, training provider or component vendor at these events. Let’s face it not everyone can shell out the big bucks to attend TechEd or VS Live. So as long as CodeCamps cost money to operate, and as long as companies are providing value to the attendees, I will be having sponsors at any event I organize.

Posted by sweisfeld | with no comments

Throbbing Picture Box

As is many times the case I speak to someone and they propose a challenge. This time I was asked to put together a windows forms picture box that when you hover over it with the mouse it throbs. To do this I created a class that inherits from the existing .NET picture box. When the user hovers over the picture I fire up a timer and in its tick event I change the size of the picture box. I am sure there are other ways to do this and would love to see your implementations, but you can download mine here (includes both C# and VB.NET).
throbber

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