Doug Reilly's Weblog

Embedded Reporting of the Information Age...

October 2003 - Posts

Validator improvements in Whidbey

The lowly validator will be updated quite a bit in Whidbey.  First, there will be validator groups, allowing you ro have validators that only fire when controls in the same group that create submissions (like buttons) fire.  The Whidbey validator framework alos allows you to set a control to get focus when an error occurs. 

The group validator is perfect for forms where you dynamically create a number of user controls, and you want the button clicks to only validate the controls for the user control that contains them.  Doing that requires some other sort of validation in the current ASP.NET, since validation is fired for all validators whenever the form is submitted..   

Posted: Oct 29 2003, 08:06 PM by douglas.reilly | with 4 comment(s)
Filed under:
Editor Chages in Whidbey

Potentially lost in Andrews longer post on Whidbey changes for the ASP.NET developer, but deserving of special mention, is hte apility to collapse and expand HTML code.  So, imagine a long page with a number of tables.  If you are looking at just one table in particular, you can collapse all of the others and just concentrate on the one you want.  The same logic applies to collapsing TD or TH elements (showing just the one you are interested in).  This is a huge help in visualizing the structure of the page.

I can't wait to be able to deploy these apps (ScottGu, if you are listening, any word on a GoLive license<g>).

Posted: Oct 28 2003, 06:11 PM by douglas.reilly | with no comments
Filed under:
New SQL CE stuff from PDC

Version 3 of SQL Server CE will eliminate a lot of the problems that developers have neen dealing with, working with SQL Server 2.  One of my greatest shocks when I first userd SQL Server CE was that if I left SQLCE Query up and connected to my database, when I ran my applicaiton that accessed it, I got a sharing exception.  No more with SQL Server CE 3 (Net yet available, due for Yukon B2 timeframe).

Also, the new Workbench allows you to run SQL CE queries on your handheld from the desktop, and more important, can show the execution plan, and accept hints (implemented slightly differently than on Sql Server).

The bad news?  Still no stored procedures, so it is still likely the database layer will have to be seriously refactored for Pocket PC use.

Another reason not to deploy Debug code...

In the CLR Internals class today, Jeff Richter gave a great deal of really good information.  One thing that I should have figured, but did not really know was about the impact of running Debug code on Garbage Collector performance.  Say you have code like this:

public void foo()
{
   BigOb big;
   big=new BigOb();
   System.Console.WriteLine("Big is Really big! {0} ",big.GetSize());
   // 1.
   LongSlowOperation();
   // 2.
}

The C++ programmer in me says that big will be in scope until just after the curly brace below the comment 2.  Turns out that in release mode, the big object will be available for garbage collection at the 1 comment (because the framework can tell that it is not referenced again in the code) unless the code is debug code.  In that case, the object will be available and not garbage colected as a convenience for you while debugging.  In most cases the difference may not be critical, but it just might in some cases.

Consider yourself warned<g>.

Interesting CLR Tricks...

From the CLR Internals talk at PDC, a really useful tidbit. 

Create a module with a call early to System.Diagnostics.Debugger.Launch.  Create a method that does not get called until after the call to Launch.

Compile the assembly, using /debug:pdbonly switch.  This tells the compiler to create the PDB, but otherwise creates code that is release mode.

When the code hits the Launch() call, the debugger pops up.  Because of the way the JIT compiler works (compiling on the first call to a method) when you call a method not previously called) the code the JIT emits will be debug code, since it knows you are in the debugger, and since you have the pdb lying around, you are in business.  Very cool.

(Note to folks at PDC, CLR Internals talk is amazing so far.  I am sitting way in the back against the wall).

 

PDC Bound Tomorrow early AM!

I will be heading to Newark Airport tomorrow, leaving home at 6:15 or so with Jason, and am looking forward to the events of the week to come.

Travel these days is a lot better than it used to be, in many respects.  Remote access is easier, VPN's and wireless networks make travel when you need to support systems lots better than it used to be.  How many of you PDC'ers will be “on“ while you are at PDC (meaning, the primary contact for one or more systems that are important to your employer or clients)?

 

EWeek Article on Blogging, Scoble
Here is an article in eWeek about blogging in general and the interactions with blogging, corporations, and the bloggers who work for them. The Scoblizer Weblog is prominently mentioned.  Even with the standard disclaimer, does your company care if you Blog?
A PDC Shirt!

Jeff sent me a great T-Shirt for being a PDC Blogger. Very cool! This is a link to Corey Gouker's log with a picture of the shirt...

Can't wait! 

Conditional Operator in C#

Rachel writes about the IIF operator in VB.NET.

An equally useful operator exists in C#, called the Conditional Operator.  A common pattern (and one of the few places I use this operator) is this sort of thing:

public string Foo
{
get { return ViewState["Foo"]==null ? string.empty : ViewState["Foo"].ToString(); }
set { ViewState["Foo"]=value; }
}

The operator is an odd one, that consists of an expression that evaluates to true or false, a question mark, the value to return if the expression is true, followed by the value to return if the expression is false.

In this example, I am simply trying to return either the value from ViewState, or an empty string (rather than a null).

Happy coding!

Posted: Oct 08 2003, 07:25 PM by douglas.reilly | with 3 comment(s)
Filed under:
Lying to get a job

I have a friend who has been out of work for about a year on and off. He was laid off from a well known hi-tech firm, doing software testing (but doing it using an internally created test system that prepared him for no other environment).

Turns out that over the last year or so, he has on a couple of occasions applied to a particular firm for the same position.  This most recent time he for the first time got an interview and the job.  What was different this time?  He lied on his resume.  Inflating his experience or past salary?  Quite the opposite!  He minimized his experience, using a lower job title for his last position, and gave a lower salary in his salary history.

Is this a trend?  Of course, he got the job for a lot less than his previous very well paying job, but after a year of nothing more than some gigs at Target and the Dollar Tree, he is happy to have it.

Crazy world. 

More Posts Next page »