<feed version="0.3" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://purl.org/atom/ns#" xml:lang="en-US"><title>This blog has moved!</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/default.aspx" /><tagline type="text/html">Check out &lt;a href="http://www.codebetter.com/blogs/grant.killian"&gt;www.CodeBetter.com/blogs/grant.killian&lt;/A&gt;</tagline><id>http://dotnetjunkies.com/WebLog/grant.killian/default.aspx</id><author><url>http://dotnetjunkies.com/WebLog/grant.killian/default.aspx</url></author><generator url="http://communityserver.org" version="1.0.1.50214">Community Server</generator><modified>2004-11-17T10:20:00Z</modified><entry><title>Leaving .Net Junkies . . .</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2005/01/27/48686.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:48686</id><created>2005-01-27T05:38:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;DNJ broke new ground in the .Net community.&amp;nbsp; What a great forum for ideas and getting involved with .Net.&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://dotnetjunkies.com/WebLog/DonnyMack/"&gt;&lt;FONT face=Arial size=2&gt;Donny Mack&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; and &lt;/FONT&gt;&lt;A href="http://dotnetjunkies.com/WebLog/DougSeven/"&gt;&lt;FONT face=Arial size=2&gt;Doug Seven&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; pioneered a great .Net portal and I'd love to buy them a beer sometime!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;That being said, I'm moving my blog to &lt;/FONT&gt;&lt;A href="http://www.CodeBetter.com"&gt;&lt;FONT face=Arial size=2&gt;CodeBetter.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; (specifically &lt;A href="http://codebetter.com/blogs/grant.killian/"&gt;http://codebetter.com/blogs/grant.killian/&lt;/A&gt;&amp;nbsp;for a few reasons:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://codebetter.com/blogs/brendan.tompkins/"&gt;&lt;FONT face=Arial size=2&gt;Brendan&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; and &lt;/FONT&gt;&lt;A href="http://codebetter.com/blogs/darrell.norton/"&gt;&lt;FONT face=Arial size=2&gt;Darrell&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt;, two good friends of mine, established CodeBetter.com to give us a bit more control over the signal-to-noise blog ratio, more creative license, and more power over the framework (a war on comment spam, anyone?)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;DNJ perf and reliability has really suffered (victim of its own success!), making it tougher to post&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;It's going to save me 15% on my car insurance&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;One of those reasons isn't true, but the other two are true; I'll let you be the judge.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Thanks for everything DNJ!&amp;nbsp; See you at &lt;A href="http://www.CodeBetter.com"&gt;CodeBetter.com&lt;/A&gt;!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;-&lt;A href="http://codebetter.com/blogs/grant.killian/ "&gt;Grant&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=48686" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Insecure Christmas Shopping: Am I Taking Crazy Pills?</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/22/38382.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:38382</id><created>2004-12-22T18:31:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;I've done a lot of Christmas shopping online this year.&amp;nbsp; It's perfect for the gift giving I like to do: I prefer to give &lt;EM&gt;experiences&lt;/EM&gt; instead of &lt;EM&gt;products &lt;/EM&gt;because most of the people I shop for don't need more material possessions.&amp;nbsp; It's all &lt;/FONT&gt;&lt;A href="http://en.wikipedia.org/wiki/Samsara"&gt;&lt;STRONG&gt;&lt;FONT face=Arial size=2&gt;samsara&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; anyway, right?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I've found that many of these &lt;EM&gt;experiential&lt;/EM&gt; type places are small and don't pay attention to online security.&amp;nbsp; They're asking for credit cards etc without SSL certificates.&amp;nbsp; &lt;STRONG&gt;That's credit card info in plain text, everyone!&amp;nbsp;&lt;/STRONG&gt; I recall two sites in particular because I called them on the -gasp- telephone to buy gift certificates &amp;#8220;securely&amp;#8221;&amp;nbsp;instead of over the internet:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;Gold Lake Spa (&lt;A href="http://goldlake.secure-shops10.com/view_category.asp?cat=32"&gt;http://goldlake.secure-shops10.com/view_category.asp?cat=32&lt;/A&gt;)&lt;/FONT&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;Great place to relax and visit, terrible place to shop &amp;#8220;securely&amp;#8220; despite the word &amp;#8220;secure&amp;#8220; in the URL.&amp;nbsp; It doesn't work with https, either, so this is clearly a case of somebody not spending a few hundred bucks to secure their shoppers' experience.&amp;nbsp;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;St Elmo Hotel (&lt;A href="http://www.stelmohotel.com/gift-certificates.html"&gt;http://www.stelmohotel.com/gift-certificates.html&lt;/A&gt;)&lt;/FONT&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;Another fine Colorado mountain escape, but no SSL on that form action.&amp;nbsp; Submit at your peril!&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;When I spoke to these places, they were all &lt;STRONG&gt;very &lt;/STRONG&gt;concerned that I didn't want to enter my payment information through their website -- they both explained that they never had anyone comment about&amp;nbsp;SSL and that they figured their sites were as secure as amazon.com.&amp;nbsp; In the words of the great movie Zoolander: Am I Taking CRAZY Pills?&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I guess I can't really fault the hotel owners, it's whoever&amp;nbsp;set the sites up and gives them technology advice that are really at fault.&amp;nbsp; As a public service, I'm linking to a &lt;A href="http://info.ssl.com/ssl_kb/article.aspx?id=10068"&gt;good summary of how you can tell if you're in a secure online shopping situation&lt;/A&gt;.&amp;nbsp; Most shared hosting solutions have very reasonable SSL shopping plans, so just because you're a small business doesn't mean you can't be secure.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I suppose I need all the SSL caveats here, to head some of you commenters off at-the-pass:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;SSL does not guarantee 100% privacy, but it is the standard for secure online communications and relied on by the majority of online businesses.&amp;nbsp; I read a &lt;A href="http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=Ft1vk6dARG&amp;amp;isbn=0312995423&amp;amp;itm=4"&gt;Dan Brown book about web security&amp;nbsp;to the contrary&lt;/A&gt;, but he's a fiction writer after all . . .&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;Yes, I realize my telephone calls could have been intruded upon and somebody could have stolen my credit card info that way.&amp;nbsp; &lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;Yes, I realize my credit card info could be abused by whoever takes my phone call on the other end of the line.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;While I realize the odds of somebody &lt;A href="http://www.effetech.com/sniffer/"&gt;intercepting HTTP packets&lt;/A&gt;&amp;nbsp;to grab credit card information is slim, it's&amp;nbsp;all in plain text&amp;nbsp;for anybody to see if you aren't in an SSL session.&amp;nbsp; This is 2004 and the internet and internet consumers should be mature enough to know secure from insecure.&amp;nbsp; Maybe I'm still up&amp;nbsp;&lt;A href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/06/29/17880.aspx"&gt;in my ivory tower&lt;/A&gt;&amp;nbsp;and expecting too much from the public.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=38382" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>My 2 Cents on MapPoint</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/17/37526.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:37526</id><created>2004-12-17T09:29:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;A href="http://dotnetjunkies.com/WebLog/bsblog/archive/2004/12/17/37490.aspx"&gt;Brendan Tompkins praises MapPoint Web Services&lt;/A&gt;; I like the product too, but I'm not sure about the price point (our usage is small enough right now that our MSFT partner status lets us use it for free).&amp;nbsp; We'll have to see how that shakes out.&amp;nbsp; The functionality is outstanding.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;There's a &lt;A href="http://blogs.msdn.com/cthota/"&gt;MapPoint blog&lt;/A&gt; available, too.&amp;nbsp; It's got lots of tips for MapPointers out there.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=37526" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Javascript Nostalgia</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/10/35992.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:35992</id><created>2004-12-10T09:33:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;I have a real soft spot for doing things other people think are hard (or better yet, impossible!); this doesn't mean I always succeed, but it does&amp;nbsp;mean I&amp;nbsp;usually want to accomplish what others think &amp;#8220;cannot be done.&amp;#8221;&amp;nbsp; While sometimes that means&amp;nbsp;challenges&amp;nbsp;like &lt;/FONT&gt;&lt;A href="http://www.terra-venture.com "&gt;&lt;FONT face=Arial size=2&gt;this goal for 2006&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt;,&amp;nbsp;this tendency of mine really plays well in the software development field.&amp;nbsp; For example, I cooked up some web drag-and-drop cross-browser javascript code a few years ago &lt;STRONG&gt;and probably more importantly&lt;/STRONG&gt; used it as a relevant and intuitive situation in an application (for selecting and sorting from many different types of options).&amp;nbsp; It involved a lot of conditional logic based on browser testing and so on; I really got my DIV tag on back then.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I came across this &lt;A href="http://www.codelifter.com/main/javascript/dragablelayer.html"&gt;cross-browser javascript code for drag and drop&lt;/A&gt;&amp;nbsp;from etLux that had me waxing nostalgic over those good old days of javascript mayhem.&amp;nbsp; etLux's effort is solid and, based on my testing, runs great on Windows OS with Netscape 4 (yes, I still have that!), Mozilla, and Internet Explorer.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I can't find my javascript library for this, but now I&amp;nbsp;don't have to thanks to etLux's contribution.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=35992" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Local Alphabet Soup Social Courtesy of Microsoft</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/08/35719.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:35719</id><created>2004-12-08T19:34:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;Microsoft had a nice end-of-year social for area user group&amp;nbsp;organizers&amp;nbsp;tonight; not just developer focused user groups, but a wide spectrum of technology related groups.&amp;nbsp; I had a chance to talk a bit with some folks from &lt;/FONT&gt;&lt;A href="http://www.aitp-hr.com/"&gt;&lt;FONT face=Arial size=2&gt;AITP&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; and &lt;/FONT&gt;&lt;A href="http://www.itpa-hr.org/"&gt;&lt;FONT face=Arial size=2&gt;ITPA&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;-- a bit of alphabet soup, right?&amp;nbsp; It gets better, though, as some folks from &lt;/FONT&gt;&lt;A href="http://www.pmihr.org/"&gt;&lt;FONT face=Arial size=2&gt;PMI&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; were there too.&amp;nbsp; I'm not sure, but I might be leaving out a few acronyms.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I didn't realize the subtle difference in subject matter for the groups before tonight; in my mind, there was &amp;#8220;developer focused&amp;#8221; groups like &lt;A href="http://www.WeProgram.Net"&gt;WeProgram.Net&lt;/A&gt; and &lt;A href="http://www.HRSSUG.org"&gt;HRSSUG&lt;/A&gt;&amp;nbsp;and &amp;#8220;all the other ITPro sort of stuff.&amp;#8221;&amp;nbsp; It was good for me to begin to see the different facets of each group and know that there's more technology organizations in the Hampton Roads area.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;We may pursue some multi-group efforts in 2005, even it's just social stuff.&amp;nbsp; It was great for Kelly from Microsoft to bring us all together for a few hours -- and for her sister to answer the last minute catering call!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I also had a good chat with a WeProgram.Net regular (and user group connoiseur), Greg P.&amp;nbsp; On the West Coast, Greg ran&amp;nbsp;a Delphi user group and he has a lot of experience with community building.&amp;nbsp; We discussed the challenges and rewards of being active in a local programming community -- and how such a small percentage of developers seem to invest time in the user group space.&amp;nbsp; It's a shame as it's a really underutilized resource in Hampton Roads.&amp;nbsp; I guess that's a call to action for us user group organizers, right?&amp;nbsp; We need to find better ways to reach out and get people involved.&amp;nbsp; Microsoft and INETA have built a good framework for our efforts, and Microsoft is more active in our area (with presentations etc) than ever before.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=35719" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Post MSDN Event "Pub Club" Tuesday, Dec 14th in Newport News VA</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/07/35463.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:35463</id><created>2004-12-07T12:49:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;The story for next Tuesday keeps getting better.&amp;nbsp; We've already got the &lt;/FONT&gt;&lt;A href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/02/34638.aspx"&gt;&lt;FONT face=Arial size=2&gt;MSDN event&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; starting at 1 PM at the Regal Cinemas in Newport News (near Kiln Creek), and now I learn that &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/gsnowman/"&gt;&lt;FONT face=Arial size=2&gt;Geoff Snowman&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; and Microsoft will be hosting a casual &amp;#8220;pub club&amp;#8221; after the formal presentations at 2nd Street Restaurant -- probably starting&amp;nbsp;shortly after 5 PM.&amp;nbsp; Sounds like a great chance to get to know your fellow .Netters a little better (and since it is a social event, I'm thinking &lt;/FONT&gt;&lt;A href="http://dotnetjunkies.com/WebLog/bsblog/"&gt;&lt;FONT face=Arial size=2&gt;Brendan Tompkins&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; might&amp;nbsp;make an appearance).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.secondst.com/local.html"&gt;&lt;FONT face=Arial size=2&gt;Here are directions to 2nd St&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;in Newport News; I understand Microsoft will be ordering some snacks but not providing the beer -- you're responsible for that end of the bargain.&amp;nbsp; If I only would've saved my &lt;A href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/05/24/14379.aspx"&gt;MSDN and INETA tequila from TechEd&lt;/A&gt;, this could've been the perfect chance to break it out!&amp;nbsp; Oh well, there's always next year . . .&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I'm looking forward to meeting up with some of you next week!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=35463" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>One step in the pursuit of fast executing .Net code</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/03/34834.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:34834</id><created>2004-12-03T05:44:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;We observed sluggish performance in some &amp;#8220;proof of concept&amp;#8220; code yesterday; I pealed back the layers of the onion to find what optimizations I could make.&amp;nbsp; Of course, measurement is a key to doing code optimization; it's how you quantify any progress you're making!&amp;nbsp; I've had success with the Win32 API for &lt;FONT color=#000000&gt;QueryPerformanceCounter (&lt;A href="http://support.microsoft.com/kb/306979/EN-US/"&gt;this Microsoft KB article breaks basic usage of QueryPerformanceCounter&amp;nbsp;down succinctly&lt;/A&gt;); you could try something with System.DateTime, but the resolution isn't really there for accurate measurement &lt;STRONG&gt;unless you're working with really slow code&lt;/STRONG&gt;.&amp;nbsp; If you're serious about analyzing the duration code takes to execute, I'd get comfortable with QueryPerformanceCounter and consider wrapping it into a quick CodeTimer class for ease of reuse.&amp;nbsp; Besides, you get to add those slick DllImports and Kernel32 calls to your code!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;This particular sluggish code was easy to tune: I replaced inline SQL with parameterized stored procs and, where appropriate, combined SQL statements together to minimize the calls to the database.&amp;nbsp; The result was much quicker and, incidentally, more secure and maintainable (stored procs are superior to inline sql in nearly every way!) -- the standard sort of thing you do when turning proof-of-concept code into something more production-ready.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I should note that an optimization that &lt;EM&gt;didn't&lt;/EM&gt; improve the performance was switching &lt;EM&gt;foreach(x in y)&lt;/EM&gt; blocks with standard &lt;EM&gt;for(i=0;i&amp;lt;n;i++) &lt;/EM&gt;syntax; many sources will include this optimization as a slightly quicker way to iterate over your collections.&amp;nbsp; In this case, the loop wasn't executed enough times to factor into the bigger picture.&amp;nbsp; Again, the only way I know this is because I had a quantifiable way to &lt;STRONG&gt;measure&lt;/STRONG&gt; the duration of the executing code -- just eye-balling it or casually observing my human perception of code performance is completely inadequate for the task.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;This is just one tactic in the pursuit of fast executing .Net code.&amp;nbsp; There are numerous other (and often more significant!) steps to take, including hardware monitoring, network traffic analysis, garbage collection inspection (&lt;A href="http://www.Wintellect.com"&gt;John Robbins from Wintellect&lt;/A&gt;&amp;nbsp;first turned me on to this -- check out the &lt;A href="http://www.wintellect.com/weblogs/wintellect/"&gt;Wintellect group blog&lt;/A&gt; for their latest insights), and many &lt;STRONG&gt;many&lt;/STRONG&gt; more.&amp;nbsp; There are whole books on the subject, in fact.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;So, get comfortable with QueryPerformanceCounter to time your code, but don't rely on it exclusively for optimizing your applications.&amp;nbsp; Think of QueryPerformanceCounter as a screwdriver in the much bigger toolbox of improving .Net code perf -- it's a very useful tool but not the end-all-be-all of tools.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=34834" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>VA MSDN Events for December</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/12/02/34638.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:34638</id><created>2004-12-02T06:23:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;Microsoft's DCC &lt;A href="http://blogs.msdn.com/gsnowman/"&gt;Geoff Snowman&lt;/A&gt; just shared two free upcoming MSDN events for .Net developers:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Newport News: &lt;/FONT&gt;&lt;A href="http://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-US&amp;amp;EventID=1032258622"&gt;&lt;FONT face=Arial size=2&gt;http://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-US&amp;amp;EventID=1032258622&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;Chester: &lt;/FONT&gt;&lt;A href="http://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-US&amp;amp;EventID=1032258636"&gt;&lt;FONT face=Arial size=2&gt;http://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-US&amp;amp;EventID=1032258636&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;There both in mid December, so check them out if you can break free of your end-of-year work committments and come out to learn about OO in .Net, MapPoint, and ASP.Net 1.1 and the upcoming 2.0 release.&amp;nbsp; I know Microsoft pays attention to turnout at these &amp;#8220;secondary locations&amp;#8220; -- we're hardly a Washington DC or New York City -- so if a good number of developers come out we'll likely see more events around here.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I'll be staffing a &lt;A href="http://www.WeProgram.Net"&gt;WeProgram.Net&lt;/A&gt; user group table at the Newport News event; Susan or another representative from the &lt;A href="http://www.HRSSUG.org"&gt;Hampton Roads SQL Server User Group&lt;/A&gt; may be joining me.&amp;nbsp; Chester is closer to Richmond so I'm not sure what community involvement you'll see up there.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&amp;lt;guilt target=&amp;#8220;Brendan Tompkins&amp;#8220;&amp;gt;I'm taking bets whether Brendan Tompkins will show at this event.&amp;nbsp; He's participated in all the WeProgram.Net fun events, like the cricket match and the bloggers dinner, but he hasn't attended any actual WeProgram.Net meetings.&amp;nbsp; This MSDN event could be a breakthrough for BT!&amp;lt;/guilt&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Hope to see you there!&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=34638" width="1" height="1"&gt;</content><slash:comments>1</slash:comments></entry><entry><title>A Proud Hungarian [Notation] Heretic</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/30/34321.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:34321</id><created>2004-11-30T10:38:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;If I still use Hungarian Notation, am I a programming pariah?&amp;nbsp; A Hungarian heretic?&amp;nbsp; Part of the Axis of Programming Evil?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Here is why I use Hungarian Notation (HN):&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;I can quickly determine the type of a variable by glancing at it (I don't have to hover over the variable with the mouse or anything)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;I can quickly determine the scope of a variable by glancing at it (the _ for class level, etc).&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;Our existing code base uses it, and I'm anal about consistency and code uniformity&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;I've been doing it for so long I seem to &amp;#8220;think&amp;#8220; in HN; it comes naturally to me&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I know HN is out of fashion and critics say it obscures the meaning of the code.&amp;nbsp; I've always been a contrarian so I don't care if &amp;#8220;all the other cool programmers&amp;#8220; use a style that I don't; and I don't feel it obscures my code.&amp;nbsp; Given the following code that doesn't use HN:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;DataObject.Save( name, birthday ) ;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;It may be close to real English, but my analytical side wants more structure. &amp;nbsp;I wonder: is &amp;#8220;name&amp;#8220; a string?&amp;nbsp; a structure encapsulating&amp;nbsp;both first and last names as strings? a more complex object with first,&amp;nbsp;middle, and last&amp;nbsp;name strings . . .&amp;nbsp;along with culture info etc?&amp;nbsp; As for &amp;#8220;birthday&amp;#8221; the possibilities are more numerous: a&amp;nbsp;DateTime?&amp;nbsp;&amp;nbsp;a simple&amp;nbsp;Date?&amp;nbsp; a verbose string&amp;nbsp;for a date (like&amp;nbsp;Tuesday, November 30th 2004); it could even be a boolean indicating if the birthday is today or not.&amp;nbsp; You get the idea.&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;So, revisiting this with Hungarian Notation we could have:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;DataObject.Save( strName, dtmBirthday ) ;&amp;nbsp; //string and datetime&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;or&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;DataObject.Save( strName, dteBirthday ) ;&amp;nbsp; //string and date (not using time component)&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;or&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;DataObject.Save( strName, blnBirthday ) ; //string and boolean&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;And so on . . .&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;Now, I don't discredit other coding methods -- I'm just explaining my position on Hungarian Notation.&amp;nbsp; Use what you're most productive in (even &lt;A href="http://www.kli.org/tlh/pIqaD.html"&gt;Klingon Notation&lt;/A&gt; if you want -- which reminds me of this great&amp;nbsp;&lt;A href="http://weblogs.asp.net/cnagel/archive/2004/07/03/172423.aspx"&gt;Klingon post&lt;/A&gt; from a while back). &amp;nbsp;I think the key element to a coding style is consistency.&amp;nbsp; When maintaining code written by others, I can get up to speed quickly when there was &lt;EM&gt;some&lt;/EM&gt; standard employed.&amp;nbsp; If you don't do it for yourself, then &lt;STRONG&gt;think of the children&lt;/STRONG&gt;.&amp;nbsp; Those who come after you will thank you for it.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;I just finished some enhancements to an application written by another company; the app was well designed.&amp;nbsp; Yes, I avoid jumping on &amp;#8220;the previous people who worked on this sucked!&amp;#8220; bandwagon . . . unless they really sucked, that is.&amp;nbsp;&amp;nbsp;It was smooth sailing &lt;STRONG&gt;except&lt;/STRONG&gt; for their failure to name user interface controls in any style -- they just left the designer defaults so we had a huge array of Textboxes named TextBox1(n) or&amp;nbsp;TextBox1, TextBox2&amp;nbsp;and so on for 30 or more controls (it was a good old tabbed user interface, so lots of room for controls).&amp;nbsp; This was pervasive throughout the whole 25+ form application.&amp;nbsp; And no, I don't think leaving controls named to their defaults to be a &amp;#8220;style.&amp;#8220;&amp;nbsp; That's just lazy.&amp;nbsp; Give me a &amp;#8220;txtTitle&amp;#8220; and &amp;#8220;txtSSN&amp;#8220; any day!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=34321" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Cheap MSFT Exam Vouchers</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/24/33420.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:33420</id><created>2004-11-24T07:49:00Z</created><content type="text/html" mode="escaped">&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/0789732025/qid=1101311117/sr=8-1/ref=pd_csp_1/102-7061235-8958533?v=glance&amp;amp;s=books&amp;amp;n=507846"&gt;&lt;FONT face=Arial size=2&gt;Amazon is selling Microsoft exam vouchers&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; for the lowest price I've seen -- unless you get them through your company connections etc.&lt;/FONT&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=33420" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Bad Experience With Infragistics &amp; Viral Marketing</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/23/33265.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:33265</id><created>2004-11-23T11:51:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;Through &lt;A href="http://www.WeProgram.Net"&gt;WeProgram.Net&lt;/A&gt; and &lt;A href="http://www.INETA.org"&gt;INETA&lt;/A&gt;, I get sent a lot of software to evaluate or experiment with; sometimes this includes a fully licensed version of the product.&amp;nbsp; Vendors hope I like the product and help to generate a positive buzz&amp;nbsp;for their tool.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Through TechEd 2004, INETA, or some other completely legit source I got a fully licensed Infragistics user-interface suite.&amp;nbsp; I installed the product in June and explored the samples and thought &amp;#8220;&lt;EM&gt;Hm, looks interesting.&amp;nbsp; Next time I'm not doing a plain vanilla user-interface, I should maybe check this out&lt;/EM&gt;.&amp;#8221;&amp;nbsp; Well, it's November and that time is now . . . I've got a need for a nice numeric up-down control and Infragistics should be the magic bullet . . . but I can't sort through the Infragistics run-time dependencies to make it work on anything besides the demo application installed many months ago.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;So, instead of finding how easy and intuitive the Infragistics&amp;nbsp;controls are to work with, I'm confronted with how &lt;EM&gt;brittle&lt;/EM&gt; the Infragistics configuration and setup is to a new user.&amp;nbsp; I find out how&amp;nbsp;tough it is to get support (unless you pay for support -- but since they&amp;nbsp;gave this license to me free I don't have any payment record), particularly when you don't have the physical license key you installed the product with (remember, that was last June and the Infragistics box didn't live through our &lt;A href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/19/32780.aspx"&gt;recent office move&lt;/A&gt;).&amp;nbsp; I find out how their Knowledge Base search doesn't contain anything for the &amp;#8220;Can't Init Editor&amp;#8220; error&amp;nbsp;message I get in the web status bar at runtime.&amp;nbsp; I find out things like their web Newsgroup area isn't &lt;A href="http://www.FireFox.com"&gt;FireFox&lt;/A&gt; compatible.&amp;nbsp; Finally, I glance at the clock and realize I've spent 120 minutes trying to get Infragistics to run outside of their demo application and I probably could've coded my own numeric up-down control in that time!&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;You might say that &lt;STRONG&gt;beggars can't be choosers&lt;/STRONG&gt;, but if a company is after viral marketing by distributing free licenses of their tools . . . they need to make sure they have a plan for supporting those free licenses or the viral marketing could turn against them.&amp;nbsp; Infragistics supports the &lt;A href="http://www.WeProgram.Net"&gt;WeProgram.Net&lt;/A&gt; user group and that's great, but I've wasted enough energy on their complimentary copy.&amp;nbsp; I've gotta go roll my own up-down control . . .&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=33265" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Canadian work STOPpage STARTS a lot of work for me</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/22/33149.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:33149</id><created>2004-11-22T20:03:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;Too bad there isn't a &lt;A href="http://www.dependencywalker.com/"&gt;Dependency Tool&lt;/A&gt; for non-programmatic dependencies!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;The &lt;/FONT&gt;&lt;A href="http://www.ups.com/content/ca/en/about/news/work_stop_ca.html"&gt;&lt;FONT face=Arial size=2&gt;Work Stoppage for UPS Canada&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; created a lot of high stress work today with our ecommerce customers and, specifically, the code that calculates shipping dynamically with UPS.&amp;nbsp; Whew.&amp;nbsp; We've got a few big customers who do a ton of online business around the holidays and this Canadian labour issue blind-sided us; I guess the lesson is to stay tuned in to &lt;EM&gt;all&lt;/EM&gt; your application dependencies . . . code-based and otherwise.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I suppose this boosts the priority of the &lt;STRONG&gt;integrate with FedEx&lt;/STRONG&gt; line item on the todo list.&amp;nbsp; It's not as cut-and-dried as it sounds because UPS has a nice package called &lt;A href="http://www.ups.com/content/us/en/bussol/offering/technology/automated_shipping/worldship.html"&gt;WorldShip&lt;/A&gt; that automates package labeling and tracking numbers etc.&amp;nbsp; We've got a few nice integration points with UPS WorldShip and, frankly, we've not seen the necessity to pursue FedEx integration -- we'll see where things stand in a week or so but I may be exploring the FedEx integration options very soon.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=33149" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry><entry><title>Developer Office Decor Help</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/19/32780.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:32780</id><created>2004-11-19T13:21:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;We're in the process of moving our offices and my new workspace has two features I'm really psyched about: a set of windows (yes, multiple windows) and a door I can close to be free of distractions.&amp;nbsp; I haven't had a door on my office for years (since I moved from DC) and I already feel more secluded and, in my opinion, productive.&amp;nbsp; I may stop working from home so much now that I can concentrate better at the office.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;My&amp;nbsp;new office is, however, bereft of any decorations or furnishings besides&amp;nbsp;a desk, computer, chair, and a big whiteboard.&amp;nbsp; &lt;STRONG&gt;I'm looking for suggestions &lt;/STRONG&gt;for ways to turn my space into something fun but still productive.&amp;nbsp; I have 100% artistic license, meaning I can paint, drill, weld, or whatever it takes (we own the building so there's no landlord and we'll likely be here for ever).&amp;nbsp; I've only got about&amp;nbsp;200 sq feet, so space is a big issue.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;I have&amp;nbsp;a blue&amp;nbsp;&lt;/FONT&gt;&lt;A href="http://www.metoliusclimbing.com/simulator.htm#Simi%20Features"&gt;&lt;FONT face=Arial size=2&gt;training board for climbing&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt; which I'll likely put above the door, but I'm seriously considering putting a &lt;/FONT&gt;&lt;A href="http://www.adackclimbs.com/bouldering_wall/bouldering_wall.htm"&gt;&lt;FONT face=Arial size=2&gt;full bouldering wall in&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt;.&amp;nbsp; The ceiling is sloped at a 45 degree angle; 10 feet high at the shortest point, 20 feet high at the tallest point.&amp;nbsp; It would be cool and a great way to take a break from thinking too much about code.&amp;nbsp; The downside to the bouldering wall is &amp;#8220;how much use will you really get out of that?&amp;#8221;&amp;nbsp;and &amp;#8220;what if I fall and break lots of stuff?&amp;#8221;&amp;nbsp;I don't know the answer, but I'm tempted to try it and see . . .&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Other things I've thought of include plants, a water fountain, fish tank, comfy furniture, some lamps (right now it's overhead fluorescent lighting), etc.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face=Arial size=2&gt;Please send me any thoughts you have on personalizing this 200 sq feet of developer space!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=32780" width="1" height="1"&gt;</content><slash:comments>1</slash:comments></entry><entry><title>Stop baking strings for UI display into your code</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/19/32776.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:32776</id><created>2004-11-19T12:47:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;I like resource files.&amp;nbsp; I can put all the strings that are displayed to the user in my application into one easily modified resource file.&amp;nbsp; How many times do you demo an application and the customer says: "can you change this message to say &lt;STRONG&gt;&lt;FONT color=#000080&gt;&lt;EM&gt;X&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt; instead"; or worse: "There's a typo in this text."&amp;nbsp; Customers often have long lists of these sorts of minor changes to the text of an application.&amp;nbsp; Instead of using search and replace, which can involve touching many different pieces of the application (and trigger a new round of &lt;A href="http://fitnesse.org/FitNesse.WhatIsFitNesse"&gt;unit and/or acceptance testing&lt;/A&gt;) if you've used a resource file to store these strings you can make all the modifications in one place without impacting any source code -- sort of like a configuration file for application constants.&amp;nbsp; The kicker is you can compile alternate versions of the "constant files" and substitute them into your application without having to recompile the whole thing.&amp;nbsp; MSDN has the steps on &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcreatingresourceassemblies.asp"&gt;how to create a "resource assembly"&lt;/A&gt; as this compiled external resource file is known.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;If you're just getting started with resource files, it's easy.&amp;nbsp; Add a file of type "resx" to your VS.Net project (in the New File dialog box for VS.Net it's under Add-&amp;gt;New Item-&amp;gt;Resources-&amp;gt;Assembly Resource file.&amp;nbsp; VS.Net presents the resx file in Data or XML view, the Data view is easiest for entering simple strings of text.&amp;nbsp; The "Name" column is the "Key" with which you'll lookup your strings; the "Value" column is the string associated with the key.&amp;nbsp; This tabular view in VS.Net makes working with these strings a breeze.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Once you've got a test string in there, your code can access the strings by creating an instance of the ResourceManager type (add a reference to System.Resources):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static ResourceManager resMgr = &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new ResourceManager( typeof( myClass ).Namespace + ".ResourceFileName",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assembly.GetAssembly( typeof( myClass ) ) ) ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Note that this constructor takes two arguments: the name of the resource file (like Namespace.Class) and the assembly containing the resource file.&amp;nbsp; I'm using a little Reflection to dynamically determine the assembly name, but you could hardcode it, just be sure to reference the System.Reflection namespace to access the Assembly object from your code.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;In your code, to access a specific value from the resource file use:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resMgr.GetString( "MyKey" ) &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;You'll want to replace "MyKey" with the key in your resource file.&amp;nbsp; Now you can have your validation messages, exception handling text, etc all originate from a single resource file for ease of maintenance and sanity when it comes time to update or modify the text.&amp;nbsp; No more "magic strings" baked into the fabric of your code -- and for real decoupling of these resource files from your code, check out the &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcreatingresourceassemblies.asp"&gt;Resource Assembly&lt;/A&gt;&amp;nbsp;approach I referenced earlier.&amp;nbsp; Critics may point out that the &amp;#8220;Key&amp;#8220; of the Resource item is a form of baked-in string for your application -- but it's one that you will &lt;STRONG&gt;never&lt;/STRONG&gt; have to change and never is displayed to a customer, so in my opinion, that sort of baking is acceptable.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;This should be enough to get you started with Resources.&amp;nbsp; I will often create the ResourceManager in a base class so that I only have the ResourceManager declaration code etc in one spot in the project.&amp;nbsp; For example, I will derive every page in an ASPX applications from a custom page object (which inherits from the System.Web.UI.Page class), and this ResourceManager approach fits in well in that base class scenario.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=32776" width="1" height="1"&gt;</content><slash:comments>1</slash:comments></entry><entry><title>Time well forgotten</title><link rel="alternate" type="text/html" href="http://dotnetjunkies.com/WebLog/grant.killian/archive/2004/11/17/32488.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:32488</id><created>2004-11-17T10:20:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;&lt;FONT face=Arial size=2&gt;As I said in my previous post, I've been doing a lot of unmanaged windows development lately.&amp;nbsp; I started work on a proof-of-concept for a different project where I need to present a list of fonts for the user to select from.&amp;nbsp; My first thought was &lt;EM&gt;&lt;STRONG&gt;windows API here I come&lt;/STRONG&gt;&lt;/EM&gt;.&amp;nbsp; I scared up the following interop code:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;[DllImport( "gdi32", EntryPoint="EnumFontFamiliesEx" ) ] public static extern int EnumFontFamiliesExA( int hDC, ref LOGFONT lpLogFont, int lpEnumFontProc, int lParam, int dw ) &lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;Luckily for me I didn't pursue this route for long.&amp;nbsp; It dawned on me like a fresh pair of socks, all warm and snug from the dryer:&amp;nbsp;Microsoft has exposed a new set of APIs through the .Net framework that allows easier, object oriented access to resources like the available system fonts.&amp;nbsp; Duh!&amp;nbsp; A quick perusal of some documentation brought me to this:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;cboFont.DataTextField = "name" ;&lt;BR&gt;cboFont.DataSource = new System.Drawing.Text.InstalledFontCollection().Families ;&lt;BR&gt;cboFont.DataBind() ;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Arial size=2&gt;Ah, sweet nourishing System.Drawing.Text.InstalledFontCollection().Families.&amp;nbsp; It's going to take me a little while to forget the last month or so&amp;nbsp;of unmanaged debugging&amp;nbsp;. . . but it will be time well forgotten!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://dotnetjunkies.com/WebLog/aggbug.aspx?PostID=32488" width="1" height="1"&gt;</content><slash:comments>0</slash:comments></entry></feed>