The Internet is for FUD

Sometimes I think Avenue Q got it wrong; The Internet is for FUD. When it comes to generating Fear, Uncertainty and Doubt the internet reigns supreme. Oh the television was good, but it has limitations. When you need to simultaneously scare the pants off someone in NYC and an uncharted island off the coast of New Guinea, only the internet will do.

Primal Scream

Every have one of those days were it seems like the world is secretly trying to scramble your brains? I’m having one today.
For some reason this statement compiles just fine:

if(anyYearCheck.Checked = false && (1 > 2))



Did you notice the problem? Yeah? Well I didn’t.
For those like me who didn’t catch it, here is the deal; “Checked = false” doesn’t check the value of Checked, it sets the value of Checked. So rather than checking for false I was setting it to false. This caused some rather intricate four-letter-word sentences to be expunged by yours truly.
What I find odd is that I’m positive that statements like this have cause compiler errors in the past. So like I said, the world must be secretly out to get me.
UPDATED: My code sample was wrong. This error requires the && to be included in the if statement.

And Another Thing…

While I’m updating wish-lists I’d like to add something to this list: more control over web reference proxy generation. I understand that this may in fact be solved by VS 2005’s new web services tools, but on the off chance that it isn’t I’d like to get this out there.

Our latest application uses web services for the entire data layer. This means that 90% of the business logic and all of the database communication is handled by a web service (really it is handled by a number of web services due to the size of the application).

One of the issues we’ve run into is in managing this. We want to maintain a single assembly that houses all of the web references and associated helper classes. With a large number of class libraries and executables this saves us a ton of time and it system actually works pretty well. We have AppSoap.dll that holds the web references and a few other classes and this is in turn referenced by a dozen or so other assemblies.

But there is one issue, the proxy generate builds the reference.cs and gives a number of items an “Internal” protection level. This means that while we can reference <namespace>.<typed dataset>.<typed datatable> we cannot access the column names in that dataset.

The sort of it: either keep it all public so I can reference my web services anywhere I need to or give me control over it. Right now I have to search and replace “Internal” with “Public” every time I update the web service. Yuk…