<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>/bill's House O Insomnia&lt;img src="http://www.williamgryan.com/images/originalcuckoo.jpg" alt="Bill Ryan" /&gt; : Coding Techniques</title><link>http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx</link><description>Tags: Coding Techniques</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Looking for some .NET Developers</title><link>http://msmvps.com/blogs/williamryan/archive/2008/06/06/looking-for-some-net-developers.aspx</link><pubDate>Sat, 07 Jun 2008 02:19:26 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1632527</guid><dc:creator>William</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=1632527</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=1632527</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2008/06/06/looking-for-some-net-developers.aspx#comments</comments><description>&lt;p&gt;A client of mine located in the Aiken/Columbia South Carolina Area has asked me if I had any friends who are .NET Developers and looking for a job. They are looking for at least one Junior Developer, on Mid-Level Developer and several Senior developers.&amp;nbsp; I know these folks quite well and I can vouch for the following:&amp;nbsp; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;They pay extremely well&lt;/li&gt; &lt;li&gt;Generous benefits package&lt;/li&gt; &lt;li&gt;There&amp;#39;s plenty of cool people on their staff&lt;/li&gt; &lt;li&gt;They are growing at an explosive rate so there&amp;#39;s plenty of room for upward mobility. There&amp;#39;s also a very strong focus on learning/teaching and career development.&lt;/li&gt; &lt;li&gt;They are an Agile/SCRUM shop&lt;/li&gt; &lt;li&gt;Currently developing with the following technologies:&lt;/li&gt; &lt;ul&gt; &lt;li&gt; Visual Studio Team System 2008 / .NET 3.5 Framework&lt;/li&gt; &lt;li&gt;Windows Communication Foundation&lt;/li&gt; &lt;li&gt;Windows Presentation Foundation&lt;/li&gt; &lt;li&gt;ASP.NET&lt;/li&gt; &lt;li&gt;LINQ&lt;/li&gt; &lt;li&gt;Silverlight&lt;/li&gt; &lt;li&gt;Windows Mobile 5/ Windows Mobile 6/ .NET Compact Framework&lt;/li&gt; &lt;li&gt;Sql Server 2005 / Sql Server 2008&lt;/li&gt; &lt;li&gt;Windows Installer for XML&lt;/li&gt; &lt;li&gt;Sandcastle&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;If you&amp;#39;re in the area and looking for a job... if you know someone who looking for a job.... or if you&amp;#39;re willing to move, please drop me a line using the Contact option on&amp;nbsp; my blog or emailing me directly at &lt;a href="mailto://WilliamRyan@gmail.com"&gt;WilliamRyan@gmail.com&lt;/a&gt; and I&amp;#39;ll put you in contact with them.&amp;nbsp; They are looking to hire folks immediately so I can probably get you an interview within a few days.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Junior Developer:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Ideal candidate will be a recent college graduate with a Computer Science of MIS degree.&amp;nbsp; No experience is necessary for this position. The main soft-skill qualifications for this position are:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;A true love for development&lt;/li&gt; &lt;li&gt;Strong desire to learn&lt;/li&gt; &lt;li&gt;A desire to stand out among one&amp;#39;s peers&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt; The hard-skill qualifications include a good theoretical understanding of at least two of the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Object Oriented Design and Analysis&lt;/li&gt; &lt;li&gt;Relational Database theory&lt;/li&gt; &lt;li&gt;Design Patterns&lt;/li&gt; &lt;li&gt;Familiarity with at least two of the following:&amp;nbsp; C, C++, Java, C#, VB.NET&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;This is essentially a dream job for recent college grads b/c the job is being offered &amp;quot;no experience required&amp;quot;.&amp;nbsp; Since they are a SCRUM/Agile shop, you&amp;#39;ll get to work extensively with their Senior and Mid level devs via Pair Programming.&amp;nbsp;&amp;nbsp; You&amp;#39;ll be able to pick&amp;nbsp; an area to specialize in which you will decide on for yourself. Additionally, you&amp;#39;ll be using some of the most sought after Microsoft technologies available.&amp;nbsp; Go to Monster.com or Dice.com and see for yourself how much demand there is for the above technologies and how much those jobs pay.&amp;nbsp; You&amp;#39;ll get to work with these on day 1 and essentially carve out a path for yourself using whichever technologies you like the best.&amp;nbsp; If you want to be a &amp;quot;UI&amp;quot; expert, that&amp;#39;s where you&amp;#39;ll be put. If you want to be a Web Services dev, again, that&amp;#39;s what you can focus on.&amp;nbsp; If you want to be an expert buildmaster who specializes in installers, that&amp;#39;s what you&amp;#39;ll get to do.&amp;nbsp; The company is looking for some excellent candidates and willing to offer a really fun and great paying job with plenty of training and career development available.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Mid-Level Developer:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The ideal candidate will have a computer science or MIS degree and 1-3 years of development experience.&amp;nbsp; The ideal candidate will have two or more the following abilities:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Solid command of OOP/OOD using C++, C#, Java or VB.NET&lt;/li&gt; &lt;li&gt;Test Driven Design&lt;/li&gt; &lt;li&gt;Service Oriented Architecture&lt;/li&gt; &lt;li&gt;Familiarity with MySql, Sql Server (T-SQL), Oracle (PL/SQL)&lt;/li&gt; &lt;li&gt;Basic understanding of both Winforms and ASP.NET&lt;/li&gt; &lt;li&gt;Basic familiarity with Web Services, MSMQ, Enterprise Services/COM+, .NET Remoting, DCOM, J2EE, Java Beans&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Just like the Junior development positions, these ones will provide a great deal of flexibility to learn and specialize the area of your choice.&amp;nbsp; These are considered &amp;#39;fast track&amp;#39; positions to move into the Senior Developer or Architect roles&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Senior Developer:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The ideal candidate will be someone with at least 4 years experience.&amp;nbsp; This person will love challenges and love coming up with solutions to problems that other people run from.&amp;nbsp; They will be people that love figuring out how to do things that everyone else said can&amp;#39;t be done.&amp;nbsp; They will be the stereotypical Alpha-Geek, Someone that spends their spare time &lt;a href="http://newtechusa.com/csharp-dotnet-quiz.asp"&gt;answering quiz questions like these&lt;/a&gt;:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;All of the requirements for the Mid-Level Developer as well as several of the following skills:&lt;/li&gt; &lt;ul&gt; &lt;li&gt;Proficiency with T-Sql or PL/SQL.&amp;nbsp; You should be able to write a 5 table join on your own. You should have written several stored procedures that were &amp;gt; 100 lines long.&lt;/li&gt; &lt;li&gt;Strong command of query tuning and ability to easily spot design flaws&lt;/li&gt; &lt;li&gt;Ability to design &amp;#39;real&amp;#39; objects.&amp;nbsp; &lt;/li&gt; &lt;ul&gt; &lt;li&gt;Someone who pays meticulous attention to the scope modifiers of their classes/functions/properties&lt;/li&gt; &lt;li&gt;Someone who understands the problems associated with coupling and strives to avoid it.&lt;/li&gt; &lt;li&gt;Someone who can write and use events in their classes without thinking twice about it.&lt;/li&gt; &lt;li&gt;Someone with a solid understanding of thread safety and thread synchronization&lt;/li&gt; &lt;li&gt;Someone who is comfortable using several different design patterns&lt;/li&gt; &lt;li&gt;Someone who is comfortable implementing several different interfaces in one object, using combinations of interface implementation and inheritance and someone who can use inheritance responsibly&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Keeps up with technology, reads computer books regularly, has favorite blogs in multiple disciplines and/or blogs themselves, attends or speaks at user&amp;#39;s groups, is active in one or more online forum or newsgroup&lt;/li&gt; &lt;li&gt;Someone who answers &amp;quot;Which is better, C# or VB.NET?&amp;quot; with &amp;quot;Either can be better depending on the circumstances but I&amp;#39;m comfortable writing in either of them&amp;quot; and then &amp;quot;But I&amp;#39;ve been learning F# lately and it&amp;#39;s really been growing on me&amp;quot;&lt;/li&gt; &lt;li&gt;Experience with .NET Remoting, Web Services &amp;amp; Web Services Enhancements, MSMQ, Enterprise Services and/or WCF&lt;/li&gt; &lt;li&gt;Ability to create syntactically correct UML diagrams (meaning they can do more than write the letters &amp;quot;UML&amp;quot; on their resume) and if not, they are willing to learn to do this.&lt;/li&gt; &lt;li&gt;Understands data structures solidly and could easily implement their own HashTable or LinkedList &lt;/li&gt; &lt;li&gt;Someone who&amp;#39;s always looking to come up with a newer, cooler, faster, and more secure way to do implement something&lt;/li&gt; &lt;li&gt;Experienced with either Biztalk server or Sharepoint&lt;/li&gt; &lt;li&gt;Takes pride in their code without falling in love with it or getting all defensive about it.&amp;nbsp; Ability to acknowledge the fact that everyone makes mistakes and can talk about their mistakes/bugs without getting defensive.&lt;/li&gt; &lt;li&gt;Someone who is the first to raise their hand whenever the boss says &amp;quot;I need someone to learn ____________, do I have any volunteers&amp;quot;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;Basically, if you love development, love creating new cutting edge solutions all the while making a lot of money and having a lot of fun you definitely should talk to these folks.&amp;nbsp; If you&amp;#39;re interested...... Please drop me a line using the Contact option on&amp;nbsp; my blog or emailing me directly at &lt;a href="mailto://WilliamRyan@gmail.com"&gt;WilliamRyan@gmail.com&lt;/a&gt; and I&amp;#39;ll put you in contact with them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1632527" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Web+Services+_2F00_+WSE/default.aspx">Web Services / WSE</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+Basics/default.aspx">.NET Basics</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+General/default.aspx">.NET General</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Biztalk/default.aspx">Biztalk</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+3.0+Framework/default.aspx">.NET 3.0 Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WIX/default.aspx">WIX</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Sql+Server+Integration+Services/default.aspx">Sql Server Integration Services</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Sql+Server/default.aspx">Sql Server</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Sql+Server+2008/default.aspx">Sql Server 2008</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/LINQ+To+ADO.NET/default.aspx">LINQ To ADO.NET</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+3.5+Framework/default.aspx">.NET 3.5 Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/LINQ+Training/default.aspx">LINQ Training</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/ADO.NET+3.5/default.aspx">ADO.NET 3.5</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/C_2300_+3.5/default.aspx">C# 3.5</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Windows+Mobile/default.aspx">Windows Mobile</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Job+Stuff/default.aspx">Job Stuff</category></item><item><title>Filtering data ADO.NET Synchronization Services</title><link>http://msmvps.com/blogs/williamryan/archive/2007/11/13/filtering-data-ado-net-synchronization-services.aspx</link><pubDate>Wed, 14 Nov 2007 02:20:57 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1308509</guid><dc:creator>William</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=1308509</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=1308509</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/11/13/filtering-data-ado-net-synchronization-services.aspx#comments</comments><description>&lt;p&gt;If you dabble in Orcas or are a data aficionado, then you have probably at least heard of &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=02989F70-49AA-43D7-81B8-A651120F8D65&amp;amp;displaylang=en" target="_blank"&gt;Synchronization Services&lt;/a&gt;.&amp;nbsp; If you haven&amp;#39;t heard of it, let me try to pique your interest.&lt;/p&gt; &lt;p&gt;The business case for &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=02989F70-49AA-43D7-81B8-A651120F8D65&amp;amp;displaylang=en" target="_blank"&gt;Sync Services&lt;/a&gt;&amp;nbsp;is simple. You have data in one place and you want to sync it with Data in another place.&amp;nbsp; This is an old school problem that has been dealt with many times before by many different people. That should clue you in to the realization that such problems should probably be approached using design patterns and &lt;a href="http://msdn2.microsoft.com/en-us/library/ms998449.aspx" target="_blank"&gt;Data Oriented Design Patterns in particular&lt;/a&gt;.&amp;nbsp; My memory is a little foggy but I don&amp;#39;t specifically remember reading any &amp;#39;data movement patterns&amp;#39; in the seminal design pattern book, &amp;nbsp;&lt;a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612" target="_blank"&gt;Design Patterns: Elements of Reusable Object-Oriented Software&lt;/a&gt;&amp;nbsp;by the &lt;a href="http://en.wikipedia.org/wiki/Design_Patterns" target="_blank"&gt;Gang of Four&lt;/a&gt;.&amp;nbsp; (As a slight digression, I&amp;#39;ve found quite a few superb design pattern books and a few stinkers.&amp;nbsp; The GOF book is by far the best one I&amp;#39;ve come across in terms of being understandable and easy to follow and can say with comfort that it won&amp;#39;t disappoint).&lt;/p&gt; &lt;p&gt;So you can roll your own code, you can use an existing mechanism like Replication, or you can go new school and try SS. I don&amp;#39;t claim to be an expert at SS but so far, I&amp;#39;ve found it shocking easily to use and learn. Of all the zillions of new MS products rolling out of Microsoft, SS is one of the easiest I&amp;#39;ve come across, at least in terms of getting up and running.&lt;/p&gt; &lt;p&gt;Now, chances are that if you have the need to sync data back and forth (for instance, moving data from a database server to your salesforce&amp;#39;s Tablet PC&amp;#39;s), you will have a lot more data on your server than you&amp;#39;d need or be able to use on the remote machine. Even if you wanted all of that data, in many cases you won&amp;#39;t be able to get it all b/c moving it would take forever and the target machine is resource constrained. To that end, the out of the box demo code that ships with SS will need some modification.&lt;/p&gt; &lt;p&gt;The first point I&amp;#39;d make is that Yes, it is possible to sync only portions of the data.&amp;nbsp; This came up recently in one of the newsgroups I frequent and it&amp;#39;s an excellent question.&amp;nbsp; Just to get a conceptual feel for this, think of the same scenario I mentioned earlier. You have a db server and a mobile salesforce (or nursing force, or delivery force, or you&amp;#39;re a large law firm, consulting group, accounting practice...you get the idea) and you only need to sync each target machine with a subset of data. In an ideal world remote users could see everything that&amp;nbsp;users at the&amp;nbsp;home base could, but moving the data could take forever in many large companies. Moreover, you probably wouldn&amp;#39;t need most of it.&amp;nbsp; If you&amp;#39;re a nurse that makes house calls,&amp;nbsp;you probably wouldn&amp;#39;t need information for people that have passed on, or that have moved or even that you&amp;#39;re not visiting. If your device was a PDA, you need to&amp;nbsp;economize on every resource possible. But even if you had a laptop or tablet you still&amp;nbsp;have&amp;nbsp;some resource limits.&amp;nbsp;Hence,&amp;nbsp;envision a case where&amp;nbsp;you might just want to sync only the data related to each person&amp;#39;s active clients (and probably augment the query&amp;#39;s restriction with a date filter of some sort and perhaps an active account indicator) that have engaged in at least one transaction in the last year.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You could give each person some sort of UI tool which they could initiate that queries the db and writes the data to a file, which they in turn copy over to their machine.&lt;/li&gt; &lt;li&gt;You could do the same thing, but run it as a job so it&amp;#39;s done automatically&lt;/li&gt; &lt;li&gt;You could expose the query results as a web service and let them retrieve data as they needed it&lt;/li&gt; &lt;li&gt;You could export the data to Excel or Access (the latter of which I&amp;#39;ve seen done more times than I care to remember)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Each of these approaches is easy enough to implement but has major suckiness associated with it.&amp;nbsp; The first approach is one of the simpler ones and fairly fool-proof.&amp;nbsp; Writing out the file is something you could automate via a schedule but not copying it to the device, unless of course you were positive the device would always be available when the job ran.&amp;nbsp; With the web service, you&amp;#39;re depending on internet connectivity which, even in this day where everyone has mobile broadband, there are still a lot of coverage holes. If you had any sort of substantial dataset, pulling it down over a mobile broadband connection would be a doubleplusbad. Copying it to Access or Excel would have the same issues and shortcomings that the first approach, after all it really is the same approach but simply uses a different file format.&lt;/p&gt; &lt;p&gt;Referring to the &lt;font face="Courier New"&gt;SyncServices_CSharp_DownloadOnly&lt;/font&gt; sample included in the Sync Services install, refer to the &lt;font face="Courier New"&gt;SampleServerSyncProvider&lt;/font&gt; method of the &lt;font face="Courier New"&gt;&lt;em&gt;SampleServerSyncProvider.cs&lt;/em&gt;&lt;/font&gt; or &lt;font face="Courier New"&gt;&lt;em&gt;SampleServerSyncProvider.vb&lt;/em&gt;&lt;/font&gt; file, you see the following code (the Author was kind enough to include copious comments which explain each portion - I&amp;#39;ve removed them for readability but would encourage you to refer to them if you&amp;#39;re unfamiliar with Sync Service):&lt;/p&gt; &lt;p&gt;public class SampleServerSyncProvider : DbServerSyncProvider&lt;br /&gt;&amp;nbsp;&amp;nbsp; { &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public SampleServerSyncProvider()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Connection = new SqlConnection(Properties.Settings.Default.ServerConnString); &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;br /&gt;&lt;font color="#0000ff"&gt;string awNewAnchorVariable = &amp;quot;@&amp;quot; + SyncSession.SyncNewReceivedAnchor;&lt;br /&gt;SqlCommand selectNewAnchorCommand = new SqlCommand();&lt;br /&gt;selectNewAnchorCommand.CommandText = &amp;quot;SELECT &amp;quot; + awNewAnchorVariable + &amp;quot; = @@DBTS&amp;quot;;&lt;br /&gt;selectNewAnchorCommand.Parameters.Add(awNewAnchorVariable, SqlDbType.Timestamp);&lt;br /&gt;selectNewAnchorCommand.Parameters[awNewAnchorVariable].Size = 8;&lt;br /&gt;selectNewAnchorCommand.Parameters[awNewAnchorVariable].Direction = ParameterDirection.Output;&lt;br /&gt;selectNewAnchorCommand.Connection = (SqlConnection)this.Connection;&lt;br /&gt;this.SelectNewAnchorCommand = selectNewAnchorCommand;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&amp;nbsp;SqlSyncAdapterBuilder builder = new SqlSyncAdapterBuilder((SqlConnection)this.Connection); &lt;/p&gt; &lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;font color="#008080"&gt;builder.TableName = &amp;quot;Sales.Customer&amp;quot;;&lt;br /&gt;&amp;nbsp;builder.TombstoneTableName = builder.TableName + &amp;quot;_Tombstone&amp;quot;;&lt;br /&gt;&amp;nbsp;builder.TombstoneFilterClause = filterCommand;&lt;/font&gt;&amp;nbsp; &lt;p&gt;&lt;br /&gt;&amp;nbsp;builder.DataColumns.Add(&amp;quot;CustomerId&amp;quot;);&lt;br /&gt;&amp;nbsp;builder.DataColumns.Add(&amp;quot;CustomerName&amp;quot;);&lt;br /&gt;&amp;nbsp;builder.DataColumns.Add(&amp;quot;SalesPerson&amp;quot;);  &lt;p&gt;&lt;br /&gt;&amp;nbsp;builder.CreationTrackingColumn = &amp;quot;InsertTimestamp&amp;quot;;&lt;br /&gt;&amp;nbsp;builder.UpdateTrackingColumn = &amp;quot;UpdateTimestamp&amp;quot;;&lt;br /&gt;&amp;nbsp;builder.DeletionTrackingColumn = &amp;quot;DeleteTimestamp&amp;quot;;  &lt;p&gt;&lt;br /&gt;&amp;nbsp;SyncAdapter customerSyncAdapter = builder.ToSyncAdapter();&lt;br /&gt;&amp;nbsp;customerSyncAdapter.TableName = &amp;quot;Customer&amp;quot;;&lt;br /&gt;&amp;nbsp;this.SyncAdapters.Add(customerSyncAdapter);&lt;br /&gt;}&lt;/p&gt; &lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;[Note:&amp;nbsp; Even with the comments, some of this code may be hard to follow when you first read it.&amp;nbsp; One thing I did which was very enlightening and always a useful thing to do in such situations is fire up good ole&amp;#39; Sql Profiler, then run the application and see exactly what happens, what objects are being used and what commands are being sent to the db]. &lt;p&gt;I show some of the relevant results from the trace below (I&amp;#39;ve color coded the results to the portion of the code that which caused it to happen): &lt;blockquote&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;declare @p3 binary(8)&lt;br /&gt;set @p3=0x0000000000000FA0&lt;br /&gt;exec sp_executesql N&amp;#39;SELECT @sync_new_received_anchor = @@DBTS&amp;#39;,N&amp;#39;@sync_new_received_anchor timestamp &lt;br /&gt;output&amp;#39;,@sync_new_received_anchor=@p3 output&lt;br /&gt;select @p3&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#408080"&gt;exec sp_executesql N&amp;#39;SELECT [CustomerId], [CustomerName], [SalesPerson] FROM Sales.Customer WHERE&amp;nbsp;&lt;br /&gt; (InsertTimestamp &amp;gt; @sync_last_received_anchor AND InsertTimestamp &amp;lt;= &lt;br /&gt;@sync_new_received_anchor)&amp;#39;,N&amp;#39;@sync_last_received_anchor binary(8000),@sync_new_received_anchor &lt;br /&gt;binary(8)&amp;#39;,@sync_last_received_anchor=0x00,@sync_new_received_anchor=0x0000000000000FA0&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#008080"&gt;exec sp_executesql N&amp;#39;SELECT [CustomerId], [CustomerName], [SalesPerson] FROM Sales.Customer WHERE &lt;br /&gt;(CustomerName=&amp;#39;&amp;#39;Sharp Bikes&amp;#39;&amp;#39;) AND (UpdateTimestamp &amp;gt; @sync_last_received_anchor AND UpdateTimestamp &amp;lt;= &lt;br /&gt;@sync_new_received_anchor AND InsertTimestamp &amp;lt;= @sync_last_received_anchor)&amp;#39;,N&amp;#39;@sync_last_received_anchor &lt;br /&gt;timestamp,@sync_new_received_anchor &lt;br /&gt;timestamp&amp;#39;,@sync_last_received_anchor=0x0000000000000000,@sync_new_received_anchor=0x0000000000000FA0&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font color="#008080"&gt;exec sp_executesql N&amp;#39;SELECT [CustomerId], [CustomerName], [SalesPerson], [CustomerType], [DeleteId], &lt;br /&gt;[DeleteTimestamp] FROM Sales.Customer_Tombstone WHERE (CustomerName=&amp;#39;&amp;#39;Sharp Bikes&amp;#39;&amp;#39;) AND (@sync_initialized = 1 &lt;br /&gt;AND DeleteTimestamp &amp;gt; @sync_last_received_anchor AND DeleteTimestamp &amp;lt;= &lt;br /&gt;@sync_new_received_anchor)&amp;#39;,N&amp;#39;@sync_initialized bit,@sync_last_received_anchor &lt;br /&gt;timestamp,@sync_new_received_anchor &lt;br /&gt;timestamp&amp;#39;,@sync_initialized=0,@sync_last_received_anchor=NULL,@sync_new_received_anchor=0x0000000000000FA0&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;As it stands, the code above is pulling everything from the &lt;font face="Courier New"&gt;Sales.Customer&lt;/font&gt; table.&amp;nbsp; But as I mentioned, chances are that you wouldn&amp;#39;t want the whole resultset. Rather, you&amp;#39;d probably want a filtered subset.&amp;nbsp; For the sake of visual simplicity, I&amp;#39;m going to violate one of my biggest coding Pet Peeves and concatenate a sql statement to include a parameter instead of doing it the right way, but I&amp;#39;ll show the correct way shortly. &lt;p&gt;The &lt;font face="Courier New"&gt;SqlSyncAdapterBuilder&lt;/font&gt; has several properties and for filtering purposes, you can simply set the &lt;font face="Courier New"&gt;FilterClause&lt;/font&gt; property.&amp;nbsp; Starting with the code beginning at the adapter instantiation, I modified the code to just return records that have a &lt;font face="Courier New"&gt;CustomerName&lt;/font&gt; value equal to the literal &amp;#39;&lt;font face="Courier New"&gt;Sharp Bikes&amp;#39; (The relevant portions are included in &lt;strong&gt;Bold &lt;/strong&gt;face)&lt;/font&gt;: &lt;blockquote&gt; &lt;p&gt;SqlSyncAdapterBuilder builder = new SqlSyncAdapterBuilder((SqlConnection)this.Connection);  &lt;p&gt;&lt;br /&gt;&lt;strong&gt;String FilterCommand = &amp;quot;CustomerName=&amp;#39;Sharp Bikes&amp;#39;&amp;quot;;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;builder.TableName = &amp;quot;Sales.Customer&amp;quot;;&lt;br /&gt;builder.TombstoneTableName = builder.TableName + &amp;quot;_Tombstone&amp;quot;;&lt;br /&gt;&lt;strong&gt;builder.FilterClause = FilterCommand ;&lt;br /&gt;builder.TombstoneFilterClause = FilterCommand;&lt;/strong&gt; &lt;/p&gt; &lt;p&gt;builder.SyncDirection = SyncDirection.DownloadOnly;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So, it&amp;#39;s pretty much this easy, you simply need to set the FilterClause property of the &lt;font face="Courier New"&gt;SqlSyncAdapterBuilder&lt;/font&gt; and absent some really compelling reason to do so, set the &lt;font face="Courier New"&gt;TombStoneFilterClause&lt;/font&gt; to the same value.&amp;nbsp; Because you use the same statement, it&amp;#39;s best to use a String literal so that the two &lt;font face="Courier New"&gt;FilterClause&lt;/font&gt; values don&amp;#39;t get out of sync. Just as you set the &lt;font face="Courier New"&gt;FilterClause&lt;/font&gt; and &lt;font face="Courier New"&gt;TombstoneFilterClause&lt;/font&gt; properties to facilitate filtering, if you use a parameter, you need to add a &lt;font face="Courier New"&gt;SqlParameter&lt;/font&gt; (or &lt;font face="Courier New"&gt;SqlParameter&lt;/font&gt;(s)) to the &lt;font face="Courier New"&gt;FilterParameters&lt;/font&gt; and &lt;font face="Courier New"&gt;TombstoneFilterParameters&lt;/font&gt; collections.&amp;nbsp; So, the below code shows the previous snippet modified to use a &lt;font face="Courier New"&gt;SqlParameter&lt;/font&gt; instead of concatenating the Sql text, again, the relevant portions are included in &lt;strong&gt;Bold &lt;/strong&gt;face: &lt;blockquote&gt; &lt;p&gt;SqlSyncAdapterBuilder builder = new SqlSyncAdapterBuilder((SqlConnection)this.Connection);&lt;br /&gt;SqlParameter CustomerNameParameter = new SqlParameter(&amp;quot;@CustomerName&amp;quot;, SqlDbType.NVarChar);  &lt;p&gt;&lt;br /&gt;&lt;strong&gt;String FilterCommand = &amp;quot;CustomerName=@CustomerName&amp;quot;;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;builder.TableName = &amp;quot;Sales.Customer&amp;quot;;&lt;br /&gt;builder.TombstoneTableName = builder.TableName + &amp;quot;_Tombstone&amp;quot;;&lt;br /&gt;builder.FilterClause = FilterCommand ;&lt;br /&gt;builder.TombstoneFilterClause = FilterCommand;&lt;br /&gt;&lt;strong&gt;builder.FilterParameters.Add(CustomerNameParameter);&lt;br /&gt;builder.TombstoneFilterParameters.Add(CustomerNameParameter);&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Now the results from Profiler show something notably different: &lt;blockquote&gt; &lt;p&gt;exec sp_executesql N&amp;#39;SELECT [CustomerId], [CustomerName], [SalesPerson] FROM Sales.Customer WHERE &lt;br /&gt;(&lt;font size="3"&gt;&lt;strong&gt;&lt;em&gt;CustomerName=@CustomerName&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;) AND (InsertTimestamp &amp;gt; @sync_last_received_anchor AND InsertTimestamp &amp;lt;= &lt;br /&gt;@sync_new_received_anchor)&amp;#39;,N&amp;#39;@CustomerName nvarchar(11),@sync_last_received_anchor &lt;br /&gt;binary(8000),@sync_new_received_anchor binary(8)&amp;#39;,@&lt;strong&gt;&lt;font size="3"&gt;&lt;em&gt;CustomerName=N&amp;#39;Sharp &lt;br /&gt;Bikes&amp;#39;&lt;/em&gt;&lt;/font&gt;&lt;/strong&gt;,@sync_last_received_anchor=0x00,@sync_new_received_anchor=0x0000000000000FA0&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;exec sp_executesql N&amp;#39;SELECT [CustomerId], [CustomerName], [SalesPerson] FROM Sales.Customer WHERE &lt;br /&gt;(&lt;font size="3"&gt;&lt;strong&gt;&lt;em&gt;CustomerName=@CustomerName&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;) AND (UpdateTimestamp &amp;gt; @sync_last_received_anchor AND UpdateTimestamp &amp;lt;= &lt;br /&gt;@sync_new_received_anchor AND InsertTimestamp &amp;lt;= @sync_last_received_anchor)&amp;#39;,N&amp;#39;@CustomerName &lt;br /&gt;nvarchar(11),@sync_last_received_anchor timestamp,@sync_new_received_anchor timestamp&amp;#39;,@&lt;font size="3"&gt;&lt;strong&gt;&lt;em&gt;CustomerName=N&amp;#39;Sharp &lt;br /&gt;Bikes&amp;#39;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;,@sync_last_received_anchor=0x0000000000000000,@sync_new_received_anchor=0x0000000000000FA0&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;exec sp_executesql N&amp;#39;SELECT [CustomerId], [CustomerName], [SalesPerson], [CustomerType], [DeleteId], &lt;br /&gt;[DeleteTimestamp] FROM Sales.Customer_Tombstone WHERE (&lt;font size="3"&gt;&lt;strong&gt;&lt;em&gt;CustomerName=@CustomerName&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;) AND (@sync_initialized = 1 &lt;br /&gt;AND DeleteTimestamp &amp;gt; @sync_last_received_anchor AND DeleteTimestamp &amp;lt;= &lt;br /&gt;@sync_new_received_anchor)&amp;#39;,N&amp;#39;@CustomerName nvarchar(11),@sync_initialized bit,@sync_last_received_anchor &lt;br /&gt;timestamp,@sync_new_received_anchor timestamp&amp;#39;&lt;font size="3"&gt;&lt;strong&gt;&lt;em&gt;,@CustomerName=N&amp;#39;Sharp &lt;br /&gt;Bikes&amp;#39;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;,@sync_initialized=0,@sync_last_received_anchor=NULL,@sync_new_received_anchor=0x0000000000000FA0&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;You can see here clearly that not only is the &lt;font face="Courier New"&gt;@CustomerName&lt;/font&gt; parameter being used, it&amp;#39;s being set to the literal &lt;font face="Courier New"&gt;Sharp Bikes&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;There&amp;#39;s one catch though when using real parameters. If you modify the code as I did above and try to run it, you&amp;#39;ll encounter the following exception:&lt;/p&gt; &lt;p&gt;&amp;nbsp; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;&lt;font color="#ff0000"&gt;Microsoft.Synchronization.Data.SessionVariableException was unhandled&lt;br /&gt;&amp;nbsp; Message=&amp;quot;Unable to set session parameters in DbServerSyncProvider. Cannot obtain the value for command parameter &amp;#39;@CustomerName&amp;#39;.&amp;quot;&lt;br /&gt;&amp;nbsp; Source=&amp;quot;Microsoft.Synchronization.Data.Server&amp;quot;&lt;br /&gt;&amp;nbsp; SyncSource=&amp;quot;ServerSyncProvider&amp;quot;&lt;br /&gt;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Synchronization.Data.Server.DbServerSyncProvider.SetSessionParameters(IDbCommand cmd, SyncGroupMetadata groupMetadata, SyncTableMetadata tableMetadata, SyncSession syncSession, DataColumnCollection columns, SyncStage stage)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Synchronization.Data.Server.DbServerSyncProvider.EnumerateChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession, IDbTransaction transaction, EnumerateChangeType changeType)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Synchronization.Data.Server.DbServerSyncProvider.GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Synchronization.SyncAgent.DownloadChanges(SyncGroupMetadata groupMetadata)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Synchronization.SyncAgent.Synchronize()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Samples.Synchronization.MainForm.btnSynchronize_Click(Object sender, EventArgs e) in C:\SyncServicesCode\SyncServices_CSharp_DownloadOnly\Client\Forms\MainForm.cs:...&lt;/font&gt;&lt;/em&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Nothing too shocking though right, after all, although we specified a parameter be used in the &lt;font face="Courier New"&gt;CommandText&lt;/font&gt; property, we never set the value so it&amp;#39;s not surprising that an exception was thrown unless the parameter had a default value, which in this case it clearly did not.  &lt;p&gt;But if you change the code to explicitly set the value for the parameter, for instance like this... &lt;blockquote&gt; &lt;p&gt;SqlParameter CustomerNameParameter = new SqlParameter(&amp;quot;@CustomerName&amp;quot;, SqlDbType.NVarChar);&lt;br /&gt;&lt;strong&gt;CustomerNameParameter.Value = &amp;quot;Sharp Bikes&amp;quot;;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;you&amp;#39;ll still get the same exception.&amp;nbsp; This really threw me for a loop b/c I used the debugger and &lt;em&gt;proved&lt;/em&gt; to myself that the value wasn&amp;#39;t null or left out. If you step through with the debugger, you can verify for yourself that the above code is in fact setting the value of &lt;font face="Courier New"&gt;@CustomerName = &amp;quot;Sharp Bikes&amp;quot;&lt;/font&gt; &lt;p&gt;One point that&amp;#39;s extremely important... Normally, as long as you modify your &lt;font face="Courier New"&gt;CommandText&lt;/font&gt; to refer to the&amp;nbsp;&lt;font face="Courier New"&gt;SqlParameter&lt;/font&gt;&amp;nbsp; and&amp;nbsp;add a &lt;font face="Courier New"&gt;SqlParameter&lt;/font&gt; object to a &lt;font face="Courier New"&gt;SqlCommand&lt;/font&gt; object&amp;#39;s &lt;font face="Courier New"&gt;Parameters&lt;/font&gt; collection, you don&amp;#39;t need to do anything else. But as I just babbled on about, that won&amp;#39;t cut it here... something is still missing. &lt;p&gt;As it turns out, (and makes perfect sense once I cleared my tunnel vision), the &lt;font face="Courier New"&gt;SyncAgent &lt;/font&gt;(&lt;em&gt;Microsoft.Synchronization.SyncAgent&lt;/em&gt;) class is what actually does much of the heavy lifting and just because you have a Parameter referenced in code in your &lt;font face="Courier New"&gt;SqlSyncAdapterBuilder&lt;/font&gt;, the &lt;font face="Courier New"&gt;SyncAgent&lt;/font&gt; doesn&amp;#39;t know anything about it. Since it doesn&amp;#39;t know anything about it, it doesn&amp;#39;t know to pass in a value or what value to pass to it, so when it tries to finish processing the value for the parameter isn&amp;#39;t set. It didn&amp;#39;t matter that we set it explicitly because we set it in the wrong place. &lt;p&gt;Fortunately, it&amp;#39;s very easy to address.&amp;nbsp; The code below is the&lt;font face="Courier New"&gt; SyncAgent&amp;#39;s&lt;/font&gt; code, the last line in Bold is what you need to add if you&amp;#39;re using a parameterized filter: &lt;p&gt;public class SampleSyncAgent : Microsoft.Synchronization.SyncAgent&lt;br /&gt;&amp;nbsp;{ &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public SampleSyncAgent()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlCeClientSyncProvider clientSyncProvider = new SqlCeClientSyncProvider(Properties.Settings.Default.ClientConnString, true);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.LocalProvider = clientSyncProvider;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientSyncProvider.ChangesApplied += new EventHandler&amp;lt;ChangesAppliedEventArgs&amp;gt;(clientSyncProvider_ChangesApplied);  &lt;p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.RemoteProvider = new SampleServerSyncProvider();  &lt;p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SyncTable customerSyncTable = new SyncTable(&amp;quot;Customer&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; customerSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; customerSyncTable.SyncDirection = SyncDirection.DownloadOnly;  &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Configuration.SyncTables.Add(customerSyncTable);&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Configuration.SyncParameters.Add(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SyncParameter(&amp;quot;@CustomerName&amp;quot;, &amp;quot;Sharp Bikes&amp;quot;));&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;p&gt;} &lt;p&gt;(Part of this class was left out for brevity - all that is missing is the private variables and their corresponding public properties). &lt;p&gt;The corresponding code is available &lt;a href="http://www.williamgryan.com/downloads/code/syncservices" target="_blank"&gt;Here&lt;/a&gt;.&amp;nbsp; Please note that this code is taken from the Synchronization Services samples that are included when you install Synchronization Services.&amp;nbsp; I merely modified that code to support parameterized filters.&amp;nbsp; I will be adding a UI Element on the MainForm object so that you can set the value dynamically instead of hard coding it as I did.&amp;nbsp; Again, although this post is a little long, we really are talking about basically adding less than 10 lines of code to add filtering. You need to set the FilterClause, the TombstoneFilterClause, FilterParameters, TombstoneFilterParameters and then add a SyncParameter to the SyncAgent.&amp;nbsp; As you can infer, you if you need more expressions, you can just add them accordingly to meet whatever your requirements happen to be. &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1308509" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/ADO.NET+Synchronization+Services/default.aspx">ADO.NET Synchronization Services</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+3.0+Framework/default.aspx">.NET 3.0 Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/DBServerSyncProvider/default.aspx">DBServerSyncProvider</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Synchronization+Services/default.aspx">Synchronization Services</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/SyncAgent/default.aspx">SyncAgent</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Microsoft.Synchronization/default.aspx">Microsoft.Synchronization</category></item><item><title>Free Silverlight Training</title><link>http://msmvps.com/blogs/williamryan/archive/2007/08/14/free-silverlight-training.aspx</link><pubDate>Tue, 14 Aug 2007 19:53:43 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1111448</guid><dc:creator>William</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=1111448</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=1111448</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/08/14/free-silverlight-training.aspx#comments</comments><description>&lt;p&gt;My friend &lt;a href="http://msmvps.com/blogs/brianmadsen/default.aspx" target="_blank"&gt;Brian Madsen&lt;/a&gt;&amp;nbsp;who owns &lt;a href="http://www.csharpzealot.com" target="_blank"&gt;CSharpZealot&lt;/a&gt;&amp;nbsp;has teamed up with &lt;a href="http://www.innerworkings.com/promotions/664b06ea-357c-4730-8cb0-44376cceb865/csharpzealot-silverlight-promotion" target="_blank"&gt;InnerWorkings&lt;/a&gt; to extend a really slick offer for &lt;a href="http://msmvps.com/blogs/brianmadsen/archive/2007/08/14/innerworkings-steps-up-and-offers-free-silverlight-training-for-csharpzealot-com-members.aspx" target="_blank"&gt;Free Silverlight Training for CSharpZealot members&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In addition, &lt;a href="http://adoguy.com/" target="_blank"&gt;Shawn Wildermuth&lt;/a&gt;&amp;nbsp;has been way ahead of the crowd when it comes to &lt;a href="http://silverlight.net/Default.aspx" target="_blank"&gt;Silverlight&lt;/a&gt; and has just created two more &lt;a href="http://adoguy.com/2007/08/10/Two_new_Silverlight_Videos!.aspx" target="_blank"&gt;Silverlight Videos&lt;/a&gt;.&amp;nbsp; His &lt;a href="http://www.adoguy.com" target="_blank"&gt;ADO Guy site&lt;/a&gt;&amp;nbsp;has an entire &lt;a href="http://adoguy.com/silverlight/" target="_blank"&gt;Section dedicated to Silverlight&lt;/a&gt;&amp;nbsp;and well, Shawn is gifted in many areas but when it comes to teaching, no one does it better.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;On a similar note, my company recently sponsored an internal Silverlight contest where our different offices are competing to build the best game written in Silverlight.&amp;nbsp; They put there money where their mouth is so the first place prize is pretty impressive.&amp;nbsp; I&amp;#39;ve had my nose in the keyboard for the past few weeks trying to help my team win.&amp;nbsp; If you&amp;#39;re interested in learning &lt;a href="http://silverlight.net/" target="_blank"&gt;Silverlight&lt;/a&gt;, one great place to get started is &lt;a href="http://silverlight.net/GetStarted/" target="_blank"&gt;Here&lt;/a&gt;.&amp;nbsp; Microsoft really did the right thing with &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" target="_blank"&gt;Orcas (VS 2008)&lt;/a&gt; and even provides ready to run (almost anyway) &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" target="_blank"&gt;VPC images&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Hopefully when I get some time I can start doing some more in depth &lt;a href="http://www.silverlight.net/" target="_blank"&gt;Silverlight&lt;/a&gt; blogging but let me make a few recommendations.&amp;nbsp; &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Use the VPC images for Orcas.&amp;nbsp; The reasons are the same for any other alpha or beta product you&amp;#39;d want to install but outside of isolation and reducing risk, the time factor is huge.&amp;nbsp; Using the VPC images, you can be up and running in under 5 minutes once you have them downloaded.&amp;nbsp;Benefits like this are really hard to quantify but I can tell you personally that at times, getting my environment set up without VPC images was frustrating to say the least.&lt;/li&gt; &lt;li&gt;Although it&amp;#39;s often prudent to learn to code things without all the crutches that a powerful IDE provide, creating Silverlight with Intellisense and a designer is probably not a very effective way to start things.&amp;nbsp; Unless you are really familiar with WPF already, the syntax takes a little getting used to and there&amp;#39;s a lot of room to mess things up with typos.&lt;/li&gt; &lt;li&gt;In addition to &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" target="_blank"&gt;Orcas&lt;/a&gt;, make sure you pull down &lt;a href="http://www.microsoft.com/Expression/products/download.aspx?key=blend2preview" target="_blank"&gt;Expression Blend and Design&lt;/a&gt;.&amp;nbsp; Blend allows you to create Graphics with &lt;a href="http://www.xaml.net/" target="_blank"&gt;XAML&lt;/a&gt;.&amp;nbsp; I&amp;#39;ve already had a few &lt;a href="http://www.getpaint.net/" target="_blank"&gt;Paint.NET&lt;/a&gt; and &lt;a href="http://www.adobe.com/products/photoshop/index.html" target="_blank"&gt;Photoshop&lt;/a&gt; fanatics get all over me for plugging Blend, but I think they are off base. I&amp;#39;m not advocating replacing Photoshop or Paint.NET with Blend. Blend however, allows one to create images with XAML.&amp;nbsp; You in turn can look at the XAML that is generated and use it to help understand and learn XAML.&amp;nbsp; If you did much Office automation, you more than likely &amp;#39;cheated&amp;#39; in the sense that you just ran a macro and saw the code that was generated and used this as a mechanism to learn VBA and get past sticking points.&amp;nbsp; Blend allows you to do the same thing.&amp;nbsp; Sure, hardcore &amp;#39;real&amp;#39; developers do everything in Notepad but if you want to get up to speed, using a tool to help you draw the effects you want and then being able to disassemble the XAML that was generated will get you where you want to be a LOT faster.&lt;/li&gt; &lt;li&gt;Pull down each of the items in the &lt;a href="http://silverlight.net/community/communitygallery.aspx" target="_blank"&gt;Gallery&lt;/a&gt;&amp;nbsp;and work through the &lt;a href="http://silverlight.net/quickstarts/" target="_blank"&gt;QuickStarts&lt;/a&gt;.&amp;nbsp; These encompass many common kick a55 effects and you can reverse engineer them to see learn how to do quite a bit.&lt;/li&gt; &lt;li&gt;I have some pretty strong opinions on the books out there but even if a book doesn&amp;#39;t address Silverlight specifically (most of them however have updated versions which do include Silverlight), you can still learn quite a bit because you are ultimately going to need to really understand WPF and XAML.&amp;nbsp; I really want to gather my thoughts a little better before making any more book recommendations because although all of the WPF books out there are pretty good, some are a lot more helpful than others when it comes to learning Silverlight&lt;/li&gt; &lt;li&gt;Read Shawn Wildermuth&amp;#39;s &lt;a href="http://www.adoguy.com/silverlight" target="_blank"&gt;Silverlight posts&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Personally, since I&amp;#39;m not&amp;nbsp; a designer and very challenged when it comes to graphics, I had a pretty rough time at the beginning of my learning curve. Little by little though, I&amp;#39;m getting through it and hopefully I&amp;#39;ll have some blogworthy material to post soon. As always, if you have any specific questions, please let me know and I&amp;#39;ll be glad to answer what I can.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1111448" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Life+in+General/default.aspx">Life in General</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+Basics/default.aspx">.NET Basics</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Me/default.aspx">Me</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+General/default.aspx">.NET General</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+3.0+Framework/default.aspx">.NET 3.0 Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WPF_2F00_E/default.aspx">WPF/E</category></item><item><title>Theory matters after all...</title><link>http://msmvps.com/blogs/williamryan/archive/2007/08/08/theory-matters-after-all.aspx</link><pubDate>Wed, 08 Aug 2007 03:53:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1094573</guid><dc:creator>William</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=1094573</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=1094573</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/08/08/theory-matters-after-all.aspx#comments</comments><description>&lt;p&gt;There are many discussions developers have with each other that always make for interesting discussions.&amp;nbsp; One of the best ones is &amp;quot;How much does a Computer Science degree matter?&amp;quot;&amp;nbsp; If you argue that it&amp;#39;s really important, you&amp;#39;ll invariably have your argument countered with anecdotes of &amp;#39;some idiot who was totally Ivorty Tower&amp;quot; and examples of people who were self taught and complete bad asses.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I definitely know many many examples of the latter.&amp;nbsp; I&amp;#39;m pretty skeptical about the former which I&amp;#39;ll get to in a minute.&amp;nbsp; I don&amp;#39;t consider myself a bad ass or guru in any sense, but I&amp;#39;ve had a pretty successful career and been able to excel in every job I&amp;#39;ve held.&amp;nbsp; I&amp;#39;m kind of a hybrid though b/c I have taken 30 credit hours of CS even though most of what I know is self taught.&amp;nbsp; However had I not had the education that I did, I know there&amp;#39;s more than a few subjects I would have had a lot more trouble with.&amp;nbsp; Outside of the formal education, there&amp;#39;s a lot of vicarious learning thrust upon you while taking college courses and at least in my case, I&amp;#39;m pretty sure a good bit of my success is attributable directly to my education.&amp;nbsp; I work/have worked with more than a few folks though who had little or no formal CS education and are far better developers than I am.&amp;nbsp; Experience and learning are ultimately what matter and at the end of the day, if you learn to create effective classes for instance, it doesn&amp;#39;t much matter if you learned to creat them in a class room or at work.&amp;nbsp; Ultimately, the reason this always makes for such a good discussion is precisely because&amp;nbsp; there are so many excellent examples to support either side of the argument.&lt;/p&gt;
&lt;p&gt;One thing I hear a lot though are people that criticize people that &amp;#39;think they are still in college&amp;#39;, &amp;#39;all theory&amp;#39; &amp;#39;too much textbook&amp;#39; or &amp;#39;ivory tower&amp;#39;.&amp;nbsp; I have yet to meet or work with someone who&amp;#39;s so well educated that they are poor at development. Like most things, I think good theory makes good practice.&amp;nbsp; What I have come across however is posers who hide behind big words.&amp;nbsp; In every single case where I&amp;#39;ve been told someone is &amp;#39;all theory&amp;#39; and had the opportunity to work with this person, what I&amp;#39;ve found is that they aren&amp;#39;t all theory at all. They are all &amp;#39;use words and phrases they don&amp;#39;t understand to&amp;nbsp; compensate for their disturbing level of ignorance&amp;#39;.&amp;nbsp; In most cases, these folks learned just enough to sound like they know what they are talking about (to others that aren&amp;#39;t familiar with the theory they claim to espouse).&amp;nbsp; A few notable examples come to mind, in most cases, I&amp;#39;ve run into and/or heard from friends about this more times than I care to remember:&lt;/p&gt;
&lt;p&gt;Tonight though, I was flipping through &lt;a href="http://www.wired.com/"&gt;Wired&lt;/a&gt; and came across an article which proves that &lt;a href="http://blog.wired.com/27bstroke6/2007/08/researchers-ana.html"&gt;without a firm command of theory, you&amp;#39;re going to be in over your head in some cases&lt;/a&gt;.&amp;nbsp; Even cooler than the article is the &lt;a href="http://blog.wired.com/27bstroke6/files/jpegquality.txt"&gt;source code they posted with it&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I&amp;#39;m not very familiar with the .jpg file format, but this article really got me thinking.&amp;nbsp; I mean, I would never have even thought to look for such things.&amp;nbsp; The code isn&amp;#39;t really all that complex, but understanding what it&amp;#39;s doing and why is something you aren&amp;#39;t just going to figure out on your own.&amp;nbsp; At least I know I wouldn&amp;#39;t.&amp;nbsp; Not surprising, &lt;a href="http://www.hackerfactor.com/bio.html"&gt;Neal Krawetz&lt;/a&gt;&amp;nbsp; the guy who performed this analysis has&amp;nbsp; a Ph.D in Computer Science.&amp;nbsp; Read the article, look at the source code, hit his web site - seems to me this is true Ivory Tower stuff and it&amp;#39;s pretty darned impressive if you ask me.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1094573" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/News/default.aspx">News</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Cool+Stuff/default.aspx">Cool Stuff</category></item><item><title>Coding Arguments - aka How to Start Religious Wars</title><link>http://msmvps.com/blogs/williamryan/archive/2007/07/23/coding-arguments-aka-how-to-start-religious-wars.aspx</link><pubDate>Mon, 23 Jul 2007 04:33:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1048055</guid><dc:creator>William</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=1048055</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=1048055</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/07/23/coding-arguments-aka-how-to-start-religious-wars.aspx#comments</comments><description>&lt;p&gt;I am lucky enough to work for a company that&amp;nbsp; really encourages us to get together and learn/hang out etc.&amp;nbsp; One way this happens is by Tech Nights. Basically, we have in office meetings which are recorded via Live Meeting, where someone picks a topic and teaches about it. Afterward, folks go to dinner and the company picks up the tab. Two weeks ago I had done the presentation and we all went out afterward.&amp;nbsp; Two of our new guys were with us, and the rest of the folks there had all worked together at a particular client.&amp;nbsp; Both of our new guys are really sharp, can talk their share of smack when necessary and been here long enough to feel comfortable speaking their minds if they want to.&lt;/p&gt;
&lt;p&gt;The first discussion was regarding&amp;nbsp;Frameworks.&amp;nbsp;&amp;nbsp;One of us mentioned that he liked Frameworks and believes in them.&amp;nbsp; Being the smart a55 that I am, I asked &amp;quot;What in the h3ll does that mean?&amp;quot;&amp;nbsp; .&amp;nbsp; He proceeded to explain that he believed in code reuse and has build reusable code&amp;nbsp;at every opportunity.&amp;nbsp; Trying to have a little fun and&amp;nbsp;encourage discussion, I asked him &amp;quot;Who doesn&amp;#39;t believe in code reuse?&amp;nbsp; But if that&amp;#39;s the only goal, then a function gets the job done.&amp;nbsp; Above functions, the whole reason for OOP&amp;nbsp;is to facilitate reuse and simply building&amp;nbsp;a bunch of objects that can be used sounds&amp;nbsp;a lot more like an API than a Framework&amp;quot;.&amp;nbsp; The guy in question is a top notch coder and certainly understands the difference, he&amp;nbsp;just had a little trouble using &amp;#39;official definitions&amp;#39;.&amp;nbsp; But&amp;nbsp;asking what differentiates a Framework from an API&amp;nbsp;turned out to be a pretty decent question to ask b/c neither have absolutely conclusive definitions that make them mutually exclusive.&amp;nbsp;As such, it&amp;#39;s precisely the type of argument that a bunch of nerds can argue into the ground over dinner.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I mentioned before that&amp;nbsp;the &amp;#39;rest of us&amp;#39;&amp;nbsp;all worked at a certain client together.&amp;nbsp; Personally, I&amp;#39;m pretty fond of standardization when it comes to coding. So even if I think my way is better, I&amp;#39;ll&amp;nbsp;use the predominant methodology in most cases simply b/c I think that in general, any improvements that doing it &amp;#39;my&amp;#39; way brings will be more than offset by complications resulting from differing coding styles. If nothing else, it&amp;nbsp;will usually mean that every time someone looks at it, they are going to ask &amp;quot;Why is it like this instead of ...&amp;quot;.&amp;nbsp; It ends up causing you to explain it over and over and have pedantic&amp;nbsp;discussions with each new person that joins the team. Similarly, if you differ from what&amp;#39;s being done, it&amp;#39;s a virtual certainty that the implication of it will be that &amp;#39;the other way is wrong&amp;#39;.&amp;nbsp;Most of the folks I work/worked with are humble enough to acknolwedge that&amp;nbsp;any given way they chose to implement something could have been better (any *real* coder will always acknolwedge it could have been done better. Anyone that says it couldn&amp;#39;t is&amp;nbsp;either egotistical or clueless).&amp;nbsp; However, just because people are ok with admitting they didn&amp;#39;t chose an optimal design methodology, that doesn&amp;#39;t mean it&amp;#39;s cool to rub it in their face.&amp;nbsp; After all, you&amp;#39;ll be on that side of the equation unless you never have to design stuff.&amp;nbsp; Not that I recommend doing things&amp;nbsp;wrong just to save people&amp;#39;s egos, but some times,&amp;nbsp;it&amp;#39;s&amp;nbsp;too easy to get&amp;nbsp;so carried&amp;nbsp;away with saying &amp;quot;this is right&amp;quot; or&amp;nbsp;&amp;quot;this is wrong&amp;#39; that you forget to remember&amp;nbsp; &amp;quot;It needs done&amp;quot;. Another problem with doing things differently is that opinions are like Carrolls, everyone has one.&amp;nbsp; What seems&amp;nbsp;obvious as day to one person may seem utterly silly to another.&amp;nbsp;&amp;nbsp;Design decisions are all about tradeoffs and since we all see the value of tradeoffs differently, well you know...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Since a few of us worked at the same client, I decided to provoke a little bit.&amp;nbsp; We had worked there at different times, except for me - I was there throughout the time each of&amp;nbsp;the other guys was there. So one of them had really strong opinions about how well code should be formatted.&amp;nbsp;&amp;nbsp;So on the one side we had the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Upper case for Keywords and reserved words&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Commas at the beginning of the line&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Each column on a different line&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Lining up words in the center&lt;/div&gt;&lt;code&gt;UPDATE Whatever &lt;br /&gt;&amp;nbsp;&amp;nbsp; SET Whatever &lt;br /&gt;&amp;nbsp;WHERE WHATEVER&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Immediately getting rid of any objects that aren&amp;#39;t used or that were just used for testing&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Using Source Control to track versioning differences.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Death to Hungarian Notation&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Names should be self documenting - no acronyms, developer initials or anything that might lead to confusion about what the method should do.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Only including update information in the procedure&amp;#39;s/parameter&amp;#39;s&amp;nbsp; documentation and leaving big changes to the source control system.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Since we didn&amp;#39;t have a Source control system at the client (their choice not ours), part of this reasoning was problematic and I&amp;#39;m probably leaving a few things out,but overall, this characterizes Argument 1.&lt;/p&gt;
&lt;p&gt;Argument 2 on the other hand was&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Document everything in the&amp;nbsp; procedure.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Have a dated comment showing who made the change every single time anything was changed&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Leave backups and test objects in the database because they may be needed later&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Minimal attention to formatting (although each person that advocated this was very careful about how their code performed. So it&amp;nbsp; would be totally unfair to imply their work was sloppy - they just had more of a don&amp;#39;t sweat the small stuff but make really sure the big stuff is right approach&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Use initials for personal utility procedures so they can be found and used easily.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Personally, I am a nut about formatting. I&amp;#39;m really fastidious about formatting and would clearly rather have NO comments than out of date comments or too many comments - but that&amp;#39;s not to say that I am anti-comments in any sense. I also am pretty fussy about source control, if you are going to have any configuration management, I can&amp;#39;t stand it being done in comments inline or at the top of the code - it needs to be in a version control system.&amp;nbsp; So on this one, the people that were on the project who preferred Argument 1 were in the minority. However at the table, we were in the Majority.&amp;nbsp; This immediately led to a small trash talking session among friends.&amp;nbsp; Little did we know the new guys were so interested in the topic. One of them seemed to be pretty opinionated but it wasn&amp;#39;t until a week later that we realized how much so.&lt;/p&gt;
&lt;p&gt;The thing is that while I consider myself a Data guy, my theoretical understanding of Relational Database theory is much stronger than say my DBA skills are. And although I&amp;#39;m admittedly a little fussy about formatting and the like, I have to admit that many of the best DBA&amp;#39;s I&amp;#39;ve worked with are much more relaxed about formatting and commenting than I am. Many of them not being AppDev guys don&amp;#39;t depend on Source Control and prefer to handle versioning issues inline. It&amp;#39;s difficult to argue against competency so in the end, my utimate belief is to defer to the best guy on the project.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Have you encountered any discussions like this that you didn&amp;#39;t really think would get people talking much but ended up getting people really involved?&amp;nbsp; Personally, I think that as long as you&amp;#39;re dealing with mature professionals, these sorts of things are great b/c folks are passionate about them, so you have smart people putting forth their best arguments, and you can&amp;#39;t help but gain perspective and knowledge. On the other hand, if you deal with people who get defensive easy, or who have trouble admitting they don&amp;#39;t know everything (funny how the more defensive they are , the less they actually know in most cases), well, this stuff will do nothing but cause bad blood.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;So which side do you fall on?&amp;nbsp; I&amp;#39;m guessing it&amp;#39;s not this black and white in many cases, for instance, the comma issue could fall in either group.&lt;/p&gt;
&lt;p&gt;What sorts of things have you come across that have stirred discussion? Any specific coding arguments, and if so, what?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1048055" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Life+in+General/default.aspx">Life in General</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category></item><item><title>Programmatic Malpractice</title><link>http://msmvps.com/blogs/williamryan/archive/2007/01/31/programmatic-malpractice.aspx</link><pubDate>Thu, 01 Feb 2007 03:23:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:532889</guid><dc:creator>William</dc:creator><slash:comments>26</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=532889</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=532889</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/01/31/programmatic-malpractice.aspx#comments</comments><description>&lt;p&gt;In the category of &amp;quot;I couldn&amp;#39;t make something like this up even if I tried&amp;quot; comes the following code.&amp;nbsp; Rather than try to dissect what it is that&amp;#39;s wrong with it, it&amp;#39;s a lot easier to find what&amp;#39;s right with it.&amp;nbsp; If the person that wrote this cashes their paycheck, they should be charged with theft.&amp;nbsp; We have all been in a hurry and written code that we aren&amp;#39;t proud of. We all are guilty of oversights.&amp;nbsp; But this was done by a self proclaimed guru and expert, and when you read the comments that were attached to it, it&amp;#39;s clear that this was done intentionally.&amp;nbsp; So I&amp;#39;m opening the floor to pointing out what&amp;#39;s wrong with it, or for my really advanced readers, what&amp;#39;s right with it (God knows a lot can go wrong calling the AddNew method of a DataTable and wrapping such a dangerous operation in catch block catching System.Exception is absolutely critical):&amp;nbsp; Read the code first, then read the comments associated with it.&amp;nbsp; P.S. I&amp;#39;m warning you up front that I&amp;#39;m not responsible if you start barfing, become overwhelmed by the ugliness of it and gouge your eyes out as solace or if your brains succumbs to spontaneous combustion.&amp;nbsp; Yep, a &amp;#39;professional consultant&amp;#39; wrote this work of art.&amp;nbsp; As a consultant, I guess I should find comfort in stuff like this b/c as long as there are people like this committing malpractice, I mean working, then I&amp;#39;ll always have a job. On the other hand, this sort of stuff is so bad and so inexcusably terrible , that my heart goes out to this person&amp;#39;s victim, urr, I mean client.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static decimal EvalNumber(string strExpr, ref bool&lt;br /&gt;calcSuccessful, ref string NegativeDelim)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;calcSuccessful=false;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NegativeDelim = &amp;quot;-&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataTable dt = new DataTable();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dt.Columns.Add(&amp;quot;Expr&amp;quot;, typeof(Decimal), strExpr);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// tough decision they entered a error&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// colud be as simple as text/words&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// could be division by zero&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (0);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataRow dr; dr = dt.NewRow();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dt.Rows.Add(dr);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (0);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;decimal TempReturn=0;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TempReturn=Convert.ToDecimal(dt.Rows[0][&amp;quot;Expr&amp;quot;]);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;calcSuccessful=true;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;calcSuccessful=false;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// expressions like (9) will resolve as positive 9 which is wrong&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// expressions like (9+2*12)*20 will obviously be a real formula&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (calcSuccessful == true &amp;amp;&amp;amp; strExpr.IndexOf(&amp;quot;(&amp;quot;) == 0)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string tempStr = strExpr;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tempStr = tempStr.Replace(&amp;quot;(&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tempStr = tempStr.Replace(&amp;quot;)&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// parentheses are stripped&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;decimal tempNum = 0;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tempNum = Convert.ToDecimal(tempStr);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// (9) == 9 so we must turn it to -9&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (tempNum == TempReturn)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TempReturn = TempReturn * -1;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NegativeDelim = &amp;quot;(&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// nothing to do, all is well&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} // end if parentheses issues&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (TempReturn);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} // end EvalNumber&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; private void ITDataGridView_CellParsing(object s,&lt;br /&gt;DataGridViewCellParsingEventArgs e)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string tempMsg = &amp;quot;ITDataGridViewFund_CellParsing&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Logger.DGVStatusGrid(tempMsg, s, e, this);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (CellTypeCalc(e.RowIndex, e.ColumnIndex, this) == false)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// we are in a row that allows formulas&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bool evalSucceeded = false;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string negativeDelim = &amp;quot;&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;decimal decMoney = 0;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string CellValue =&lt;br /&gt;this.Rows[e.RowIndex].Cells[e.ColumnIndex].EditedFormattedValue.ToString();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;decMoney = Utils.EvalNumber(CellValue, ref evalSucceeded,&lt;br /&gt;ref negativeDelim);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (evalSucceeded)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// set format based on ( or -&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (negativeDelim == &amp;quot;(&amp;quot;)&lt;br /&gt;&lt;br /&gt;this.Rows[e.RowIndex].Cells[e.ColumnIndex].Style.Format =&lt;br /&gt;&amp;quot;#,##0;(#,##0)&amp;quot;; ;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (negativeDelim == &amp;quot;-&amp;quot;)&lt;br /&gt;&lt;br /&gt;this.Rows[e.RowIndex].Cells[e.ColumnIndex].Style.Format =&lt;br /&gt;&amp;quot;#,##0;-#,##0&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; } // end ITDataGridView_CellParsing&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-----------------------------&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Quote from the Guru that wrote this&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I tried every event to set .Value to the result of that formula. I&lt;br /&gt;tried dozens of desperate acts including just trying to SendKeys the&lt;br /&gt;Calc result to the cell (even that hack is impossible to get to work).&lt;br /&gt;Despite printing dozens of articles from Google and reading and&lt;br /&gt;empirically experimenting, days of frustrating no answer were my fate.&lt;br /&gt;But its ok, they had not resolved this in months and were going to say&lt;br /&gt;&amp;quot;no&amp;quot; to that user requirement before they handed it to me. They had&lt;br /&gt;made a pretty good app, otherwise that is a 1:1 knockoff functionality&lt;br /&gt;wise of another .net app written in 1 C# file with the Infragistics&lt;br /&gt;grid and spaghetti code everywhere, extraneous code, ad-hoc SQL, etc.&lt;br /&gt;whereas they wrote a fresh code base in 2 dozen sanely organized files&lt;br /&gt;and using Sprocs instead. They just needed a few bugs and enhancements&lt;br /&gt;fixed, and the code refactored in places for the new code and they&lt;br /&gt;were quite burn out on taming the DataGridView with very little,&lt;br /&gt;incomplete and confusing and contradictory docs whereas I am not burnt&lt;br /&gt;out.&lt;br /&gt;&lt;br /&gt;The two things that maybe could help but the docs/Google searches were&lt;br /&gt;as clear as mud i.e.&lt;br /&gt;e.FormattingApplied=true&lt;br /&gt;e.ParsingApplied=true&lt;br /&gt;seemed to not work well. They are normally false but if set to True&lt;br /&gt;they tended to create recursive DGV events in an infinite loop and&lt;br /&gt;overflow the stack. Ouch!&lt;br /&gt;&lt;br /&gt;Finally the answer turns out to be to use&lt;br /&gt;_CellParsing&lt;br /&gt;&lt;br /&gt;and VERY IMPORTANT use these 2 lines:&lt;br /&gt;&lt;br /&gt;e.Value = newValue;&lt;br /&gt;e.ParsingApplied = true;&lt;br /&gt;&lt;br /&gt;and never do:&lt;br /&gt;this.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = newValue;&lt;br /&gt;e.ParsingApplied = true;&lt;br /&gt;&lt;br /&gt;even though its basically the same thing because DataError will fire&lt;br /&gt;and recursion will occur etc.&lt;br /&gt;&lt;br /&gt;The users had 2 needs that sound simple but are quite tricky...&lt;br /&gt;&lt;br /&gt;1) a cell that understands a formula&lt;br /&gt;2) that cell if you enter -33 it should format as -33&lt;br /&gt;&amp;nbsp; &amp;nbsp;if you enter (33) it should format as (33)&lt;br /&gt;&amp;nbsp; &amp;nbsp;(ouch harder than it sounds)&lt;br /&gt;&lt;br /&gt;and the Eval function I use i.e. is crude and convoluted because of&lt;br /&gt;requirement 2 and the fact that when it works as designed (33)&lt;br /&gt;resolves to +33 if one does not compensate since it considers&lt;br /&gt;parentheses to be an algebraic operator i.e. to make (2+3)*9 &amp;nbsp;resolve&lt;br /&gt;without the multiplication occurring first via the order of operation&lt;br /&gt;rules. I probably will redo the EvalNumber function soon to ve cleaner&lt;br /&gt;and maybe with generics to support more numeric types than decimal&lt;br /&gt;(int, double, etc.) but this app only needs decimal.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE: You&amp;#39;ve heard the adage &amp;#39;the customer is always right&amp;#39; haven&amp;#39;t you?&amp;nbsp; Well, I guess the&amp;nbsp;developer that wrote this has his own version &amp;quot;If the customer doesn&amp;#39;t complain, then the code doesn&amp;#39;t suck&amp;quot;&amp;nbsp; Hysterically, since the customer was ok with the end result, it&amp;#39;s not bad code.&amp;nbsp; I guess you couldn&amp;#39;t&amp;nbsp;write code that met the customer&amp;#39;s needs&amp;nbsp;that wasn&amp;#39;t so lame?&amp;nbsp; The fact is, that a lot of&amp;nbsp;code problems don&amp;#39;t&amp;nbsp;show themselves at first.&amp;nbsp; It&amp;#39;s only after stuff doesn&amp;#39;t scale or port well,&amp;nbsp;that&amp;nbsp;people realize it&amp;#39;s crap.&amp;nbsp;Trust me dude, you could have written better code that they would have been ok with and rationalize it&amp;nbsp;however you like,&amp;nbsp;people&amp;nbsp;bragging about being gurus shouldn&amp;#39;t start writing stuff like this.&lt;/strong&gt;&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=532889" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WTF/default.aspx">WTF</category></item><item><title>I'll be doing the presentation next Monday</title><link>http://msmvps.com/blogs/williamryan/archive/2007/01/26/i-ll-be-doing-the-presentation-next-monday.aspx</link><pubDate>Fri, 26 Jan 2007 00:39:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:520176</guid><dc:creator>William</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=520176</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=520176</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/01/26/i-ll-be-doing-the-presentation-next-monday.aspx#comments</comments><description>&lt;P&gt;If you're going to be in Atlanta next week, &lt;A href="http://www.atlantadotnet.org/"&gt;stop by the .NET User Group Presentation&lt;/A&gt;&amp;nbsp;. &lt;/P&gt;
&lt;P&gt;As you probably know already, I tend toward non mainstream technologies.&amp;nbsp; This presentation is going to be on &lt;A href="http://cardspace.netfx3.com/"&gt;Windows Cardspace&lt;/A&gt;&amp;nbsp;, &lt;A href="http://msdn2.microsoft.com/en-us/netframework/aa663324.aspx"&gt;Windows Communication Foundation&lt;/A&gt; and &lt;A href="http://wpf.netfx3.com/"&gt;Windows Presentation Foundation&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I've been working diligently as a tech reviewer for&amp;nbsp;&amp;nbsp; &lt;A href="http://www.amazon.com/Professional-WCF-Programming-Development-Communication/dp/0470089849/sr=8-1/qid=1169772126/ref=sr_1_1/104-8028824-2026339?ie=UTF8&amp;amp;s=books"&gt;Scott Klein's Professional WCF Programming&lt;/A&gt;&amp;nbsp;so I'm pretty well versed there.&amp;nbsp; I've learned a lot about WCF from Scott so hopefully I can make a good showing there.&lt;/LI&gt;
&lt;LI&gt;My fascination with Cardspace borders on an obsession so I'm quite confident this part should be cool.&lt;/LI&gt;
&lt;LI&gt;I&amp;nbsp; have 0 UI Skills so while I know my way around WPF, well, my game is pretty weak.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I was a pretty big fan of Remoting, love Web Services and loved WSE (heck, I was one of the 4 people in the world that actually cared about WSE 3.0) so WCF is just - well, da bomb. Huge move forward here.&lt;/P&gt;
&lt;P&gt;As far as Cardspace, I can only hope it's going to get adopted and go mainstream.&amp;nbsp; Self issuing cards are a cool idea and more than anything, will make things more convenient.&amp;nbsp; There's got to be some streamlined distribution of Managed cards, but once that's addressed, it's got to be huge.&amp;nbsp; I'm having some server problems right now, but hopefully they'll be addressed tonight.&amp;nbsp; &lt;A href="http://community.strongcoders.com/blogs/ryan/"&gt;Ryan&lt;/A&gt;&amp;nbsp;and I are putting together some web services and I hope to have Cardspace up and running with one of them.&lt;/P&gt;
&lt;P&gt;Everybody else in the world is blogging about WPF so I don't have much to add there.&amp;nbsp; &lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=520176" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Cardspace/default.aspx">Cardspace</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/WCF/default.aspx">WCF</category></item><item><title>How to be really annoying with Pocket Outlook</title><link>http://msmvps.com/blogs/williamryan/archive/2007/01/25/how-to-be-really-annoying-with-pocket-outlook.aspx</link><pubDate>Thu, 25 Jan 2007 06:08:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:517762</guid><dc:creator>William</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=517762</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=517762</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/01/25/how-to-be-really-annoying-with-pocket-outlook.aspx#comments</comments><description>&lt;P&gt;If you've been following my coding tonight, you can probably tell what I'm up to. If you call me regularly, you probably are already familiar with this little project, aka the CuckooBot.&amp;nbsp; He's up to Version 4.0 and about to be released into the wild. Yes, this one is more functional and useful than the last but also a lot snarkier and more annoying. In fact, he's also a lot smarter. He has a lot better AI and text parsing for one thing, so he can make better decisions about whether or not I can be disturbed and if you are on the 'cool' list, he'll actually do some of your bidding. When I release the final version, I'll provide everyone with the list of commands he'll respond to.&amp;nbsp; But enough about that for now.&amp;nbsp; Part two of this project involves email.&amp;nbsp; You can shoot the CuckooBot an email with a request, like "Please send ClevelandSteamer.jpg" and if you are authorized, he'll send it.&amp;nbsp; The&amp;nbsp; authorization piece is causing me some grief but it's not like I have anything better to be doing in the middle of the night right?&lt;/P&gt;
&lt;P&gt;Ok, so the way to send Email messages is to first create an OutlookSession object. Instantiate it and scope it as necessary.&amp;nbsp; Next, specify an EmailAccount for it.&amp;nbsp; Next create an EmailMessage and at the end, just Send() it.&lt;/P&gt;
&lt;P&gt;Now, I've mentioned many times that things like BCC, CC, Importance and Sensitivity should be outlawed and considered as tantamount to war crimes for they are pure evil. But too many people like those features so I'll have to keep my little quixotic jihad against them going in other ways.&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;CODE&gt;const&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; Primary = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Cuckoo1"&lt;/CODE&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;CODE&gt;private&lt;/FONT&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;{&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008080 size=2&gt;&lt;CODE&gt;OutlookSession MainSession = new OutlookSession()&lt;/FONT&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;FONT color=#008080 size=2&gt;&lt;CODE&gt;EmailAccount&lt;/FONT&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;FONT color=#008080 size=2&gt;EmailAccount MainAccount = MainSession.EmailAccounts[Primary];&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;CODE&gt;EmailMessage MyMessage = new EmailMessage();&lt;/FONT&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;CODE&gt;//One dorks set this to High.&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;MyMessage.Importance = &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Importance&lt;/FONT&gt;&lt;FONT size=2&gt;.Normal;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;CODE&gt;//Again, see above.&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;MyMessage.Sensitivity = &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Sensitivity&lt;/FONT&gt;&lt;FONT size=2&gt;.Normal;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;MyMessage.Subject = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Cleveland Steamers vs. Pink Socks on Fox - 8:00 PM EDT"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;MyMessage.To = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Recipient&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Knights of the Cleveland Steamers"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"911@clevelandsteamers.org"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;MyMessage.Attachments.Add(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Attachment&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;@"\eviction1.jpg"&lt;/FONT&gt;&lt;FONT size=2&gt;));&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;MyMessage.BodyText = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Cleveland Steamers aren't appropriate for community sites. However I predict they'll win tonight - 9-2"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;MainAccount.Send(MyMessage);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;}&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=517762" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Mindless+Babbling/default.aspx">Mindless Babbling</category></item><item><title>Password Protection != Encryption on SqlCe</title><link>http://msmvps.com/blogs/williamryan/archive/2007/01/25/password-protection-encryption-on-sqlce.aspx</link><pubDate>Thu, 25 Jan 2007 03:50:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:517605</guid><dc:creator>William</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=517605</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=517605</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/01/25/password-protection-encryption-on-sqlce.aspx#comments</comments><description>&lt;P&gt;I know this probably seems pretty obvious, but believe it or not, it's a very common area of confusion.&amp;nbsp; Take a look at the following declaration:&lt;/P&gt;&lt;FONT color=#008080 size=2&gt;
&lt;P&gt;&lt;CODE&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;CODE&gt;ConnectionString = &lt;/CODE&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.Format(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;@"Data Source=\BlueCuckoo.sdf;password={0}"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"SomeValue"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008080 size=2&gt;&lt;CODE&gt;SqlCeEngine&lt;/FONT&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;engine.CreateDatabase();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;If I asked, "Will this database be encrypted?" you should hopefully answer "No" b/c&amp;nbsp;I gave away the answer in the title. However on more than a few occassions, i've seen people&amp;nbsp;assume that it was.&amp;nbsp; If you don't explicitly add Encrypt&amp;nbsp; = True&amp;nbsp;- it isn't going to be encrypted.&amp;nbsp; And just in case you're wondering "Well, what if I want to encrypt the database but not password protect it?" , well, you wouldn't seriously ask me something like that right?&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=517605" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Mindless+Babbling/default.aspx">Mindless Babbling</category></item><item><title>SMS Messages with Windows Mobile 5.0</title><link>http://msmvps.com/blogs/williamryan/archive/2007/01/25/sms-messages-with-windows-mobile-5-0.aspx</link><pubDate>Thu, 25 Jan 2007 02:40:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:517555</guid><dc:creator>William</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=517555</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=517555</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/01/25/sms-messages-with-windows-mobile-5-0.aspx#comments</comments><description>&lt;P&gt;A while ago, I was playing around creating a bot, a Snarkier version of the &lt;A href="http://blogs.msdn.com/windowsmobile/archive/2006/10/29/the-mobile-secretary-source-code.aspx"&gt;Mobile Secretary Application&lt;/A&gt;&amp;nbsp;.&amp;nbsp; Well, it was late and I got sloppy. So basically, my little app sent out a text message to everyone on one of my company's Outlook distribution lists. I learned a lot that night.&lt;/P&gt;
&lt;P&gt;So you've always been able to send SMS messages with Smartphone, but it's a lot easier now.&amp;nbsp; Sending them isn't a big deal though. The cool thing is intercepting them.&amp;nbsp; To that end, the &lt;A href="http://msdn2.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.messageinterception.messageinterceptor.aspx"&gt;Message Interceptor&lt;/A&gt;&amp;nbsp;class makes it quite easy:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Create a module level variable (or whatever scope you need it).&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;MessageInterceptor&lt;/FONT&gt;&lt;FONT size=2&gt; Interceptor;&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Instantiate it in the constructor&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Interceptor = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;MessageInterceptor&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;InterceptionAction&lt;/FONT&gt;&lt;FONT size=2&gt;.NotifyAndDelete, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Specify a &lt;A href="http://msdn2.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.messageinterception.interceptionaction.aspx"&gt;InterceptionAction&lt;/A&gt;&amp;nbsp;property. (Notify or NotifyAndDelete) - those should be self explanatory [See above]&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Specify if you want it to use the Form's thread (a must if you want to update the UI) [see above]&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Wire up a handler.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;Interceptor.MessageReceived +=&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;MessageInterceptorEventHandler&lt;/FONT&gt;&lt;FONT size=2&gt;(Interceptor_MessageReceived);&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;Cast the e.Message object in the handler as a SmsMessage and use accordingly&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; Interceptor_MessageReceived(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;MessageInterceptorEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&amp;nbsp;&amp;nbsp; SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt; IncomingMessage = (e.Message &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&lt;/FONT&gt;&lt;FONT size=2&gt;[] ImportantStuff = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;[]{&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Dog pooping"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Vista Launch"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Would you care to explain THIS?"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Vicodin ES"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Camel Toe"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Kim"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Mom"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "EDC"&lt;/FONT&gt;&lt;FONT size=2&gt;};&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;foreach&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; s &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; ImportantStuff){&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt;(IncomingMessage.Body.IndexOf(s)&amp;gt; -1){&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt; OutgoingMessage = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt;(e.Message.From.Address, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"This is the Cuckoobot, I'm handling Bill's messages, he'll be in touch shortly"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;OutgoingMessage.Send();&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//Yes, I know this isn't optimal - it's demo code.&lt;/CODE&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;CODE&gt;}&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;else&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;CODE&gt;{&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt; OutgoingMessage = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt;(e.Message.From.Address, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"This is the Cuckoobot. Your message isn't important and will have to wait."&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/P&gt;&lt;CODE&gt;OutgoingMessage.Send();&lt;BR&gt;}&lt;BR&gt;}&lt;BR&gt;}&lt;BR&gt;&lt;/CODE&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=517555" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Mindless+Babbling/default.aspx">Mindless Babbling</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category></item><item><title>A very slick Smartphone Emulator feature</title><link>http://msmvps.com/blogs/williamryan/archive/2007/01/25/a-very-slick-smartphone-emulator-feature.aspx</link><pubDate>Thu, 25 Jan 2007 01:25:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:517187</guid><dc:creator>William</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=517187</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=517187</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2007/01/25/a-very-slick-smartphone-emulator-feature.aspx#comments</comments><description>&lt;P&gt;I'm finishing up some SmartPhone articles I should have posted soon but figured I could discuss this one very quickly.&amp;nbsp; Any professional application should be thoroughly tested on a physical device that it will be run on. However that's not practical for incremental builds throughout the day.&amp;nbsp; So that's where Emulators fit in right?&amp;nbsp; Anyway, one shortcoming of emulators is, rather was, the inability to duplicate functionality exclusive to the phone. How would you simulate an incoming call or SMS message?&amp;nbsp; Fortunately, that's easily resolved now.&amp;nbsp; Let's say you want to send a SMS message and test it.&amp;nbsp; Just use 425.001.0001 and viola, it will fire a SMS message directly to your emulator.&amp;nbsp; Just to show how easy it is...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;CODE&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; SendSMSMessage(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; phoneNumber, &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; message){&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt; NewMessage = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SmsMessage&lt;/FONT&gt;&lt;FONT size=2&gt;(phoneNumber, message);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;NewMessage.Send();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;}&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Then to fire it off... &lt;FONT size=2&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;SendSMSMessage(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"14250010001"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Behold the greatness of the Blue Cuckoo!"&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/CODE&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;More coming shortly, I promise!&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=517187" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category></item><item><title>Musings on the database formerly known as Sql Everywhere</title><link>http://msmvps.com/blogs/williamryan/archive/2006/11/02/Musings-on-the-database-formerly-known-as-Sql-Everywhere.aspx</link><pubDate>Thu, 02 Nov 2006 01:53:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:237552</guid><dc:creator>William</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=237552</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=237552</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/11/02/Musings-on-the-database-formerly-known-as-Sql-Everywhere.aspx#comments</comments><description>&lt;p&gt;The IM volume I received today about the &lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/10/31/sql-server-everywhere-gets-yet-another-name.aspx"&gt;Rollback to SqlCE&lt;/a&gt;&amp;nbsp;issue was enough to border on overwhelming.&amp;nbsp; Between PMs and some lazy SOB CRM guy trying to get me to do all his work for him, it was hard focusing on work today. (And seriously, if you are a CRM professional, telling me you don&amp;#39;t know how to do a two table, one field inner join so i have to do it for you, makes you look like a Complete Moron.&amp;nbsp; Try &amp;#39;Bill, I&amp;#39;m really busy, can you do me a favor and write this join for me&amp;#39; next time, at least then my gag reflex won&amp;#39;t kick in).&amp;nbsp; But I digress.&lt;/p&gt;&lt;p&gt;Anyway, I&amp;#39;ve been getting a lot of email about my presentations on Everywhere.&amp;nbsp; I guess I got people thinking about a few assertions I&amp;#39;ve made.&amp;nbsp; In a nutshell, I made the following comments:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I love ADO.NET and in no way am I disparaging it, but in some scenarios, the disconnected model just doesn&amp;#39;t fit.&amp;nbsp; This has nothing to do with any deficiency in theory or implementation of ADO.NET.&amp;nbsp; A Ferrari is a great vehicle but if you need to tow a heavy boat, it&amp;#39;s not the right vehicle.&lt;/li&gt;&lt;li&gt;The one case where I don&amp;#39;t think the ADO.NET architectue is well suited to handle is single user scenarios where you are *positive* that you&amp;#39;ll only have one user connecting to your database.&lt;/li&gt;&lt;li&gt;Devices like Smartphones and PDAs proabably aren&amp;#39;t going to be targeting multiple users simultaneously and in those cases, where you are resource constrained and pretty much assured of a single user, the database-&amp;gt;dataset model is overly consumptive.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In case you don&amp;#39;t understand why, let me explain.&amp;nbsp; What does using a disconnected model bring to the table?&amp;nbsp; Essentially it brings tremendous scability and at least as far as the server is concerned, the possiblity of improved performance.&amp;nbsp; It is a Just In Time data access strategy that can greatly minimize locking and bottlenecks.&amp;nbsp; Like anything, it needs to be used wisely but the fact you don&amp;#39;t have to keep a persisent connection to the db is huge.&amp;nbsp; This benefit isn&amp;#39;t free.&amp;nbsp; In exchange for it you have to pay a price in RAM b/c you&amp;#39;re using cached copy of the data.&amp;nbsp; In most cases, this tradeoff is well worth it.&amp;nbsp; In some though, it makes very little sense.&amp;nbsp; Think of a Smartphone.&amp;nbsp; I have one user.&amp;nbsp; Only one person needs to be hitting the db at once.&amp;nbsp; I have the data persisted to disk and I have limited RAM.&amp;nbsp; What benefit does sticking a dataset in between my UI and the backend db bring?&amp;nbsp; None.&lt;/p&gt;&lt;p&gt;That&amp;#39;s where the beauty of using SqlCE/SqlMobile/SqlEverywhere/SqlCE comes in.&amp;nbsp; You can use the SqlCeResultset which is scrollable and updateable, and you can cut out the layer in the middle.&amp;nbsp; Your logic is trimmed down b/c updates/inserts/deletes require no work on your part provided the table you&amp;#39;re hitting is keyed.&lt;/p&gt;&lt;p&gt;But that has a problem.&amp;nbsp; What if the data needs synchronized with a db server?&amp;nbsp; Well, you can roll your own logic.&amp;nbsp; Or you can use a familiar, well documented, well tested and peer reviewed mechanism.&amp;nbsp; Unless you&amp;#39;re getting paid by the hour and you have no compunction about robbing from your clients, use the latter.&lt;/p&gt;&lt;p&gt;So in short, on a SmartPhone or PDA, SqlCe/SqlMobile/SqlEverywhere/SqlCe is a seemlingly perfect solution for data access. Now that you can run it on a desktop, the same holds for single user scenarios there.&amp;nbsp; And using a SqlCeResultset&amp;nbsp;is *not* a replacement for ADO.NET.&amp;nbsp; It&amp;#39;s still ADO.NET in every sense of the word, it&amp;#39;s just a evolution of one aspect of it. And a darned good on for single user scenarios.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=237552" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category></item><item><title>Cool things you can do with Windows Mobile</title><link>http://msmvps.com/blogs/williamryan/archive/2006/10/24/Cool-things-you-can-do-with-Windows-Mobile.aspx</link><pubDate>Tue, 24 Oct 2006 00:11:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:203556</guid><dc:creator>William</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=203556</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=203556</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/10/24/Cool-things-you-can-do-with-Windows-Mobile.aspx#comments</comments><description>There&amp;#39;s a lot of possiblity &lt;a href="http://blogs.msdn.com/windowsmobile/archive/2006/10/23/the-mobile-secretary.aspx"&gt;to create cool stuff like this on Windows Mobile&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Devices are waiting for a compelling app and stuff like this, or like &lt;a href="http://www.brains-n-brawn.com"&gt;Casey&lt;/a&gt; often does are going to drive us to finding it (my money is on Casey to actuall invent it but that&amp;#39;s another story).&amp;nbsp; Anyway, very cool and practical post.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=203556" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Compact+Framework/default.aspx">Compact Framework</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category></item><item><title>Differentiating between "Denormalization" and excuse making.</title><link>http://msmvps.com/blogs/williamryan/archive/2006/09/27/Differentiating-between-_2200_Denormalization_2200_-and-excuse-making_2E00_.aspx</link><pubDate>Wed, 27 Sep 2006 05:47:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:142646</guid><dc:creator>William</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=142646</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=142646</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/09/27/Differentiating-between-_2200_Denormalization_2200_-and-excuse-making_2E00_.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve actually got a lot to discuss about database stuff but wanted to start out explaining a very basic concept.&amp;nbsp;&amp;nbsp; All me to disgress for a moment.&amp;nbsp; I&amp;#39;ve worked at a few places where there were some Cobol/AS 400 developers that were quite full of themselves. They knew how to handle business with COBOL/AS400 and it went straight to their heads.&amp;nbsp; Along came round wheels, indoor plumbing, relational databases and object oreinted programming and they dismissed it as a fad.&amp;nbsp; Then as reality repeatedly *** slapped them, they just turned into eternal pity parties lamenting how all the good jobs are moving to India and how relational databases suck.&amp;nbsp; And as is often the case with people that think Relational Databases suck, they were heavy on opinion but really light on reasons to back it up.&amp;nbsp; There was a perfect correlation between the degree to which they thought RDBMS&amp;#39;s sucked and their lack of knowledge about them. How you can know something is lame without knowing anything about it [with repsect to technology] is beyond me.&amp;nbsp; Sure, I can know that drinking out of a Port-O-Potty sucks without doing it, but I at least have to know what&amp;#39;s in a Port-O-Potty to understand why drinking from it would suck.&lt;/p&gt;&lt;p&gt;So their criticisms came down to two things for the most part.&amp;nbsp; First they claimed that joins had too much overhead.&amp;nbsp; Next they claimed that Normalization was unnecessary and that in many cases, it was impossible to do.&amp;nbsp; Back when I had my Apple 2e, perhaps joins would be too expensive.&amp;nbsp; But in and of itself, it&amp;#39;s a lame argument. [I won&amp;#39;t even touch the fact that many of their Killer AS400 apps used to take 20 minutes to run even the simplest of queries].&amp;nbsp; And they would build in redundancies everywhere.&amp;nbsp; They must have all surfed the internet long and hard for &amp;quot;Lame excuses to use when you get busted creating a really crappy db structure&amp;quot; and somewhere stumbled across the word &lt;a href="http://en.wikipedia.org/wiki/Denormalization"&gt;http://en.wikipedia.org/wiki/Denormalization&lt;/a&gt;&amp;nbsp;because that was their excuse for everything.&amp;nbsp; One manager who fancied himself an architect was addicted to redundancies.&amp;nbsp; He actually lamented the fact that the tool we were using only allowed 250 columns and we had *many* tables that used every last one.&amp;nbsp; When the chickens came home to roost he decided he needed a good excuse. The president of the company decided to circumvent him and went to each of the developers asking why we were having all the problems we were experiencing.&amp;nbsp; And everyone that wasn&amp;#39;t a COBOL programmer who refused to change said that same thing - redundancies.&amp;nbsp; He was in a bind.&amp;nbsp; Then he called a meeting, with the president, and had a bunch of printouts about Denormalization and how that&amp;#39;s the approach he used.&amp;nbsp; &lt;/p&gt;&lt;p&gt;So people that don&amp;#39;t know what they are talking&amp;nbsp; about often use Denormalization and redundancy synonomously.&amp;nbsp; The metaphor that comes to mind is this... If you fill your bathtub up with hot water, then find it&amp;#39;s too hot and proceed to turn on the cold water until it becomes tolerable, that&amp;#39;s not the same as never turning on the hot water in the first place.&lt;/p&gt;&lt;p&gt;This silly excuse usually shows itself with &amp;#39;Historical&amp;#39; data, they&amp;#39;ll claim they built in the redundancies to handle historical data.&amp;nbsp; If you had a customers table with a SalesPersonID which relates to a name, they&amp;#39;ll point out that if you change the name of the sales person, you&amp;#39;ll affect all the records.&amp;nbsp; This issue can usually be worked out with effective dates but that&amp;#39;s another story.&amp;nbsp; So I&amp;#39;ll concede, the historical data issue is a valid place to have redundancies.&amp;nbsp; However, and this is a big howerver!!!!!, it&amp;#39;s only valid if the historical data is not to be changed in the future.&amp;nbsp; If it&amp;#39;s data that you might have to change or update, then the redundancies are just that, redundancies.&amp;nbsp; And you can still use historical data and use relational modelling. If you have the SalesPersonID and Name in the Historical table, and you have cause to update it because of business requirements, it&amp;#39;s not &amp;#39;denormalization&amp;#39; and it&amp;#39;s a bad way to do things.&amp;nbsp; &lt;/p&gt;&lt;p&gt;You may think this is so obvious that it goes without saying. However&amp;nbsp;I was in a situation not too long ago where a database was created that had redundancies All over the place.&amp;nbsp; If you needed to change a Salesperson&amp;#39;s name (for instance, someone gets married), you had to go into at least 12 different tables to change it. And if you missed one record, it was enough to seriously screw up the logic reporting was built on.&amp;nbsp; Another wonderful feature was computed fields stored as hard coded values.&amp;nbsp; Every week a new series of transactions would be imported.&amp;nbsp; A few processes were run and the aggregate total of sales, fees etc were stored in multiple tables.&amp;nbsp; Then the details that were used to create them were stored in another series of tables.&amp;nbsp; If you changed data in one place and didn&amp;#39;t change it everywhere else, reporting would be totally hosed.&amp;nbsp; To say it was a nightmare to maintain would be putting it mildly. Yet the person that built this system claimed that it was done intentionally as a means to double check the values.&amp;nbsp; So let me ask you this.&amp;nbsp; If you have a&amp;nbsp; table with CustomerID, Sales, Week, and you run a process to stick the aggregate of sales in one table, how is that any different than just using SUM?&amp;nbsp; Rather, how can you claim it&amp;#39;s &amp;#39;better&amp;#39; or intentional?&amp;nbsp; People like this often rationalize it with &amp;quot;Well if everyone did their job and just made sure they updated all the tables, there wouldn&amp;#39;t be a problem.&amp;#39;&amp;nbsp; True enough.&amp;nbsp; But people make mistakes.&amp;nbsp; If you can&amp;#39;t force all the other changes to occur each time source data changes through triggers or integrity constraints, you can&amp;#39;t guarantee changes will be made. Plain and simple.&lt;/p&gt;&lt;p&gt;When you see a nightmare database or program, it&amp;#39;s often attributed to the ignorance of the person that created it.&amp;nbsp; But pure ignorance will typically only produce bad stuff, not truly terrible stuff. To be truly terrible, it takes someone who&amp;#39;s convinced their way is best, while being totally ignorant of the consequences.&amp;nbsp; You can only make something so bad accidentally.&amp;nbsp; No, the really horrendous things out there are always the result of deliberate action by someone or some group of people. And this begs the bigger question - why, in 2006, with all the books out there, internet sites etc, so people still fight normalization when using Relational Database Systems?&amp;nbsp; And why or why do people that have no clue what they are doing and little to no desire to learn get to design critical systems?&lt;/p&gt;&lt;p&gt;I&amp;#39;m betting this is more common than it may seem.&amp;nbsp; Anyone else still run into stuff like this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=142646" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category></item><item><title>Comment of the week - Sql Server Reporting Services vs. Crystal</title><link>http://msmvps.com/blogs/williamryan/archive/2006/09/27/Comment-of-the-week-_2D00_-Sql-Server-Reporting-Services-vs.-Crystal.aspx</link><pubDate>Wed, 27 Sep 2006 05:27:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:142621</guid><dc:creator>William</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=142621</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=142621</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/09/27/Comment-of-the-week-_2D00_-Sql-Server-Reporting-Services-vs.-Crystal.aspx#comments</comments><description>&lt;p&gt;A while ago, I posted &lt;a href="http://msmvps.com/blogs/williamryan/archive/2004/11/07/18148.aspx?CommentPosted=true#commentmessage"&gt;this&lt;/a&gt;&amp;nbsp;about how much a55 I think Crystal Reports sucks.&amp;nbsp; A long time ago, back at like v.7, I thought Crystal was a decent product.&amp;nbsp; And to be honest, it still is a decent product.&amp;nbsp; But it comes with a lot of baggage and has a lot that just makes it lame.&amp;nbsp; So I had almost total consenus on the Crystal Reports w/ .NET sucks side, I think there are two people that disagree.&amp;nbsp;Ignoring the fact that SSRS is very new product and Crystal has been around forever, I think side by side it&amp;#39;s a slam dunk.&amp;nbsp; But one big mouth said this: (NOTE:&amp;nbsp; I&amp;#39;m only posting a comment that was publicly posted on my site.&amp;nbsp; So hopefully the guy won&amp;#39;t be a &lt;a href="http://www.charlescarroll.com"&gt;cry baby&lt;/a&gt; about it and throw a temper tantrum over it)&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;quot;Either you guys are idiots or you have never used Crystal and don&amp;#39;t realize the minimal functionality that SQL Reporting Services offers. I have spent the last week evaluating SSRS and am greatly dissapointed. I came up with a list of over 250 items that SSRS could not do. As for all you Access reporters, your probably the only people to ever purchase Microsoft&amp;#39;s &amp;quot;Bob&amp;quot; product. &amp;quot;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;So the guy claims to know enough about Crystal to have cataloged over 250 features that SSRS doesn&amp;#39;t have.&amp;nbsp; That means that including the features he&amp;#39;ll admit it does have, he knows way more than 250 features.&amp;nbsp; I think that would qualify you as a fairly advanced Crystal user if you&amp;#39;ll pardon the oxymoron.&amp;nbsp; And he spent one week with SSRS.&amp;nbsp; And the only conclusion he can draw is that SSRS is definitely lacking those features and that it couldn&amp;#39;t possibly be that he just doesn&amp;#39;t know how to use them, right?&amp;nbsp; And far be it from me to say anything positive about Access, but come on, being a hard core Crystal user still means you&amp;#39;re the report ***, and that gives you credentials to snob no one. Certainly not Access developers&amp;nbsp;and certainly not Bob users.&amp;nbsp; Is he really claiming Bob was lame but Crystal Reports isn&amp;#39;t?&amp;nbsp; Pulllleeezz.&amp;nbsp; But if you read the context of the comments, the people were pointing out that Access, as lame as it is, provides more effective funcionality.&amp;nbsp; The fact this can even be debated speaks volumes don&amp;#39;t you think?&amp;nbsp; Is Access supposed to be first and foremost a report writer?&amp;nbsp; Last time I looked it&amp;#39;s main purpose was as a relational database (more precisely, a database that anyone can build with, that causes major headaches for the people that will inevitably be brought in to clean up the mess it made) not a report writer.&amp;nbsp; Reports are one of its features but one would certainly expect that a mature product who&amp;#39;s sole purpose is report writing ought to be a little better than a RDBMS product with reports added in.&lt;/p&gt;&lt;p&gt;So I offered a challenge, I asked him to post just 20 of his 250 features that CR can do that SSRS can&amp;#39;t.&amp;nbsp; I&amp;#39;ll see if they really can&amp;#39;t be done and post the results. If I&amp;#39;m wrong, I&amp;#39;ll admit it.&amp;nbsp; If he&amp;#39;s wrong I&amp;#39;ll point out what an a33hat he is.&amp;nbsp; I actually believe there are probably 20 or so features missing, but certainly not major ones.&amp;nbsp; Even assuming there were really 250 features missing, how many times do you need 250 features for a report?&amp;nbsp; Typically you need Grouping, Subreporting, charts/graphs, conditional formatting, functions and the like. He didn&amp;#39;t comment as to his evaluation of how each stacked up there - for reasons that are obvious.&amp;nbsp; Anyway, I believe his 250+ number about as much as I believe in the easter bunny so although *someone* could probably post 20 things lacking, I doubt he can.&amp;nbsp; One of us is very wrong here and hopefully it&amp;#39;s not me. We&amp;#39;ll have to wait and see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=142621" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Humor/default.aspx">Humor</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+General/default.aspx">.NET General</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Mindless+Babbling/default.aspx">Mindless Babbling</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category></item><item><title>Normalization really does matter</title><link>http://msmvps.com/blogs/williamryan/archive/2006/09/07/Normalization-really-does-matter.aspx</link><pubDate>Thu, 07 Sep 2006 14:30:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:116352</guid><dc:creator>William</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=116352</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=116352</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/09/07/Normalization-really-does-matter.aspx#comments</comments><description>&lt;p&gt;It seems like years ago, but I remember one of my professors giving us an assignment. It involved taking a database chock full of redundancies and writing the SQL Statements to make a few small updates.&amp;nbsp; We thought it was an assignment to test our SQL Skills.&amp;nbsp; However we were graded on how close to &amp;#39;right&amp;#39; we got all of the changes.&amp;nbsp; It wasn&amp;#39;t about SQL at all, he could care less about SQL at this point. It was about illustrating, with much painful monotony, why &amp;quot;Normalization matters.&amp;quot;&lt;/p&gt;&lt;p&gt;After we turned the assignment in, he asked everyone how long it took.&amp;nbsp; Suffice to say it took everyone a long time.&amp;nbsp; But the interesting thing was that not one single person got all of the changes correct. Many got close, but no one got all of them.&lt;/p&gt;&lt;p&gt;Then he explained some more why normalization matters.&amp;nbsp; You see, not only did working with non-normalized data (as opposed to denormalized) take forever to do, it was very error prone.&amp;nbsp; No matter how careful you are, if you do the same thing over and over, you&amp;#39;re likely to miss something.&lt;/p&gt;&lt;p&gt;Afterward, he proceeded to give us a story from the &amp;#39;real world&amp;#39;.&amp;nbsp; He told us how some things in CS have great theoretical value but not much practical value.&amp;nbsp; But he said that in general, good theory makes for good practice and no where is this more true than in DB Design.&amp;nbsp; We were told that when we get out into the real world, we&amp;#39;ll hear all sorts of &amp;#39;Senior&amp;#39; folks trashing normalization as ivory tower stuff that works great in college but doesn&amp;#39;t have value in the real world.&amp;nbsp; He said that *when* we hear this, to immediately ask the person &amp;quot;At which level doesn&amp;#39;t normalization make sense in the &amp;#39;real world&amp;#39;?&amp;nbsp; All of them or just certain forms&amp;quot;&amp;nbsp; This was because, in his opinion, the only people that will trash normalization are ones who don&amp;#39;t understand it.&amp;nbsp; Granted, there were many caveats in the lectures.&amp;nbsp; Sometimes it&amp;#39;s best to denormalize (which, is something you do AFTER you&amp;#39;ve normalized - for the uninitiated).&amp;nbsp; Many will design garbage and when the redundancies are pointed out will say &amp;quot;I totally do believe in normalization but I denormalized the design&amp;quot;.&amp;nbsp; If it wasn&amp;#39;t normalized in the first place it couldn&amp;#39;t have been denormalized, such statements are mere excuse making.&amp;nbsp; He also pointed out that sometimes when time is of the essense and maintainability isn&amp;#39;t a real issue, then normalization may not justify the costs.&amp;nbsp; There were definitely exceptions to his rule, but one thing that always stuck with me was that folks that trash normalization almost always have never studied it very far.&lt;/p&gt;&lt;p&gt;So why am I babbling about this?&amp;nbsp; It&amp;#39;s simple.&amp;nbsp; Some things can be totally screwed up and then fixed quickly/easily/inexpensively.&amp;nbsp; I could get the color scheme of a CSS layout totally upside down and fix it pretty quickly in many cases.&amp;nbsp;Other things are a little more difficult but still doable.&amp;nbsp; Let&amp;#39;s say I didn&amp;#39;t use inheritance and coded some total redundant classes.&amp;nbsp; Making the code modification won&amp;#39;t be trivial but if my code is modular, it should be fairly straightforward considering the development tools in place these days.&amp;nbsp; Other things though are deal breakers.&amp;nbsp; Absolute and utter deal breakers.&amp;nbsp; Database design is the epitome of a deal breaker.&amp;nbsp; To those new to development, you may be asking why DB Design is so vastly different from other design issues.&lt;/p&gt;&lt;p&gt;Just imagine the following scenario.&amp;nbsp; You have a Dog and a Cat class and they are in a running production app that&amp;#39;s working great. You decide that you should have had a Mammal base class and decided to implement it.&amp;nbsp; You guess it&amp;#39;ll take you about 16 hours to find every instance and make the appropriate changes.&amp;nbsp; So the app runs along, users are happy, you take your 16 hours, make your changes , test them (or test them, make them for many) and redeploy.&amp;nbsp; No problems. Users are none the wiser and everyone&amp;#39;s happy.&lt;/p&gt;&lt;p&gt;Now what if this was a production database?&amp;nbsp; Well, if you have downtime on the db then you can create a replica of the data, make your changes, verify they worked correctly and then implement them at some time when no one is using the system.&amp;nbsp; I&amp;#39;ve only worked in two places where such was the case.&amp;nbsp; If the design flaws go out the door on a live system, you&amp;#39;re stuck.&lt;/p&gt;&lt;p&gt;In the Dog Cat example, if you totally screwed something up, you can redeploy the previous version and in many cases it won&amp;#39;t be too big of a deal (in some it obviously will but that&amp;#39;s related to installation more than anything else).&amp;nbsp; But what if you damaged a lot of data, the impact very well may (and probably will) be immediate.&amp;nbsp; Moreoever, you are probably dealing with a moving target b/c the data is constantly changing. Even if you think you coded everythign correctly, new data may be introduced that you weren&amp;#39;t counting on. And even then, even assuming you got everything right, many changes of this sort are going to cause service interruptions.&amp;nbsp; Depending on what the db is used for, this could be a huge deal.&lt;/p&gt;&lt;p&gt;We all know that the further downstream it is that a bug is caught the more it costs to correct. We&amp;#39;ve all seen the upward trending curve.&amp;nbsp; The thing is that in most case, with DB changes in a production system, that curve is very short and very steep.&amp;nbsp; And if you do any of the following, you should be flogged:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Use Reserved words as object names, column names etc (they are called Reserved words for a reason)&lt;/li&gt;&lt;li&gt;Use inconsistent naming conventions&lt;/li&gt;&lt;li&gt;Use unintelligible naming conventions&lt;/li&gt;&lt;li&gt;Ignore data types.&amp;nbsp; NVARCHAR isn&amp;#39;t the solution to everything. Yes, I know you can cast dates held in VARCHAR fields to DATETIME Values but that&amp;#39;s irrelevant&lt;/li&gt;&lt;li&gt;Fail to use keys. At a minimum you&amp;#39;re going to have a lot of trouble getting tools to update data but that&amp;#39;s the least of your worries&lt;/li&gt;&lt;li&gt;Use multiple fields to represent similar data and then using inconsistent rules for maintaining the data that they are populated with&lt;/li&gt;&lt;li&gt;Fail to enable integrity constraints. I once heard a developer, with a straight face, say he didn&amp;#39;t believe in integrity contsraints b/c he was a &amp;#39;real developer&amp;#39; and preferred to write his own.&amp;nbsp; He contended that he wanted to make sure things were done right as opposed to being lazy and leaving it to Oracle to handle.&amp;nbsp; You have to have the initials CC or have forgotten to take your lithium if you think you&amp;#39;re going to do a better job writing your own integrity constraints than Oracle/Microsoft etc are.&amp;nbsp; And for those of you that are going to get all pedantic and tell me of some obscure bug or situation where MS&amp;#39;s or Oracle&amp;#39;s constraints fail, I&amp;#39;d counter with this.&amp;nbsp; Use their AND use your own.&amp;nbsp; You can&amp;#39;t guarantee that they only way the data will be accessed is through your killer app and it&amp;#39;s uber integrity algorithms. So why leave it bare?&amp;nbsp; If you&amp;#39;re constraints are really that good, then it shouldn&amp;#39;t ever be an issue anyway right?&lt;/li&gt;&lt;li&gt;Freestyling!&amp;nbsp; Freestyling is cool as long as it&amp;#39;s done in a Rap/BMX/Skateboard etc context.&amp;nbsp; It has no place in the development world other than in R &amp;amp; D scenarios.&amp;nbsp; RDBMS systems are well tested and rooted in very strong theoretical foundations.&amp;nbsp; They have stood the test of time and they work.&amp;nbsp; They aren&amp;#39;t perfect but they are damn good and they work well when used correctly.&amp;nbsp; Unless you really are a super genius, chances are that you&amp;#39;re not going to have some superior way of doing things that the rest of the world has missed. And even if you did&amp;nbsp; find one, the chances of you finding another one are slim to none.&amp;nbsp; And why do these folks never seem to&amp;nbsp;freestyle with other things like addition, subtraction, multiplication, division, gravity, intertia etc?&amp;nbsp; What do you think would happen if you owed the IRS 10k and used your own math to compute that they actually owed you 10k?&amp;nbsp; Why would it be any different with anything else?&amp;nbsp;So if you&amp;#39;re some Maverick has a ton of &amp;#39;unique&amp;#39; ways of building your dbs - all you&amp;#39;re doing is shoving the burden of your sloppiness onto someone else.&lt;/li&gt;&lt;li&gt;Failing to at a minimum follow the first two normal forms.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It&amp;#39;s a matter of &amp;quot;you can get with the program or you can pay a ton of money to have someone else fix it, or spend a ton of time down the road fixing it yourself.&amp;quot;&amp;nbsp; And if this happens, you can&amp;#39;t cry foul - you&amp;#39;re the one that decided to break the rules.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=116352" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category></item><item><title>Transferring data around with ADO.NET 2.0 - SqlBulkCopy</title><link>http://msmvps.com/blogs/williamryan/archive/2006/08/26/109836.aspx</link><pubDate>Sat, 26 Aug 2006 16:03:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:109836</guid><dc:creator>William</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=109836</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=109836</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/08/26/109836.aspx#comments</comments><description>I'm working at a client on a data migration and found some results that were surprising. I expected there to be a difference but not one quite this large... Synopsis of Problem: Right now I'm working on a rather complex migration from a bunch of disparate...(&lt;a href="http://msmvps.com/blogs/williamryan/archive/2006/08/26/109836.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://msmvps.com/aggbug.aspx?PostID=109836" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category></item><item><title>Stealing code ;-(</title><link>http://msmvps.com/blogs/williamryan/archive/2006/07/03/103747.aspx</link><pubDate>Mon, 03 Jul 2006 22:45:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:103747</guid><dc:creator>William</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=103747</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=103747</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/07/03/103747.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I don't know why I even let it bother me but a lot of times is still does.&amp;nbsp; Usually starts out with me working on something, an article, a book, a newsgroup question.&amp;nbsp; I start searching around and use words that I think describe what I'm looking for.&amp;nbsp; Low and behold, there's an article on X.&amp;nbsp; Great.&amp;nbsp; Click through, start reading it and then realize&amp;nbsp; Cuckoo c = new Cuckoo(); or some other code looks really familiar.&amp;nbsp; Look up at the site - nope, not mine.&amp;nbsp; Look at the author - nope, not me.&amp;nbsp; Look for credit, nope, none given.&amp;nbsp; Look at the variable names or namespaces, "Gee, this guy decided to use KDN.xxxx as a namespace.&amp;nbsp; I use KDN for KnowDotNet - small world I guess." except that it is my code.&amp;nbsp; Then I start wondering, did I give anyone permisson?&amp;nbsp; If anyone asks I'm normally ok with it but if I wrote it, I'd probably at least have asked for some credit.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Then being a grown up kicks in.&amp;nbsp; Putting code samples on the net means some folks are going to take it and use it which is what it was up there for in the first place. But others are going to take it and try to take credit for it.&amp;nbsp; It's life. Get over it.&amp;nbsp; Quit whining.&amp;nbsp; Write a blog post about it if you must and then shut up about it - you're too old to snivel, particularly about something like this.&amp;nbsp; Then I go back to what I was doing....&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=103747" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Life+in+General/default.aspx">Life in General</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Me/default.aspx">Me</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category></item><item><title>Do you have any ideas about preparation for 70-529?</title><link>http://msmvps.com/blogs/williamryan/archive/2006/06/28/102989.aspx</link><pubDate>Wed, 28 Jun 2006 02:30:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:102989</guid><dc:creator>William</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=102989</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=102989</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/06/28/102989.aspx#comments</comments><description>As you may know, I'm coauthoring http://www.microsoft.com/learning/exams/70-529.asp . In particular, I'm covering the following objectives: Create and configure an XML Web service method. Create a public method. Attach the WebMethodAttribute attribute...(&lt;a href="http://msmvps.com/blogs/williamryan/archive/2006/06/28/102989.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://msmvps.com/aggbug.aspx?PostID=102989" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Web+Services+_2F00_+WSE/default.aspx">Web Services / WSE</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Books/default.aspx">Books</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+Basics/default.aspx">.NET Basics</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/.NET+General/default.aspx">.NET General</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Visual+Studio+.NET+2005/default.aspx">Visual Studio .NET 2005</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Misc+Technology/default.aspx">Misc Technology</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Certification/default.aspx">Certification</category></item><item><title>Biztalk - What do you call a 'difficult' application</title><link>http://msmvps.com/blogs/williamryan/archive/2006/06/15/101239.aspx</link><pubDate>Thu, 15 Jun 2006 02:19:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:101239</guid><dc:creator>William</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/rsscomments.aspx?PostID=101239</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/williamryan/commentapi.aspx?PostID=101239</wfw:comment><comments>http://msmvps.com/blogs/williamryan/archive/2006/06/15/101239.aspx#comments</comments><description>I think I'm going back into one of my hypomanic phases b/c everything seems so clear and I'm learning at an amazing pace. Back to Biztalk. Ok ok. Back in the day I was pretty big into Biztalk. For a while, it seemed like it was fizzling out and since...(&lt;a href="http://msmvps.com/blogs/williamryan/archive/2006/06/15/101239.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://msmvps.com/aggbug.aspx?PostID=101239" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Coding+Techniques/default.aspx">Coding Techniques</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Biztalk/default.aspx">Biztalk</category><category domain="http://msmvps.com/blogs/williamryan/archive/tags/Biztalk+Server/default.aspx">Biztalk Server</category></item></channel></rss>