February 2008 Blog Posts

Custom Controls Everywhere and ASP.NET MVC, part 1

This is part 1 of a 4-part series discussing a concept that I've long called "Custom Controls Everywhere" and how ASP.NET MVC affects it.  This article will explain why I advocate the pattern and how ASP.NET MVC takes the capability away. What does Custom Controls Everywhere mean? When I start my explanation of Custom Controls Everywhere, many listeners think I'm off my rocker.  At the least, they think I'm creating a bunch of extra work for nothing.  But once those listeners hear me out, as with some of my other ideas, the critics come to realize the benefits.  I preface the definition...

posted @ Sunday, February 24, 2008 6:05 PM | Feedback (5)

Still no go... back to 3GB RAM

After installing Vista Service Pack 1 things seemed to be running pretty well.  Both ATI cards were functioning and looking good.  But after a couple hours of use, system performance degraded, especially relating to video.  Then the ATI drivers crashed and restarted successfully, just like the nVidia drivers did. So, back to 3GB RAM.  I will submit a ticket to Microsoft when I have the energy.  Otherwise, I am considering this case closed.  I cannot use 4GB RAM and 2 video cards on this Dell OptiPlex with Vista 64-bit. Technorati Tags: nVidia,ATI,Vista,64-bit

posted @ Thursday, February 21, 2008 5:53 PM | Feedback (1)

Video Card Update - Vista Service Pack 1

I installed Vista Service Pack 1 today.  I put my stick of RAM back in, and I have no distorted graphics.  Still using the 2 ATI cards.  I'm going to keep my fingers crossed.  It feels good to have that 4th GB of RAM back. Technorati Tags: ATI,Video Card,Vista,64-bit

posted @ Tuesday, February 19, 2008 1:44 PM | Feedback (0)

Test your smoke detectors

Fire investigators determined that Mike did not have a working smoke detector in his house.  Having one could have possibly saved his life.  Please test yours when you get home today.

posted @ Monday, February 18, 2008 1:18 PM | Feedback (0)

Still cannot open a VS 2008 solution from explorer

Well, I jumped the gun.  I saw the post that was referenced during This Week on Channel 9 and I thought it would solve my problems.  It did not.  I still cannot open a VS 2008 solution from explorer. My issue does seem to be that I have the UAC turned on.  In order for VS 2008 to open cleanly, I have to run it as Administrator.  If I don't, I get this message when I try to open a web project. This means that I must always run VS 2008 as Administrator.  I've updated the shortcut's compatibility...

posted @ Sunday, February 17, 2008 10:32 PM | Feedback (0)

Goodbye, Mike Martinelli

I found out yesterday that a friend from high school passed away this week.  Mike Martinelli died on Friday, February 15th, 2008, 3 weeks after being burned in a fire at his home.  Mike had been found lying unconscious beside his back door. Mike's obituary: MARTINELLI Michael R. beloved son of Joseph and Judith Zink Martinelli, loving brother of Amanda (John) Hull, Joseph Martinelli Jr and Stefano Martinelli, dear grandson of Margaret Zink Fritsch, caring uncle of Marissa, Emma and Ainsley Hull, also survived by many aunts, uncles, cousins and friends. The family would like to thank the staff at the Burn...

posted @ Sunday, February 17, 2008 7:49 PM | Feedback (7)

How to safely change 13,000 lines of code, part 2

Frankly, this isn't going as well as I hoped it would.  I'm pretty happy with the naming convention that I ended up with, but the search and replace isn't going so well to this point. I had estimated that 30% of the usage of the previous methods would be incorrect.  But then I stated that was a pessimistic estimate.  I don't have numbers, but so far it feels like we were wrong more often than we were right.  What's kind of reassuring is that in most places where mistakes were made, 2 mistakes were made, and, well, 2 wrongs...

posted @ Friday, February 15, 2008 11:28 PM | Feedback (0)

Open a VS 2008 solution from Explorer

Andrew Arnott : Why double-clicking on an .SLN file doesn't always launch Visual Studio I thought this was because of the UAC, but it has nothing to do with that.  Glad to have a fix! Technorati Tags: Visual Studio,VS 2008

posted @ Friday, February 15, 2008 7:10 PM | Feedback (1)

Custom Controls Everywhere and ASP.NET MVC, part 0

As I referenced last night, I've been advocating "custom controls everywhere" for a long, long time.  I don't approve of using the <asp:Textbox> control or <asp:DataGrid> control, or pretty much any others.  Instead, these controls should be inherited, and the derived controls should be used. There are many reasons for doing this, and I've given a few user group talks on this and I've offered tidbits in my blog over the years.  But I've been thinking about how ASP.NET MVC will hinder my ability to use custom controls everywhere, and what I should do about that. The problem is that ASP.NET MVC...

posted @ Wednesday, February 13, 2008 11:53 AM | Feedback (10)

Self-Validating Form Controls

Ever since I started working with ASP.NET, back in v1.0 Beta 1, I've been creating self-validating form controls.  I've gone through a few iterations with them, but overall, the concept has stayed the same. Here's a fun link to an archive of the old Cincinnati .NET user group.  It shows where I gave a presentation back in February of 2003 on this topic.  I was trying to remember when that was, and archive.org was able to remember for me. On my current project, our Textbox got the most attention for validation.  We also...

posted @ Tuesday, February 12, 2008 10:16 PM | Feedback (2)

VS.NET Find In Files Hangs on Vista

Today, I am embarking upon my global search and replace to change 13,000 lines of code.  But I have had a problem with VS 2003 on my Vista machine -- it likes to hang when I use Find in Files or Replace in Files. Google to the rescue.  I very quickly found that Visual Themes is the problem.  Fortunately, you can just turn Visual Themes off for VS 2003 without having to turn Aero off completely.  Excellent! I would have NEVER figured that out myself.  I freaking love Google! Technorati Tags: Google,VS.NET 2003,Vista

posted @ Tuesday, February 12, 2008 8:22 AM | Feedback (7)

How To: Cause a Vista BSOD with VS 2008

Just in case you want to do this, here's a step by step guide. Start VS 2008 (no need to open a project or file) Click on Tool->Attach to Process... Select wininit.exe and click Attach Wait for the debugger to initialize Click the Stop Debugging button When you attempt to attach to w3wp.exe, but it's not running, the keystrokes that you zip through in less than a second can cause you to be attached to wininit.exe.  Once...

posted @ Sunday, February 10, 2008 4:25 PM | Feedback (0)

Using ROW_NUMBER() to merge data

I just tackled a problem using SQL's ROW_NUMBER() function, and I'm happy with how it turned out.  It would have been pretty tricky in SQL 2000. The problem at hand was merging 2 sets of data, copying data from one account into another account, where the records don't already exist.  The data contains a SortOrder field that must be unique within each account.  When I merge data from one account to another, I need to include the SortOrder field, but prevent duplicate values in the new account. Let's set up a sample of the problem: ...

posted @ Sunday, February 10, 2008 2:22 PM | Feedback (0)

How to safely change 13,000 lines of code, part 1

I cranked out a bunch of code tonight for my new nullable types approach.  This is a .NET 1.1 solution, so it's pretty old school, but it was still fun. I explained the problem with our existing methods the other day.  Basically, we have a ton of helper functions for dealing with nulls and empty strings across all of the data types.  The methods are confusing and we haven't been using them correctly.  We need a more sensible approach. After chatting with Marco, we came up with something like this: ...

posted @ Saturday, February 9, 2008 4:13 AM | Feedback (0)

SQL Profiler - Being self-centered is a good thing

I don't know why I hadn't taken the time to do this before, but I just invested 5 minutes into SQL Profiler to make my life much easier when debugging stored procedures. When I'm faced with stored procedure debugging, especially procedures that take awhile to run, or require a series of steps in the application to fire off, I often use SQL Profiler to capture the SQL call.  Then I'll re-run the call directly in SQL Management Studio.  But SQL Profiler can bring back a lot of noise, making it tough to grab only what I need. I...

posted @ Thursday, February 7, 2008 3:44 PM | Feedback (2)

Video Card Woes - Finally Over

I believe that my video card woes have finally come to an end.  As I discussed, the key ended up being my RAM, and not the cards.  Ultimately, I guess I can't use 4GB RAM + 2 video cards on Vista 64-bit.  This is good to know since I have 4GB RAM installed at home too, but only a single card (for now). After dropping my RAM down to 3GB, the displays look great, but I kept getting messages stating, nvlddmkm stopped responding.  This is the video driver for the nVidia cards.  I saw this a lot when I'd...

posted @ Thursday, February 7, 2008 12:04 PM | Feedback (0)

90% of this job is figuring out what to call stuff

This has always been one of my favorite Dilbert strips.  Why?  Because in our field, it's true.  Many times I've spent more time figuring out what to call something than I spent actually developing it. This week, I've been gathering ideas from team members on how to name some methods that we use throughout our application.  The existing names are ambiguous and the methods have not always been used correctly, so I want to rename them to something that makes sense. We have 2 sets of methods for working with "nullable" values.  Pretty standard stuff: ...

posted @ Tuesday, February 5, 2008 3:50 PM | Feedback (2)

Video Card Woes - Up to 3 screens, down to 3GB RAM

I said in my last post that I was going to try yanking out a stick of RAM.  I had seen some mention of this in some message boards.  I'm either really happy or really sad (undecided) to report that this seemed to address the issue (for the most part). I am up to 3 screens, but down to 3GB RAM.  Apparently, Vista 64-bit cannot manage 4GB RAM as well as 384MB video memory.  I am still seeing the video driver "stop responding" but "restart successfully" every time I lock my screen and then log back in.  But while...

posted @ Monday, February 4, 2008 5:59 PM | Feedback (0)

Bank Logins and Twenty Questions

Rick Strahl had a post with this title.  I thought I'd share my story too.  Somehow, we as consumers need to speak out to the banking industry and get them to change how this Multi Factor Authentication is being implemented. On Christmas Eve, Fifth-Third bank turned on their new security feature that prompted me with "twenty questions."  Here's what I sent to them after muddling through the questions and deciding what to put in. The new security feature is terrible. The arbitrary questions provided are extremely irritating. No one will ever be able to answer...

posted @ Monday, February 4, 2008 5:08 PM | Feedback (1)

I didn't know CompUSA was going out of business

I must live under a rock.  CompUSA is closing its stores.  I stopped by tonight on my way home from work to pick up a wireless router and PCI card for my mother-in-law's new Dell, and they had store closing signs all over the front of the building.  The shelves were near empty, but I managed to get some of the last (on-the-cheap-side) wireless stuff they had. I'll be sad to see this store go as I've always shopped there.  The MicroCenter near us feels like a warehouse inside, instead of a nice, bright store, and their prices have...

posted @ Saturday, February 2, 2008 3:03 AM | Feedback (0)

Video Card Woes - Finally Resolved... Nope

Well, ANTOnline sucks.  They really suck, and I'm not afraid to say it! Back on Jan 25, I said that I had submitted an RMA to them after talking with BFG Tech.  This was actually the 2nd RMA I submitted to ANTOnline.  The first was because there was no DVI-I to VGA dongle included like there should have been.  But the one I submitted on Jan 25 was because BFG told me that the card I got was probably bad.  I haven't heard back from ANTOnline yet. I called them, I emailed them, I submitted their online form,...

posted @ Friday, February 1, 2008 5:04 PM | Feedback (1)