<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<id>http://thomaskrehbiel.com/tech</id>
<title type="text">Krehbiel Tech</title>
<updated>2008-11-17T03:36:24Z</updated>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech" />
<link rel="self" type="application/atom+xml" href="http://thomaskrehbiel.com/tech/feed" />
<entry>
<id>http://thomaskrehbiel.com/tech/1687-fed_up_with_synctoy</id>
<title>Fed up with SyncToy</title>
<updated>2008-11-17T03:44:11Z</updated>
<published>2008-11-17T03:36:24Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1687-fed_up_with_synctoy" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1687-fed_up_with_synctoy"&gt;&lt;/a&gt;&lt;P&gt;I've been trying to use &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=c26efa36-98e0-4ee9-a7c5-98d0592d8c52&amp;amp;amp;displaylang=en"&gt;Microsoft's SyncToy&lt;/A&gt; for my directory synchronization tasks, and I'm just about fed up with it.&amp;nbsp; For reasons I can't fathom, it routinely "forgets" what to synchronize.&amp;nbsp;&amp;nbsp;I frequently synchronize to and from a USB stick, and I find that SyncToy usually wants to copy far more files than have actually been changed.&amp;nbsp; Like I'll make a couple of changes to some files on the stick,&amp;nbsp;and then for some reason SyncToy thinks it needs to re-copy all kinds of files from both the stick and the computer.&amp;nbsp; So I end up having to copy files manually from one side to another.&amp;nbsp; It's a bit aggravating.&lt;/P&gt;
&lt;P&gt;I guess I'm going back to &lt;A href="http://www.xs4all.nl/~lploeger/TreeComp3.htm"&gt;TreeComp&lt;/A&gt;, a freeware program I first used in about 2003.&amp;nbsp; It looks godawful but still works better and faster than anything I've seen.&amp;nbsp; We'll see how it goes on Vista.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/SyncToy" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1687-fed_up_with_synctoy/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1686-disabling_pluralization_in_visual_studio</id>
<title>Disabling Pluralization in Visual Studio</title>
<updated>2008-11-11T22:51:14Z</updated>
<published>2008-11-11T22:51:01Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1686-disabling_pluralization_in_visual_studio" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1686-disabling_pluralization_in_visual_studio"&gt;&lt;/a&gt;&lt;P&gt;I noticed with some concern&amp;nbsp;that the Visual Studio 2008 designer puts an "s" on the end of table names when it builds LINQ to SQL classes.&amp;nbsp; If you want to disable that, open Tools/Options, go to the Database Tools O/R Designer&amp;nbsp;page, and change "Pluralization of names" option to false.&lt;/P&gt;
&lt;P&gt;Note that if you have already generated pluralized classes, you have to force the designer to regenerate the classes by actually changing the names to some temporary value, build, then change them to what you really want and rebuild again.&amp;nbsp; Otherwise, if you leave the name the same, it assumes it doesn't need to regenerate&amp;nbsp;the classes.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/Tips" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1686-disabling_pluralization_in_visual_studio/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1685-azure_and_c_40_at_pdc</id>
<title>Azure and C# 4.0 at PDC</title>
<updated>2008-11-07T02:46:53Z</updated>
<published>2008-11-07T02:46:37Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1685-azure_and_c_40_at_pdc" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1685-azure_and_c_40_at_pdc"&gt;&lt;/a&gt;&lt;P&gt;Most of the buzz from &lt;A href="http://en.wikipedia.org/wiki/PDC_2008"&gt;Microsoft's PDC&lt;/A&gt; is about Azure and&amp;nbsp;C# 4.0.&amp;nbsp; I don't usually pay too much attention to bleeding edge Microsoft technology until it might actually be used in real-life situations, but I thought I'd break from tradition and peek at these two shiny new things.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/azure/default.mspx"&gt;Windows Azure Services&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There isn't a lot of concrete information available on Azure yet, so there isn't much to say about it.&amp;nbsp; Conceptually, it's a specialized web hosting service from Microsoft for your ASP.NET&amp;nbsp;web apps.&amp;nbsp;&amp;nbsp;It's specialized because it's designed for the large numbers of processors and mass storage requirements needed for large-scale enterprise applications (large-scale as in, for example,&amp;nbsp;Amazon or Facebook or Google).&lt;/P&gt;
&lt;P&gt;From a programmer perspective, I gather that the main difference from a regular web app&amp;nbsp;is that the details of the OS and hardware your application is running on is abstracted away from you.&amp;nbsp; For example, instead of your web app reading and writing files with the System.IO namespace, you'll use SQL Services to read and write "blobs."&lt;/P&gt;
&lt;P&gt;I personally can't think of any applications I might use Azure for.&amp;nbsp; (Do we really need another Amazon?)&amp;nbsp; It would have to be something mandated by a pointy-haired boss-type.&lt;/P&gt;
&lt;P&gt;As for the "cloud computing" part of it; well, I've &lt;A href="http://thomaskrehbiel.com/tech/1606-the_cloud"&gt;said before&lt;/A&gt; that I don't much care for cloud computing.&amp;nbsp; Besides all the privacy and data loss concerns, the bottom line is that "the cloud" is meant to make life easier for developers, not users.&amp;nbsp; As a user, I might store &lt;EM&gt;a copy &lt;/EM&gt;of something in the cloud for convenience, but I would never use the cloud as my main work area.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://code.msdn.microsoft.com/csharpfuture"&gt;C# 4.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Recall that C# 3.0 gave us query syntax, extension methods and the&amp;nbsp;"var" shortcut, and tried to change us to functional programmers with lambdas.&amp;nbsp;&amp;nbsp;With the possible exception of LINQ, I personally have not yet encountered a situation where I thought any of those things would make my code better.&lt;/P&gt;
&lt;P&gt;So what can we expect from C# 4.0?&amp;nbsp; Among other things, dynamic types.&amp;nbsp; That's right,&amp;nbsp;in the continuing effort to put back all the bad things we didn't like about&amp;nbsp;VBScript and C, the variant and void* is back.&amp;nbsp; For all those people who simply can't decide how to declare your variables, you can now circumvent all pre-planning and simply write, "void myfunction( dynamic&amp;nbsp;myparam )".&amp;nbsp; Is that parameter a string?&amp;nbsp; Is it an int?&amp;nbsp; Is it a custom object?&amp;nbsp; Is it an array?&amp;nbsp; Who knows?&amp;nbsp; Guessing is half the fun!&lt;/P&gt;
&lt;P&gt;I kid of course.&amp;nbsp;&amp;nbsp;You could assume it's an object of some kind.&lt;/P&gt;
&lt;P&gt;I'm sure there are&amp;nbsp;situations where it is more convenient to use "dynamic" than an interface.&amp;nbsp; (Just like there were plenty of occasions to use void* types and variants.)&amp;nbsp; Offhand, I can't think of any, but I'm sure they're out there somewhere.&lt;/P&gt;
&lt;P&gt;The problem I see&amp;nbsp;with dynamics is that, as with any "advanced" language feature that circumvents the "KISS" principle, it leaves the door wide open for the inexperienced to&amp;nbsp;abuse it unmercifully.&amp;nbsp; When you go too far down that road, you end up with Perl, a language almost entirely composed of symbols.&lt;/P&gt;
&lt;P&gt;It looks like almost all of the new C# 4.0 features&amp;nbsp;were designed to improve COM Interop, which is something I don't have much use for.&amp;nbsp; I have exactly one COM component project, and if I ever need to use it again, I plan to upgrade it to managed C++.&lt;/P&gt;
&lt;P&gt;I do like the idea of finally having optional parameters, though.&amp;nbsp; That's something I'd use (sparingly!), as long as it compiles down to the .NET 2.0 CLR.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/PDC" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1685-azure_and_c_40_at_pdc/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1680-mmo_prototype_progress</id>
<title>MMO Prototype Progress</title>
<updated>2008-10-20T12:36:11Z</updated>
<published>2008-10-20T03:14:00Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1680-mmo_prototype_progress" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1680-mmo_prototype_progress"&gt;&lt;/a&gt;&lt;P&gt;Here's the progress I made on my MMO engine this weekend:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://picasaweb.google.com/lh/photo/N87CYSbnaPYfcj73JMdrCA"&gt;&lt;IMG src="http://lh3.ggpht.com/tkrehbiel/SPv2YmcpaUI/AAAAAAAABW4/pAbZoFnTyys/s288/EarlyPrototype.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I should probably figure out how to do a screencast or something; it's more impressive when it's moving. :)&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/Projects" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1680-mmo_prototype_progress/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1678-moving_ccli_properties_out_of_headers</id>
<title>Moving C++/CLI Properties Out Of Headers</title>
<updated>2008-10-18T20:58:51Z</updated>
<published>2008-10-18T20:54:00Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1678-moving_ccli_properties_out_of_headers" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1678-moving_ccli_properties_out_of_headers"&gt;&lt;/a&gt;&lt;P&gt;A while back I &lt;A href="http://thomaskrehbiel.com/tech/1578-ccli_properties"&gt;railed against C++/CLI&lt;/A&gt; for its nonsensical inability to separate property implementations from the header file.  Well, it turns out you &lt;EM&gt;can&lt;/EM&gt; do it -- it's just not widely reported.  Almost every example of a C++/CLI property shows it implemented in the header file.  But thankfully I stumbled upon an article about this very subject:  &lt;A href="http://www.sharplogic.com/blogs/ed/PermaLink,guid,2b8da6f3-a6dc-452d-8b3d-430077bff249.aspx"&gt;Splitting Properties Between Header And Implementation Files In C++/CLI&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Old Class.h:&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: #1e1e1e; COLOR: #dcdce6; FONT-FAMILY: Consolas; padding-bottom:4px; margin-bottom:6pt;"&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    7&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;ref&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Effect&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    8&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    9&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;private&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   10&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #e6e6dc"&gt;Route&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;^&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;componentChain&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   11&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   12&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;public&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   13&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #809fd5"&gt;property&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Route&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;^&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;ComponentChain&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   14&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #a9a9c0"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   15&lt;/SPAN&gt;       &lt;SPAN style="COLOR: #e6e6dc"&gt;Route&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;^&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;get&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;void&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;{&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;this&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;-&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;componentChain&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   16&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #a9a9c0"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   17&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;New Class.h:&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: #1e1e1e; COLOR: #dcdce6; FONT-FAMILY: Consolas; padding-bottom:4px; margin-bottom:6pt;"&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    7&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;ref&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Effect&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    8&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    9&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;private&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   10&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #e6e6dc"&gt;Route&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;^&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;componentChain&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   11&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   12&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;public&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   13&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #809fd5"&gt;property&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Route&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;^&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;ComponentChain&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   14&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #a9a9c0"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   15&lt;/SPAN&gt;       &lt;SPAN style="COLOR: #e6e6dc"&gt;Route&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;^&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;get&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;void&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   16&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #a9a9c0"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   17&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;New Class.cpp:&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 10pt; BACKGROUND: #1e1e1e; COLOR: #dcdce6; FONT-FAMILY: Consolas; padding-bottom:4px; margin-bottom:6pt;"&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   24&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Route&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;^&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Effect&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;ComponentChain&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;::&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;get&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;void&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   25&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   26&lt;/SPAN&gt;    &lt;SPAN style="COLOR: #809fd5"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;this&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;-&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;componentChain&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 110%; PADDING-TOP: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   27&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;The key is the Class::Property::get and Class::Property::set syntax that I'd not seen documented anywhere before.  Hopefully now that there are &lt;EM&gt;two&lt;/EM&gt; articles about this, it will move up higher in Google searches.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/C++" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1678-moving_ccli_properties_out_of_headers/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1677-evaluating_mmo_engines</id>
<title>Evaluating MMO Engines</title>
<updated>2008-10-18T16:54:19Z</updated>
<published>2008-10-18T16:53:29Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1677-evaluating_mmo_engines" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1677-evaluating_mmo_engines"&gt;&lt;/a&gt;&lt;P&gt;Before I embark too far on the insane idea of &lt;A href="http://thomaskrehbiel.com/tech/1675-me_vs_the_mmo_engine"&gt;writing my own MMO engine&lt;/A&gt;, I thought it would be instructive to peek at some open source engines out there (gathered from the first few pages of &lt;A href="http://www.google.com/search?hl=en&amp;amp;amp;q=open+source+mmo+engine&amp;amp;amp;btnG=Search"&gt;a Google search&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;At this point I am mainly interested in the specifics of their network implementation, because that is really the foundation on which everything else is built.&amp;nbsp; For reference, my design so far is leaning toward&amp;nbsp;UDP sockets with variable-length packed binary structures, conceptually similar to the&amp;nbsp;&lt;A href="http://www.gamers.org/dEngine/quake/QDP/qnp.html"&gt;Quake network protocol&lt;/A&gt;&amp;nbsp;if I remember right.&amp;nbsp; The idea is to maximize CPU efficiency (by avoiding expensive serialization and parsing routines) and minimize bandwidth requirements (by avoiding bloated serialization and parsing routines).&lt;/P&gt;
&lt;P&gt;&lt;A href="http://black-crystal.net/"&gt;&lt;STRONG&gt;Black-Crystal&lt;/STRONG&gt;&lt;/A&gt;. &amp;nbsp;(C#.)&amp;nbsp;&amp;nbsp;No code releases that I can find, which is too bad, because I would have loved to see their .NET implementation.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.genecys.org/"&gt;&lt;STRONG&gt;Genecys&lt;/STRONG&gt;&lt;/A&gt;. &amp;nbsp;(C,&amp;nbsp;&lt;A href="http://genecys.cvs.sourceforge.net/genecys/"&gt;CVS Repository&lt;/A&gt;.)&amp;nbsp; The source code is not very easy to read and not very well commented, but I gather (from &lt;A href="http://genecys.cvs.sourceforge.net/viewvc/genecys/src/server/network.c?view=markup"&gt;server/network.c&lt;/A&gt;&amp;nbsp;and &lt;A href="http://genecys.cvs.sourceforge.net/viewvc/genecys/src/server/ninterface.c?view=markup"&gt;server/ninterface.c&lt;/A&gt;) that the design uses simple text commands over TCP streams.&amp;nbsp; This is precisely what I &lt;EM&gt;don't&lt;/EM&gt; want to use, because I don't think it will scale very well.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://launchpad.net/openmmog"&gt;&lt;STRONG&gt;OpenMMOG&lt;/STRONG&gt;&lt;/A&gt;.&amp;nbsp;&amp;nbsp;No code releases that I can find.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.planeshift.it/"&gt;&lt;STRONG&gt;PlaneShift&lt;/STRONG&gt;&lt;/A&gt;.&amp;nbsp;&amp;nbsp;(C++, &lt;A href="http://planeshift.svn.sourceforge.net/viewvc/planeshift/"&gt;SVN Repository&lt;/A&gt;.)&amp;nbsp; This is an actual MMO that you can play, which makes it a compelling test case.&amp;nbsp; After perusing the source repository, it looks&amp;nbsp;to be using UDP sockets (see &lt;A href="http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/src/common/net/netbase.cpp?view=markup"&gt;common/net/netbase.cpp&lt;/A&gt;) and message structures similar to my design.&amp;nbsp; I am validated!&amp;nbsp; (Although, honestly, it's not so much mine as it is John Carmack's idea from the 1990s.)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ryzom.com/"&gt;&lt;STRONG&gt;Ryzom (NeL)&lt;/STRONG&gt;&lt;/A&gt;.&amp;nbsp; (C++, &lt;A href="http://dev.ryzom.com/repositories/show/nel"&gt;SVN Repository&lt;/A&gt;).&amp;nbsp; I can't tell what it's doing because the repository gives me internal server errors ("Rails application failed to start properly" -- figures :).&amp;nbsp; Based soley on the &lt;EM&gt;&lt;A href="http://dev.ryzom.com/repositories/browse/nel/nel/src/net"&gt;filenames&lt;/A&gt;&lt;/EM&gt;&amp;nbsp;in the source code, there appears to be UDP &lt;EM&gt;and&lt;/EM&gt; TCP code.&amp;nbsp; I'm very interested in seeing what it does because it &lt;A href="http://en.wikipedia.org/wiki/The_Saga_of_Ryzom"&gt;purports&lt;/A&gt;&amp;nbsp;to be able to update hundreds of entities in an area with modest bandwidth usage.&amp;nbsp; I have a number of ideas of my own in that department, and I'm curious if they are similar.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.mmoworkshop.com/"&gt;&lt;STRONG&gt;Torque MMO Kit&lt;/STRONG&gt;&lt;/A&gt;.&amp;nbsp; (Python, &lt;A href="http://www.mmoworkshop.com/trac/mom/browser/trunk/torque/mmo/v1"&gt;Repository&lt;/A&gt;).&amp;nbsp; (I am not positive, but I think this is actually&amp;nbsp;descended from the original Tribes game engine.)&amp;nbsp;&amp;nbsp;This appears to be one of the most mature codebases around, but I'm not a Python guy, so much of this is foreign to me.&amp;nbsp; I can't find any specific network layer -- I think it's probably embedded in whatever application parses the .cs files, but there's no source code for that.&amp;nbsp; In any case, an entire implementation of an MMO game is there, so it's a good reference to have handy.&amp;nbsp; It would be interesting to try&amp;nbsp;&lt;A href="http://www.prairiegames.com/"&gt;Minions of Mirth&lt;/A&gt; to see how well the engine works.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.vbgore.com/"&gt;&lt;STRONG&gt;vbGORE&lt;/STRONG&gt;&lt;/A&gt;.&amp;nbsp; (VB6, &lt;A href="http://www.vbgore.com/Downloads"&gt;Downloads&lt;/A&gt;.)&amp;nbsp; Yeah, I know, it's written in&amp;nbsp;VB6, but I downloaded it anyway.&amp;nbsp; It actually looks surprisingly mature.&amp;nbsp; Digging into the GOREsock\GameClient\GOREsock.ctl code reveals they're using TCP byte streams.&amp;nbsp; I can't make much sense of the rest of the codebase, but there might be something useful in there somewhere.&amp;nbsp; I'm not going to install VB6 again to look at&amp;nbsp;it in depth, though.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.worldforge.org/"&gt;&lt;STRONG&gt;WorldForge&lt;/STRONG&gt;&lt;/A&gt;.&amp;nbsp; (C++, &lt;A href="http://sourceforge.net/project/showfiles.php?group_id=11799"&gt;Downloads&lt;/A&gt;.)&amp;nbsp; WorldForge appears to be&amp;nbsp;well-known, but I can't find any real games based upon it.&amp;nbsp; It's broken into a number of distinct libraries -- the network library is&amp;nbsp;called "&lt;A href="http://sourceforge.net/project/showfiles.php?group_id=11799&amp;amp;amp;package_id=132539"&gt;Atlas&lt;/A&gt;," and it appears to be a highly&amp;nbsp;generalized API, which usually means&amp;nbsp;scope creep from trying to be everything to everybody.&amp;nbsp; It looks like it's using a TCP stream and serialized objects, encoded&amp;nbsp;as XML or "packed" (see the Atlas::Codecs namespace).&amp;nbsp; Unfortunately, the code looks like it's getting close to the "big ball of mud" stage of entropy. :)&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/Projects" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1677-evaluating_mmo_engines/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1676-new_collection_vs_collectionclear</id>
<title>New Collection vs. Collection.Clear</title>
<updated>2008-10-18T17:03:22Z</updated>
<published>2008-10-18T16:38:00Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1676-new_collection_vs_collectionclear" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1676-new_collection_vs_collectionclear"&gt;&lt;/a&gt;&lt;P&gt;Quick, which one of the following implementations is faster to use in a time-critical section of code:&lt;/P&gt;
&lt;P&gt;Implementation 1:&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 11pt; BACKGROUND: #1e1e1e; COLOR: #dcdce6; FONT-FAMILY: Consolas"&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   25&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;iterations&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   26&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   27&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   28&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;1000&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; ) &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Add&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   29&lt;/SPAN&gt; }&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Implementation 2:&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 11pt; BACKGROUND: #1e1e1e; COLOR: #dcdce6; FONT-FAMILY: Consolas"&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   34&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   35&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;iterations&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   36&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   37&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Clear&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   38&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;1000&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; ) &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Add&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px; PADDING:0px;"&gt;&lt;SPAN style="COLOR: gray"&gt;   39&lt;/SPAN&gt; }&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Answer:  The second one, by about 33%.&lt;/P&gt;
&lt;DIV style="FONT-SIZE: 11pt; BACKGROUND: #1e1e1e; COLOR: #dcdce6; FONT-FAMILY: Consolas"&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    1&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;using&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;System&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    2&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;using&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;System&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Collections&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Generic&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    3&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;using&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;System&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Diagnostics&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    4&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;using&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;System&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Text&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    5&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    6&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;namespace&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;CollectionSpeedTest&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    7&lt;/SPAN&gt; {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    8&lt;/SPAN&gt;     &lt;SPAN style="COLOR: #809fd5"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;Program&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;    9&lt;/SPAN&gt;     {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   10&lt;/SPAN&gt;         &lt;SPAN style="COLOR: #809fd5"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;void&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Main&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;string&lt;/SPAN&gt;[] &lt;SPAN style="COLOR: #e6e6dc"&gt;args&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   11&lt;/SPAN&gt;         {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   12&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #809fd5"&gt;long&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;time1&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;Stopwatch&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;GetTimestamp&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   13&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #e6e6dc"&gt;Method1&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #d2ae62"&gt;1000000&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   14&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #809fd5"&gt;long&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;time2&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;Stopwatch&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;GetTimestamp&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   15&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #e6e6dc"&gt;Method2&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #d2ae62"&gt;1000000&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   16&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #809fd5"&gt;long&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;time3&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;Stopwatch&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;GetTimestamp&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   17&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   18&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #5c6cfe"&gt;Console&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;WriteLine&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #d2ae62"&gt;"Method1: {0}"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #e6e6dc"&gt;time2&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;-&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;time1&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   19&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #5c6cfe"&gt;Console&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;WriteLine&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #d2ae62"&gt;"Method2: {0}"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #e6e6dc"&gt;time3&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;-&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;time2&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   20&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #5c6cfe"&gt;Console&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;ReadLine&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   21&lt;/SPAN&gt;         }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   22&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   23&lt;/SPAN&gt;         &lt;SPAN style="COLOR: #809fd5"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;void&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Method1&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;iterations&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   24&lt;/SPAN&gt;         {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   25&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;iterations&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   26&lt;/SPAN&gt;             {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   27&lt;/SPAN&gt;                 &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   28&lt;/SPAN&gt;                 &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;1000&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; ) &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Add&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   29&lt;/SPAN&gt;             }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   30&lt;/SPAN&gt;         }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   31&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   32&lt;/SPAN&gt;         &lt;SPAN style="COLOR: #809fd5"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;void&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;Method2&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;iterations&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   33&lt;/SPAN&gt;         {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   34&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #809fd5"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #5c6cfe"&gt;List&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;&gt;&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   35&lt;/SPAN&gt;             &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;iterations&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;i&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   36&lt;/SPAN&gt;             {&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   37&lt;/SPAN&gt;                 &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Clear&lt;/SPAN&gt;();&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   38&lt;/SPAN&gt;                 &lt;SPAN style="COLOR: #809fd5"&gt;for&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #809fd5"&gt;int&lt;/SPAN&gt; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;0&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; &lt;SPAN style="COLOR: #a9a9c0"&gt;&lt;&lt;/SPAN&gt; &lt;SPAN style="COLOR: #d2ae62"&gt;1000&lt;/SPAN&gt;; &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;++&lt;/SPAN&gt; ) &lt;SPAN style="COLOR: #e6e6dc"&gt;myList&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a9a9c0"&gt;.&lt;/SPAN&gt;&lt;SPAN style="COLOR: #e6e6dc"&gt;Add&lt;/SPAN&gt;( &lt;SPAN style="COLOR: #e6e6dc"&gt;j&lt;/SPAN&gt; );&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   39&lt;/SPAN&gt;             }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   40&lt;/SPAN&gt;         }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   41&lt;/SPAN&gt;     }&lt;/P&gt;
&lt;P style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;   42&lt;/SPAN&gt; }&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;P&gt;Method1: 20962096146&lt;BR&gt;Method2: 13987606779&lt;BR&gt;&lt;/P&gt;&lt;/FONT&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/.NET" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1676-new_collection_vs_collectionclear/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1675-me_vs_the_mmo_engine</id>
<title>Me vs. the MMO Engine</title>
<updated>2008-10-16T22:59:15Z</updated>
<published>2008-10-16T22:54:00Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1675-me_vs_the_mmo_engine" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1675-me_vs_the_mmo_engine"&gt;&lt;/a&gt;&lt;P&gt;So I decided to write an &lt;A href="http://en.wikipedia.org/wiki/MMOG"&gt;MMO&lt;/A&gt; game engine*.&lt;/P&gt;
&lt;P&gt;No, really.&lt;/P&gt;
&lt;P&gt;Okay, I know, I know, this is the fifth or sixth time I've started a game engine project like this, and it will probably end up the same as all the others:  Nifty ideas, but without considerably more time and structure and funding -- and, you know, &lt;EM&gt;an actual game idea&lt;/EM&gt; -- it will end up in source code purgatory, picked over for an occasional gem of an idea but otherwise left to rot.&lt;/P&gt;
&lt;P&gt;Why an MMO and not something simple like, say, Space Invaders?  Well for one thing I've already written a couple of different 2D game engines (now residing in purgatory) so there isn't a lot to explore there.  Beyond that, MMOs are more interesting to me because they have a much broader variety of technologies to explore.&lt;/P&gt;
&lt;P&gt;As usual, I'm going to build most of the framework with .NET since that's the quickest way for me to get a prototype up and running.  I'm not planning to use any third-party game engines (&lt;A href="http://en.wikipedia.org/wiki/Not_invented_here"&gt;Not Invented Here&lt;/A&gt;!), but I do want to use a 3D rendering engine for the client (which just by itself represents a whole set of challenges).  And by the way, no, I still don't have a game idea (well, that's not entirely true, but certainly nothing more than a vague idea) -- I'm only interested in the underlying technology at this point.  And if anyone is reading this that &lt;EM&gt;does&lt;/EM&gt; have a game idea -- no, I'm not interested in developing your game (unless there's a decent salary attached, of course).  This is purely an intellectual exercise.&lt;/P&gt;
&lt;P&gt;This should keep me busy until... well, until the next shiny bauble comes along to grab my attention.&lt;/P&gt;
&lt;P&gt;* If you don't understand the ramifications of that statement, it's roughly equivalent to me saying, "so I decided to memorize the encyclopedia" or "so I decided to perform a heart transplant."&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/Projects" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1675-me_vs_the_mmo_engine/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1671-sitemapxml_and_google_webmaster_tools</id>
<title>Sitemap.xml and Google Webmaster Tools</title>
<updated>2008-10-14T22:05:18Z</updated>
<published>2008-10-14T22:04:49Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1671-sitemapxml_and_google_webmaster_tools" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1671-sitemapxml_and_google_webmaster_tools"&gt;&lt;/a&gt;&lt;P&gt;I just read about &lt;A href="http://www.codinghorror.com/blog/archives/001174.html"&gt;Sitemap.xml on Coding Horror&lt;/A&gt;.&amp;nbsp; I'd never heard of it before (yeah, I'm not exactly wired into the whole SEO thing).&amp;nbsp; Anyway, I just implemented a site map for my page, for what it's worth.&lt;/P&gt;
&lt;P&gt;This also led me to Google's nifty &lt;A href="https://www.google.com/webmasters/tools"&gt;Webmaster Tools&lt;/A&gt; page which, again,&amp;nbsp;I'd never seen before.&amp;nbsp; I've made a few small tweaks to my page titles to be a little more Google-friendly.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/Web" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1671-sitemapxml_and_google_webmaster_tools/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1665-sorry_ie7_users</id>
<title>Sorry IE7 Users</title>
<updated>2008-09-26T23:02:29Z</updated>
<published>2008-09-26T23:01:43Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1665-sorry_ie7_users" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1665-sorry_ie7_users"&gt;&lt;/a&gt;&lt;P&gt;By the way I'd like to apologize to anyone who has viewed my site recently with Internet Explorer 7.&amp;nbsp;&amp;nbsp;Sometimes it rendered&amp;nbsp;very badly, randomly writing text all over the place, shifting boxes around and generally looking ugly (see below).&amp;nbsp; It had something to do with an overflow:hidden CSS&amp;nbsp;attribute in the rounded boxes, which apparently is not well liked by Internet Explorer.&amp;nbsp; I had to implement one of those "&lt;A href="http://en.wikipedia.org/wiki/Conditional_comment"&gt;conditional comment&lt;/A&gt;" hacks to use an alternate style sheet for Internet Explorer browsers.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://uvtek.net/images/krehbieltech/ie7_bad_rendering_1.jpg" border=1&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://uvtek.net/images/krehbieltech/ie7_bad_rendering_2.jpg" border=1&gt;&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/PHP" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1665-sorry_ie7_users/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1661-finally__inevitable</id>
<title>Finally != Inevitable</title>
<updated>2008-09-19T12:49:28Z</updated>
<published>2008-09-19T12:31:05Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1661-finally__inevitable" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1661-finally__inevitable"&gt;&lt;/a&gt;&lt;P&gt;For future reference:&amp;nbsp; I had always&amp;nbsp;&lt;A href="http://thedailywtf.com/Articles/My-Tales.aspx"&gt;heard&lt;/A&gt; that there were cases where finally blocks were not run.&amp;nbsp; The other day I actually witnessed one of those situations:&amp;nbsp; In a .NET console app, if you hit CTRL-C to exit the application, finally blocks are not executed.&amp;nbsp; Fortunately garbage collection will still&amp;nbsp;handle standard cleanup of objects for you (at least I assume so).&amp;nbsp; But if you need to do something special you have to &lt;A href="http://www.codeneverwritten.com/2006/10/ctrl-c-and-net-console-application.html"&gt;use the System.Console.CancelKeyPress event&lt;/A&gt;, like so:&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;System.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Console&lt;/FONT&gt;&lt;FONT size=2&gt;.CancelKeyPress += &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;delegate&lt;/FONT&gt;&lt;FONT size=2&gt; { Cleanup(); };&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Be careful because it runs in a separate thread -- the main thread is not interrupted and won't actually stop until the CancelKeyPress handler returns.&lt;/P&gt;
&lt;P&gt;Unfortunately, I found no&amp;nbsp;way to handle the situation where the user clicks the close button (the red X) on the console window.&amp;nbsp; It skips &lt;EM&gt;both&lt;/EM&gt; CancelKeyPress and all the finally blocks.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Programming/.NET" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1661-finally__inevitable/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1648-agile_wall</id>
<title>Agile Wall</title>
<updated>2008-08-29T20:52:50Z</updated>
<published>2008-08-29T20:52:34Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1648-agile_wall" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1648-agile_wall"&gt;&lt;/a&gt;&lt;P&gt;I learned &lt;A href="http://www.codesqueeze.com/my-agile-wall-plus-a-few-tricks/"&gt;a new software development&amp;nbsp;term&lt;/A&gt; the other day:&amp;nbsp; "Agile Wall."&amp;nbsp; For those of&amp;nbsp;you who aren't into renaming things that already have names just to sound more important, it is: &amp;nbsp;"A bulletin board with project notes all over it."&amp;nbsp; Okay, okay, the notes are supposed to be arranged into three columns for "todo," "in progress," and "done."&amp;nbsp; Yeah, I can see how it's a totally different concept now.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Agile" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1648-agile_wall/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1646-opera_road_test</id>
<title>Opera Road Test</title>
<updated>2008-08-27T03:45:41Z</updated>
<published>2008-08-27T03:45:24Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1646-opera_road_test" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1646-opera_road_test"&gt;&lt;/a&gt;&lt;P&gt;&lt;A href="http://thomaskrehbiel.com/tech/1608-opera_pretty_cool"&gt;Previously I wrote about Opera 9.5&lt;/A&gt;.&amp;nbsp; Since then, I've been using it for almost all of my browsing at home (at work we still have to use IE6&amp;nbsp;*rolls eyes*).&amp;nbsp; So far I've only encountered two real problems with it.&lt;/P&gt;
&lt;P&gt;Of course, every now and then, you still run across some sites that refuse to work with anything but Internet Explorer or Firefox.&amp;nbsp; Most of the time it's a bank or some other kind of financial institution.&amp;nbsp; (I find it somewhat ironic that banks usually have the worst, most incompatible, most insecure web sites around.)&amp;nbsp; It's not really a problem, but it is sort of annoying to have to load up another browser.&amp;nbsp; It'd be nice if Opera had an "Open Link in Internet Explorer" option.&amp;nbsp; Oh, hey, a quick Google reveals &lt;A href="http://my.opera.com/Tamil/blog/open-in-firefox-internet-explorer"&gt;there is&amp;nbsp;a way to do just that&lt;/A&gt;.&amp;nbsp; Sweet.&lt;/P&gt;
&lt;P&gt;More annoying is the way that Opera handles RSS feeds and XML.&amp;nbsp; As a programmer, I look at XML all the time.&amp;nbsp; And as a programmer who has written software to read RSS feeds, I look at RSS feeds all the time, too.&amp;nbsp; Opera does an admirable job of recognizing RSS and offering to add feeds to its internal RSS reader like other browsers, but that's not what I want it to do.&amp;nbsp; When I click on an RSS feed link, I almost always want to look at formatted content or at the underlying XML.&amp;nbsp; Unfortunately Opera does a miserable job of displaying XML in the browser.&amp;nbsp; It crams everything together into a&amp;nbsp;big page of unreadable mush.&amp;nbsp; So for this I'll also have to use the&amp;nbsp;aforementioned Open in Internet Explorer menu.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Opera" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1646-opera_road_test/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1645-ghostdoc_redux</id>
<title>GhostDoc Redux</title>
<updated>2008-08-27T03:35:50Z</updated>
<published>2008-08-27T03:35:39Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1645-ghostdoc_redux" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1645-ghostdoc_redux"&gt;&lt;/a&gt;&lt;P&gt;I had &lt;A href="http://thomaskrehbiel.com/tech/1385-ghostdoc"&gt;previously written&lt;/A&gt; that I tried &lt;A href="http://www.roland-weigelt.de/ghostdoc/"&gt;GhostDoc&lt;/A&gt; but removed it because it didn't write very useful comments.&amp;nbsp; Well I&amp;nbsp;re-loaded it today because it does have one &lt;EM&gt;very&lt;/EM&gt; handy feature:&amp;nbsp; Adding comments to classes that implement interfaces.&amp;nbsp; It's incredibly tedious to copy comments from the interface code to the class code, but with GhostDoc you just have to right-click on the class member and hit "Document This" and it will automatically bring the comment from the interface to the class.&amp;nbsp; Pretty cool.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="Tools" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1645-ghostdoc_redux/commentfeed</wfw:commentRss>
</entry>
<entry>
<id>http://thomaskrehbiel.com/tech/1644-linq_query_syntax</id>
<title>LINQ query syntax</title>
<updated>2008-08-26T01:47:36Z</updated>
<published>2008-08-26T01:47:23Z</published>
<link rel="alternate" type="text/html" href="http://thomaskrehbiel.com/tech/1644-linq_query_syntax" />
<content type="html">&lt;a href="http://thomaskrehbiel.com/tech/1644-linq_query_syntax"&gt;&lt;/a&gt;&lt;P&gt;I'm starting to learn a little bit about LINQ.&amp;nbsp; I am only doing this because I was starting to learn a little bit about the forthcoming &lt;A href="http://www.asp.net/mvc/"&gt;ASP.NET MVC Framework&lt;/A&gt; by &lt;A href="http://www.asp.net/learn/mvc-videos/"&gt;watching some handy screencasts&lt;/A&gt;, and the authors of the framework seem to think that we should all be using LINQ, too, so amidst the discussion of the MVC Framework they throw in quite a&amp;nbsp;lot of tutorials about LINQ.&lt;/P&gt;
&lt;P&gt;Based on all the hype built up around it over the years, you'd think that LINQ was the second coming.&amp;nbsp; It's nice, but it's not quite all that.&amp;nbsp; To understand what it really&amp;nbsp;is, first let me show you a simple SQL query:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=blue&gt;SELECT&lt;/FONT&gt; * &lt;FONT color=blue&gt;FROM&lt;/FONT&gt; customers &lt;FONT color=blue&gt;WHERE&lt;/FONT&gt; state=&lt;FONT color=red&gt;'VA'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This query will return every customer record where the customer's address is 'VA.'&amp;nbsp; It can't get any simpler than that.&lt;/P&gt;
&lt;P&gt;Now you might be wondering why invent LINQ when SQL works just fine?&amp;nbsp; Well, the problem for us&amp;nbsp;application programmers (as opposed to people writing stored procedures or typing queries into&amp;nbsp;Management Studio) is that we have to do some&amp;nbsp;extra work&amp;nbsp;to send that query to the database and get back results in a manageable format&amp;nbsp;(namely, in a collection of objects instead of a flat stream of bytes).&amp;nbsp; We have to write code that looks something like this (super-simplified for illustration):&lt;/P&gt;
&lt;P&gt;&lt;FONT color=blue&gt;SqlCommand&lt;/FONT&gt; command = CreateCommand( &lt;FONT color=red&gt;"SELECT * FROM customers WHERE state='VA'"&lt;/FONT&gt; );&lt;BR&gt;&lt;FONT color=blue&gt;SqlDataReader&lt;/FONT&gt; data = command.&lt;FONT color=blue&gt;ExecuteReader&lt;/FONT&gt;();&lt;BR&gt;&lt;FONT color=blue&gt;List&lt;/FONT&gt;&amp;lt;&lt;FONT color=blue&gt;Customer&lt;/FONT&gt;&amp;gt; results = new &lt;FONT color=blue&gt;List&lt;/FONT&gt;&amp;lt;&lt;FONT color=blue&gt;Customer&lt;/FONT&gt;&amp;gt;();&lt;BR&gt;&lt;FONT color=blue&gt;while&lt;/FONT&gt;( data.&lt;FONT color=blue&gt;Read&lt;/FONT&gt;() ) {&lt;BR&gt;&lt;FONT color=blue&gt;Customer&lt;/FONT&gt; customer = new &lt;FONT color=blue&gt;Customer&lt;/FONT&gt;( data );&lt;BR&gt;customers.&lt;FONT color=blue&gt;Add&lt;/FONT&gt;( customer );&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;That will get us a collection of Customer objects that we&amp;nbsp;can work with.&amp;nbsp; It's not particularly difficult, but it's kind of ugly and&amp;nbsp;awkward.&amp;nbsp; Normally we try to hide those&amp;nbsp;awkward details behind a data access layer so it doesn't distract us from our application logic.&amp;nbsp; With the details hidden, we might end up writing application code that looks like this:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=blue&gt;IEnumerable&lt;/FONT&gt;&amp;lt;&lt;FONT color=blue&gt;Customer&lt;/FONT&gt;&amp;gt; customers = datalayer.&lt;FONT color=blue&gt;GetCustomersFrom&lt;/FONT&gt;( &lt;FONT color=red&gt;"VA"&lt;/FONT&gt; );&lt;/P&gt;
&lt;P&gt;That worked fine, but now&amp;nbsp;we have a whole new paradigm in LINQ.&amp;nbsp; Now we&amp;nbsp;don't have to wrap our queries with extraneous code.&amp;nbsp; Here is the same concept as the above SQL query, written as a&amp;nbsp;LINQ query:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=blue&gt;var&lt;/FONT&gt; customers = &lt;FONT color=blue&gt;from&lt;/FONT&gt; c &lt;FONT color=blue&gt;in&lt;/FONT&gt; db.Customers &lt;FONT color=blue&gt;where&lt;/FONT&gt; c.State==&lt;FONT color=red&gt;"VA"&lt;/FONT&gt; &lt;FONT color=blue&gt;select&lt;/FONT&gt; c;&lt;/P&gt;
&lt;P&gt;The cool thing is you can put that right inline with&amp;nbsp;your&amp;nbsp;source code, and what you get back from it is "customers"&amp;nbsp;-- an enumerable&amp;nbsp;collection of Customer objects.&lt;/P&gt;
&lt;P&gt;How's it work?&amp;nbsp; Well, when you get right down to it, it's basically just another data access framework that hides the messy details of&amp;nbsp;querying the database, just like all the other data access&amp;nbsp;frameworks out there.&amp;nbsp; The only things that are different about this one are, 1) it's built by Microsoft, and, 2) it's integrated right into the language.&amp;nbsp; (Those are two powerful incentives to use it, by the way.)&amp;nbsp; But there's nothing really magical about it -- behind the scenes,&amp;nbsp;LINQ to SQL queries are transmogrified into method calls that eventually&amp;nbsp;build SQL statements, send them to the database, instantiate Customer objects, and populate them with results from the&amp;nbsp;query.&lt;/P&gt;
&lt;P&gt;But enough of that.&amp;nbsp; Let's talk about the LINQ query syntax itself.&amp;nbsp; I find it&amp;nbsp;puzzling.&amp;nbsp; For example, in LINQ query syntax, we have to specify where to look before we specify what we're looking for.&amp;nbsp; In SQL, it was a pretty straightforward&amp;nbsp;"select stuff from here."&amp;nbsp; But in LINQ, it's backwards -- it's&amp;nbsp;"from here, select stuff."&lt;/P&gt;
&lt;P&gt;We also have to specify the search criteria in the middle.&amp;nbsp; In SQL, it was "select stuff from here with this criteria."&amp;nbsp; In LINQ, it's "from here, with this criteria, select stuff."&lt;/P&gt;
&lt;P&gt;Furthermore, we have to reference the name of each row entity, as in "from each row named x in here, select stuff."&amp;nbsp; I can only speculate that that becomes more of an asset in complex queries, but in my experience, simple queries are much more common than complex queries, so it seems like needless redundancy to me.&lt;/P&gt;
&lt;P&gt;In short, LINQ is&amp;nbsp;a handy shortcut if you're working with Microsoft .NET 3.5 technology and nothing else.&amp;nbsp; (It's almost entirely worthless if you aren't.)&amp;nbsp; For myself, I can see the benefit in understanding the basics, and I'm sure I'll enjoy working with it where possible, but I can't see myself expending much effort in becoming an "expert" on LINQ.&lt;/P&gt;</content>
<author><name>Tom</name></author>
<category term="LINQ" />
<wfw:commentRss>http://thomaskrehbiel.com/tech/1644-linq_query_syntax/commentfeed</wfw:commentRss>
</entry>
</feed>
