Thursday, February 21, 2008

remember IE6

kind of goes along with the 1024x768 note: IE6 still accounts for 40% of our IE visits, and IE as a whole accounts for 80% of site visits. this means about 1 in 3 of all site visitors see what we do using IE6. this # is declining, but it’s still very much in play for now, so remember to check your work in IE6 in addition to IE7/Firefox. unfortunately, there are subtle differences in the IE rendering engines, and some things that work fine in IE7 just don’t in IE6.

when Firefox 3 comes out (fairly soon), we’ll have yet another browser to add to the make-sure-you-test-on list; ahhh, web development J

Wednesday, February 20, 2008

when doing GUI work, run your second monitor at 1024x768

remember that most of the world sees things very differently than we do, so make sure you frequently check your GUI work on a 1024x768 display; it’s still half of users. recent stats from our site:

1

1024x768

47.56%

2

1280x800

16.57%

3

1280x1024

10.05%

4

800x600

8.81%

5

1440x900

5.05%

Thursday, February 14, 2008

beware a Deleted flag on tables

some of our tables have a 'Deleted' flag, and a row cannot be considered to really be in a table unless the Deleted flag = 0. this means your joins will always have something like "t1.Id = t2.Id AND t1.Deleted = 0".

the design goal here was to keep some historical record of changes without the hassle of a history table, but it was really a bad idea since it’s way too easy to forget about when writing queries, and all indexes are irrelevant unless they start with the Deleted bit...

Thursday, February 7, 2008

vista shadow copies just saved me

vista keeps shadow copies of files and folders when it creates its daily restore points. so if you delete something accidentally, right-click on the folder and go to the “Previous Versions” tab; you can browse through the contents of the folder as it existed at the last restore point. there’s no fancy gui and you only get the last 2 restore points, but it got the job done--

Monday, February 4, 2008

chaining the C# ?? Operator

?? operator was news to me, Rick Stahl's blog is great: http://www.west-wind.com/weblog/posts/236298.aspx. snippet:

string value1 = null;
string value2 = "Test1";
string result = value1 != null ? value1 : value2;

which causes result containing Test1 or the second value.

In C# you can shortcut this special null comparison case with the new ??:

string result = value1 ?? value2;

Friday, January 25, 2008

debug .net library code

msft released the code to a whole bunch of .net libraries last week, Shawn Burke details the steps to take to see it:

http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx