sql, sharepoint comments edit

Here’s an interesting tidbit for you. We are currently trying to do some work via the search web service in SharePoint Portal Server 2003. (You may have seen my test app that I wrote for checking out searches and results via that web service.)

Seems there’s an internal debate at Microsoft over which team should be handling our support call - the SQL Server team or the SharePoint team. See, we’re having trouble getting metadata returned correctly when executing full text searches. At first we thought it was an iFilter problem or maybe something weird with our setup…

Turns out SQL Server handles full text queries differently based on the platform it’s installed on - Windows 2000 server vs. Windows 2003 server. I didn’t get any details on exactly what the differences are (I’m only peripheral on the case; another developer here is actually talking directly to the support folks), but that’s the situation.

One would think that it shouldn’t matter what platform the product is installed on, it should consistently handle queries the same. Maybe different optimization or something, but the actual syntax possibly being different? It boggles the mind.

net, vs comments edit

I’m working on some ideas to enhance Solvent and I’ve realized that one of the things I want to do will require some low-level shell programming.

I hate low level shit.

Looking at MSDN, it seems that the only real way to do it is to use C++ (because of the ridiculous amount of weird pointer stuff that’s happening).

I tried pInvoking my way to freedom and leisure. There’s only one problem with that: When there are marshaling issues, I’m not a COM person… I don’t know how to fix them. I live in a higher-level programming world: garbage collection and high-level data structures and no fussing with memory allocation issues. It’s been like seven years since I’ve dealt with anything C or C++ related.

Try as I might, though, I can’t get myself quite DllImported into the Windows Shell.

As such, this weekend I went out and bought Visual C++ .NET - Step By Step. I’m only on like the second chapter (no time!) but I’ve skimmed through the rest.

Lots has changed since I last worked with this stuff. ATL? Funky reserved words (__gc, __value, etc.)? Maybe that’s standard stuff that has always been around, but then, I learned C++ in Solaris on SPARC workstations, which means I read a little about MFC but never had opportunity to use any of it.

(By now, all of you VC++ people out there are shaking your heads. Gimme a break; I’m [re]learning!)

It’ll be good to come up to speed on it; if anything, an interesting exercise in crash-course style learning. Who knows… I might even read the whole thing instead of just enough to get my project done. Heh.

Just looked at my stats. The number two search phrase that leads people to my site is:

you don t have to be rich to be my girl

What in the…?!

I’m working on this project, you know, at work, and it turns out it’s a little larger than we first anticipated so we’re getting some contractors on it.

I’m interviewing these contractors, and I’m finding that lots of people look great on paper but don’t live up to the hype when you talk to them.

We’re looking for ASP.NET developers, specifically. I’ve talked to five developers with excellent looking resumes so far, and only two are remotely close to anything I’d consider an ASP.NET developer. It’s bad to the point where you wonder if the people who put down “proficiency in ASP.NET” have actually been online before in their lives.

One of the first questions I ask a candidate is what the events are (and in what order) for an ASP.NET web form (System.Web.UI.Page) when it executes. For those who actually aren’t ASP.NET developers, this is like asking a college English professor to give you the alphabet. If you don’t know it, or can’t at least get the main ones, it sort of debunks you as being anything you claim to be.

It turns out that this is a tough question for the people we’ve so far interviewed.

For those going to interviews, let me help you out: When you don’t know the answer to a question, say so. You might take the opportunity to think out loud and talk with the interviewer to see if you’re on the right track, but make sure they understand you’re not trying to put up a smoke screen. Do not change the subject and start talking about jobs you’ve had in the past that are entirely unrelated to the job you’re interviewing for. Do not hem and haw about and then give up with the statement “I know I could do a good job for you.” Just be straight and do your best. Unless you’re interviewing for a sales job, chances are the interviewer(s) will know if you’re lying.

Furthermore, if you’ve used a technology (or application or tool or whatever) only once or twice, don’t list it on your resume. Just because you’ve ridden in a car doesn’t mean you know how to drive one. Save us both some time. Oh, and if you tell me you know how to program and that you rely on copying and pasting example code then tweaking it… just get up and walk out. You’re not going to get the job.

Finally, don’t oversell yourself. I understand that people in interviews get nervous and some people react to nervousness by talking… curb your yammering skullcave and let the interviewers ask you questions. If you have a question, ask it. If you’re asked a question, answer it. Don’t go off on some diatribe about the 47 other jobs you’ve had and every project you’ve ever worked on. Answer the question, provide reasonable detail, and move on.

Save me time. I value my time. You’re wasting it. Just… just don’t.

gists, aspnet, csharp comments edit

In creating various web apps, I use Peter Blum’s Professional Validation and More controls for page validation and error display. If you don’t, you really should. They’re much more flexible and robust than the Microsoft validation controls are.

One problem I ran into was in using the ValidationSummary control. I’m generating a huge form using all sorts of validation, and I want the ValidationSummary to display the list of errors on the form as they happen. The issue is, the ValidationSummary only displays when the user tries to submit the form - even if it’s a client-side validation, you only see it when the user clicks the submit button.

I wanted my ValidationSummary to display real-time, rather than waiting for the user to click the submit button. Here’s a little method you can use on your controls to make the page execute validation on a control event. Just pass in your control and the name of the event (“onclick,” “onchange,” etc.) and this will handle the rest.

/// <summary>
/// Adds a call to the VAM page validation to a specified control's event.
/// </summary>
/// <param name="control">The control that should call validation.</param>
/// <param name="eventName">The event that should fire validation (onClick, onChange, etc.)</param>
protected void AddPageValidationEvent(WebControl control, string eventName)
{
    var scriptKey = (string)control.ClientID + "_" + eventName + "_VAMValidate";
    if (!Page.IsStartupScriptRegistered(scriptKey))
    {
        var scriptBase = "<script type=\"text/javascript\" language=\"javascript\">\n" +
            "<!-- \n" +
            "VAM_AttachEvent(VAM_GetById(\"{0}\"), \"{1}\", \"{2}\");\n" +
            "-->\n" +
            "</script>";
        var eventAction = "VAM_ValidateGroup('', true);";
        var completeScript = string.Format(scriptBase, control.ClientID, eventName, eventAction);
        Page.RegisterStartupScript(scriptKey, completeScript);
    }
}