<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3788415011443104697</id><updated>2011-11-27T16:08:54.100-08:00</updated><category term='pressure'/><category term='C#'/><category term='wcf'/><category term='set theory'/><category term='LINQ'/><category term='Equals'/><category term='iphone'/><category term='GetHashCode'/><category term='tutorials'/><category term='debugging'/><category term='silverlight'/><category term='bamboo'/><category term='tablet'/><category term='Objective-C'/><category term='tablet pc'/><category term='Intersect'/><category term='pressure sensitivity'/><category term='wacom'/><category term='redwhiteblue'/><category term='blogs'/><category term='rant'/><category term='Windows 7'/><title type='text'>Why do I code with this guy?</title><subtitle type='html'>Rants and tutorials about the freshest technologies! With commentary from d-roc and Vargo. Prepare to take sides.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>54</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6084714601506432292</id><published>2011-04-06T17:00:00.001-07:00</published><updated>2011-04-06T17:00:45.884-07:00</updated><title type='text'>Update: What Internet Explorer 9 needs in order to make me switch from Chrome</title><content type='html'>&lt;p&gt;I may as well post an update now that I’ve used IE9 for a couple weeks now.&amp;#160; (Also, Dimitri hassled me about it.)&lt;/p&gt;  &lt;p&gt;The verdict is that IE9 is a great improvement over IE8.&amp;#160; In fact, I don’t even need to follow that up with a “but I’m still not going to use it because…”&amp;#160; In fact, I use it about as often as I use Chrome now.&amp;#160; I generally switch back and forth depending on which happens to be causing me trouble at any given time.&lt;/p&gt;  &lt;p&gt;But to address my criteria:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. Spell-check&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Still absent, annoyingly.&amp;#160; It’s 2011.&amp;#160; Supposedly it can be included via some plug-in which was not immediately obvious when I tried to find it.&amp;#160; If I open the “Manage Add-ons” window, I see nothing in the list that shows any indication that it’s spell-check-related.&amp;#160; Even when I click the link to find more add-ons online, I’m directed to some pretty-but-unusable web site which allegedly should allow me to search for add-ons, yet when I click the Search button, it merely opens to an unusable tiled list of addons (none of which I need) with no search text field to speak of.&amp;#160; I clicked &lt;em&gt;Search&lt;/em&gt;, not &lt;em&gt;Browse&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;2. Tab-dragging/removal/insertion&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Excellent, works well.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;3. The ability to switch to another tab while the previous tab is loading/rendering content&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Also excellent.&amp;#160; I was really skeptical about MS getting this one in.&amp;#160; It’s one of those features that rarely finds itself in a design spec, and yet is vitally important to user perception of performance.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;4. More efficient URL auto-completion&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;It seems to work exactly as in Chrome now, which is excellent.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So there you have it.&amp;#160; I still use both Chrome and IE, and I may lean toward Chrome but whenever it fails for some reason, I don’t hesitate to switch to IE.&amp;#160; At any given time I seem to have tabs open in either browser.&amp;#160; Oh, and having Windows 7 jump-list preview-whatever-you-call-it support is nice, too.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6084714601506432292?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6084714601506432292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6084714601506432292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6084714601506432292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6084714601506432292'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2011/04/update-what-internet-explorer-9-needs.html' title='Update: What Internet Explorer 9 needs in order to make me switch from Chrome'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-2601090039732836467</id><published>2011-03-10T15:29:00.001-08:00</published><updated>2011-03-10T15:33:39.169-08:00</updated><title type='text'>Performing a Simple Build Task with the Microsoft stack</title><content type='html'>&lt;p&gt;First of all, I hate it when the term “stack” is used in this context.&amp;#160; Speak in plain English, people.&lt;/p&gt;  &lt;p&gt;Now on to the issue at hand.&amp;#160; I have a Visual Studio 2010 solution I want to build.&amp;#160; Because of limitations in Visual Studio’s ability to customize builds of different configurations (e.g. Debug vs Release), I have to execute a custom build step to mess with some of my project files before they get built, and do some custom stuff depending on whether I’m running the Production or Development configuration.&lt;/p&gt;  &lt;p&gt;This is fine; at this point I’ve come to terms with Visual Studio’s limitations and will gladly write some hacktastic pre-build step.&amp;#160; So, being the good citizen that I am, I consider alternatives for approaching this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;1) I can write a custom C# console app to do whatever it is I need to do.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;2) I can use the BATCH language or some ancient WScript script or something.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;3) I can use this newfangled PowerShell thing I keep hearing about (I say “newfangled” despite it being several years old).&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;#1&lt;/strong&gt; would work fine, but the nice thing about scripts rather than built executables is that you can modify them on-the-fly; the source code is right there at your fingertips.&amp;#160; In short they’re transparent.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#2&lt;/strong&gt; might also work fine, but this is an older and more convoluted technology and the solution may be more roundabout.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#3&lt;/strong&gt; PowerShell sounds like the perfect combination!&amp;#160; I can allegedly execute .NET code in a script!&lt;/p&gt;  &lt;p&gt;So, after wading through the horrendously over-complex MSDN documentation which takes about 10 minutes of wading through links before you can see a concrete code example, I gave up and utilized my handy-dandy Safari Books Online subscription to virtually crack open a book about PowerShell.&amp;#160; The explanations were clear and I was finally ready to test out a simple code example, written into a custom .ps1 file that I created.&lt;/p&gt;  &lt;p&gt;So, I tried running it and… FAIL.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#ff0000" face="Courier New"&gt;File [myscriptfile].ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see &amp;quot;get-help about_signing&amp;quot; for more details.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Oh, that’s just great.&amp;#160; I read the &lt;a href="http://pastebin.com/85Qutkey"&gt;wall of documentation&lt;/a&gt;.&amp;#160; Not only is the execution of scripts disabled, but to enable them in a way that wouldn’t unduly molest other people’s systems when they ran this step would require me to actually &lt;em&gt;sign my script with a certificate&lt;/em&gt;.&amp;#160; In short, are you F’ing kidding me?&amp;#160; I want to run a script on the systems of a handful of people who assumedly trust me, and I’ve got to go through convoluted steps of signing my script, having my coworkers manually allow this thing to run, likely introducing extra confusing steps in the build process?&amp;#160; No.&amp;#160; Not acceptable.&amp;#160; Once again, &lt;strong&gt;#1&lt;/strong&gt; is looking like the best option despite its drawbacks.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-2601090039732836467?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/2601090039732836467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=2601090039732836467' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2601090039732836467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2601090039732836467'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2011/03/performing-simple-build-task-with.html' title='Performing a Simple Build Task with the Microsoft stack'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6761060784717961255</id><published>2010-11-15T15:01:00.001-08:00</published><updated>2010-11-15T15:01:06.733-08:00</updated><title type='text'>What Internet Explorer 9 needs in order to make me switch from Chrome</title><content type='html'>&lt;p&gt;As I regularly switch between IE8 and Chrome, I’m constantly reminded of the features which IE9 will need in order to make &lt;em&gt;me&lt;/em&gt; switch.&amp;#160; I know the particular needs are different for different people, but here are mine:&lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;1. Spell-check&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I’m a good speller.&amp;#160; But I still make typos, and there’s still the occasional word that I’m unsure of.&amp;#160; Having to look up unknown words in an online dictionary is an annoyance I shouldn’t have to deal with in 2010.&lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;2. Tab-dragging/removal/insertion&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Now that I’ve been spoiled with Chrome’s ability to drag tabs in and out of browser windows into new instances, I’m annoyed when I don’t have this.&amp;#160; I am an unapologetic “tab whore”, and organizing them is important.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;3. The ability to switch to another tab while the previous tab is loading/rendering content&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Microsoft likes to defend IE’s speed versus Chrome, conveniently measuring only those situations which favor such comparisons.&amp;#160; But here’s a common situation you’ll never see quantified:&lt;/p&gt;  &lt;p&gt;I load a page in a tab (either by clicking a link or typing a URL manually).&amp;#160; The page is taking forever to load, so I click to open a new tab (or switch to a currently open tab).&amp;#160; In Chrome, this happens effortlessly.&amp;#160; In IE, however, I’m blocked until the page loads completely.&amp;#160; This is &lt;strong&gt;gets old very quickly&lt;/strong&gt;, and every time it happens, it serves as a reminder for why I prefer Chrome.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;4. More efficient URL auto-completion&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In Chrome, if I want to visit Facebook, I commonly follow these steps:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1. Click in the address bar.&lt;/p&gt;    &lt;p&gt;2. Type the letter ‘f’.&lt;/p&gt;    &lt;p&gt;3. Press [Enter].&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In IE, it’s these:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1. Click in the address bar.&lt;/p&gt;    &lt;p&gt;2. Type the letter ‘f’.&amp;#160; See that the History list has brought up a bogusly-entered URL “http://fa/” from a prior failed attempt to visit Facebook.com.&lt;/p&gt;    &lt;p&gt;3. Type the letter ‘a’.&amp;#160; “Facebook” now appears in the History list, underneath “http://fa/”.&lt;/p&gt;    &lt;p&gt;4.&amp;#160; Press the down-arrow key twice to select the History entry for Facebook.&lt;/p&gt;    &lt;p&gt;5. Press [Enter].&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now, if I know you as well as I think I do, you’re going to launch all sorts of counter-arguments:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;“It’s your fault you typed ‘http://fa’ and expected it to work, causing the invalid History entry.”&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;One, this would have worked in Chrome, so it just illustrates that Chrome is simpler; and two, Chrome is smart enough not to save bogus URLs in its history, so even if I manually typed &lt;a href="http://fa/"&gt;http://fa/&lt;/a&gt; in Chrome, it won’t create a History entry for it.&amp;#160; Another strike against IE.      &lt;br /&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;“You can just hit Shift+Enter to load the top URL in your History.”&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;So in other words, it’s more complex than Chrome.&amp;#160; Thank you for proving my point.&amp;#160; And I still have to type more characters to eliminate &lt;a href="http://fa/"&gt;http://fa/&lt;/a&gt; as a history option.&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6761060784717961255?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6761060784717961255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6761060784717961255' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6761060784717961255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6761060784717961255'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/11/what-internet-explorer-9-needs-in-order.html' title='What Internet Explorer 9 needs in order to make me switch from Chrome'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-4026477672363478776</id><published>2010-11-05T14:06:00.001-07:00</published><updated>2010-11-05T14:06:17.046-07:00</updated><title type='text'></title><content type='html'>&lt;p&gt;I’ve found that one of the best ways to find a solution to a technical problem at work is to write a lengthy, passive-aggressive email to your coworkers, explaining in detail what you’re trying to do and what’s going wrong.&amp;#160; 9 times out of 10, you’ll figure out what’s wrong before you embarrass yourself by hitting the Send button.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-4026477672363478776?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/4026477672363478776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=4026477672363478776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4026477672363478776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4026477672363478776'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/11/ive-found-that-one-of-best-ways-to-find.html' title=''/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-478819269201266754</id><published>2010-07-15T22:38:00.001-07:00</published><updated>2010-07-15T22:38:04.714-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Objective-C MIN and MAX #define wonkiness</title><content type='html'>&lt;p&gt;Here’s a little odd thing I discovered when trying to use the MIN and MAX macros defined in NSObjCRuntime.h.&amp;#160; I had the following code (simplified):&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;const int MAX_OBJECTS = 10;     &lt;br /&gt;int numObjectsToRemove = MAX(0, myObjectArray.count - MAX_OBJECTS);&lt;/font&gt;    &lt;br /&gt;    &lt;br /&gt;Let’s say myObjectArray.count is 1.&amp;#160; What would you expect numObjectsToRemove to become?&lt;/p&gt;  &lt;p&gt;0, right?&amp;#160; Because (myObjectArray.count – MAX_OBJECTS) == (1 – 10) == –9, and 0 is clearly greater than –9.&amp;#160; But you’d be wrong.&amp;#160; And so was I.&lt;/p&gt;  &lt;p&gt;You see, apparently, since the &lt;strong&gt;count&lt;/strong&gt; member of NSArray is an unsigned int, the &lt;em&gt;entire expression&lt;/em&gt; gets treated like an unsigned int.&amp;#160; So, since –9 in unsigned form is actually a very large number, it’s considered greater when compared to 0.&amp;#160; But as if that wasn’t bad enough, when it gets assigned to numObjectsToRemove, it gets treated like a normal signed int again, so its value becomes –9 again.&amp;#160; And you’re left wondering why –9 is considered greater than 0.&lt;/p&gt;  &lt;p&gt;The simple fix is to force the macro to treat the whole expression like an int with a simple cast:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;int numObjectsToRemove = MAX(0, &lt;strong&gt;(int)&lt;/strong&gt;myObjectArray.count - MAX_OBJECTS);&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-478819269201266754?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/478819269201266754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=478819269201266754' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/478819269201266754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/478819269201266754'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/07/objective-c-min-and-max-define.html' title='Objective-C MIN and MAX #define wonkiness'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-933324165694141050</id><published>2010-07-13T18:01:00.001-07:00</published><updated>2010-07-13T18:01:33.123-07:00</updated><title type='text'>Permission confusion in MS SQL Server 2008</title><content type='html'>&lt;p&gt;I’m singling out MS SQL Server 2008 though I’m sure this appears in previous versions as well.&lt;/p&gt;  &lt;p&gt;Have you ever run into a situation in which, for some reason, you just couldn’t grant someone certain permissions in SQL Server?&amp;#160; If you’re irresponsible like me, you’ll generally just try to give them as much access as possible to make the problem go away sooner.&lt;/p&gt;  &lt;p&gt;But there are an &lt;em&gt;insane&lt;/em&gt; number of ways you have available to you to change permissions.&amp;#160; Do they all do the same thing?&amp;#160; Are they different windows into the same data, or do they affect different permissions?&amp;#160; Who the heck knows, except the SQL Gods.&amp;#160; Here’s an example of the overwhelming number of ways to assign permissions:&lt;/p&gt;  &lt;p&gt;1. Select the &lt;strong&gt;Security-&amp;gt;Users&lt;/strong&gt; folder under your database item, and add/modify the property of users from there:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/TD0MUUSkmOI/AAAAAAAAAXs/WXWvFD7g2wE/s1600-h/sqlhell_step01%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="sqlhell_step01" border="0" alt="sqlhell_step01" src="http://lh3.ggpht.com/_qvLGUOISC18/TD0MVia7MjI/AAAAAAAAAXw/3TVtnQQy7ws/sqlhell_step01_thumb%5B2%5D.png?imgmax=800" width="591" height="554" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;2. Select the &lt;strong&gt;Security-&amp;gt;Roles&lt;/strong&gt; folder under your database item, right-click and select Properties on a database role and assign a user to that role.&amp;#160; Bewilderingly, this doesn’t appear to correspond to method #1!&amp;#160; In other words, if I assign a user to the dbowner role using method #1, they won’t be listed in the role membership listing of method #2!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_qvLGUOISC18/TD0MWJVGHvI/AAAAAAAAAX0/CFKI72tt2TU/s1600-h/sqlhell_step02%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="sqlhell_step02" border="0" alt="sqlhell_step02" src="http://lh5.ggpht.com/_qvLGUOISC18/TD0MXeJSOsI/AAAAAAAAAX4/d-Ef4Szi0-M/sqlhell_step02_thumb%5B2%5D.png?imgmax=800" width="631" height="544" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3. Right-click the database object itself, click Properties, then select the Permissions page.&amp;#160; OMG, now there’s a completely separate list of users and very fine-grained permissions which you can “Grant”, “With Grant” (whatever on Earth that means), or “Deny”.&amp;#160; Huh?&amp;#160; Why is there a completely different set of permissions?&amp;#160; Do these override the role memberships?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/TD0MXzlu4QI/AAAAAAAAAX8/rfBfOgHHRFg/s1600-h/sqlhell_step03%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="sqlhell_step03" border="0" alt="sqlhell_step03" src="http://lh3.ggpht.com/_qvLGUOISC18/TD0MYRK8b4I/AAAAAAAAAYA/miO4B3pnrkc/sqlhell_step03_thumb%5B3%5D.png?imgmax=800" width="681" height="554" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;4. Select a user from Security-&amp;gt;Logins of the database server item, edit their User Mapping properties to assign them to a particular database, and from there modify their &amp;quot;Database role membership”.&amp;#160; This &lt;em&gt;seems&lt;/em&gt; to correspond to the values in step 1 or 2.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_qvLGUOISC18/TD0MY3J5mgI/AAAAAAAAAYE/JHsaj8eXnZ4/s1600-h/sqlhell_step04%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="sqlhell_step04" border="0" alt="sqlhell_step04" src="http://lh4.ggpht.com/_qvLGUOISC18/TD0MaKWaQuI/AAAAAAAAAYI/wjifIbOs7eY/sqlhell_step04_thumb%5B2%5D.png?imgmax=800" width="689" height="551" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;5. RIght-click the database server item and choose Properties, then click the Permissions page.&amp;#160; This allows you to select logins or roles and explicitly assign permissions similar to Step 3.&amp;#160; But you’re assigning these to &lt;em&gt;Logins&lt;/em&gt; instead of Users?&amp;#160; Wha?&amp;#160; Does that override the User permission, or does the User value override the Login permission?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/TD0MapgTzcI/AAAAAAAAAYQ/1DAlC3FXvXU/s1600-h/sqlhell_step05%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="sqlhell_step05" border="0" alt="sqlhell_step05" src="http://lh6.ggpht.com/_qvLGUOISC18/TD0MbFggXvI/AAAAAAAAAYU/ACIi9sLYCww/sqlhell_step05_thumb%5B2%5D.png?imgmax=800" width="676" height="612" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’m sure there are many more ways to modify permissions but I’d just be belaboring the point.&amp;#160; I have nothing against having multiple places from which to modify user permissions, but I’d like if there was some semblance of correlation to one another.&amp;#160; As it stands, when I assign someone permissions, I’m mostly just guessing.&amp;#160; I realize that this is a tool for hardcore administrators, but in reality it’s used by a lot of everyday programmer-users like myself.&amp;#160; We aren’t administrators nor do we want to be; we just need to do what we need to do to get our job done.&lt;/p&gt;  &lt;p&gt;I have something I want to do and a cryptic way to accomplish this through the administration tool.&amp;#160; What I want is an easier way to specify what I want, and have the system be smart enough to guide me through (possibly multiple) options for making this happen.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-933324165694141050?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/933324165694141050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=933324165694141050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/933324165694141050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/933324165694141050'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/07/permission-confusion-in-ms-sql-server.html' title='Permission confusion in MS SQL Server 2008'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_qvLGUOISC18/TD0MVia7MjI/AAAAAAAAAXw/3TVtnQQy7ws/s72-c/sqlhell_step01_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-1820706713110434034</id><published>2010-06-09T20:40:00.001-07:00</published><updated>2010-06-09T20:40:14.748-07:00</updated><title type='text'>2D Line segment intersection detection in C#</title><content type='html'>&lt;p&gt;For a previous game project, I needed a nice line segment intersection detection algorithm.&amp;#160; It was surprisingly difficult to find a good one in C#, but I found one in C++ that I converted.&amp;#160; &lt;/p&gt;  &lt;p&gt;As it turns out, my upcoming game makes heavy use of this algorithm as well.&amp;#160; So here it is in case anyone else needs it.&amp;#160; This version is a little sloppy in that it uses 3D constructs despite checking 2D intersections, but it would be simple to convert this to its 2D counterpart.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:1aa3925f-9bfd-4d3a-bda1-694b6d05ce21" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px"&gt;Line segment intersection C#&lt;/div&gt; &lt;div style="background: #ddd; max-height: 500px; overflow: auto"&gt; &lt;ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px; white-space: nowrap"&gt; &lt;li&gt; &lt;span style="color:#008000"&gt;// Returns true if the lines intersect, otherwise false. If the lines &lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#008000"&gt;// intersect, intersectionPoint holds the intersection point.&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;bool&lt;/span&gt; Intersects2D(&lt;span style="color:#2b91af"&gt;LineSegment3&lt;/span&gt; otherLineSegment, &lt;span style="color:#0000ff"&gt;out&lt;/span&gt; &lt;span style="color:#2b91af"&gt;Vector3&lt;/span&gt; intersectionPoint)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;float&lt;/span&gt; firstLineSlopeX, firstLineSlopeY, secondLineSlopeX, secondLineSlopeY;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            firstLineSlopeX = &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point2.X - &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.X;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            firstLineSlopeY = &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point2.Y - &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.Y;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            secondLineSlopeX = otherLineSegment.Point2.X - otherLineSegment.Point1.X;&lt;/li&gt; &lt;li&gt;            secondLineSlopeY = otherLineSegment.Point2.Y - otherLineSegment.Point1.Y;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;float&lt;/span&gt; s, t;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            s = (-firstLineSlopeY * (&lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.X - otherLineSegment.Point1.X) + firstLineSlopeX * (&lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.Y - otherLineSegment.Point1.Y)) / (-secondLineSlopeX * firstLineSlopeY + firstLineSlopeX * secondLineSlopeY);&lt;/li&gt; &lt;li&gt;            t = (secondLineSlopeX * (&lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.Y - otherLineSegment.Point1.Y) - secondLineSlopeY * (&lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.X - otherLineSegment.Point1.X)) / (-secondLineSlopeX * firstLineSlopeY + firstLineSlopeX * secondLineSlopeY);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (s &amp;gt;= 0 &amp;amp;&amp;amp; s &amp;lt;= 1 &amp;amp;&amp;amp; t &amp;gt;= 0 &amp;amp;&amp;amp; t &amp;lt;= 1)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            {&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;float&lt;/span&gt; intersectionPointX = &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.X + (t * firstLineSlopeX);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                &lt;span style="color:#0000ff"&gt;float&lt;/span&gt; intersectionPointY = &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Point1.Y + (t * firstLineSlopeY);&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                &lt;span style="color:#008000"&gt;// Collision detected&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                intersectionPoint = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;Vector3&lt;/span&gt;(intersectionPointX, intersectionPointY, 0);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;true&lt;/span&gt;;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            }&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            intersectionPoint = &lt;span style="color:#2b91af"&gt;Vector3&lt;/span&gt;.Zero;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;false&lt;/span&gt;; &lt;span style="color:#008000"&gt;// No collision&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        }&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-1820706713110434034?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/1820706713110434034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=1820706713110434034' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/1820706713110434034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/1820706713110434034'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/06/2d-line-segment-intersection-detection.html' title='2D Line segment intersection detection in C#'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-7268987567323327244</id><published>2010-03-19T19:40:00.001-07:00</published><updated>2010-03-19T19:40:30.577-07:00</updated><title type='text'>Improving music performance in the iPhone SDK</title><content type='html'>&lt;p&gt;For people who like to copy and paste other people’s solutions without researching the problem in depth, this entry is for you (since I don’t go into depth).&lt;/p&gt;  &lt;p&gt;I was noticing my iPhone game framerate being really jerky when playing music that I encoded using IMA4 format, so I changed it to LEI8.&amp;#160; The file format is somewhat big, being lossless, but the tradeoff is that I hardly notice any jerkiness now.&lt;/p&gt;  &lt;p&gt;In short, I was previously running this to convert my files before:&lt;/p&gt;  &lt;p&gt;/usr/bin/afconvert -f caff -d ima4 Source.mp3 Target.caf&lt;/p&gt;  &lt;p&gt;and now I’m doing this&lt;/p&gt;  &lt;p&gt;/usr/bin/afconvert -f caff -d &lt;strong&gt;LEI8&lt;/strong&gt; Source.mp3 Target.caf&lt;/p&gt;  &lt;p&gt;I don’t notice any sound quality degradation either.&amp;#160; I also tried LEI16 but it wasn’t worth the doubled size for no noticeable quality gain (Your Mileage May Vary).&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-7268987567323327244?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/7268987567323327244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=7268987567323327244' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7268987567323327244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7268987567323327244'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/03/improving-music-performance-in-iphone.html' title='Improving music performance in the iPhone SDK'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-108347816683870990</id><published>2010-01-31T20:07:00.001-08:00</published><updated>2010-01-31T20:07:41.129-08:00</updated><title type='text'>Reflections from Global Game Jam 2010</title><content type='html'>&lt;p&gt;I posted a characteristically long blog entry via my account at globalgamejam.org, which I will repost here:&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;I've survived the &lt;a href="http://www.globalgamejam.org/"&gt;Global Game Jam&lt;/a&gt;, and my team created something resembling a game. To say that I'm happy with it or proud of it would be untrue, unfortunately. It's hard not to look back at all the things that could have been but weren't, or imagine what could have been added if only we had slightly more time.&lt;/p&gt;  &lt;p&gt;In the end, we created an espresso stand themed mini-game, essentially. Was it innovative? Not really. Was it fun? Not in its 48-hour state, but there was potential at least. Was it the game I dreamed of making during the months preceding the Jam? No. Why? What went wrong? I will try to address these questions in a way that won't spiral into hopeless negativity.&lt;/p&gt;  &lt;p&gt;My first blog entry listed the lessons I learned from my last Game Jam. I want to revisit them to see how well I did, and then see what new lessons I learned from this one:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;* Find a team you mesh well with.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My teammates were cool people, but it was clear that we had very different goals and very different sets of experience. Dwelling on this will only sound like blaming, but suffice it to say I didn't do a good job here.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;* Use source control.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We had an SVN server up and running pretty quickly, and this saved us. I don't even want to think about the challenges we would have faced otherwise.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;* Scale scale scale&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Our overall game idea was indeed very straightforward, but we aimed for far too many embellishments than we should have for a 48-hour game. Probably half of the time was spent creating/working with content in some form, rather than coding actual essential gameplay logic. Because of this, we ultimately had to cut key features of the game.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;* Throw solid coding practices to the wayside&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I feel we reached a really good balance here. Our code was structured in a fairly logical way but with some corners cut for the sake of time (for example, avoiding unnecessary future-proofness by hardcoding logic which assumes two players).&lt;/p&gt;  &lt;p&gt;The lessons I learned from this Jam were mostly rehashes/reinforcements of the previous lessons:&lt;/p&gt;  &lt;p&gt;* Find a team that you mesh well with, part 2: I had been excitedly anticipating this event for months in advance, and all my friends knew because I talked about it constantly. Naturally I arrived early, brought tons of supplies/food/drinks with me, set up my laptop with source control, etc. ahead of time. I should have immediately seeked out other developers who shared the same passion. And remember, you are inevitably going to have to compromise on a design idea. So find people who have design goals as close as possible to yours (e.g. don't group with someone who is passionate about Myth-esque puzzle games if you really want to make a retro shooter)&lt;/p&gt;  &lt;p&gt;Speaking of design, I might get flak for saying this, but for a 48-hour game, a designer with little or no programming experience is dead space unless they're also an artist. &lt;strong&gt;Everyone&lt;/strong&gt; is a designer. &lt;strong&gt;Everyone&lt;/strong&gt; has ideas. Yes, there are good designers and there are horrible designers. But even a great designer who does nothing but design is not worth it on a 48-hour game. More likely than not, a dedicated designer will only increase the scope of the game by dreaming up infeasible features, causing friction with the developers who actually have to [dare I say] do the work.&lt;/p&gt;  &lt;p&gt;If you're lucky, you'll find a programmer who is already good-enough at art. The artistic bar is not exactly high for a 48 hour game, so &amp;quot;good-enough&amp;quot; is all you need. A dedicated, exceptional artist is a great asset as well though, because it's often the aesthetics that really boost the appeal of games of this scope.&lt;/p&gt;  &lt;p&gt;I didn't mention sound designers, because again, the scope of the game is so small that sound is often an afterthought, but they can be a great addition if you can afford the opportunity cost.&lt;/p&gt;  &lt;p&gt;* Scale scale scale, part 2: Your design should be iterative even for a 48 hour game, but a crucial point is that this design should start extremely simple. Find a core mechanic, keep the mechanic DEAD SIMPLE, and if you have time, iterate on it. Here's a counter-example of what I mean:&lt;/p&gt;  &lt;p&gt;For our espresso game, &amp;quot;Cheap Shots&amp;quot;, the original plan was to have players create different drinks by pressing buttons in a particular sequence on an Xbox controller. So, one drink might be A, B, B, X and another might be X, Y, A, B (the buttons were supposedly associated with different ingredients). Before we had even completed implementing this basic mechanic, we began dreaming up new ways to add ingredients; for example, holding the trigger and releasing it at a particular time might be associated with steaming milk, or turning the thumbstick on the controller might be associated with stirring the drink. This was a mistake from the start. I ended up spending precious amounts of coding time trying to implement these special case scenarios (keep in mind they all required additional UI assets as well), while core gameplay mechanics were being neglected (score board, game timer, essential UI elements, etc.)&lt;/p&gt;  &lt;p&gt;Further, we spent what felt like half of our time dealing with mountains of sound assets that were completely non-essential to the gameplay. These were the types of niceties that could be added after the fact, when the core gameplay was done.&lt;/p&gt;  &lt;p&gt;So, in short, it's not just the game that needs to be simple; the core mechanic needs to start dead-simple and optionally build from there &lt;em&gt;after&lt;/em&gt; you have a complete gameplay experience.&lt;/p&gt;  &lt;p&gt;Here are some additional lessons I learned, though some are minor:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;* Make sure that your working environment is comfortable.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;DigiPen was great. There was an active work environment with plenty of space. But when you're working for 48 hours almost nonstop, even the minor things can become major annoyances. I was foolish enough to position myself in the middle of a long table, separated enough from my team that any time they called me over, I needed to practically climb over my table or else squeeze by several people to get to them. After the 25th time having to do this, I was ready to relocate.&lt;/p&gt;  &lt;p&gt;Also, make sure you have the best setup you can get; a large monitor, comfortable mouse, etc.&lt;/p&gt;  &lt;p&gt;As soon as you sense an annoyance, fix it, or it'll be a thorn in your side for the next 48 hours.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;* Time is precious; don't waste it.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Yes, I know, this is obvious. My point isn't about goofing off excessively or being lazy. If you're inclined to do that at a game jam, you're probably not passionate enough for it to begin with. I'm talking about other time wasters. For example, you don't need to notify your team about every single change that doesn't affect them, show them every cool thing you added, or ask them questions that you can easily find the answer to yourself (i.e. &amp;quot;Where is X defined in the code?&amp;quot;; there's a search function for that). Remember, assuming you picked a good team, their time is every bit as valuable as yours. Every time you interrupt them in the middle of coding, you break their concentration. You force a &amp;quot;context switch&amp;quot;, and it takes them time to regain their focus. Don't have needless conversations in which you explain at length how you intend to implement something; just do it. And similarly, don't explain at length how &lt;strong&gt;someone else&lt;/strong&gt;might possibly implement something, unless they are requesting your help or are working on a shared component. They could be using that time to actually implement rather than discussing it.&lt;/p&gt;  &lt;p&gt;In the off chance that anyone actually read through this in its entirety, I hope it provides some value.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-108347816683870990?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/108347816683870990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=108347816683870990' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/108347816683870990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/108347816683870990'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/01/reflections-from-global-game-jam-2010.html' title='Reflections from Global Game Jam 2010'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-2741708284405624226</id><published>2010-01-26T11:23:00.001-08:00</published><updated>2010-01-26T11:23:41.093-08:00</updated><title type='text'>Error: Cannot read configuration file due to insufficient permissions – possible solution</title><content type='html'>&lt;p&gt;I wanted to post an incomplete solution to this problem that I’ve encountered a couple times now.&amp;#160; I’m not sure the exact cause but the jist of it is that I’ve got a web site I’m hosting via IIS7 on a remote server which I can access just fine.&amp;#160; But when I try to host this on my local machine for debugging purposes, I get an error which resembles this when I access the page:&lt;/p&gt;  &lt;h3&gt;Server Error in '/xxxxx’ Application.    &lt;hr size="1" width="100%" /&gt;&lt;/h3&gt;  &lt;h4&gt;&lt;i&gt;Filename: redirection.config      &lt;br /&gt;Error: Cannot read configuration file due to insufficient permissions&lt;/i&gt;&lt;i&gt;&lt;/i&gt;     &lt;p&gt;&lt;/p&gt; &lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Exception Details:&lt;/strong&gt; System.UnauthorizedAccessException: Filename:redirection.config     &lt;br /&gt;Error: Cannot read configuration file due to insufficient permissions &lt;/p&gt;  &lt;p&gt;ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via &amp;lt;identity impersonate=&amp;quot;true&amp;quot;/&amp;gt;, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. &lt;/p&gt;  &lt;p&gt;To grant ASP.NET access to a file, right-click the file in Explorer, choose &amp;quot;Properties&amp;quot; and select the Security tab. Click &amp;quot;Add&amp;quot; to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.&lt;/p&gt;  &lt;h3&gt;The Solution:&lt;/h3&gt;  &lt;p&gt;1. Identify the user under which your web site’s application pool is running under.&lt;/p&gt;  &lt;p&gt;2. Add this user as a User Account on your local machine and add them to the IIS_IUSRS Group (the names have been obscured to protect the innocent).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_qvLGUOISC18/S19BNs_udmI/AAAAAAAAAU8/Yt32WIYpi30/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_qvLGUOISC18/S19BOvi6owI/AAAAAAAAAVA/mJXCj_CxtWs/image_thumb%5B4%5D.png?imgmax=800" width="369" height="394" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-2741708284405624226?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/2741708284405624226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=2741708284405624226' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2741708284405624226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2741708284405624226'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/01/error-cannot-read-configuration-file.html' title='Error: Cannot read configuration file due to insufficient permissions – possible solution'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_qvLGUOISC18/S19BOvi6owI/AAAAAAAAAVA/mJXCj_CxtWs/s72-c/image_thumb%5B4%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-5562925265770277636</id><published>2010-01-17T17:30:00.001-08:00</published><updated>2010-01-17T17:30:21.767-08:00</updated><title type='text'>Indie game developer YouTube/Vimeo channels</title><content type='html'>&lt;p&gt;On one of my sister blogs, I posted a link to some &lt;a href="http://middlebrain.blogspot.com/2010/01/indie-game-developer-youtubevimeo.html"&gt;independent game developer video channels&lt;/a&gt;.&amp;#160; I’ve tried to get D-Roc to make a similar video series with me, but he wouldn’t have it.&amp;#160; I’m convinced we could make something every bit as compelling or more (or at least have fun doing it), but alas, it wasn’t meant to be.&amp;#160; Maybe I’ll create my own series some day.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4a26176b-9d31-42d6-97e5-4e8fa8e5e13d" class="wlWriterEditableSmartContent"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/game+development" rel="tag"&gt;game development&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/reference" rel="tag"&gt;reference&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/indie+game+developers" rel="tag"&gt;indie game developers&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-5562925265770277636?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/5562925265770277636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=5562925265770277636' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5562925265770277636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5562925265770277636'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/01/indie-game-developer-youtubevimeo.html' title='Indie game developer YouTube/Vimeo channels'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-7442792173420217434</id><published>2010-01-12T11:40:00.001-08:00</published><updated>2010-01-12T11:42:17.810-08:00</updated><title type='text'>Creating a file share with a custom name – an unpleasant Windows 7 user experience</title><content type='html'>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I usually run into this issue when I have two folders of the same name that I want to share, but I want sensible share names to distinguish them from one another.&lt;/p&gt;  &lt;p&gt;For a concrete example, let’s suppose you have local folders on your PC called &lt;strong&gt;c:\project\tools&lt;/strong&gt; and &lt;strong&gt;c:\development\tools&lt;/strong&gt; (stupid names, I know).&amp;#160; You want to share both of these to the outside world, so you browse to &lt;strong&gt;c:\project&lt;/strong&gt;, right-click the &lt;strong&gt;tools&lt;/strong&gt; subfolder and click Share:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_qvLGUOISC18/S0zQBKLbRoI/AAAAAAAAAT4/IkZ0pNN6kOg/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/S0zQBe7v_qI/AAAAAAAAAT8/nwfwNQHN5FM/image_thumb%5B3%5D.png?imgmax=800" width="286" height="365" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If everything works properly, it auto-assigns a share name of &lt;strong&gt;\\yourmachinename\tools&lt;/strong&gt;.&amp;#160; Congrats.&lt;/p&gt;  &lt;p&gt;But now you want to share &lt;strong&gt;c:\development\tools&lt;/strong&gt;, so you follow the same process.&amp;#160; Here is what happens:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/S0zQB3ULvDI/AAAAAAAAAUA/ybBfhsHgqHM/s1600-h/image%5B14%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_qvLGUOISC18/S0zQCSBiDpI/AAAAAAAAAUE/KOgoFT1p0Jo/image_thumb%5B6%5D.png?imgmax=800" width="512" height="371" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The folder is automatically shared as &lt;strong&gt;tools2&lt;/strong&gt;.&amp;#160; Note that there is absolutely no option to choose a different name at this time.&amp;#160; Whether you like it or not, your folder is initially going to be shared as the name &lt;strong&gt;tools2&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;So, now that it’s shared as &lt;strong&gt;tools2&lt;/strong&gt;, you want to somehow change the share name.&amp;#160; To do this, you need to right-click the folder, navigate to its Sharing properties and click &lt;strong&gt;Advanced Sharing…&lt;/strong&gt; (because apparently renaming a share is an advanced feature).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/S0zQCuk4tyI/AAAAAAAAAUI/_bnsG2-rqIo/s1600-h/image%5B18%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/S0zQC4vWfQI/AAAAAAAAAUM/U95LQOjfpyA/image_thumb%5B8%5D.png?imgmax=800" width="379" height="493" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In the &lt;strong&gt;Advanced Sharing&lt;/strong&gt; dialog, you’ll notice in the &lt;strong&gt;Settings&lt;/strong&gt; group that it displays the current share name and lets you add additional share names.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/S0zQDcLprNI/AAAAAAAAAUQ/c7ef7qMl4GI/s1600-h/image%5B23%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_qvLGUOISC18/S0zQDz1nAwI/AAAAAAAAAUU/qLZzVkUewF0/image_thumb%5B11%5D.png?imgmax=800" width="437" height="437" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;What you must do is first &lt;strong&gt;Add&lt;/strong&gt; a new share name (you can’t delete the existing one until you do), and give it the name you prefer (in this case, &lt;strong&gt;toolsdev&lt;/strong&gt;).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/S0zQEDKicTI/AAAAAAAAAUY/2Bntn9VrKF8/s1600-h/image%5B27%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_qvLGUOISC18/S0zQEzBT63I/AAAAAAAAAUc/MZJJC-MU_As/image_thumb%5B13%5D.png?imgmax=800" width="458" height="204" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now you’ve got two share names for this folder, so delete the extraneous &lt;strong&gt;tools2&lt;/strong&gt; name.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_qvLGUOISC18/S0zQHjkF-yI/AAAAAAAAAUg/HYqD5u1SUd4/s1600-h/image%5B44%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/S0zQIOHYlwI/AAAAAAAAAUk/u2Ov8-DgTog/image_thumb%5B24%5D.png?imgmax=800" width="484" height="484" /&gt;&lt;/a&gt; &lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/S0zQIUVRqdI/AAAAAAAAAUo/rhNmkYhdm_Y/s1600-h/image%5B45%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/S0zQI_xmxvI/AAAAAAAAAUs/Hh-pRnmzNJM/image_thumb%5B25%5D.png?imgmax=800" width="479" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, to make matters worse, if you’ve already assigned permissions to the &lt;strong&gt;tools2&lt;/strong&gt; share, you’ll have to reassign them.&amp;#160; I’m not sure why this is the case.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/S0zQJdAtisI/AAAAAAAAAUw/NuPtI-iIf8g/s1600-h/image%5B36%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_qvLGUOISC18/S0zQJpNdHwI/AAAAAAAAAU0/nu8xnFN3O3I/image_thumb%5B18%5D.png?imgmax=800" width="611" height="440" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Congrats!&amp;#160; You’ve finally created a shared folder of the name you desire, but it took about 5 steps more than it should have.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-7442792173420217434?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/7442792173420217434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=7442792173420217434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7442792173420217434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7442792173420217434'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2010/01/creating-file-share-of-custom-name.html' title='Creating a file share with a custom name – an unpleasant Windows 7 user experience'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_qvLGUOISC18/S0zQBe7v_qI/AAAAAAAAAT8/nwfwNQHN5FM/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-3056556949513323745</id><published>2009-11-16T17:55:00.001-08:00</published><updated>2009-11-16T17:55:47.757-08:00</updated><title type='text'>Using Command-line arguments in Windows Services – a “gotcha”</title><content type='html'>&lt;p&gt;This can’t really be considered a “gotcha” more than just a “pay careful attention to the perhaps unintuitive documentation” scenario.&amp;#160; Also, this assumes basic knowledge of creating Windows Services.&lt;/p&gt;  &lt;p&gt;So here’s the situation: I wrote a Windows Service, and I wanted to optionally enable verbose debug output (since services are a bit of a pain to debug) using a command-line option.&amp;#160; Services, after all, can be started with command-line arguments.&amp;#160; But regardless of what I entered as the command-line arguments, the OnStart(string[] args) method of my service would always report that “args” was empty – that is, no arguments.&lt;/p&gt;  &lt;p&gt;After some quick Bingoogling, here’s &lt;a href="http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicebase.onstart.aspx"&gt;what I found&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The arguments in the args parameter array can be set manually in the properties window for the service in the Services console. &lt;em&gt;The arguments entered in the console are not saved; they are passed to the service on a one-time basis&lt;/em&gt; when the service is started from the control panel.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I still thought that I was doing the right thing, by going to my service’s properties, typing command-line arguments, clicking OK and then right clicking the service and choosing Start:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/SwICmD0kvYI/AAAAAAAAASs/bwBgnEW6n3E/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/SwICnI2e8FI/AAAAAAAAASw/CBz06bhB80s/image_thumb%5B2%5D.png?imgmax=800" width="372" height="416" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/SwICnaDR90I/AAAAAAAAAS0/cJL3L7dCzBI/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/SwICoJQ3lTI/AAAAAAAAAS4/qAY6cZZwob4/image_thumb%5B3%5D.png?imgmax=800" width="244" height="216" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;But no luck!&amp;#160; The solution was very simple: &lt;strong&gt;Click Start from within the Properties window.&amp;#160; &lt;/strong&gt;As soon as you click &lt;strong&gt;OK&lt;/strong&gt; (which intuitively would seem to save the changes to the Start parameters, as is the case in every other properties dialog in the history of mankind), the Start parameters disappear.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-3056556949513323745?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/3056556949513323745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=3056556949513323745' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3056556949513323745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3056556949513323745'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/11/using-command-line-arguments-in-windows.html' title='Using Command-line arguments in Windows Services – a “gotcha”'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_qvLGUOISC18/SwICnI2e8FI/AAAAAAAAASw/CBz06bhB80s/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-2504057340655839456</id><published>2009-10-31T16:52:00.001-07:00</published><updated>2009-11-02T12:29:48.237-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wacom'/><category scheme='http://www.blogger.com/atom/ns#' term='bamboo'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='tablet'/><category scheme='http://www.blogger.com/atom/ns#' term='pressure sensitivity'/><category scheme='http://www.blogger.com/atom/ns#' term='pressure'/><category scheme='http://www.blogger.com/atom/ns#' term='tablet pc'/><title type='text'>Pressure Sensitivity Problem with Wacom Bamboo Pen Tablet in Windows 7</title><content type='html'>&lt;p&gt;Okay, this isn’t my usual coding-related post, but I hope it helps someone.&amp;#160; There are a million different threads about Wacom tablets not working properly with various software on various system configurations, and there’s no shortage of suggested solutions, so I’ll describe my specific situation and its specific solution:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Wacom tablet pen pressure sensitivity does not work in Adobe Photoshop CS4.&amp;#160; More specifically, it draws at full brush thickness all the time, &lt;em&gt;unless &lt;/em&gt;I double-tap the tablet quickly and then begin drawing immediately after, which surprisingly allows pressure sensitivity to work.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;My Configuration:&lt;/strong&gt; Windows 7 Ultimate, &lt;a href="http://www.wacom.com/bamboo/bamboo_pen.php?gclid=CLO377i-6J0CFSn6agodcQg-LA"&gt;Wacom Bamboo Pen&lt;/a&gt; tablet (the most basic model), Adobe Photoshop CS4 (as mentioned above)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; In short, disable using the “press and hold” pen action as a right-click equivalent in the Windows tablet pen control panel.&amp;#160; To do this:&lt;/p&gt;  &lt;p&gt;Click the Windows button, and in the search box type “Change tablet pen settings&amp;quot;.&amp;#160; Open the item that appears.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/SuzN0YRPF5I/AAAAAAAAASM/VlFNe-seQGA/s1600-h/image%5B11%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/SuzN0jtbECI/AAAAAAAAASQ/05dJwGdMZoM/image_thumb%5B5%5D.png?imgmax=800" width="454" height="146" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In that dialog, in the &lt;strong&gt;Pen Options&lt;/strong&gt; tab (the default), in the &lt;strong&gt;Pen actions&lt;/strong&gt; group, select the &lt;strong&gt;Press and hold&lt;/strong&gt; pen action and then click the &lt;strong&gt;Settings…&lt;/strong&gt; button.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_qvLGUOISC18/SuzN1Brly6I/AAAAAAAAASU/x0holHtWZb0/s1600-h/image%5B15%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_qvLGUOISC18/SuzN1eitFFI/AAAAAAAAASY/H8xDC2cLHrU/image_thumb%5B7%5D.png?imgmax=800" width="362" height="450" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Then, in the dialog that appears, uncheck &lt;strong&gt;Enable press and hold for right-clicking&lt;/strong&gt; and click&lt;strong&gt; OK&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_qvLGUOISC18/SuzN1t0z43I/AAAAAAAAASc/kCOhIrd7_Qg/s1600-h/image%5B19%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_qvLGUOISC18/SuzN2I9ysaI/AAAAAAAAASg/fOztQt6jJsg/image_thumb%5B9%5D.png?imgmax=800" width="379" height="469" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Windows’ Tablet PC settings are fighting with the tablet’s usefulness, doing their best to turn it into a primary input device rather than a dedicated drawing instrument.&amp;#160; In my specific case, you’ll notice that every time you tap the pen and start drawing (interpreted by Windows as a “tap and hold”), a circle will start drawing around the tap location, and once it finishes drawing, the equivalent of a right-click is received.&amp;#160; This is not a Wacom thing; it’s a Windows thing, and it’s messing with your ability to use your pen with proper pressure sensitivity.&lt;/p&gt;  &lt;p&gt;Since my Bamboo tablet pen has a button on it which maps to a right-click by default, I don’t need the “press-and-hold” right-click functionality, and you likely don’t either.&lt;/p&gt;  &lt;p&gt;I hope this saves someone some frustration.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-2504057340655839456?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/2504057340655839456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=2504057340655839456' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2504057340655839456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2504057340655839456'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/10/pressure-sensitivity-problem-with-wacom.html' title='Pressure Sensitivity Problem with Wacom Bamboo Pen Tablet in Windows 7'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_qvLGUOISC18/SuzN0jtbECI/AAAAAAAAASQ/05dJwGdMZoM/s72-c/image_thumb%5B5%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-7789532267220696565</id><published>2009-10-28T13:54:00.001-07:00</published><updated>2009-11-02T12:30:27.487-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Equals'/><category scheme='http://www.blogger.com/atom/ns#' term='set theory'/><category scheme='http://www.blogger.com/atom/ns#' term='Intersect'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='GetHashCode'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>GetHashCode is useful, who knew?</title><content type='html'>&lt;p&gt;If you’re like me, you’re inclined to lazily ignore warnings to override &lt;strong&gt;object.GetHashCode&lt;/strong&gt; for your custom types if you’ve already overriden &lt;strong&gt;object.Equals&lt;/strong&gt;.&amp;#160; If I’m using a Dictionary and using one of my objects as a key, then sure, I can see the point.&amp;#160; But if I’m just throwing it in a generic List, &lt;strong&gt;object.Equals&lt;/strong&gt; is good enough, right?&lt;/p&gt;  &lt;p&gt;Well, yes, but apparently this isn’t a safe assumption to make for any given collection type or operation.&amp;#160; I learned this the hard way with LINQ’s &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb460136.aspx"&gt;Enumerable.Intersect&lt;/a&gt;&lt;/strong&gt; method (an extension method of IEnumerable&amp;lt;T&amp;gt;).&lt;/p&gt;  &lt;p&gt;Without going into detail about &lt;a href="http://en.wikipedia.org/wiki/Set_theory#Basic_concepts"&gt;set theory&lt;/a&gt;, the &lt;strong&gt;Enumerable.Intersect&lt;/strong&gt; method will take two collections of objects, and return a collection of objects which both source sets contain.&amp;#160; So, for example, if I have two sets of ints:&lt;/p&gt;  &lt;p&gt;A = { 1, &lt;strong&gt;5&lt;/strong&gt;, 7, &lt;strong&gt;9&lt;/strong&gt; }    &lt;br /&gt;B = { 4, &lt;strong&gt;5&lt;/strong&gt;, &lt;strong&gt;9&lt;/strong&gt;, 13 }&lt;/p&gt;  &lt;p&gt;The intersected set would contain only the values that both sets share:&lt;/p&gt;  &lt;p&gt;{ &lt;strong&gt;5&lt;/strong&gt;, &lt;strong&gt;9&lt;/strong&gt; }&lt;/p&gt;  &lt;p&gt;Now, if the items in my sets are of my own custom type, I thought it would be sufficient to override &lt;strong&gt;object.Equals&lt;/strong&gt; for this type.&amp;#160; But no, if I do this, &lt;strong&gt;Enumerable.Intersect&lt;/strong&gt; will return an empty collection, indicating that &lt;em&gt;none of the objects are equal, &lt;/em&gt;even if they are&lt;em&gt;.&amp;#160; &lt;/em&gt;When I implemented &lt;strong&gt;object.GetHashCode&lt;/strong&gt; as the compiler repeatedly pestered me to do, everything worked fine.&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://thegurglingcod.typepad.com/thegurglingcod/images/2008/02/12/the_more_you_know2.jpg" width="215" height="144" /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-7789532267220696565?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/7789532267220696565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=7789532267220696565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7789532267220696565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7789532267220696565'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/10/gethashcode-is-useful-who-knew.html' title='GetHashCode is useful, who knew?'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-2368426286850713121</id><published>2009-08-28T11:28:00.001-07:00</published><updated>2009-08-28T11:28:34.853-07:00</updated><title type='text'>ServerTooBusyException in WCF, possible cause</title><content type='html'>&lt;p&gt;I wanted to post this confusing error and solution in case this can help anyone else.&amp;#160; Here is my general situation:&lt;/p&gt;  &lt;p&gt;1. I was testing my WCF service hosted on a remote IIS server.&amp;#160; I had an identical IIS setup on my local development machine, and I wanted to switch to use it instead for better debugging support.&amp;#160; &lt;/p&gt;  &lt;p&gt;2. When I ran the exact same service-calling code on my local machine, service calls always hit the ServerTooBusyException exception.&amp;#160; I checked my local IIS setup, confused that I was getting a different result when all of the virtual directories, ports, bindings, etc. were identical to the remote server.&amp;#160; I manually accessed my service’s URL in a local web browser, i.e. &lt;a href="http://localhost/MyService/MyService.svc"&gt;http://localhost/MyService/MyService.svc&lt;/a&gt;.&amp;#160; I got the error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;h4&gt;Service Unavailable&lt;/h4&gt;    &lt;hr /&gt;    &lt;p&gt;HTTP Error 503. The service is unavailable.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Huh?&amp;#160; Not very descriptive.&amp;#160; And being a newbie, I have had no luck following the convoluted steps of getting any sort of service trace logging to work – and I wasn’t even sure if this would help.&amp;#160; (As an aside, PLEASE comment if you know how to enable the type of logging that ultimately would have revealed this problem.)&lt;/p&gt;  &lt;p&gt;3. Finally I found a vague comment on a forum regarding changed credentials, and it dawned on me: The account associated with the app pool I was using had had its password changed recently, and I hadn’t updated it on my local server to reflect this.&amp;#160; Once I re-set the credentials for the app pool user, everything worked perfectly.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I hope this post saves a headache or two.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-2368426286850713121?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/2368426286850713121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=2368426286850713121' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2368426286850713121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2368426286850713121'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/08/servertoobusyexception-in-wcf-possible.html' title='ServerTooBusyException in WCF, possible cause'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6680428053907309458</id><published>2009-08-07T17:33:00.001-07:00</published><updated>2009-08-07T17:33:57.503-07:00</updated><title type='text'>Code Analysis / Team Foundation context menu items missing!</title><content type='html'>&lt;p&gt;I had an issue recently in which my Team Foundation (2008) enlistment appeared to be partially corrupt.&amp;#160; Some of the symptoms:&lt;/p&gt;  &lt;p&gt;1. My “Work Items” folder had a red ‘x’ next to it permanently; I could never connect to my work items on my main PC (but I could from other PCs).&lt;/p&gt;  &lt;p&gt;2. When right-clicking on a Code Analysis warning in the Error List panel of Visual Studio, I didn’t get the usual options of “Create Work Item” and “Suppress Message(s)”.&lt;/p&gt;  &lt;p&gt;3. Some of the Team menu items were missing, or their sub menu items were greyed out, and displayed error messages such as “value does not fall within the expected range.”&lt;/p&gt;  &lt;p&gt;I tried all sorts of painful, time-consuming solutions, even uninstalling/reinstalling everything, but ultimately the solution was simply to delete my local app data Team Foundation Cache folder, located here:&lt;/p&gt;  &lt;p&gt;%localappdata%\Microsoft\Team Foundation\2.0\Cache&lt;/p&gt;  &lt;p&gt;I hope that someone finds this and it saves them hours of headache.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6680428053907309458?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6680428053907309458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6680428053907309458' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6680428053907309458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6680428053907309458'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/08/code-analysis-team-foundation-context.html' title='Code Analysis / Team Foundation context menu items missing!'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-5617987515035800778</id><published>2009-07-27T01:57:00.001-07:00</published><updated>2009-07-27T01:57:13.663-07:00</updated><title type='text'>Resolving “CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262)”</title><content type='html'>&lt;p&gt;To those of you who have Microsoft SQL Server Management Studio, and you’re un-hardcore users like myself who simply want to create a simple database to play around with, you might run into this cryptic error when you try to create a new database.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/Sm1r54ToUqI/AAAAAAAAAQ8/ErOp7ITT1pw/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/Sm1r6O-LBFI/AAAAAAAAARA/pQ7HHvS-BvQ/image_thumb%5B2%5D.png?imgmax=800" width="581" height="204" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Naturally the help URL link provided merely consoles you with an all-too-common “sorry, we can’t help” message.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;We're sorry&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Given that you’re not a hardcore MS SQL Server user, and neither am I, this error makes little sense.&amp;#160; There’s a system database called master, but I’m not creating that… I’m creating my own database, called ‘MyDatabase’.&amp;#160; I don’t care about the permissions to the database called ‘master.’&amp;#160; Further, I’m the admin on my PC, and I’m using “Windows Authentication”… to me that sounds like I should have the highest possible access to do whatever the heck I want with my local SQL server.&amp;#160; &lt;/p&gt;  &lt;p&gt;Well, yeah, you do, but here’s the catch: &lt;strong&gt;You have to run the damn SQL Management Studio as administrator.&lt;/strong&gt;&amp;#160; That’ll make this hellish error go away.&amp;#160; I sincerely hope that this blog post has saved at least one person from the frustration they might otherwise endure.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-5617987515035800778?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/5617987515035800778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=5617987515035800778' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5617987515035800778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5617987515035800778'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/07/resolving-create-database-permission.html' title='Resolving “CREATE DATABASE permission denied in database &amp;#39;master&amp;#39;. (Microsoft SQL Server, Error: 262)”'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_qvLGUOISC18/Sm1r6O-LBFI/AAAAAAAAARA/pQ7HHvS-BvQ/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6513253980165537079</id><published>2009-05-03T16:33:00.001-07:00</published><updated>2009-05-04T11:12:09.064-07:00</updated><title type='text'>Oh noes! Expectation Failed (417) in my WCF service at Tully’s</title><content type='html'>&lt;p&gt; Just when I thought my WCF service was working properly with regard to different network set-ups (i.e. my work network versus my home network), I found an annoying error occurring whenever I try to call one of my service methods.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Aside: Is that the proper terminology?  Do I say: “Whenever I call a service method” or instead do I say: “Whenever I connect to my service” or : “Whenever I access my service” ?  I’m not sure of the proper lingo.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/Sf4pue4f7rI/AAAAAAAAAOg/mUh2tNtoHAQ/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border: 0px none ; display: inline;" title="image" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/Sf4pv15bjRI/AAAAAAAAAOk/kAY8fOchMKM/image_thumb%5B1%5D.png?imgmax=800" width="603" border="0" height="289" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;For the benefit of search engines, that’s: “ProcolException was unhandled.  The remote server returned an unexpected response: (417) Expectation failed.”&lt;/p&gt;  &lt;p&gt;I verified (via remote desktop) that my home PC is still getting a proper response from the service.  So what’s going on?  Why am I unable to live up to my web service’s expectations when I’m on my laptop at Tully’s?  Well, either it has something to do with my local system configuration, or it has something to do with the network settings here.  I don’t really have a convenient way to test another network here, so I’m going to work on the hypothesis that it has something to do with Tully’s wifi network configuration.  This seems especially likely given that my web browser is having a heck of a time loading web pages fully.  Nevertheless, I don’t want to lazily write this off as an extreme case.  I’ll need to use Google to get to the bottom of this.&lt;/p&gt;  &lt;p&gt;So, after looking at Google, I’ve found several forums in which people have had a similar problem, and a solution which seems to work is described on my new favorite code-help site, &lt;a href="http://stackoverflow.com/questions/566437/http-post-returns-the-error-417-expectation-failed-c-resolved"&gt;stackoverflow.com&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;System.Net.HttpWebRequest adds the header 'HTTP header "Expect: 100-Continue"' to every request unless you explicitly ask it not to by setting &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue%28VS.80%29.aspx"&gt;this static property&lt;/a&gt; to false:&lt;/p&gt;    &lt;pre&gt;&lt;code&gt;System.Net.ServicePointManager.Expect100Continue = false;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Some servers choke on that header and send back the 417 error you're seeing.&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;Sure enough, I added this line before my call to the WCF service and everything worked as expected.  Of course, it’s still basically magic to me.  I understand little about how these requests and responses behave.  &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue%28VS.80%29.aspx"&gt;MSDN&lt;/a&gt; demystifies it a little bit more:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;When this property is set to &lt;b&gt;true&lt;/b&gt;, client requests that use the &lt;b&gt;POST&lt;/b&gt; method expect to receive a 100-Continue response from the server to indicate that the client should send the data to be posted. This mechanism allows clients to avoid sending large amounts of data over the network when the server, based on the request headers, intends to reject the request.&lt;/p&gt;  &lt;p&gt;For example, assume the &lt;b&gt;Expect100Continue&lt;/b&gt; property is &lt;b&gt;false&lt;/b&gt;. When the request is sent to the server, it includes the data. If, after reading the request headers, the server requires authentication and must send a 401 response, the client must resend the data with proper authentication headers.&lt;/p&gt;  &lt;p&gt;If this property is &lt;b&gt;true&lt;/b&gt;, the request headers are sent to the server. If the server has not rejected the request, it sends a 100-Continue response signaling that the data can be transmitted. If, as in the preceding example, the server requires authentication, it sends the 401 response and the client has not unnecessarily transmitted the data.&lt;/p&gt;  &lt;p&gt;Changing the value of this property does not affect existing &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.servicepoint%28VS.80%29.aspx"&gt;ServicePoint&lt;/a&gt; objects. Only new &lt;b&gt;ServicePoint&lt;/b&gt; objects created after the change are affected.&lt;/p&gt;  &lt;p&gt;The Expect 100-Continue behavior is fully described in IETF RFC 2616 Section 10.1.1. &lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6513253980165537079?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6513253980165537079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6513253980165537079' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6513253980165537079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6513253980165537079'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/05/oh-noes-expectation-failed-417-in-my.html' title='Oh noes! Expectation Failed (417) in my WCF service at Tully’s'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_qvLGUOISC18/Sf4pv15bjRI/AAAAAAAAAOk/kAY8fOchMKM/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6440429066093170204</id><published>2009-04-19T02:50:00.001-07:00</published><updated>2009-04-19T15:06:11.431-07:00</updated><title type='text'>My Experience Trying to Host a WCF Service on a Shared Hosting Plan</title><content type='html'>&lt;p&gt;So I was about to try to host a WCF service on my shared hosting plan, and I was excited given my knowledge that such a tutorial had already been written – or so I thought.&amp;#160; I began by reading through some of the many &lt;a href="http://codeidol.com/csharp/wcf/"&gt;WCF service creation tutorials&lt;/a&gt; &lt;a href="http://www.switchonthecode.com/tutorials/wcf-tutorial-basic-interprocess-communication"&gt;available on the web&lt;/a&gt;.&amp;#160; These explained the fundamentals, and gave the steps required to create a working WCF service.&amp;#160; I was able to host these locally without much trouble, given that Visual Studio 2008 automagically &lt;strong&gt;does everything for you&lt;/strong&gt;.&amp;#160; I can shut off my brain (a bad habit in coding, mind you) and trust that everything will work for me behind the scenes.&lt;/p&gt;  &lt;p&gt;But once I was ready to test in a shared hosting environment, I drew a blank.&amp;#160; What the heck was I supposed to do?&amp;#160; No sweat, I told myself.&amp;#160; I just referred to an article written by our very own D-roc entitled: “&lt;a href="http://silverbling.blogspot.com/2009/01/hosting-wcf-services-on-shared-hosting_04.html"&gt;Hosting WCF Services on a Shared Hosting Plan&lt;/a&gt;.”&amp;#160; Much to my horror, this article didn’t explain the first thing about hosting a WCF service on a shared hosting plan; it merely warned me of a single “gotcha” that could occur.&amp;#160; It should have been titled: “One Thing To Look Out For When Hosting a WCF Service on a Shared Hosting Plan.”&amp;#160; It lost me on the fourth sentence:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;If you would try to run a web service using this markup,&lt;/p&gt;    &lt;p&gt;&amp;lt;%@ ServiceHost Language=&amp;quot;C#&amp;quot; Debug=&amp;quot;true&amp;quot; Service=&amp;quot;SomeService&amp;quot; %&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Huh?&amp;#160; What’s this markup?&amp;#160; Where does that markup live?&amp;#160; I don’t have that markup anywhere in my code.&amp;#160; Is that supposed to be on my web server somewhere?&amp;#160; Where do I find/put it?&lt;/p&gt;  &lt;p&gt;I had to refer back to one of my tutorials at codeidol.com, under the topic of &lt;a href="http://codeidol.com/csharp/wcf/WCF-Essentials/Hosting/"&gt;WCF Essentials –&amp;gt; Hosting&lt;/a&gt;.&amp;#160; I was a little worried because these articles seem a little outdated, but not &lt;em&gt;too&lt;/em&gt; outdated, I hoped.&amp;#160; In this topic, the author describes how to use IIS (Microsoft Internet Information Server) hosting.&amp;#160; Now, I don’t know much about IIS, but I know that it’s Microsoft’s server software for allowing servers on the internet to host web pages, FTP sites and that sort of thing.&amp;#160; I also know that my web hosting company has IIS installed and lets me administer it somehow.&amp;#160; So I figured this was my best bet.&lt;/p&gt;  &lt;p&gt;Specifically, the article said that in order to host a service, I need to create a “virtual directory” and “supply an .svc file”.&amp;#160; Okay, I’d heard the term “virtual directory” before but I had no idea how to create one.&amp;#160; I was guessing it’d be a setting in my web host administration tool, so I looked.&amp;#160; Sure enough, in my web host administration control panel, I had a menu heading called “IIS Manager” and a setting called “Set Virtual Dir.”&amp;#160; I also noticed way too many settings that had to do with FrontPage extensions.&amp;#160; Microsoft doesn’t even make FrontPage, and hasn’t since 2003.&amp;#160; Why is this a big supported feature?&amp;#160; But I digress:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/Serzzv8oMyI/AAAAAAAAANM/8-yGh4mMtlY/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/Serz0QzWwtI/AAAAAAAAANQ/0RaF_BM44Og/image_thumb%5B2%5D.png?imgmax=800" width="244" height="298" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So I clicked this option and it brought up a page that let me specify the name of the virtual directory, and the actual directory where it should point.&amp;#160; I created a directory and made the virtual directory the same name.&amp;#160; Hopefully your web host will have something similar:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/Serz0eVXdrI/AAAAAAAAANU/Jcwhb-lsQ3s/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_qvLGUOISC18/Serz07LGtoI/AAAAAAAAANY/z2Ij1zM1xQ8/image_thumb%5B4%5D.png?imgmax=800" width="540" height="144" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, I needed to somehow let the web server know that I have a service there.&amp;#160; Well, I don’t yet, but I wanted to make it think that I did.&amp;#160; So I opened up notepad and created an .svc file.&amp;#160; Now, rather than using the sample from codeidol.com, I decided to use D-roc’s example, since I assumed that his would be the “newer” of the two, in case there were any differences, and I didn’t want to do things the “old” way.&amp;#160; So I created a file called myservice.svc with the contents:&lt;/p&gt;  &lt;p&gt;&amp;lt;%@ ServiceHost Language=&amp;quot;C#&amp;quot; Debug=&amp;quot;true&amp;quot; Service=&amp;quot;SomeService&amp;quot; %&amp;gt;&lt;/p&gt;  &lt;p&gt;I then FTP’d to the folder which I set as an IIS virtual directory, and copied this svc file there.&amp;#160; Then I navigated to this folder in a web browser.&amp;#160; Predictably:&lt;/p&gt;  &lt;blockquote&gt;   &lt;h3&gt;Directory Listing Denied&lt;/h3&gt;    &lt;p&gt;This Virtual Directory does not allow contents to be listed.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Okay, so somehow I needed to give the appropriate permissions.&amp;#160; From experience, I know that if you set global execute permissions using your FTP client, you can make the directory viewable to anyone browsing to it in a web browser, but I was pretty sure this was something different… perhaps an IIS setting.&amp;#160; So, back to my web host control panel I went, and look what I saw:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_qvLGUOISC18/Serz1GRvv0I/AAAAAAAAANg/Z8-0qFl0Kdc/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_qvLGUOISC18/Serz1NZg7fI/AAAAAAAAANk/GziUudsGIDA/image_thumb%5B6%5D.png?imgmax=800" width="265" height="325" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Sounds promising.&amp;#160; Sure enough, after clicking that option, I was able to browse all my directories and set “Browsing On” for whichever I chose.&amp;#160; I then browsed to this folder using a web browser.&amp;#160; I expected it to somehow run the service, then throw up an expected error saying that it couldn’t find it.&amp;#160; Instead, I got a directory listing with a single file: myservice.svc.&amp;#160; @#$%.&amp;#160; I don’t want people to actually be able to browse my svc file.&amp;#160; I want it to actually be run.&amp;#160; So I disabled browsing on that folder.&amp;#160; Strike 1.&amp;#160; &lt;/p&gt;  &lt;p&gt;Alright, I saw another option that looks just vague enough to be promising:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_qvLGUOISC18/Serz1UoMlLI/AAAAAAAAANo/1MoQSAUPTJ8/s1600-h/image%5B18%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/Serz1ppAuJI/AAAAAAAAANs/ZtuyffPN8Wc/image_thumb%5B10%5D.png?imgmax=800" width="274" height="333" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Maybe this would set a certain file to be considered a “.NET App”, and maybe run as such.&amp;#160; (I should have mentioned earlier that I had Google’d every step of this process and ran into several dead-ends, hence the need to even post this article-blog-entry.)&amp;#160; Google led me to believe that this was for running ASP.NET applications, but there was some hint that it applied to web services as well.&amp;#160; A WCF web service is a .NET application, technically, isn’t it?&amp;#160; At least, it’s run within one.&amp;#160; So choosing this option let me pick a folder to set as a .NET application.&amp;#160; This made little sense to me, because a folder is a folder, not an application.&amp;#160; But I assumed that IIS would intelligently look inside the folder for an applicable application.&amp;#160; So I choose my “myservice” folder and set it as an application.&amp;#160; Back to the web browser:&lt;/p&gt;  &lt;blockquote&gt;   &lt;h3&gt;Directory Listing Denied&lt;/h3&gt; This Virtual Directory does not allow contents to be listed.&lt;/blockquote&gt;  &lt;p&gt;@#%$!!!!!&lt;/p&gt;  &lt;p&gt;Okay okay, no sweat.&amp;#160; I will try to turn browsing on; because maybe it will work properly in conjunction with setting that folder as a .NET App.&amp;#160; WRONG.&amp;#160; It still browsed the folder, .svc and all.&amp;#160; Okay, I will try to give execute permissions to the actual directory via my FTP client:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;h3&gt;Directory Listing Denied&lt;/h3&gt;    &lt;p&gt;This Virtual Directory does not allow contents to be listed.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;At this point, I’m thinking to myself: “Wow, that would have been super swell if D-roc had actually explained the first thing about getting this set up in his article.”&lt;/p&gt;  &lt;p&gt;Okay, maybe I’m going about this with some wrong assumptions.&amp;#160; I mean, who cares if I can’t browse the folder?&amp;#160; I shouldn’t be able to browse the folder anyway, right?&amp;#160; This web service isn’t even supposed to be accessed via a web browser; it’s supposed to be accessed via some other client app on a user’s PC.&amp;#160; So, I start thinking to myself: Visual Studio is cool enough not to require me to manually FTP a freakin’ svc file to my web server.&amp;#160; There should be a way within Visual Studio to do this.&amp;#160; Well, luckily enough, I have my Visual Studio Web Service project I had previously created.&amp;#160; And sure enough, if I right-click that project, I see a “Publish…” option.&amp;#160; So I chose that option, and it prompted me for the target location.&amp;#160; I entered: &lt;strong&gt;http://mydomain.com/myservice&lt;/strong&gt; and chose the default options, and clicked Publish.&amp;#160; &lt;/p&gt;  &lt;p&gt;Much to my amazement, it worked the first time!&lt;/p&gt;  &lt;p&gt;Connecting to http://mydomain.com/myservice…   &lt;br /&gt;Publishing folder /...    &lt;br /&gt;Publishing folder bin...    &lt;br /&gt;========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========    &lt;br /&gt;========== Publish: 1 succeeded, 0 failed, 0 skipped ==========&lt;/p&gt;  &lt;p&gt;I verified that in fact there were files published to this location.&amp;#160; Okay, okay, that’s a first step!&amp;#160; Now I want to test this service, which, by the way, simply takes an input string and manipulates it in a simple way.&amp;#160; I had some trusty code at my disposal from an online tutorial involving &lt;a href="http://www.switchonthecode.com/tutorials/wcf-tutorial-basic-interprocess-communication"&gt;using WCF for interprocess communication&lt;/a&gt;.&amp;#160; Even though that’s not what I was doing, I still needed to make a connection using a similar method (or so I assumed).&lt;/p&gt;  &lt;p&gt;So, in short, my client needs to create a channel between itself and the server.&amp;#160; It can do this using the handy ChannelFactory class provided by WCF:&lt;/p&gt;  &lt;p&gt;ChannelFactory&amp;lt;IMyService&amp;gt; httpFactory = new ChannelFactory&amp;lt;IMyService&amp;gt;(   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new BasicHttpBinding(),    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new EndpointAddress(&amp;quot;&lt;a href="http://mydomain.com:8000/MyService&amp;quot;));"&gt;http://mydomain.com:8000/MyService&amp;quot;));&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;IMyService httpProxy = httpFactory.CreateChannel();&lt;/p&gt;  &lt;p&gt;So this is my client app.&amp;#160; It references a shared contracts library which defines IMyService.&amp;#160; In case you haven’t tell by now, I’ve replaced the real names of my things with fake ones, to protect my billion dollar ideas.&amp;#160; If you want a full explanation of my logic here, please refer to the &lt;a href="http://www.switchonthecode.com/tutorials/wcf-tutorial-basic-interprocess-communication"&gt;tutorial I referenced earlier&lt;/a&gt;.&amp;#160; So, I figured that something would go wrong if I ran this code, so I did – just to get a taste of what this brand of failure looked like, so that I’d recognize it in the future.&lt;/p&gt;  &lt;p&gt;When I ran the test client, the handy built-in Visual Studio service host launched.&amp;#160; This was a bit disconcerting, since the ServiceHost I care about is the one allegedly hosted on my web server, so I didn’t want the local one to interfere.&amp;#160; But I carried on.&amp;#160; To my not-so-surprise, no exceptions were thrown when I called httpFactory.CreateChannel.&amp;#160; The real test would be the following line:&lt;/p&gt;  &lt;p&gt;string translatedMessage = httpProxy.TwistMessage(&amp;quot;I am a message.&amp;quot;);&lt;/p&gt;  &lt;p&gt;This code should actually connect to my service through my proxy, send it some message and get a string response, all handled for me.&amp;#160; Right?&amp;#160; I mean, I published my service already, so hopefully I can expect good things.&amp;#160; No such luck; I got an EndpointNotFoundException:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Could not connect to http://mydomain.com:8000/MyService. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xx.xxx.xx.xx:8000.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Okay, so let’s review my understanding: The endpoint is somewhere on the web server.&amp;#160; It’s part of the service, which is hosted by a ServiceHost.&amp;#160; But IIS manages the ServiceHost.&amp;#160; Somehow I need a ServiceHost running from IIS on my web server.&amp;#160; I already used the management tool to set a &lt;em&gt;folder&lt;/em&gt; as an IIS .NET application (which, again, makes little sense because a folder is not any sort of executable as far as I know).&amp;#160; But wait, why did I use port 8000?&amp;#160; I just assumed that was proper, because I copied it from an example.&amp;#160; So let’s remove it and see what happens when I run the TestApp again, and attempt to call a service method from the proxy:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/Serz1_Y11EI/AAAAAAAAANw/2zTjPt9Nva0/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/Serz2DMPySI/AAAAAAAAAN0/3oN7Du23yy8/image_thumb%5B19%5D.png?imgmax=800" width="566" height="271" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Progress!&amp;#160; Maybe!&amp;#160; Virtually clueless, I google’d this problem.&amp;#160; I found some forum posts with little help provided, but also this &lt;a href="http://msdn.microsoft.com/en-us/library/ms752252.aspx"&gt;seemingly potentially helpful MSDN article&lt;/a&gt;.&amp;#160; In a cryptic way, the article explained – or so I believe – that I need to associate svc files with a certain DLL (aspnet_isapi.dll) in IIS.&amp;#160; It gave instructions about how to do this, of course working from the assumption that I am running IIS locally, which I, like hundreds of thousands of other people, are not.&amp;#160; No matter, there’s got to be an obvious way to accomplish the same thing in my web host.&amp;#160; Sure enough, something promising:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/Serz2IQYzAI/AAAAAAAAAN4/gP_B67h2cVA/s1600-h/image%5B22%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/Serz2RSRGsI/AAAAAAAAAN8/KmTmTAmMHU8/image_thumb%5B12%5D.png?imgmax=800" width="253" height="310" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Clicking this link led me to an administration page where I could choose file extensions and the “program” (for lack of a better term) to execute them with.&amp;#160; I didn’t see the aspnet_isapi.dll listed explicitly, but I saw the option “ASP.NET”, which seemed to be close enough:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/Serz2UZLLVI/AAAAAAAAAOA/LdwRyrrFcEU/s1600-h/image%5B27%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_qvLGUOISC18/Serz2h_T3II/AAAAAAAAAOE/cV-PkFiXyqw/image_thumb%5B15%5D.png?imgmax=800" width="642" height="226" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;BAM!&amp;#160; After clicking Add, sure enough, the association was listed as: &lt;b&gt;C:\WINDOWS\MICROSOFT.NET\FRAMEWORK\V2.0.50727\ASPNET_ISAPI.DLL&lt;/b&gt;.&amp;#160; Ladies and gentlemen, this is called “progress”.&amp;#160; Carelessly ignoring the potential warning about waiting 5 to 10 minutes, I ran my test app again:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/Serz1_Y11EI/AAAAAAAAANw/2zTjPt9Nva0/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/Serz2DMPySI/AAAAAAAAAN0/3oN7Du23yy8/image_thumb%5B19%5D.png?imgmax=800" width="566" height="271" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Dang.&amp;#160; Well, I can wait the 5-10 minutes, but in the meantime I’m going to check the files published to my folder, since earlier I explicitly removed my old bogus svc file (assuming Visual Studio would be smart enough to create one for me when publishing).&amp;#160; Yep, it did.&amp;#160; The svc file is sitting there in the folder, sure enough.&amp;#160; Okay, I will wait…&amp;#160; &lt;/p&gt;  &lt;p&gt;WAITED.&amp;#160; SAME ERROR.&lt;/p&gt;  &lt;p&gt;Okay, let’s try a new angle: I’m going to connect to the svc file with the web browser:&lt;/p&gt;  &lt;blockquote&gt;   &lt;h3&gt;Server Error in '/myservice’ Application.&lt;/h3&gt;    &lt;h4&gt;&lt;i&gt;Runtime Error&lt;/i&gt;&lt;/h4&gt;    &lt;p&gt;&lt;b&gt;Description: &lt;/b&gt;An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. &lt;/p&gt;    &lt;p&gt;…&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Okay, I’ve had experience with this type of exception before, and it gave me instructions for getting specific details about the error message by modifying my web.config file:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;!-- Web.Config Configuration File --&amp;gt; &lt;/p&gt;    &lt;p&gt;&amp;lt;configuration&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;system.web&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;customErrors mode=&amp;quot;Off&amp;quot;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/system.web&amp;gt;      &lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So I’ll try this.&amp;#160; Nothing to lose.&amp;#160; I quickly discover that I don’t have a Web.Config, but I do have an App.Config.&amp;#160; Close enough, right?&amp;#160; It has a &amp;lt;configuration&amp;gt; group, so that’s probably the same, right?&amp;#160; BOOM, added.&amp;#160; Published.&amp;#160; Dang, no change.&amp;#160; Viewing the Web.Config in my app directory via FTP revealed that the customErrors tag was not added.&amp;#160; But wait, was I deceived?&amp;#160; My healthy skepticism of software brought my attention to a Publish dialog option.&amp;#160; Which one?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/Serz2wqfdaI/AAAAAAAAAOI/ntF3sKwaT7c/s1600-h/image%5B31%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_qvLGUOISC18/Serz2xOBZDI/AAAAAAAAAOM/opeYGNDZt3w/image_thumb%5B17%5D.png?imgmax=800" width="567" height="424" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Choosing the “Delete all existing files prior to publishing” option made the customErrors tag propagate, and I was finally able to see the actual error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;[ArgumentException: This collection already contains an address with scheme http.&amp;#160; There can be at most one address per scheme in this collection.      &lt;br /&gt;Parameter name: item]&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Oh my, look what we have here!!&amp;#160; After hours of struggling trying to learn how to host a WCF service in a shared hosting plan, I’ve finally reached the point where D-Roc’s tutorial, entitled “Hosting Wcf Services on a Shared Hosting Plan” begins!&amp;#160; Well hey, whaddya say we follow his instructions?&lt;/p&gt;  &lt;p&gt;(Please refer to &lt;a href="http://silverbling.blogspot.com/2009/01/hosting-wcf-services-on-shared-hosting_04.html"&gt;D-Roc’s tutorial&lt;/a&gt; for a walkthrough of this process.)&lt;/p&gt;  &lt;p&gt;Now that I’ve completed the steps D-Roc described, I’m gonna try loading the svc file in a web browser again.&amp;#160; I don’t expect anything to work, since I’m not actually calling the service’s methods, but I just want to see what happens:&lt;/p&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;blockquote&gt;   &lt;h3&gt;Server Error in '/myservice’ Application. &lt;/h3&gt;    &lt;h3&gt;     &lt;hr size="1" width="100%" /&gt;&lt;/h3&gt;    &lt;h4&gt;&lt;i&gt;The resource cannot be found.&lt;/i&gt;&lt;/h4&gt;   &lt;b&gt;Description: &lt;/b&gt;HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.&amp;#160; Please review the following URL and make sure that it is spelled correctly. &lt;/blockquote&gt;  &lt;p&gt;Eh, that’s not the &lt;em&gt;first&lt;/em&gt; thing I expected, but I’m going to assume that there’s just some dependency of the service that can’t be loaded considering I’m like… not properly connecting to the service.&amp;#160; Shaky reasoning, I know, but really, what would I &lt;em&gt;expect&lt;/em&gt; to happen if I connected in this unorthodox way?&lt;/p&gt;  &lt;p&gt;Anyway, if I recall, I had a test app that I was playing around with.&amp;#160; Let’s see if my recent changes made any difference regarding the problem I was having.&amp;#160; I ran it and….&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_qvLGUOISC18/Serz1_Y11EI/AAAAAAAAANw/2zTjPt9Nva0/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_qvLGUOISC18/Serz2DMPySI/AAAAAAAAAN0/3oN7Du23yy8/image_thumb%5B19%5D.png?imgmax=800" width="566" height="271" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Ugh, kill me.&amp;#160; Alright, I Google’d some more and found that someone had had a similar issue, and solved their problem by changing their endpoint address to actually point to the svc file rather than just the virtual directory.&amp;#160; In plain English, instead of:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;ChannelFactory&amp;lt;IMyService&amp;gt; httpFactory = new ChannelFactory&amp;lt;IMyService&amp;gt;(     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new BasicHttpBinding(),      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new EndpointAddress(http://mydomain.com/MyService/));&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I should (maybe) write:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;ChannelFactory&amp;lt;IMyService&amp;gt; httpFactory = new ChannelFactory&amp;lt;IMyService&amp;gt;(     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new BasicHttpBinding(),      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new EndpointAddress(http://mydomain.com/MyService/&lt;strong&gt;MyService.svc&lt;/strong&gt;));&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So I made this change and ran the test app.&amp;#160; Here is what I got:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;ServiceActivationException was unhandled&lt;/strong&gt;      &lt;br /&gt;The requested service, 'http://mydomain.com/MyService/MyService.svc' could not be activated. See the server's diagnostic trace logs for more information.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I DON’T HAVE ACCESS TO THE SERVER’S DIAGNOSTIC TRACE LOGS!&amp;#160; It’s a remote host!!&lt;/p&gt;  &lt;p&gt;So at this point, I’m thinking I was better off without specifying the svc file in the endpoint address.&amp;#160; At least before I was getting an exception that seemed to imply that my service was being contacted and my method request was being rejected.&amp;#160; This new exception makes it sound like my service isn’t even executing.&lt;/p&gt;  &lt;p&gt;So, by now you must be anxiously awaiting my resolution to this problem.&amp;#160; Unfortunately, I haven’t come across one yet!&amp;#160; I will have to leave you in suspense until I actually figure out how the heck to get this thing working properly.&amp;#160; (Hint: I will ask D-Roc to tell me what the @#$% he did.)&lt;/p&gt;  &lt;p&gt;Update: It turns out that my custom factory created from D-Roc’s tutorial was actually expecting the service to be accessed via “www.mydomain.com” rather than “mydomain.com”.&amp;#160; Here’s the tiny change I had to make:&lt;/p&gt;  &lt;p&gt;ChannelFactory&amp;lt;IMyService&amp;gt; httpFactory = new ChannelFactory&amp;lt;IMyService&amp;gt;(   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new BasicHttpBinding(),    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new EndpointAddress(http://&lt;strong&gt;www.&lt;/strong&gt;mydomain.com/MyService/MyService.svc));&lt;/p&gt;  &lt;p&gt;But then, when running the test client and calling my service method on the proxy, I got a ProtocolException: Content Type text/xml; charset=utf-8 was not supported by service…&amp;#160; To fix this, I needed to change BasicHttpBinding to WSHttpBinding, like this:&lt;/p&gt;  &lt;p&gt;ChannelFactory&amp;lt;IMyService&amp;gt; httpFactory = new ChannelFactory&amp;lt;IMyService&amp;gt;(   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new &lt;strong&gt;WS&lt;/strong&gt;HttpBinding(),    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; new EndpointAddress(http://mydomain.com/MyService/MyService.svc));&lt;/p&gt;  &lt;p&gt;Thanks to &lt;a href="http://davidsandor.com/blogs/tipsandtricks/archive/2008/08/03/content-type-text-xml-charset-utf-8-was-not-supported-by-service-insert-service-url-here-the-client-and-service-bindings-may-be-mismatched.aspx"&gt;this article&lt;/a&gt; for explaining this.&lt;/p&gt;  &lt;p&gt;Update 2: I found it quite odd that a Visual Studio 2008 Web Service project item wouldn’t create an svc file within the project.&amp;#160; Instead, it would generate a generic one automatically every time I published my service (via Visual Studio’s Publish… option).&amp;#160; But, as it turns out, if I manually add an svc file into the project, it will publish that one instead, and won’t generate one on its own.&amp;#160; The more you know.&lt;/p&gt;  &lt;p&gt;After all this headache, my web service finally ran.&amp;#160; I feel much smarter now.&amp;#160; Oh, and to put things in perspective, all of these struggles I’ve encountered are still much less of a headache than the iPhone development experience.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6440429066093170204?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6440429066093170204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6440429066093170204' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6440429066093170204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6440429066093170204'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/04/my-experience-trying-to-host-wcf.html' title='My Experience Trying to Host a WCF Service on a Shared Hosting Plan'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_qvLGUOISC18/Serz0QzWwtI/AAAAAAAAANQ/0RaF_BM44Og/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-2829488646868680393</id><published>2009-03-02T00:52:00.001-08:00</published><updated>2009-03-02T00:52:14.139-08:00</updated><title type='text'>Another user experience brought to you by Microsoft</title><content type='html'>&lt;p&gt;Just so I’m not accused of being biased in favor of Microsoft, let me bring you an example of the user experience we’ve all come to expect from this company.&lt;/p&gt;  &lt;p&gt;So today, looking to expand my budding WPF knowledge by working on a Silverlight application, I decided to download the Silverlight 2 Toolkit from MSDN.&amp;#160; Easy enough, right?&amp;#160; Not quite.&amp;#160; Here is a summary of my experience:&lt;/p&gt;  &lt;p&gt;1. Visited &lt;a href="http://msdn.microsoft.com"&gt;http://msdn.microsoft.com&lt;/a&gt;.&amp;#160; Conveniently, there was a link on the left pane of the web site labeled Silverlight, so I clicked on this and it led to a page that pointed me in the right direction to install “Microsoft® Silverlight™ Tools for Visual Studio 2008 SP1”.&amp;#160; Now, I assume that I have VS2008 SP1 installed.&amp;#160; I mean, if I didn’t, it would have shown up in Microsoft Update, right?&amp;#160; So I ran the installer.&lt;/p&gt;  &lt;p&gt;2. Oops!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/SaueOKNFdfI/AAAAAAAAALA/z-_srF2T-Tk/s1600-h/image%5B6%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_qvLGUOISC18/SaueOq75iQI/AAAAAAAAALE/o2N70YYYHRw/image_thumb%5B2%5D.png?imgmax=800" width="548" height="476" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I guess I didn’t have it installed.&amp;#160; Weird, I was sure I keep my computer up-to-date with Windows Update.&amp;#160; No worries, I just clicked the link as provided and it conveniently took me to the installer for VS2008 SP1.&amp;#160; &lt;/p&gt;  &lt;p&gt;3. I downloaded SP1 and ran the installer.&amp;#160; Uh oh, another problem:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/SauePFXB_rI/AAAAAAAAALI/MZDcQNKuyKY/s1600-h/image%5B11%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/SauePdxwD5I/AAAAAAAAALM/tgB9D22PtkA/image_thumb%5B5%5D.png?imgmax=800" width="561" height="488" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Ah well, I guess I have to run some program to clean up the beta I installed a while ago.&amp;#160; So I clicked the link, downloaded and ran the installer.&amp;#160; Then I ran the SP1 update.&amp;#160; Then I ran the Silverlight 2 installer.&amp;#160; I have to wonder why this couldn’t have been done for me somehow.&lt;/p&gt;  &lt;p&gt;Now let’s pretend that I’m not Vargo.&amp;#160; I’m another user who attempts to solve the problem another reasonable way.&amp;#160; Instead of clicking the first link to download VS2008 SP1, I go to Windows Update to look for the update.&amp;#160; I see nothing.&amp;#160; So I open Visual Studio and select Help-&amp;gt;Check For Updates.&amp;#160; This can’t fail, right?&amp;#160; Wrong.&amp;#160; Not only does it take me to &lt;em&gt;the same Windows Update site which failed me previously&lt;/em&gt;, but it opens it in my default browser: Firefox, and I get an error stating that I need to load the Windows Update site in Internet Explorer in order to get it to work!&amp;#160; MSN—no, sorry—“Windows Live” Messenger has no qualms about annoying me by opening hyperlinks in my non-default browser; why can’t Visual Studio do the same thing when it’s &lt;em&gt;actually necessary&lt;/em&gt;!&lt;/p&gt;  &lt;p&gt;Microsoft really has some work to do when it comes to the user experience.&amp;#160; But I’m not really shocking anyone here.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-2829488646868680393?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/2829488646868680393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=2829488646868680393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2829488646868680393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2829488646868680393'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/03/another-user-experience-brought-to-you.html' title='Another user experience brought to you by Microsoft'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_qvLGUOISC18/SaueOq75iQI/AAAAAAAAALE/o2N70YYYHRw/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-5164022936915945378</id><published>2009-01-26T21:45:00.001-08:00</published><updated>2009-01-26T22:27:34.684-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='wcf'/><title type='text'>The Poor Man’s Stock Quote Web Service</title><content type='html'>&lt;p&gt;   Ever wanted to programmatically fetch stock quotes? Ever look into it? I did. &lt;a href="http://www.strikeiron.com/ProductDetail.aspx?p=420"&gt;StrikeIron&lt;/a&gt; charges top dollar for their stock quote service, and, frankly, I don’t have that kind of money. But I can always go to finance.yahoo.com, and get the same information for free. Let’s exploit that, let’s create &lt;strong&gt;The Poor Man’s Stock Quote Web Service&lt;/strong&gt;. &lt;/p&gt;  &lt;p style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://www.badinfluencesoftware.com/WcfStockService/"&gt;See it in action!&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Using &lt;a href="http://msdn.microsoft.com/en-us/library/ms735119.aspx"&gt;Windows Communication Foundation (Wcf)&lt;/a&gt;, we will build a web service that takes a ticker symbol for a stock, grabs the text from the yahoo finance webpage, parses out the relevant stock quote information, and then returns a sweet StockQuote struct full of information. The legality of all this in a commercial application could probably be put to question, but we’ll leave that as an exercise for the reader. &lt;/p&gt;  &lt;p&gt;Building a Wcf Service is very straightforward, and the source linked at the bottom is a Wcf sample perfect to introduce you to Wcf. This article isn’t an intro to Wcf, but if you’re quick, which I’m sure you are, you could pick it all up from the sample. See my &lt;a href="http://silverbling.blogspot.com/2009/01/hosting-wcf-services-on-shared-hosting_04.html"&gt;other blog post&lt;/a&gt; to see how to host a Wcf service on a shared hosting plan.&lt;/p&gt;  &lt;p&gt;First, we must define the ServiceContract for our Wcf Service:&lt;/p&gt;  &lt;div   style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: rgb(244, 244, 244); width: 97.5%; max-height: 200px; cursor: text;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;"&gt;   &lt;div    style="border-style: none; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;     &lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;[ServiceContract]    &lt;/pre&gt;&lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;interface&lt;/span&gt; IStockQuoteService    &lt;/pre&gt;&lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;{    &lt;/pre&gt;&lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;    [OperationContract]    &lt;/pre&gt;&lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;    StockQuote GetQuote(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; ticker);    &lt;/pre&gt;&lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;    [OperationContract]    &lt;/pre&gt;&lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;    List&amp;lt;StockQuote&amp;gt; GetQuotes(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;[] tickers);    &lt;/pre&gt;&lt;pre    style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;As mentioned earlier, I’m going to use the Yahoo Finance to provide information for my Stock Quotes. Thus, the YahooStockService was born:&lt;br /&gt;&lt;br /&gt;&lt;div   style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: rgb(244, 244, 244); width: 97.5%; max-height: 200px; cursor: text;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;"&gt;&lt;div    style="border-style: none; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;font-family:consolas,'Courier New',courier,monospace;font-size:8pt;color:black;"&gt;&lt;pre face="consolas,'Courier New',courier,monospace" size="8pt" color="black" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;    &lt;/pre&gt;&lt;pre face="consolas,'Courier New',courier,monospace" size="8pt" color="black" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/// The Stock Quote Web Service that scrapes values from Yahoo's finance stock page.&lt;/span&gt;    &lt;/pre&gt;&lt;pre face="consolas,'Courier New',courier,monospace" size="8pt" color="black" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]    &lt;/pre&gt;&lt;pre face="consolas,'Courier New',courier,monospace" size="8pt" color="black" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; YahooStockService : IStockQuoteService&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;In our Wcf service, we programmatically grab the text from a website using the HtmlScraper.GetPageContent function:&lt;br /&gt;&lt;br /&gt;&lt;div face="consolas,'Courier New',courier,monospace" size="8pt" style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: rgb(244, 244, 244); width: 97.5%; max-height: 200px; cursor: text;"&gt;&lt;div face="consolas,'Courier New',courier,monospace" size="8pt" color="black" style="border-style: none; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%;"&gt;&lt;pre face="consolas,'Courier New',courier,monospace" size="8pt" color="black" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; GetPageContent(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; url)    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;{    &lt;/pre&gt;&lt;pre face="consolas,'Courier New',courier,monospace" size="8pt" color="black" style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%;"&gt;    WebRequest wreq = HttpWebRequest.Create(url);    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    WebResponse wres = wreq.GetResponse();    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    StreamReader sr = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; StreamReader(wres.GetResponseStream());    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; content = sr.ReadToEnd();    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    sr.Close();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; content;    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;Now that we have the page’s text, we can clumsily parse the text for the value that prefixes the content we are looking for. I usually break in my debugger, grab the Html page’s string value from the Watch window, and paste it in notepad. Then I look for the company name, and copy whatever’s in front of it.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here is a simple example of the YahooStockService parsing for the Company Name:&lt;br /&gt;&lt;/p&gt;&lt;div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; line-height: 12pt; background-color: rgb(244, 244, 244); width: 97.5%; font-family: consolas,'Courier New',courier,monospace; max-height: 200px; font-size: 8pt; cursor: text;"&gt;&lt;div style="border-style: none; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; ParseCompanyName(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; page)    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;{    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;// Regex pattern pasted from Html page.&lt;/span&gt;    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    Regex parseFor = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; Regex(&lt;span style="color: rgb(0, 96, 128);"&gt;"&amp;lt;div class=\"yfi_quote_summary\"&amp;gt;&amp;lt;div class=\"hd\"&amp;gt;&amp;lt;h1&amp;gt;"&lt;/span&gt;);    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: white; width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; HtmlScraper.ParseContent(page, parseFor, &lt;span style="color: rgb(0, 96, 128);"&gt;"&amp;lt;/h1&amp;gt;"&lt;/span&gt;);    &lt;/pre&gt;&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; line-height: 12pt; background-color: rgb(244, 244, 244); width: 100%; font-family: consolas,'Courier New',courier,monospace; color: black; font-size: 8pt;"&gt;}       &lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;   &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;And now here’s the &lt;a href="http://www.dimstuff.com/random/WcfStockService.zip"&gt;source&lt;/a&gt;. Many other parse functions exist in the &lt;a href="http://www.dimstuff.com/random/WcfStockService.zip"&gt;sample&lt;/a&gt;, and we eventually end up with all the stock information we could need. Now go forth, poor one, and gather stock information to your heart’s content. At the time of this writing, it’s probably all going down anyways. GGgggooooo Bailout!&lt;/p&gt;One note about the &lt;a href="http://www.dimstuff.com/random/WcfStockService.zip"&gt;sample&lt;/a&gt;: it uses a Silverlight web app to consume the Wcf Service, you might need to install the Silverlight SDK.&lt;br /&gt;&lt;p&gt;References: &lt;a href="http://www.dotnetjunkies.ddj.com/Article/A3E8CA89-9AA1-4C3B-BCC6-901C92A523E9.dcik"&gt;Building a Web Service to Provide Real-Time Stock Quotes&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-5164022936915945378?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/5164022936915945378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=5164022936915945378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5164022936915945378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5164022936915945378'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/01/poor-mans-stock-quote-web-service.html' title='The Poor Man’s Stock Quote Web Service'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-1057084279848152476</id><published>2009-01-26T02:42:00.001-08:00</published><updated>2009-01-26T22:27:44.325-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Objective-C'/><title type='text'>Objective-C versus C#, part 2: Loading, rotating, and saving an image</title><content type='html'>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In this example, I’ll compare Objective-C/Cocoa Touch to C#/.NET in their ability to load an image from a file, rotate it 90 degrees, and then save the modified image.&amp;#160; Both platforms are perfectly capable of performing this task.&amp;#160; One of them, however, sucks orders of magnitude less.&amp;#160; I’ll leave it as an exercise to the reader to decide to which I’m referring.&amp;#160; I’ll list the C# example first this time, since I wouldn’t want to be accused of favoritism.&amp;#160; In fairness, I should point out that for the Objective-C version, I cut some corners.&amp;#160; By using a UIImageView to house the image, I saved many lines of code that would result from applying transforms to the graphics context directly.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;C#/.NET&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Image myImage = Image.FromFile(@&amp;quot;c:\myImage.png&amp;quot;);      &lt;br /&gt;myImage.RotateFlip(RotateFlipType.Rotate90FlipNone);       &lt;br /&gt;myImage.Save(@&amp;quot;c:\newImage.png&amp;quot;);&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Objective-C/Cocoa Touch&lt;/strong&gt;&lt;/p&gt;  &lt;pre&gt;&lt;pre&gt;UIImage* myImage = [UIImage imageNamed:@&amp;quot;myImage.png&amp;quot;];&lt;br /&gt;UIImageView* imageView = [[UIImageView alloc] initWithImage:myImage];&lt;br /&gt;[imageView setTransform:CGAffineTransformMakeRotation(M_PI / 2.0)];&lt;br /&gt;	&lt;br /&gt;CGSize newImageSize = CGSizeMake(myImage.size.y, myImage.size.x);&lt;br /&gt;UIGraphicsBeginImageContext(newImageSize);&lt;br /&gt;[imageView.layer renderInContext:UIGraphicsGetCurrentContext()];&lt;br /&gt;UIImage* newImage = [UIGraphicsGetImageFromCurrentImageContext() retain];&lt;br /&gt;UIGraphicsEndImageContext();&lt;br /&gt;	&lt;br /&gt;[UIImagePNGRepresentation(newImage) writeToFile:@&amp;quot;myNewImage.png&amp;quot; atomically:YES];&lt;br /&gt;&lt;br /&gt;[imageView release];&lt;br /&gt;[newImage release];&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-1057084279848152476?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/1057084279848152476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=1057084279848152476' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/1057084279848152476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/1057084279848152476'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/01/objective-c-versus-c-part-2-loading.html' title='Objective-C versus C#, part 2: Loading, rotating, and saving an image'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-4356537429971160295</id><published>2009-01-18T02:03:00.001-08:00</published><updated>2009-01-18T02:04:18.789-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='Objective-C'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Objective-C versus C#, part 1: Searching for a substring within a string</title><content type='html'>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’ve been wanting to create a series of comparisons between the syntax of Objective-C and C#.&amp;#160; I’ve been writing a lot of both these days, so I have a lot of experience with each.&amp;#160; For our first example, let’s say we wanted to check for a substring within a string:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Objective-C&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;if ([myString rangeOfString:@&amp;quot;mySubstring&amp;quot;].location == NSNotFound)) {      &lt;br /&gt;&amp;#160;&amp;#160; NSLog(@&amp;quot;mySubstring not found in myString: %@&amp;quot;, myString);       &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;I don’t know how you could get any more intuitive than that, but just for kicks let’s look at the C# equivalent:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;if (!myString.Contains(“mySubstring”))      &lt;br /&gt;{       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(“mySubstring not found in myString: “ + myString);       &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-4356537429971160295?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/4356537429971160295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=4356537429971160295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4356537429971160295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4356537429971160295'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/01/objective-c-versus-c-part-1-searching.html' title='Objective-C versus C#, part 1: Searching for a substring within a string'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-8930601387105543667</id><published>2009-01-12T03:35:00.001-08:00</published><updated>2009-01-12T17:17:54.225-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><title type='text'>The Science of Debugging</title><content type='html'>&lt;p&gt;One of the best pieces of advice I ever received about debugging code was something that I could have just as easily brushed aside.&amp;#160; I was attending a work-sponsored training course, and the instructor said something that struck me as obvious and profound at the same time: &lt;strong&gt;Always start with a hypothesis&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;How many times have you found yourself chasing down a bug, clueless about its cause, blindly adding variables to your watch window &lt;font size="1"&gt;(or for XCode Objective-C programmers, blindly opening up the console window and typing “print object.property” – no, wait, that common syntax isn’t supported by the debugger.&amp;#160; So you type “print [object property]”, then receive an error that it can’t determine what the type is without a cast, even though it’s just an integer, so you type “print (int)[object property]”)&lt;/font&gt; without really knowing what you’re looking for?&amp;#160; As you step through the code aimlessly, you finally realize that you’ve jumped past the part of the code which reproduced the bug, and you have to start over.&amp;#160; (This situation is magnified by the lateness of the hour and the length of time you’ve been coding prior.)&lt;/p&gt;  &lt;p&gt;You repeat this process several times, gradually locking down more and more of your code until you’re picking it apart one line at a time.&amp;#160; But even this doesn’t help if you don’t know what you’re looking for.&amp;#160; But that’s just it – you &lt;em&gt;don’t&lt;/em&gt; know what you’re looking for.&amp;#160; If you did, you wouldn’t need to be debugging in the first place.&amp;#160; &lt;/p&gt;  &lt;p&gt;Rather than spinning your wheels, you need to come up with a hypothesis; an educated guess about what might be causing the behavior you’re seeing.&amp;#160; If a dialog isn’t appearing on the screen, a simple hypothesis might be: &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The code which spawns the dialog is not being executed.&lt;/strong&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Testing this hypothesis is simple; just set a breakpoint on the line of code responsible for displaying the dialog (assuming you find it – maybe that was the problem), run your program, and observe whether or not it’s hit.&amp;#160; If it’s hit and the dialog still doesn’t appear, that’s fine – great, even.&amp;#160; You’ve gained information about the situation.&amp;#160; Rather than going on a wild goose chase, you’ve narrowed down the issue.&amp;#160; Now you can test another hypothesis: &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The dialog’s Visible property is set to false.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Failing that, try another:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The dialog’s bounds are outside of the screen’s bounds.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;And other:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The dialog is rendering underneath another window of the application.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The key is that you’re learning more about the situation with every hypothesis, rather than repeating the same guesses, moving off in random directions based on hunches, and becoming more confused and frustrated.&lt;/p&gt;  &lt;p&gt;Note that all of these hypotheses are testable and falsifiable.&amp;#160; That is, you can objectively demonstrate if the hypothesis is true or false through experimentation.&amp;#160; This is crucial not only in debugging but for science as a whole.&amp;#160; There’s a reason why &lt;a href="http://en.wikipedia.org/wiki/Intelligent_design"&gt;Intelligent Design Theory&lt;/a&gt; is the butt of jokes; there’s nothing testable or falsifiable about the idea that the universe was created by (essentially) magic.&amp;#160; Science, on the other hand, gains from both confirmed and falsified hypotheses (a fact which is lost on evolution-deniers).&amp;#160; Just as science gains knowledge about the universe from a disproven hypothesis, you gain knowledge about your application the same way.&lt;/p&gt;  &lt;p&gt;Obvious, right?&amp;#160; When you’re tracking down a frustratingly elusive bug while exhausted and over-caffeinated, it isn’t.&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-8930601387105543667?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/8930601387105543667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=8930601387105543667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8930601387105543667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8930601387105543667'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/01/science-of-debugging.html' title='The Science of Debugging'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-9072836027669523341</id><published>2009-01-04T17:11:00.001-08:00</published><updated>2009-01-18T22:01:35.774-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='wcf'/><title type='text'>Using the PollingDuplexHttpBinding for a Silverlight Group Chat</title><content type='html'>&lt;span xmlns=""&gt; &lt;p&gt;&lt;span style="text-decoration: underline"&gt;1) A Quick Intro to the PollingDuplexHttpBinding&lt;/span&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Comet_%28programming%29"&gt;Comet&lt;/a&gt; technologies, such as AJAX push and HTTP server push, allow web pages to have data pushed to them from the server, rather than always having the client pull information. It mimics this feature by having the browser poll the server at regular but short intervals (~1 second) to check for updates. Now web pages can be updated dynamically without any user input. Lucky for us, Silverlight supports this using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.pollingduplexhttpbinding%28VS.95%29.aspx"&gt;PollingDuplexHttpBinding&lt;/a&gt; Wcf Binding, which does most of the heavy lifting.&lt;br&gt;&lt;/p&gt; &lt;p&gt;In this article, we hope to build a basic Silverlight group chat application by connecting a &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.pollingduplexhttpbinding%28VS.95%29.aspx"&gt;PollingDuplexHttpBinding&lt;/a&gt; to a Wcf Service hosted on a shared hosting plan.&lt;br&gt;&lt;/p&gt; &lt;p&gt;There are excellent introductory articles to this technology that are pretty much required reading if unfamiliar with the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.pollingduplexhttpbinding%28VS.95%29.aspx"&gt;PollingDuplexHttpBinding&lt;/a&gt; (Skim the first link if pressed for time):&lt;br&gt;&lt;/p&gt; &lt;ol style="margin-left: 54pt"&gt; &lt;li&gt;&lt;a href="http://weblogs.asp.net/dwahlin/archive/2008/06/16/pushing-data-to-a-silverlight-client-with-wcf-duplex-service-part-i.aspx"&gt;Basketball score server&lt;/a&gt; by Dan Wahlin&lt;br&gt; &lt;li&gt;&lt;a href="http://petermcg.wordpress.com/2008/09/03/silverlight-polling-duplex-part-2-the-server/"&gt;Stock quote server&lt;/a&gt; by Peter McGrattan&lt;br&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The bulk of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.pollingduplexhttpbinding%28VS.95%29.aspx"&gt;PollingDuplexHttpBinding&lt;/a&gt; functionality is covered in the blogs listed above. From here on out, I will talk about some of the higher level details involved in making the simple chat program on top of the PushDataReceiver.&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="text-decoration: underline"&gt;2) The static list of clients.&lt;/span&gt;&lt;br&gt;&lt;br&gt;Every time a client connects to our webservice, we instantiate a new instance of the GameStreamClient class and keep it in a static List&amp;lt;ChatClient&amp;gt;. This does restrict us to only being able to run our chat server on one appdomain.&lt;br&gt;&lt;/p&gt; &lt;p style="margin-left: 36pt"&gt;&lt;span style="background-color: #eeece1; color: blue"&gt;private static &lt;/span&gt;&lt;span style="background-color: #eeece1; color: #2b91af"&gt;List&lt;/span&gt;&lt;span style="background-color: #eeece1"&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;IGameStreamClient&lt;/span&gt;&amp;gt; clients = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;IGameStreamClient&lt;/span&gt;&amp;gt;();&lt;/span&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;Our service gets instantiated on a Per Session basis as shown by the mark up below. In retrospect, I actually think it should have been a singleton, but that's for another time.&lt;br&gt;&lt;/p&gt; &lt;p style="background: #eeece1; margin-left: 36pt"&gt;[&lt;span style="color: #2b91af"&gt;ServiceBehavior&lt;/span&gt;(InstanceContextMode = &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;InstanceContextMode&lt;/span&gt;.PerSession,ConcurrencyMode = &lt;span style="color: #2b91af"&gt;ConcurrencyMode&lt;/span&gt;.Single,AutomaticSessionShutdown = &lt;span style="color: blue"&gt;true&lt;/span&gt;)]&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;span style="text-decoration: underline"&gt;3) The inactivity timeout and the stay alive ping.&lt;/span&gt;&lt;br&gt;&lt;br&gt;Each Wcf connection has an inactivity timeout that defaults to around 10 minutes. We want our clients to be able to idle in the chat room, and not get booted for inactivity. Here we introduce a stay alive packet to reset this inactivity timeout. The end user will know nothing of it, and this way they can idle all they want.&lt;br&gt;&lt;/p&gt; &lt;p style="background: #eeece1; margin-left: 36pt"&gt;&lt;span style="color: #2b91af"&gt;Message&lt;/span&gt; gameDataMsg = &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Message&lt;/span&gt;.CreateMessage(&lt;span style="color: #2b91af"&gt;MessageVersion&lt;/span&gt;.Soap11,&lt;span style="color: #a31515"&gt;"Silverlight/IGameStreamService/Receive"&lt;/span&gt;,&lt;span style="color: #a31515"&gt;"stayalive"&lt;/span&gt;);&lt;br&gt;&lt;br&gt;gameDataMsg.Properties.Add(&lt;span style="color: #a31515"&gt;"Type"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"StayAlive"&lt;/span&gt;);&lt;br&gt;&lt;br&gt;&lt;span style="color: blue"&gt;this&lt;/span&gt;.localClient.BeginReceive(gameDataMsg, EndSend, &lt;span style="color: blue"&gt;this&lt;/span&gt;.localClient);&lt;/p&gt; &lt;p&gt;&lt;span style="text-decoration: underline"&gt;4) I remove when I catch an exception when sending to a client.&lt;/span&gt;&lt;br&gt;&lt;br&gt;With the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.pollingduplexhttpbinding%28VS.95%29.aspx"&gt;PollingDuplexHttpBinding&lt;/a&gt;, the only way we will know if a client disconnects, is when the server fails to deliver a message. We cannot rely on the client to tell us when they are disconnecting, especially when considering that they are connecting from a browser; there's no real way to elegantly close out the client. Plus, they could just crash. As a result, there is no real disconnect, there is more of a send failure mechanism, that removes clients from the static list of ChatClients. In the proceeding ChatMessage broadcast, any clients that throw a CommunicationException/TimeoutException are removed from the server's client list. These timeouts could block the server however, so we must handle this asynchronously so as not to penalize connected clients.&lt;br&gt;&lt;/p&gt; &lt;p style="background: #eeece1; margin-left: 36pt"&gt;&lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #2b91af"&gt;IGameStreamClient&lt;/span&gt; client &lt;span style="color: blue"&gt;in&lt;/span&gt; clients)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;try&lt;br&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&lt;span style="color: green"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Send data to the client&lt;/span&gt;&lt;br&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/span&gt; (client != &lt;span style="color: blue"&gt;null&lt;/span&gt;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&lt;span style="color: #2b91af"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message&lt;/span&gt; gameDataMsg = &lt;br&gt;&lt;span style="color: #2b91af"&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; Message&lt;/span&gt;.CreateMessage(&lt;span style="color: #2b91af"&gt;MessageVersion&lt;/span&gt;.Soap11,&lt;span style="color: #a31515"&gt;"Silverlight/IGameStreamService/Receive"&lt;/span&gt;,data,&lt;span style="color: blue"&gt;this&lt;/span&gt;.serializer);&lt;br&gt;&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; gameDataMsg.Headers.Add(&lt;span style="color: #2b91af"&gt;MessageHeader&lt;/span&gt;.CreateHeader(&lt;span style="color: #a31515"&gt;"Type"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;""&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"DataWrapper"&lt;/span&gt;));&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; client.BeginReceive(gameDataMsg, EndSend, client);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch&lt;/span&gt; (&lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt; ex)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&lt;span style="color: green"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Exception caught when trying to send message to client so remove them from client list.&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Should probably catch a more specific exception but I'll leave that as an exercise for the reader.&lt;br&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clientsToRemove.Add(client);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;br&gt;&lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #2b91af"&gt;IGameStreamClient&lt;/span&gt; client &lt;span style="color: blue"&gt;in&lt;/span&gt; clientsToRemove)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clients.Remove(client);&lt;br&gt;}&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;span style="text-decoration: underline"&gt;5) Using DataContracts and DataContractSerializers to send complex types.&lt;/span&gt;&lt;br&gt;&lt;br&gt;Sending strings back and forth is not really fun. Complex types such as structs would allow for much richer data transfer. So it's a good thing Wcf supports DataContracts and has a DataContractSerializer that makes this process seemless.&lt;br&gt;&lt;/p&gt; &lt;p style="background: #eeece1; margin-left: 36pt"&gt;&lt;span style="color: blue"&gt;private readonly &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataContractSerializer&lt;/span&gt; serializer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataContractSerializer&lt;/span&gt;(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChatData&lt;/span&gt;));&lt;br&gt;&lt;span style="color: #2b91af"&gt;&lt;span style="font-family: courier new"&gt;&lt;span style="font-size: 8pt"&gt;&lt;font size="2"&gt;&lt;span style="color: green"&gt;// Serialize&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;Message&lt;/span&gt; gameDataMsg = &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Message&lt;/span&gt;.CreateMessage(&lt;span style="color: #2b91af"&gt;MessageVersion&lt;/span&gt;.Soap11,&lt;span style="color: #a31515"&gt;"Silverlight/IGameStreamService/Receive"&lt;/span&gt;,chatData,&lt;span style="color: blue"&gt;this&lt;/span&gt;.serializer);&lt;br&gt;&lt;br&gt;&lt;span style="color: #2b91af"&gt;&lt;span style="color: #2b91af"&gt;&lt;span style="font-family: courier new"&gt;&lt;span style="font-size: 8pt"&gt;&lt;font size="2"&gt;&lt;span style="color: green"&gt;// Deserialize&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;ChatData&lt;/span&gt; chatData = receivedMessage.GetBody&amp;lt;&lt;span style="color: #2b91af"&gt;ChatData&lt;/span&gt;&amp;gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;.serializer);&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;span style="text-decoration: underline"&gt;6) Adding Header information to the Message object so the Processor can serialize to the appropriate type.&lt;/span&gt;&lt;br&gt;&lt;br&gt;When your application gorws in complexity, you will probably have multiple DataContracts, but your Wcf Callback contract will only have one message handler, and you will need to programmatically handle the Message Body. To know what that body is so you can deserialize it, the sample tags the outgoing message with type strings in the Headers. This acts as a form of metadata for the message and allows the caller to deserialize the DataContract to the message of the passed type, allowing proper complexity to the callback contract. This is a lot better than clumsily having a class with a body and a type, and dealing with deserialization logic yourself.&lt;br&gt;&lt;/p&gt; &lt;p style="background: #eeece1; margin-left: 36pt"&gt;&lt;span style="font-family: courier new"&gt;&lt;span style="font-size: 8pt"&gt;&lt;font size="2"&gt;&lt;span style="color: green"&gt;//Server creates the message and tags it with a type.&lt;/span&gt;&lt;br&gt;&lt;span style="color: #2b91af"&gt;Message&lt;/span&gt; gameDataMsg = &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af"&gt;Message&lt;/span&gt;.CreateMessage(&lt;span style="color: #2b91af"&gt;MessageVersion&lt;/span&gt;.Soap11,&lt;span style="color: #a31515"&gt;"Silverlight/IGameStreamService/Receive"&lt;/span&gt;,&lt;span style="color: #a31515"&gt;"stayalive"&lt;/span&gt;);&lt;br&gt;&lt;/font&gt;&lt;br&gt;&lt;/span&gt;&lt;strong&gt;gameDataMsg.Properties.Add(&lt;span style="color: #a31515"&gt;"Type"&lt;/span&gt;, &lt;span style="color: #a31515"&gt;"StayAlive"&lt;/span&gt;);&lt;/strong&gt;&lt;/span&gt;&lt;br&gt;&lt;/p&gt; &lt;p style="background: #eeece1; margin-left: 36pt"&gt;&lt;span style="color: green"&gt;// Receiver parses the message type and deserializes using the correct deserializer.&lt;br&gt;// Check message type&lt;br&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;string&lt;/span&gt; type = &lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty;&lt;br&gt;&lt;span style="color: blue"&gt;for&lt;/span&gt; (&lt;span style="color: blue"&gt;int&lt;/span&gt; i = 0; i &amp;lt; receivedMessage.Headers.Count; i++)&lt;br&gt;{&lt;br&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/span&gt; (receivedMessage.Headers[i].Name == &lt;span style="color: #a31515"&gt;"Type"&lt;/span&gt;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type = receivedMessage.Headers.GetHeader&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;(i);&lt;br&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&lt;/span&gt;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;br&gt;&lt;span style="color: green"&gt;// Dispatch message based on type.&lt;/span&gt;&lt;br&gt;&lt;span style="color: blue"&gt;switch&lt;/span&gt; (type)&lt;br&gt;{&lt;br&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &lt;/span&gt;&lt;span style="color: #a31515"&gt;"StayAlive"&lt;/span&gt;:&lt;br&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&lt;/span&gt;;&lt;br&gt;&lt;span style="color: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &lt;/span&gt;&lt;span style="color: #a31515"&gt;"DataWrapper"&lt;/span&gt;:&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;span style="text-decoration: underline"&gt;7) &lt;a href="http://www.dimstuff.com/random/WcfChatSample.zip"&gt;Source code&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.dimstuff.com/random/WcfChatSample.zip"&gt;Source code&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-9072836027669523341?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/9072836027669523341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=9072836027669523341' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/9072836027669523341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/9072836027669523341'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/01/using-pollingduplexhttpbinding-for.html' title='Using the PollingDuplexHttpBinding for a Silverlight Group Chat'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6589548923991836862</id><published>2009-01-04T15:58:00.001-08:00</published><updated>2009-01-07T23:33:03.372-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wcf'/><title type='text'>Hosting Wcf Services on a Shared Hosting Plan</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;Hosting Wcf Services on a windows shared hosting plan has one issue that people should be aware of: You can only add one address per scheme to a service host. But what does this mean?&lt;br/&gt;&lt;br/&gt;Shared hosting plans often run with the default IIS set up, which means that there are two addresses to your site: &lt;a href='http://www.yourdomain.com'&gt;http://www.yourdomain.com&lt;/a&gt; and &lt;a href='http://yourdomain.com'&gt;http://yourdomain.com&lt;/a&gt;. Wcf only allows one address of any scheme (ie http://) to be used as a Service host, but by default, it tries to add the two. If you would try to run a web service using this markup,&lt;br /&gt;&lt;/p&gt;&lt;p style='background: #eeece1; margin-left: 36pt'&gt;&lt;span style='background-color:yellow'&gt;&amp;lt;%&lt;/span&gt;@ &lt;span style='color:#a31515'&gt;ServiceHost &lt;/span&gt;&lt;span style='color:red'&gt;Language&lt;/span&gt;="C#" &lt;span style='color:red'&gt;Debug&lt;/span&gt;="true" &lt;span style='color:red'&gt;Service&lt;/span&gt;="SomeService" &lt;span style='background-color:yellow'&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;You would receive the following error:&lt;br /&gt;&lt;/p&gt;&lt;p style='background: #eeece1; margin-left: 36pt'&gt;&lt;span style='color:red'&gt;&lt;strong&gt;This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;To get around this, you'll have to make a custom ServiceHostFactory that will select only one address, and have your markup use this custom factory with the 'Factory' attribute. Which address you prefer is up to you, just remember to use it in your Endpoint configurations!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='text-decoration:underline'&gt;.svc file:&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p style='background: #eeece1; margin-left: 36pt'&gt;&lt;span style='background-color:yellow'&gt;&amp;lt;%&lt;/span&gt;@ &lt;span style='color:#a31515'&gt;ServiceHost &lt;/span&gt;&lt;span style='color:red'&gt;Language&lt;/span&gt;="C#" &lt;span style='color:red'&gt;Debug&lt;/span&gt;="true" &lt;span style='color:red'&gt;Service&lt;/span&gt;="SomeService" &lt;span style='color:red'&gt;Factory&lt;/span&gt;="SomeNamspace.AddressSelectorHostFactory" &lt;span style='background-color:yellow'&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;   &lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='text-decoration:underline'&gt;AddressSelectorHostFactory.cs file:&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p style='background: #eeece1; margin-left: 36pt'&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:blue'&gt;public class &lt;/span&gt;&lt;span style='color:#2b91af'&gt;AddressSelectorHostFactory&lt;/span&gt; : &lt;span style='color:#2b91af'&gt;ServiceHostFactory&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;    &lt;span style='color:blue'&gt;protected override &lt;/span&gt;&lt;span style='color:#2b91af'&gt;ServiceHost&lt;/span&gt; CreateServiceHost(&lt;span style='color:#2b91af'&gt;Type&lt;/span&gt; serviceType, &lt;span style='color:#2b91af'&gt;Uri&lt;/span&gt;[] baseAddresses)&lt;br/&gt;    {&lt;br/&gt;        &lt;span style='color:green'&gt;// When hosting on a shared hosting plan, the default IIS configuration passes 2 addresses&lt;br/&gt;        // to CreateServiceHost: http://www.yoururl.com and http://yoururl.com.&lt;br/&gt;        //&lt;br/&gt;        // You can only add ONE address of a certain scheme (ie: http://), so we just take the www address.&lt;br/&gt;&lt;br/&gt;        &lt;/span&gt;&lt;span style='color:blue'&gt;if&lt;/span&gt; (baseAddresses.Length &amp;gt; 1)&lt;br/&gt;        {&lt;br/&gt;            &lt;span style='color:#2b91af'&gt;Uri&lt;/span&gt; address = (&lt;span style='color:blue'&gt;from&lt;/span&gt; u &lt;span style='color:blue'&gt;in&lt;/span&gt; baseAddresses &lt;span style='color:blue'&gt;where&lt;/span&gt; u.AbsoluteUri.StartsWith(&lt;span style='color:#a31515'&gt;"http://www."&lt;/span&gt;) &lt;span style='color:blue'&gt;select&lt;/span&gt; u).First();&lt;br/&gt;            &lt;span style='color:blue'&gt;return new &lt;/span&gt;&lt;span style='color:#2b91af'&gt;ServiceHost&lt;/span&gt;(serviceType, address);&lt;br/&gt;        }&lt;br/&gt;&lt;span style='color:blue'&gt;        else&lt;br/&gt;        &lt;/span&gt;{&lt;br/&gt;&lt;span style='color:blue'&gt;            return new &lt;/span&gt;&lt;span style='color:#2b91af'&gt;ServiceHost&lt;/span&gt;(serviceType, baseAddresses[0]);&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;}&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt; &lt;br /&gt; &lt;/p&gt;&lt;p&gt;More about this can be read &lt;a href='http://www.webhost4life.com/kb/question.php?qstId=216'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6589548923991836862?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6589548923991836862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6589548923991836862' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6589548923991836862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6589548923991836862'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2009/01/hosting-wcf-services-on-shared-hosting_04.html' title='Hosting Wcf Services on a Shared Hosting Plan'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-3848211130580905442</id><published>2008-12-07T17:57:00.000-08:00</published><updated>2008-12-07T18:08:59.146-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>Red, White, and Blue</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_B1bTw4pieO8/STyBHgMiurI/AAAAAAAAACA/zmseeJIVg7Y/s1600-h/RedWhiteBlueGameShot.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 273px;" src="http://3.bp.blogspot.com/_B1bTw4pieO8/STyBHgMiurI/AAAAAAAAACA/zmseeJIVg7Y/s400/RedWhiteBlueGameShot.jpg" alt="" id="BLOGGER_PHOTO_ID_5277234829272988338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It can be found &lt;a href="http://www.badinfluencesoftware.com/redwhiteblue/"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I feel comfortable with Silverlight now and will be releasing a few "How To" articles for people interested in the technology. That said, the actual game didn't turn out as well as I had hoped, but I do think the map control, the one that features the zooming of the States, came out pretty slick.&lt;br /&gt;&lt;br /&gt;So do I continue on this project, or move on to another one? Normal d-roc fashion would have me bury yet another failed project, and tackle something new. What will happen this time?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-3848211130580905442?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/3848211130580905442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=3848211130580905442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3848211130580905442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3848211130580905442'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/12/red-white-and-blue.html' title='Red, White, and Blue'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_B1bTw4pieO8/STyBHgMiurI/AAAAAAAAACA/zmseeJIVg7Y/s72-c/RedWhiteBlueGameShot.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-258090141505056286</id><published>2008-12-03T10:15:00.001-08:00</published><updated>2008-12-03T10:18:36.314-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='blogs'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorials'/><title type='text'>Regarding Coding Tutorials on Blogs</title><content type='html'>&lt;p&gt;I was reading &lt;a href="http://blogs.sqlxml.org/bryantlikes/archive/2006/09/27/WPF-Patterns.aspx"&gt;an article&lt;/a&gt; about the Model-View-ViewModel design pattern when I noticed a comment which sparked my rage against an all-too-common pattern I've observed in recent years:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;If you're doing &lt;a href="http://wpf.netfx3.com/"&gt;WPF&lt;/a&gt; development, you really need to check out &lt;a href="http://blogs.msdn.com/dancre/default.aspx"&gt;Dan Crevier&lt;/a&gt;'s series on DataModel-View-ViewModel. Right now there is no easy way to read through all his posts on the subject without navigating through them using the calendar control on his blog.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;With the prevalence of increasingly easier blog services like Blogger or Wordpress, anyone can be a publisher.&amp;#160; Unfortunately some have used these services (with little additional customization) for purposes they are not well-suited for.&amp;#160; While we may likely contradict this post at some time in the future, I'd like to express my increasing annoyance with blogs that post coding tutorials.&amp;#160; A blog is a much-less-than-ideal medium for hosting coding tutorials.&amp;#160; &lt;/p&gt;  &lt;p&gt;Why?&lt;/p&gt;  &lt;p&gt;For one, when I'm looking for coding tutorials, I want them categorized.&amp;#160; I want to be able to easily sort through XNA Game Studio SpriteBatch tutorials or WPF TabControl tutorials.&amp;#160; With blogs, your posts are time-based.&amp;#160; They are generally consumed in much the same way a newspaper or magazine is; you don't often reach for an old issue of a magazine or a newspaper from a few months or years ago.&amp;#160; You use them to get recent information about topics of interest.&amp;#160; Blogs are designed around this assumption as well.&lt;/p&gt;  &lt;p&gt;Now admittedly, a blog is orders of magnitude better for retrieving archived information, but the filtering mechanism is still subpar.&amp;#160; The best that you can reasonably hope is that the blog author applied an extensive and thorough use of tags, which certainly isn't something you can count on, and is often completely arbitrary.&amp;#160; (I can write an entire article about the problems with the hacky &amp;quot;tags&amp;quot; system so prevalent these days.&amp;#160; In fact, I'm struggling to come up with an adequate set of tags for &lt;em&gt;this&lt;/em&gt; post.)&lt;/p&gt;  &lt;p&gt;Instead, developers should separate their tutorials and their blog posts.&amp;#160; Perhaps services like Blogger should (if they don't already) easily facilitate categorized articles.&amp;#160; Google seems to be on to something with their &lt;a href="http://knol.google.com/"&gt;Knol&lt;/a&gt; system, but I imagine there's a better way.&amp;#160; Speaking of Google, it seems that currently most tutorials are found by searching for a particular topic, and trusting that relevant archived developer blog entries will appear in the search results.&amp;#160; Thankfully, Google tends to pick up the slack where the blogging system falls short.&amp;#160; But it shouldn't have to be this way.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-258090141505056286?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/258090141505056286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=258090141505056286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/258090141505056286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/258090141505056286'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/12/regarding-coding-tutorials-on-blogs.html' title='Regarding Coding Tutorials on Blogs'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6174717294454874883</id><published>2008-11-25T01:29:00.001-08:00</published><updated>2008-11-28T21:21:00.843-08:00</updated><title type='text'>Coding Vacation '08: Bad Timing</title><content type='html'>&lt;p&gt;Several weeks ago I took the initiative and committed to something that went against my conventional patterns of behavior.&amp;#160; I decided that I would spend some vacation time devoted primarily toward developing software -- my personal projects, of course.&amp;#160; In the back of my head, I heard voices telling me that this was not an acceptable justification to take vacation time.&amp;#160; Vacations are for trips or visiting family, they said.&amp;#160; But, much like the thought processes that steered me toward the video game industry rather than business apps, the thoughts compelling me to take this vacation won in the end.&amp;#160; I announced my plans confidently to my friends and family, as if asserting it this way would protect against any criticism.&amp;#160; And, well, I didn't receive any.&amp;#160; In fact, I only received support.&lt;/p&gt;  &lt;p&gt;My girlfriend, of course, saw this as an opportunity to spend more time with me every day.&amp;#160; She is currently unemployed, so she has a lot of free time.&amp;#160; It's very difficult to make the argument that I need to spend so much time doing things alone on my computer when I have a rare opportunity to spend extra time together, but she seemed to understand.&amp;#160; Of course, that didn't stop her from coming over often, inevitably leading to a lot of time spent away from coding.&amp;#160; Much of this time was spent with her playing the newly released &lt;a href="http://www.worldofwarcraft.com/"&gt;World of Warcraft expansion: Wrath of the Lich King&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I can't blame her for this; I always want to play, and I have to keep myself at least somewhat disciplined.&amp;#160; It just makes it so much easier to play when I have someone to play with.&amp;#160; Between my uber druid and my hopelessly gay mage, there's so much fun to be had; so many hours to lose.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/_qvLGUOISC18/SSvFZzFSE4I/AAAAAAAAAH8/R_CHV-fefIY/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://lh4.ggpht.com/_qvLGUOISC18/SSvFaZg_1cI/AAAAAAAAAIA/CgfvJdNT0eI/image_thumb%5B1%5D.png?imgmax=800" width="213" border="0" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_qvLGUOISC18/SSvFa2plnUI/AAAAAAAAAIE/Qu-hBWOF8T4/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://lh5.ggpht.com/_qvLGUOISC18/SSvFbYloGzI/AAAAAAAAAII/0FCUISVE8wg/image_thumb.png?imgmax=800" width="229" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;For the past week it's taken all my energy to avoid getting completely sucked into the grind.&amp;#160; I have to reach level 80.&amp;#160; I have to purchase an epic flying mount.&amp;#160; I have to obtain uber gear, etc.&lt;/p&gt;  &lt;p&gt;To make matters worse, I'm leaving to visit my brother for Thanksgiving tomorrow.&amp;#160; Don't get me wrong, I love visiting him, but it's more time spent away from coding.&amp;#160; Compounding this is the fact that he plays World of Warcraft as well, and I'm giving him the new expansion pack as a gift.&amp;#160; Nevertheless, I'm bringing my Mac Mini and an LCD monitor with me tomorrow.&amp;#160; Yes, I'm a little bit crazy.&lt;/p&gt;  &lt;p&gt;Despite all of this, I have made significant progress on my app, but there's much to be done.&amp;#160; I will talk more about it later when I feel less reserved about it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6174717294454874883?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6174717294454874883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6174717294454874883' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6174717294454874883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6174717294454874883'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/11/coding-vacation-bad-timing.html' title='Coding Vacation &amp;#39;08: Bad Timing'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_qvLGUOISC18/SSvFaZg_1cI/AAAAAAAAAIA/CgfvJdNT0eI/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-7690087843304306393</id><published>2008-11-20T15:04:00.003-08:00</published><updated>2008-11-20T15:05:57.284-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>Red, White, And Blue Logo</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_B1bTw4pieO8/SSXtRA6Q3TI/AAAAAAAAAB4/zb0C8d85CgM/s1600-h/RedWhiteBlue.jpg"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; FLOAT: left; HEIGHT: 250px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5270879815464967474" border="0" alt="" src="http://4.bp.blogspot.com/_B1bTw4pieO8/SSXtRA6Q3TI/AAAAAAAAAB4/zb0C8d85CgM/s400/RedWhiteBlue.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Some say, it's amatuer. Screw those guys.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-7690087843304306393?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/7690087843304306393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=7690087843304306393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7690087843304306393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7690087843304306393'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/11/red-white-and-blue-logo.html' title='Red, White, And Blue Logo'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_B1bTw4pieO8/SSXtRA6Q3TI/AAAAAAAAAB4/zb0C8d85CgM/s72-c/RedWhiteBlue.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6638954044299850886</id><published>2008-11-18T10:40:00.000-08:00</published><updated>2008-11-19T11:36:55.939-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>Oct 31st == Nov 30th &amp;&amp; Shared plans == win!</title><content type='html'>So much for that beta by Oct 31st. I've had a lot of petty life things distract me from what's important: Red, White, And Blue! It is coming together though and I have high hopes. There are some interesting obstacles involved with keeping many clients in sync (quasi sync at least), and all the bugs that can occur when you have a client that loses sync with the db.&lt;br /&gt;&lt;br /&gt;I have a really annoying issue where a browser's cache will prevent users from downloading a new client, so should I rename my client on every update just to trigger a download? Sounds clumsy. I don't think I would like old silverlight clients pinging my services either, so will I have to check a version string on every login? Seems so.&lt;br /&gt;&lt;br /&gt;I am relying on the fact that all of my WCF sessions will exist in the same AppDomain, so I can use a single static to keep track of users. Risky and clumsy, I know, but I'm already stretching the capabilities of a shared hosting plan about as far as possible. I don't know many websites on shared hosting plans using WCF services, Ajax style PollingDuplex binding, Linq2Sql , hosting silverlight. This stuff came out last night (pretty much), so I've been happy with how much I can get away with on a shared hosting plan.&lt;br /&gt;&lt;br /&gt;It really is a tribute to the computer industry when you can get so much power for a measly $100 / year hosting plan. This is our one up on any other industry: the low barrier of entry. Can you even imagine something similar in the auto industry? Investment banking? The factories, connections, and brown-nosing needed to do the most trivial things in other industries makes me love my field that much more.&lt;br /&gt;&lt;br /&gt;See you next Sunday and have a happy thanksgiving!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6638954044299850886?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6638954044299850886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6638954044299850886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6638954044299850886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6638954044299850886'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/11/oct-31st-nov-30th-shared-plans-win.html' title='Oct 31st == Nov 30th &amp;&amp; Shared plans == win!'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-4241115853006053336</id><published>2008-10-12T22:22:00.000-07:00</published><updated>2008-11-19T11:36:42.893-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>Red, White, and Blue</title><content type='html'>The final title for my web game, slated for an oct 31st beta. Three parties, three colors: red, white, and blue. I decided to pull back on the plot in an effort to stay out of politics, we don't need half-assed political dialogue in a budget web game prototype (v2?).&lt;br /&gt;&lt;br /&gt;The next piece of tech I would like the exploit is Silverlight's Polling Duplex support. Similar to the "AJAX Push" or "HTTP server push", this technique, coined &lt;a href="http://en.wikipedia.org/wiki/Comet_%28programming%29"&gt;Comet&lt;/a&gt; by the web community, allows one to emulate packet "Pushing" in the browser, without having to face the hurdles of socket programming, policy files, and blocked ports. I'm pretty excited about it's capabilities and it's ease of implementation with WCF and Silverlight. Although it won't be enough for any serious real-time multiplayer communication, it'll be "good enough" for most scenarios, especially those found in a turn-based world.&lt;br /&gt;&lt;br /&gt;As a side note, does anyone have a problem with dandruff dirtying up their keyboard?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-4241115853006053336?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/4241115853006053336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=4241115853006053336' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4241115853006053336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4241115853006053336'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/10/red-white-and-blue.html' title='Red, White, and Blue'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-8728254136828743177</id><published>2008-10-07T00:02:00.001-07:00</published><updated>2008-10-07T20:06:58.903-07:00</updated><title type='text'>XNA Game Studio Coding Jam, Fall '08</title><content type='html'>&lt;p align="left"&gt;I recently signed up to attend an event for developers and artists which allowed them to collaborate on an almost-released build of XNA Game Studio 3.0 and build a game in a short amount of time. When I signed up, I was under the impression that this event took place on a Saturday and lasted all day long. It wasn't until last Friday afternoon that I got an Outlook Calendar reminder which corrected this false assumption, informing me that in fact it was an &lt;em&gt;all-weekend&lt;/em&gt; event.&lt;/p&gt;  &lt;p align="left"&gt;Reluctantly, especially given the time and energy I've been devoting to iPhone development recently, I bit the bullet and told myself that this was an opportunity that I didn't want to pass up.&lt;/p&gt;  &lt;p align="left"&gt;The event consisted of an Iron Chef-style &amp;quot;five ingredients&amp;quot; challenge (also similar to gamedev.net's &amp;quot;elements&amp;quot; programming contests), in which we picked from randomly generated lists of game elements from which we derived a game concept. We quickly formed into groups, each containing (thank the Lord) an artist, and tried to pick the most appealing set. The elements we chose were Doom, Clock, Robot, Pirate, and Defense. Our game: &lt;strong&gt;Doom Clock Robot Pirate Defense&lt;/strong&gt;.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/vargonian/SOwjylpzxPI/AAAAAAAAAGk/ojGsZj-P0HI/s1600-h/DoomClockRobotPirateDefense2%5B4%5D.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="345" alt="DoomClockRobotPirateDefense2" src="http://lh5.ggpht.com/vargonian/SOwjzvXOAPI/AAAAAAAAAGo/ZmLbSjbQ6QQ/DoomClockRobotPirateDefense2_thumb%5B2%5D.png?imgmax=800" width="484" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="left"&gt;As an aside, it's funny what goes on in my head when I have to choose team members in a short amount of time. Ultimately I'm looking for enthusiastic, motivated, skillful people who are also mellow (i.e. no Prima Donnas). Obviously it's impossible to gauge this in such a short amount of time, but I was fortunate with my group.&lt;/p&gt;  &lt;p align="left"&gt;We ironed out the basic details of the gameplay Friday evening, and began our implementation bright and early Saturday morning. (Seriously, it still amazes me that I was able to show up on time at 9am on a Saturday.) Much to my great concern, we opted against using source control, and instead agreed to use a memory stick as our repository. Yikes. In retrospect, I bet I could have created an &lt;em&gt;actual&lt;/em&gt; SVN repository on that thing. It wouldn't have been perfect, but it would have likely eliminated many headaches. &lt;/p&gt;  &lt;p align="left"&gt;It quickly became apparent that our lack of source control was a very bad idea. Nearly all of our changes involved multiple shared files, and the process of merging was very manual, and very confusing. We essentially had four different versions of the code floating around at any given time, and it became difficult to tell whose changes were the newest. Instead of merging to the USB stick, team members would often just copy the changed versions of their files to a separate folder on the stick, making it nearly impossible for me to tell when a line from the USB stick's code was newer or older than what the programmer had copied to the new folder. Suffice it to say, it was a big mess, and I'll write it off as a reminder of why source control is so crucial.&lt;/p&gt;  &lt;p align="left"&gt;Our artist, Chris, was hard at work from the very start. I regularly glanced over at his drawings and wished I had that ability. I also envied his lack of need for any sort of source control solution. We'd call out when we needed art assets, and I was tempted to ask for something completely ridiculous just for the fun of it, but I restrained myself. I really like the opportunity to work with an artist on a project for several reasons. First of all, I'm much more inspired to work on a project when I have visual gratification at regular intervals. I may be able to create intriguing gameplay without an artist, but I don't really &lt;em&gt;believe&lt;/em&gt; it until I see it. As soon as I see appealing illustrations and animations, that's when I first start to feel the real potential of my project. Second, it's a great experience to discover the processes needed for a functioning content pipeline. What format should my images be in? What size? Should each frame of an animation be a separate image or a large composite image? What if the composite image isn't a square; will the texture importer complain? Questions I may not have even considered are suddenly an important part of the process, and this experience makes future projects go much more smoothly.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/vargonian/SOsJhzdQtpI/AAAAAAAAAGs/l5xnHbZFySA/s1600-h/DoomClockRobotPirateDefense%5B1%5D.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="350" alt="DoomClockRobotPirateDefense" src="http://lh4.ggpht.com/vargonian/SOsJiJxwwwI/AAAAAAAAAGw/vvpR_ZukPsA/DoomClockRobotPirateDefense_thumb.jpg?imgmax=800" width="484" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="left"&gt;After a couple full (but not overly burdensome) days of coding, we ended up with a fairly playable prototype. It contained several types of enemies with AI, three different types of towers, several levels, a controllable player, collision avoidance, a snazzy menu system, support for the Xbox 360, and even same-box multiplayer. I added all the code to a repository which I shared with the team, and I've even seen significant updates from one of the developers in the past couple days. I am tempted/eager to clean up the code, since ours was inevitably very messy and arbitrary, and just enough to &amp;quot;get the job done.&amp;quot; I am almost as much a Code Nazi as I am a Grammar Nazi. (Although seriously, I don't think that avoiding &amp;quot;u&amp;quot; in place of &amp;quot;you&amp;quot; and knowing the difference between &amp;quot;your&amp;quot; and &amp;quot;you're&amp;quot; qualifies me as a Grammar Nazi; that just means I have at least a third-grade education.) I just think there's something inherently selfish about writing bad code if you're on a multi-person team, but I'll save that soapbox rant for later.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-8728254136828743177?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/8728254136828743177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=8728254136828743177' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8728254136828743177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8728254136828743177'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/10/xna-game-studio-coding-jam-fall.html' title='XNA Game Studio Coding Jam, Fall &amp;#39;08'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/vargonian/SOwjzvXOAPI/AAAAAAAAAGo/ZmLbSjbQ6QQ/s72-c/DoomClockRobotPirateDefense2_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-2256066788702711692</id><published>2008-10-02T13:02:00.001-07:00</published><updated>2009-01-05T13:27:45.179-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>More Mac/iPhone development updates</title><content type='html'>I have several posts in one of my other blogs that are applicable to this one, so I suppose I will fix one of them up and post it here, so as not to appear M.I.A.  The following is a follow-up to some landscape-mode issues I've been having with iPhone development; specifically, if I apply a transform to a root level screen in my app, any child screens added 1) will not have that transform applied in the iPhone simulator, as I would expect, but 2) *will* have that transform applied on the actual device:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've at least found a good temporary solution for the landscape issues, and I've been progressing with learning Objective-C / Cocoa / UIKit / etc. but not to the point at which I can concretely delineate between each of these terms. I'm also struggling a bit but getting the hang of several things.&lt;br /&gt;&lt;br /&gt;I finally installed a third-party mouse configuration software so that I can get more than a kindergarten level of control over my mouse sensitivity.&lt;br /&gt;&lt;br /&gt;I'm getting the hang of the MacOS app launching model, the dock bar and how it represents running versus non-running programs, the "Finder" file browser and its quirks.&lt;br /&gt;&lt;br /&gt;XCode is like Visual Studio Lite, or perhaps "Visual Studio Gimped". I've chatted endlessly on IRC with people who gladly praise XCode over Visual Studio, but I wonder if they've used VS2005 or greater. It's just no comparison; there are redundant windows/panels everywhere, the debugger runs in a separate tiny window, though you can resize it, covering your other windows. The expression watcher is nowhere near as powerful as Visual Studio's, and Intellisense (or its equivalent) is weaker in its implementation, requiring more keystrokes for simple tasks.&lt;br /&gt;&lt;br /&gt;Speaking of the tiny debugger window (obviously resizable), this is a common observation with MacOS. It seems the norm to be expected to manually drag windows around and place them as you need them; stretching them to just the right extents, etc. In Windows my usual mode of operation is to only do that when I'm copying files from one explorer window to another. When I'm running apps, I generally switch to the app, then maximize the window if it isn't already maximized. Windows seems to work well with users who are used to this behavior. MacOS doesn't seem to be expecting it; hence, I'll find that apps have lots of little "helper" windows that are expected to be resized to comfortable dimensions for the particular user at that particular time. This is not how I want my apps to work. Visual Studio supports this, but also a very extensive docking scheme so I can have all my windows docked where I want them instead of floating about in the ether, always getting in the way of content behind them, or else getting hidden themselves when I click somewhere else.&lt;br /&gt;&lt;br /&gt;Again I find it ironic that so much of what makes the iPhone dominant over Windows Mobile is the same that makes Visual Studio dominant over XCode and the general Mac development situation. Of course, I am trying very hard not to bias my arguments with my existing familiarity with Visual Studio. There's still much more to learn.&lt;br /&gt;&lt;br /&gt;Other factors which add major hurdles include simple things like the feel of the keyboard. It's no longer Ctrl-C, it's Command-C, etc., not to mention completely different dev environment hotkeys. And on my particular keyboard, the Esc and F-keys are tiny.&lt;br /&gt;&lt;br /&gt;I finally bit the bullet and sacrificed dual-monitors on my PC in order to have a dedicated monitor with a DVI input from my Mac. I also switched placement of my keyboards/mice so that my Mac is in my primary workspace on my desk, and my PC is riding shotgun. This will encourage me to give my Mac some more love.&lt;br /&gt;&lt;br /&gt;Update: The lack of multi-monitors with my PC is getting annoying, but I bought a new keyboard for my Mac, realizing that PC keyboards usually work just fine.  This has been so great for my sanity and has filled me with some extra spirit that was lacking the past few days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-2256066788702711692?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/2256066788702711692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=2256066788702711692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2256066788702711692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2256066788702711692'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/10/i-have-several-posts-in-one-of-my-other.html' title='More Mac/iPhone development updates'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6157194576297531523</id><published>2008-09-24T22:55:00.000-07:00</published><updated>2008-10-09T14:51:12.250-07:00</updated><title type='text'>Why am I coding?</title><content type='html'>Every once in a while, I stop and think, "wow, I've spent a lot of time coding." And for what? How many side projects have I buried in my repository? I code for work and play, and it can be taxing.&lt;br /&gt;&lt;br /&gt;Right now, I'm juggling three new technologies, and love experience. But what else could I have done during this time?&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Raise my bench max to 300 lbs? &lt;/li&gt;&lt;li&gt;Write a novelette? &lt;/li&gt;&lt;li&gt;Work on my public speaking? &lt;/li&gt;&lt;li&gt;Work on something that I can actually show?! &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;My previous side projects haven't been seen by many. This lack of exposure is a big reason why I've moved to web development. I am tired of doing a substantial amount of work, that's never to be seen. I feel as if I was stranded on an island of creativity, and just kept pushing bottles of ideas into a swallowing sea of bits.&lt;br /&gt;&lt;br /&gt;Ok, I've taken the analogy too far. But I hope this time, more people get to see my work. I have to learn a lot of things; gone are my graphics libraries and shader skillz, but so what? They probably weren't that good anyways. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6157194576297531523?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6157194576297531523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6157194576297531523' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6157194576297531523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6157194576297531523'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/09/why-am-i-coding.html' title='Why am I coding?'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-48286419714012408</id><published>2008-09-15T20:17:00.000-07:00</published><updated>2008-11-19T11:36:16.980-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>Secession</title><content type='html'>Today's bankruptcy filing of Lehman Brothers and Bank of America's purchase of Merrill Lynch defined a new Black Monday in what could be a new Great Depression. This event is sure to make future iterations of Globalization when the Economy portion of the game is released, but let's not get ahead of ourselves. For now, let's keep our eyes on the November 30th Alpha which will have the turn-based combat. This first chapter of Globalization will be titled &lt;span style="font-style: italic;"&gt;Secession&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;Set in 2020, the Republicans have just won their 6th straight presidential election, only to be rewarded with a country torn asunder. The previous decade saw numerous clashes between the two political parties, and spawned thoughts of secession in the halls of democratic strongholds. Throughout the years, media slammed small town conservatives, bible beaters denounced godless liberals, and now, politics wasn't just a stance, it was a way of life. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;During the chaos, another ideology bubbled into significance in the northwest. The Green Party Libertarians rose to take the mantle of the west, rejecting the status quo of America's two party System, and jumped into the increasingly hostile fray. &lt;/span&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;&lt;br /&gt;&lt;br /&gt;The Republican's November victory was the last election to be held across the Union. Seeking independence from the larger Republican electoral block, the other parties seceded immediately and drafted their own policies. This did not calm the tension, and the new borders became the new frontier.&lt;br /&gt;&lt;br /&gt;Thus was born the War of the Primaries, a sempiternal struggle that broke the union, shook the balance of power, and emboldened America's enemies. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;Welcome. Choose your party ...&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;That's all I've got. I chose to have a 3 party campaign to add complexity to diplomacy, and to prevent any one party from becoming too powerful. All party systems seem to evolve into a virtual two-party system, where alliances are formed between the weaker factions to secure victory. Hopefully, the three party campaign will emulate that idea; when there's an imbalance in power, the weaker parties will pair up against the superpower.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With regards to the actual game. I've focused on tool development, with the world editor about 40% complete, and a lot of database work finished. I am looking forward to the ability to manipulate the story and the world in real time. It allows for some interesting dynamics that simply cannot be matched by a fixed plot stamped onto a disc.&lt;br /&gt;&lt;br /&gt;In another note, I've read Vargo's posts and can't help but notice his writing superiority. I hope to improve my writing, but I have a ways to go before I can match his eloquence. I DO wonder how many rewrites he goes through for one post ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-48286419714012408?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/48286419714012408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=48286419714012408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/48286419714012408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/48286419714012408'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/09/secession.html' title='Secession'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6756769785314945858</id><published>2008-09-07T21:19:00.000-07:00</published><updated>2008-09-07T21:23:33.083-07:00</updated><title type='text'>My hiatus</title><content type='html'>I know you've all been wondering why I haven't updated in a while.  There are two reasons: 1) I haven't had a Mac available for iPhone development since August 28th or so, and 2) I'm on vacation right now in Disney World, returning September 10th.&lt;br /&gt;&lt;br /&gt;I'm having an awesome time but it'll be really nice to be home and back to my geeky endeavors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6756769785314945858?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6756769785314945858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6756769785314945858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6756769785314945858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6756769785314945858'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/09/my-hiatus.html' title='My hiatus'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-3332173128890992549</id><published>2008-08-26T02:19:00.001-07:00</published><updated>2008-08-26T02:19:19.534-07:00</updated><title type='text'>My insane ramblings about how the Internet keeps me sane</title><content type='html'>&lt;p&gt;Some people who work on their computer all day dread the thought of using a computer for a moment longer when they get home.&amp;#160; For me that's like saying that I've been breathing all day at the office, so I'd rather not breathe when I get home.&amp;#160; To clarify the analogy, I never think about &amp;quot;breathing&amp;quot; as my primary activity.&amp;#160; I'm always doing something else.&amp;#160; Nobody ever calls you boring or uncultured because you breathe all day long.&amp;#160; Sitting at the computer, for better or worse, is like breathing to me.&amp;#160; There are so many different things that I can do on the computer that to clump it all together as &amp;quot;sitting at the computer&amp;quot; is an unfair, hasty, ignorant categorization.&amp;#160; Don't get me wrong, you could easily chastise me for not getting enough exercise, and for having what is almost certainly an addiction and I'd gladly concede, but that's not my point.&amp;#160; &lt;/p&gt;  &lt;p&gt;What I do on my computer at home is generally quite different from what I do at work.&amp;#160; For example, after a long, busy day full of hectic events that may be largely computer-centric, I find it therapeutic to sit at yet another computer and blog about whatever it is that's been stuck on my mind.&amp;#160; Hey, it worked for Doogie Howser, and who am I to argue with him or his overly simplistic word processor?&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/vargonian/SLPKkMvayiI/AAAAAAAAAF0/sv_00vfozRc/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="183" alt="image" src="http://lh5.ggpht.com/vargonian/SLPKllmzRNI/AAAAAAAAAF4/UmYuW2LUmf0/image_thumb.png?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Computers can also simultaneously be the source of my stress and stress &lt;em&gt;relief&lt;/em&gt;.&amp;#160; An Internet connection keeps you connected to the rest of the world despite the fact that you may be crammed in an office for long hours working on a nerve-wracking project.&amp;#160; (This doesn't reflect my current situation, thankfully, but it certainly has in the past.)&amp;#160; It reminds me of one of my elementary schools, built near a small, somewhat active retail center.&amp;#160; This school stood out from my others in the fact that it wasn't buried in the woods, or deeply entrenched in a residential area devoid of life from 8-5.&amp;#160; The classroom window wasn't just a window outside; it was a window to the rest of the world.&amp;#160; Peering through it reminded me that there were still people out there going about their lives, doing &lt;em&gt;interesting&lt;/em&gt; &lt;em&gt;things&lt;/em&gt; (since anything was interesting compared to being confined to a classroom all day, every day).&amp;#160; It didn't matter as much that I was stuck in school because I knew that there was still an exciting world out there, and I would eventually be part of it -- and for now, living vicariously through them would suffice.&amp;#160; &lt;/p&gt;  &lt;p&gt;The Internet is that window for me.&amp;#160; Whether through RSS feeds, message boards, or chat windows, regardless of how enclosed I feel at work, I am always just a click away from sanity.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-3332173128890992549?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/3332173128890992549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=3332173128890992549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3332173128890992549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3332173128890992549'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/08/my-insane-ramblings-about-how-internet.html' title='My insane ramblings about how the Internet keeps me sane'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/vargonian/SLPKllmzRNI/AAAAAAAAAF4/UmYuW2LUmf0/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-5808084446446912114</id><published>2008-08-24T20:57:00.000-07:00</published><updated>2008-11-19T11:35:54.532-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>Render Target!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_B1bTw4pieO8/SLIuHMDA5_I/AAAAAAAAABw/t5mQzd8L8iA/s1600-h/GlobalizationRenderTarget.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_B1bTw4pieO8/SLIuHMDA5_I/AAAAAAAAABw/t5mQzd8L8iA/s400/GlobalizationRenderTarget.jpg" alt="" id="BLOGGER_PHOTO_ID_5238300017613137906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Progress is creeping forward in my Silverlight game. I've heard from 2 other people interested in helping out with the project and have start to refactor heavily as a result.&lt;br /&gt;&lt;br /&gt;There are many complications involved when your dev team grows bigger than 1, especially with members new to the technology. As a result, I've gone so far as to throw up a render target (quality is questionable) which you can see to the left, and a bunch of probably unseen UML diagrams which help me lay out my thoughts as much as it helps the other devs figure out what I'm trying to do.&lt;br /&gt;&lt;br /&gt;So far, this project has incorporated a lot of the latest and greatest .NET 3.5 has to offer, such as: WCF Services, LINQ, LINQ2SQL, and XAML with Silverlight/WPF (for tools).&lt;br /&gt;&lt;br /&gt;It's been great learning all this tech, and I hope it'll result in a great game. It might be a sip of the Kool-Aid , but hearing about Mike's forays into the IPhone SDK, and having a few stints into the LAMP stack, the Microsoft dev environment seems to be unmatched. With some experience and a decent code library, one could create a ridiculously powerful application in a ridiculously short amount of time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-5808084446446912114?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/5808084446446912114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=5808084446446912114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5808084446446912114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5808084446446912114'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/08/render-target.html' title='Render Target!'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_B1bTw4pieO8/SLIuHMDA5_I/AAAAAAAAABw/t5mQzd8L8iA/s72-c/GlobalizationRenderTarget.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-28765285673996550</id><published>2008-08-21T01:46:00.001-07:00</published><updated>2009-01-05T13:27:19.278-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Microsoft development, I will never forsake you</title><content type='html'>&lt;p&gt;Warning: The following post was originally posted to a development blog of mine, and is thus heavy on the programming jargon and ranting.&amp;#160; Feel free to ignore for your sanity's sake.&lt;/p&gt;  &lt;p&gt;For the past few weeks I've found myself jumping from one shiny project to the next.&amp;#160; I was enticed into trying game development using Silverlight, which I still regard as an exciting technology with lots of potential, but my heart just isn't in it.&amp;#160; If I targetted that platform, I'd be doing so out of pragmatism instead of passion; that is, I know there's a potential market there, but I wouldn't enjoy the work.&lt;/p&gt;  &lt;p&gt;My latest flavor-of-the-month project has been game development with the iPhone SDK, whose Kool-Aid I drank in one giant gulp.&amp;#160; The iPhone is amazing.&amp;#160; The interface is slick and intuitive; the app store is exciting and full of great (and not-so-great) apps with a promising revenue model for independent developers, and the development platform is... utter shit.&amp;#160; Without breaking the NDA (I hope), let me just say that just about everything about the iPhone development story is inferior to what Microsoft has to offer.&amp;#160; I don't claim to be an expert after only about a week of experience (albeit with many hours put in), but here are some gripes so far:&lt;/p&gt;  &lt;p&gt;1. First, there's the fact that you have to use MacOS to develop for the iPhone.&amp;#160; In my case, I'm borrowing my girlfriend's MacBook.&amp;#160; I would very much prefer to utilize my dual widescreen LCD monitors, but I realize that this complaint is circumstantial.&amp;#160; I'm sure that a savvy Mac user could navigate the MacOS with ease, but it's a struggle for me.&amp;#160; It would be nice if there were a Windows option &lt;em&gt;somehow&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;2. Second, I have to use XCode, Apple's free IDE.&amp;#160; I will be fair; for a free IDE, it's packed with decent features, and I can't really compare it to Visual Studio Express (another free IDE) given that the latter benefits from the features of the full versions of Visual Studio.&amp;#160; But it's still a &lt;strong&gt;giant step backwards&lt;/strong&gt;.&amp;#160; The syntax highlighting is overly subtle, the code completion guesses at what you're trying to type but doesn't pop up a list of options (at least not automatically).&amp;#160; I've yet to see a list of method overloads appear; you're at the mercy of your memory and the greatly-inferior-to-MSDN documentation, which lists all of an object's methods/properties in one long list.&amp;#160; There doesn't appear to be any sort of refactoring capability, though I can probably blame the language (which I'll get to soon enough).&amp;#160; The solution explorer equivalent is strikingly un-Apple-like, showing redundant information while lacking important information at a glance.&amp;#160; I've run into bugs in which error and warning markers in the code don't disappear even after you fix the errors. (I even deleted the offending code entirely and rebuilt with no luck).&amp;#160; &lt;/p&gt;  &lt;p&gt;3. Objective-C.&amp;#160; Oh my god.&amp;#160; Could Apple have picked a more obscure language?&amp;#160; Why not just stick to C or C++?&amp;#160; The syntax in objective C is unnecessarily arbitrary, with objects calling methods (or more specifically, &amp;quot;sending messages to call a method&amp;quot;) of the syntax:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;[object methodName]&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;(including the brackets.)&amp;#160; You can even (and are encouraged to) nest these calls, for optimal confusion:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;[object1 methodName:[object2 getSomething:[object3:getSomethingElse]]]&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;My favorite (sarcasm, in case it wasn't obvious) detail about methods is the parameter passing.&amp;#160; You see, a method signature is defined &lt;strong&gt;not&lt;/strong&gt; by its return type, name, and parameters, but rather &lt;strong&gt;just&lt;/strong&gt; its return type and parameters.&amp;#160; Read that again: Return type and parameters.&amp;#160; Something missing?&amp;#160; That's right, there's NO METHOD NAME.&amp;#160; Or more specifically, the method name IS the parameter list!&amp;#160; So, a hypothetical method to open a file read-only might be:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;[FileObject openFile:@&amp;quot;myfile.txt&amp;quot; readOnly:YES]&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Or an even better example:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;[MySpatialObject setPositionX:100 andY:120]&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;That's right, I can't have a method called &amp;quot;SetPosition&amp;quot;.&amp;#160; Instead, the method is technically called: &amp;quot;setPositionX:andY&amp;quot;.&amp;#160; Of course nobody would use the word &amp;quot;and&amp;quot; in a real-world parameter name, right?&amp;#160; GUESS AGAIN, it's &lt;em&gt;encouraged&lt;/em&gt;!&amp;#160; Method names are supposed to read like prose.&amp;#160; I am a strong advocate of longer method/parameter names for the sake of readability and avoiding obscurity, but there are much better solutions to this problem than this.&lt;/p&gt;  &lt;p&gt;And just as an extra kick in the nads, the standard coding conventions fly in the face of everything that modern, civilized software developers have evolved toward (e.g. curly braces on separate lines for the love of God, curly braces surrounding one-line if statements, non-cryptic class/variable names, etc.)&lt;/p&gt;  &lt;p&gt;Oh, did I mention that this language isn't strongly typed?&amp;#160; Enjoy.&lt;/p&gt;  &lt;p&gt;4. Interface Builder.&amp;#160; Fine, this relates to XCode, but it's bad enough to deserve its own category.&amp;#160; This is the GUI tool that creates...well, GUIs.&amp;#160; Hell, even Apple devs don't seem to like it.&amp;#160; It's again another ironic example of Apple's dev tools flying in the face of Apple's typical design philosophies.&amp;#160; This tool is completely unintuitive to use as opposed to Visual Studio's designers, involving all sorts of GUI elements that can be connected with lines as a way to graphically &amp;quot;wire up&amp;quot; events and relationships.&amp;#160; So much of what you'd expect (i.e. you click on a control in the visual designer and immediately see a context menu with this control's attributes and event wiring) just doesn't exist.&amp;#160; You have to dig through options to even see these things, and even when you find them, their function is not obvious.&amp;#160; Can the people who designed the iPhone interface please help out designing this tool as well?&lt;/p&gt;  &lt;p&gt;---&lt;/p&gt;  &lt;p&gt;There is much more to write about the iPhone dev woes but I'll save that for another post.&amp;#160; In general, if you want to know what the iPhone dev environment is like, use an iPhone for a week.&amp;#160; Then use a Windows Mobile phone the next week.&amp;#160; The extra pain you'll feel the second week is analogous to the pain you'll feel switching from the standard Visual Studio/C# environment to the iPhone's.&amp;#160; But at least in Windows Mobile's defense, it &lt;em&gt;does&lt;/em&gt; have extra features it's trying to pack in.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After working on iPhone development/learning for a few hours today, I worked a bit on my XNA Game Studio project.&amp;#160; It was an almost orgasmic experience.&amp;#160; It felt like the feeling you get right after stepping off a treadmill after a long run.&amp;#160; Suddenly you feel like superman, almost gliding along the floor effortlessly when you walk.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-28765285673996550?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/28765285673996550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=28765285673996550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/28765285673996550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/28765285673996550'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/08/microsoft-development-i-will-never_21.html' title='Microsoft development, I will never forsake you'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-8615896861765961776</id><published>2008-08-19T13:47:00.000-07:00</published><updated>2008-08-19T13:49:04.662-07:00</updated><title type='text'>Negative Friends</title><content type='html'>Here's a post from a former blog of mine that I felt was appropriate to post here:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;blockquote&gt;Over the past year or so, I've noticed that there are certain friends and acquaintances in my life who frequently get on my nerves.  That's okay, since friends can't always be expected to get along all the time.  But at some point, I've noticed, it becomes so bad that I find myself less happy on average with them in my life than I'd be without them.  Do you have friends like this?&lt;br /&gt;&lt;br /&gt;In my view, a friend is supposed to be more than a warm body that shares an interest with you.  A friend is supposed to be somewhat tolerant and non-judgmental.  They're someone you can talk to and confide in.  Looking over the friends I have now, I can only point out a few who exhibit these qualities.&lt;br /&gt;&lt;br /&gt;Most of my friends are largely ego-driven.  Some are always looking to one-up a story, put someone down (including me) in order to make themselves feel better about themselves, etc.  I can't relate to this.  One common example that's especially bothersome is this: When a friend of mine tells me an idea they have, my first instinct is to support them.  With my friends, most of them have the first instinct to slam the idea down.  Where does this come from?  How does anyone become that way?&lt;br /&gt;&lt;br /&gt;All of this is leading to my main point, which is that it seems that many if not most of my friends are a net negative force on my happiness.  While this is sad, I think it's at least good to identify this, because from here I can actually address the issue; cutting ties with negative friends and surrounding myself with positive ones.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Do you have friends like this in your life?  Have you done anything about it?&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-8615896861765961776?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/8615896861765961776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=8615896861765961776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8615896861765961776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8615896861765961776'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/08/negative-friends.html' title='Negative Friends'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-4725344203181400116</id><published>2008-08-11T01:38:00.001-07:00</published><updated>2008-08-11T21:21:50.452-07:00</updated><title type='text'>To create or to borrow</title><content type='html'>&lt;p&gt;I seem to always find myself working on game projects in spurts, often spread months apart.&amp;#160; Inevitably, by the time I've started a new project, technology has changed enough to warrant an investment in a newer, shinier codebase.&amp;#160; With this realization, I always face several questions: Do I use an engine, or just bake the engine into the specific game?&amp;#160; I almost always choose the former, but then comes the harder question: Do I write my own engine to be exactly what I want it to be, or do I borrow someone else's?&lt;/p&gt;  &lt;p&gt;In the past, I'd readily take on the challenge of creating my own game engine.&amp;#160; I've written dozens of sprite/animation libraries, several GUI systems, and a few 3D view management systems.&amp;#160; This process is invaluable and despite what your mentors may tell you, I'd recommend doing this at least at some point in your game-developing life.&amp;#160; The lessons learned are worth the effort, and you'll consequently approach third-party engines with much more insight into their motivations.&lt;/p&gt;  &lt;p&gt;But what inevitably gets me are the tool requirements.&amp;#160; If I'm creating any game of remotely significant scale, I'm going to need some sort of sprite editor, level editor, and animation editor at least.&amp;#160; It's not feasible to hard-code these assets anymore.&amp;#160; &lt;/p&gt;  &lt;p&gt;To this end, I've been re-exploring the &lt;a href="http://www.flatredball.com/frb/"&gt;Flat Red Ball&lt;/a&gt; engine, which has above average support (dare I say, &amp;quot;exceptional&amp;quot;), a sprite editor, an animation editor, and a particle effect editor to name a few.&amp;#160; It began as a Managed DirectX engine and evolved into an XNA Game Studio engine, with support for XNA Game Studio 2.0 as of this writing.&amp;#160; I have a healthy level of concern about the longevity of this engine, but my skepticism is tempered a bit by the fact that the creator has maintained this code for over two years straight with regular updates, and responds to forum posts and IMs promptly.&amp;#160; It seems to be a labor of love for him, and hopefully he'll see more from it in the future.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-4725344203181400116?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/4725344203181400116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=4725344203181400116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4725344203181400116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4725344203181400116'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/08/to-create-or-to-borrow.html' title='To create or to borrow'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-3293112232356067628</id><published>2008-08-03T03:27:00.001-07:00</published><updated>2008-08-03T03:27:58.570-07:00</updated><title type='text'>Getting chores out of the way</title><content type='html'>&lt;p&gt;I spent the past few hours throwing together a very bare-bones customer management app for the local coffee company, which should hold the owner for now.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/vargonian/SJWILL6o25I/AAAAAAAAAFQ/z3o0B0Q7yI0/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="271" alt="image" src="http://lh4.ggpht.com/vargonian/SJWILenRCFI/AAAAAAAAAFU/nmCMDSHIQgA/image_thumb%5B4%5D.png?imgmax=800" width="674" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There's lots of room for improvement, and this fact makes me thankful for &lt;a href="http://msdn.microsoft.com/en-us/library/t71a733d(VS.80).aspx"&gt;ClickOnce deployment&lt;/a&gt;.&amp;#160; It makes the patching process so much easier; it's almost dangerous how lazy it can allow developers to get (publishing garbage now with the intent to clean it up later).&amp;#160; I think the good far outweighs the potential bad, though.&lt;/p&gt;  &lt;p&gt;I look forward to the mountains of feature requests I receive.&amp;#160; Let's hope I get some time to work on my XNA Game Studio project between now and then.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-3293112232356067628?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/3293112232356067628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=3293112232356067628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3293112232356067628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/3293112232356067628'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/08/getting-chores-out-of-way.html' title='Getting chores out of the way'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/vargonian/SJWILenRCFI/AAAAAAAAAFU/nmCMDSHIQgA/s72-c/image_thumb%5B4%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-1890876458553562053</id><published>2008-08-02T19:12:00.000-07:00</published><updated>2008-09-22T23:06:23.993-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>So long DotNetNuke</title><content type='html'>My stint with DotNetNuke looks like it's coming to a close. I think DNN is fantastic, but I want to create a complete silverlight experience. Having remnants of Web 1.0 HTML floating around, contaminating my Rich Internet Application like dust on a diamond, just detracted from the user experience I seek.&lt;br /&gt;&lt;br /&gt;What does this mean work load wise? I know have to write a login WCF service. Apparently ASP.NET has a rich set a libraries for this, complete with Membership roles. So perhaps it won't be too painful, and I will be able to dictate exactly what I want from my user., instead of lazily requesting your First and Last Name just to keep DNN happy.&lt;br /&gt;&lt;br /&gt;Silverlight 100% here we come.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-1890876458553562053?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/1890876458553562053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=1890876458553562053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/1890876458553562053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/1890876458553562053'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/08/so-long-dotnetnuke.html' title='So long DotNetNuke'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-9146982203147701879</id><published>2008-07-29T00:33:00.001-07:00</published><updated>2008-07-29T00:33:52.421-07:00</updated><title type='text'>Obligations and Pleasures</title><content type='html'>&lt;p&gt;As the saying goes, &amp;quot;No Good Deed Goes Unpunished.&amp;quot;&amp;#160; I've offered my services to the local coffee shop I frequent, now realizing just how much of my free time I'm sacrificing when I could be working on more rewarding endeavors.&amp;#160; D-Roc will undoubtedly take this as some sort of excuse for why I'm not getting work done, which I will combat right this instant by saying that I &lt;em&gt;need&lt;/em&gt; no excuse; I fully admit that I am a slacker and often have a hard time finding motivation, and I never claimed otherwise.&amp;#160; He can continue to boast his glossy screen captures with pride, and the straw man he's attacking will continue to tremble in fear.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/vargonian/SI7H1ESb1bI/AAAAAAAAAEo/tSEAzyssgb0/image%5B6%5D.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="190" alt="image" src="http://lh3.ggpht.com/vargonian/SI7H1cj_2bI/AAAAAAAAAEs/TlqjxpQRLGY/image_thumb%5B2%5D.png" width="196" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Anyway, I found myself buried in &lt;a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation"&gt;WPF&lt;/a&gt; books and articles just to accomplish a simple customer management app.&amp;#160; Don't get me wrong; I intend to continue learning WPF but I'd rather devote my work time for this as opposed to my free time, which is better spent exploring &lt;a href="http://creators.xna.com/"&gt;XNA Game Studio&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;To this end, I've reduced the scope of my customer management app from a WPF app with databound database, to a Windows Forms app with a DataSet serialized to and from a big-ass XML file (though in fairness, given the size of the coffee shop, it's a relatively small-ass XML file).&amp;#160; These are all familiar technologies to me, so I shouldn't have to spend much time in R&amp;amp;D.&lt;/p&gt;  &lt;p&gt;On the topic of obligations versus pleasures, as I mentioned before I'm also continuing with XNA Game Studio.&amp;#160; I realize that I could reach a broader audience with a web game, but I just don't care.&amp;#160; The type of game I'd enjoy making is better suited for XNA GS.&amp;#160; And as &lt;a href="http://www.queasygames.com/"&gt;Jonathan Mak&lt;/a&gt; would say, if you're creating a game for someone else, how can you call yourself an indie?&amp;#160; (But let's be honest, I always have a mix of the player and myself in mind.)&amp;#160; Plus, the new &lt;a href="http://creators.xna.com/en-us/XboxLIVECommunityGames"&gt;Xbox LIVE Community Games&lt;/a&gt; system could, at least in theory, easily offset the lack of PR I'd suffer from if I tried to launch a web game from my own site.&amp;#160; Perhaps if a major web portal starts supporting Silverlight, it'd be a different story.&lt;/p&gt;  &lt;p&gt;My next post will cover some of the decisions I (or any indie dev) has to make when deciding on a technology.&amp;#160; Until then, not to be outdone by D-Roc, allow me to meet the bar by posting a screenshot of an all-but-empty window:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/vargonian/SI7H1lwlDwI/AAAAAAAAAEw/N7nM852ITiE/image%5B12%5D.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="191" alt="image" src="http://lh6.ggpht.com/vargonian/SI7H1-JkmTI/AAAAAAAAAE0/9xbNjDhpqrY/image_thumb%5B4%5D.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-9146982203147701879?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/9146982203147701879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=9146982203147701879' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/9146982203147701879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/9146982203147701879'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/07/obligations-and-pleasures.html' title='Obligations and Pleasures'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/vargonian/SI7H1cj_2bI/AAAAAAAAAEs/TlqjxpQRLGY/s72-c/image_thumb%5B2%5D.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-8131846068828640244</id><published>2008-07-27T20:10:00.000-07:00</published><updated>2008-11-19T11:35:26.696-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>DotNetNuke and Silverlight Chatter done!</title><content type='html'>I finally have a framework up for logins and other mundane albeit necessary web things. Using DotNetNuke, I will be having an optional login for my silverlight games. You can check out how to plug silverlight modules in DotNetNuke right here:&lt;br /&gt;&lt;a href="http://dnnsilverlight.adefwebserver.com/Silverlight20/tabid/65/Default.aspx"&gt;http://dnnsilverlight.adefwebserver.com/Silverlight20/tabid/65/Default.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I wanted to take a very minimalist approach, deferring most of the page space to the hosted silverlight module, rather than slamming my viewers with clumsy div boxes that seems to be standard for enterprise web pages. You can check it out below (ignore the placeholder silverlight button):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_B1bTw4pieO8/SI050koCzZI/AAAAAAAAABo/kVE1c5Xyl08/s1600-h/DnnPortal.jpg"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_B1bTw4pieO8/SI050koCzZI/AAAAAAAAABo/kVE1c5Xyl08/s400/DnnPortal.jpg" alt="" id="BLOGGER_PHOTO_ID_5227898317794626962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I custom skinned the Dnn portal which was extremely easy. Don't fall for the lazy trap and buy off-the-shelf skins, they tend to be garbage anyways. Here's a great site to learn how to skin Dnn sites:&lt;br /&gt;&lt;a href="http://www.dotnetnukerocks.com/tabid/3167/Default.aspx"&gt;http://www.dotnetnukerocks.com/tabid/3167/Default.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are just starting off, remember, only edit the .htm files. The "parse skin package" will generate the .ascx file for you to manipulate later. You'll know what I talk about after reading / watching the tutorial linked above.&lt;br /&gt;&lt;br /&gt;To get my silverlight app to benefit from the user login received by DotNetNuke, I pass the information as InitParams to the Silverlight module. I leaned away from marshalling data back and forth between JavaScript and Silverlight because of the added difficulty of doing this inside a DotNetNuke module. I might exploit that capability in the future, but for now, I'm just happy with a unique username that I can plug into my own database to create a personal gaming experience perhaps even across multiple games.&lt;br /&gt;&lt;br /&gt;As for my associate Vargo, he's been silent lately, probably waiting to have something substantial to show in his next post. Don't wait up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-8131846068828640244?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/8131846068828640244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=8131846068828640244' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8131846068828640244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/8131846068828640244'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/07/dotnetnuke-and-silverlight-chatter-done.html' title='DotNetNuke and Silverlight Chatter done!'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_B1bTw4pieO8/SI050koCzZI/AAAAAAAAABo/kVE1c5Xyl08/s72-c/DnnPortal.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-2881775665791050199</id><published>2008-07-19T09:27:00.000-07:00</published><updated>2008-11-19T11:35:00.827-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='redwhiteblue'/><title type='text'>Indecision in Game Design</title><content type='html'>Every week my game changes. This week, we're looking at Civilization meets Supreme Commander with a dash of Wall Street (in game stock ticker reflecting the game economy, stock purchasing incorporated in full force!). A game will be played simultaneously by at least ~40 players in their browser and last around a month. They log in every day or so and spend 30 minutes managing their country/state/corporations. The first chapter will be titled "Secession" and only contain the United States. I'm trying to limit the scope for the initial release while keeping the environment interesting. I don't know about you, but I've always wanted to invade Jersey.&lt;br /&gt;&lt;br /&gt;Keep posted for progress reports! My alpha will most likely by a single player game with no ai but a real time version of the game described above, to test out physics and game mechanics.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_B1bTw4pieO8/SIIlaOv2B5I/AAAAAAAAABg/hNOuqlik9gs/s1600-h/GlobalizationLogo.jpg"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_B1bTw4pieO8/SIIlaOv2B5I/AAAAAAAAABg/hNOuqlik9gs/s400/GlobalizationLogo.jpg" alt="" id="BLOGGER_PHOTO_ID_5224779650268792722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I would like to take a moment to apologize for the ramblings of Vargo. He's spamming his own blog with gibberish and making the whole site look pretty amateur. Maybe after he reads this, he'll clean it all up. I wish there was an option to view posts by author, if there is let me know. For now, to save you time, just look for posts by d-roc. Vargo's posts combined might produce one with substance. I hope this doesn't continue and again, sorry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-2881775665791050199?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/2881775665791050199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=2881775665791050199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2881775665791050199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/2881775665791050199'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/07/indecision-in-game-design.html' title='Indecision in Game Design'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_B1bTw4pieO8/SIIlaOv2B5I/AAAAAAAAABg/hNOuqlik9gs/s72-c/GlobalizationLogo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-5073703975814037982</id><published>2008-07-14T13:49:00.000-07:00</published><updated>2008-07-14T14:04:35.993-07:00</updated><title type='text'>My First WPF Application</title><content type='html'>While slowly trudging through &lt;a href="http://www.informit.com/store/product.aspx?isbn=0672328917"&gt;Windows Presentation Foundation Unleashed&lt;/a&gt;, I found a (hopefully) simple application that I can practice with. &lt;br /&gt;&lt;br /&gt;About a year ago I offered my programming services to a local coffee shop owner in order to practice my ASP.NET skills and hopefully score a lifetime supply of free coffee.  Unfortunately (or in hindsight, &lt;span style="font-style: italic; font-weight: bold;"&gt;extremely fortunately&lt;/span&gt;), the owner wasn't very interested in a web site. &lt;br /&gt;&lt;br /&gt;Fast forward a year later, and the owner is interested in a tool to manage his customer credits/tabs and punch card status (i.e. number of purchases until the next one is free).  This sounded like a perfect opportunity to over-engineer and practice some real-world application of WPF. &lt;br /&gt;&lt;br /&gt;I will be creating a simple GUI app with a &lt;a href="http://www.microsoft.com/sql/editions/compact/default.mspx"&gt;SQL Server 2005 Compact Edition&lt;/a&gt; database back-end to accomplish this goal.  I want to also experiment with minimalistic UI, trying to borrow from examples from Apple and counter-examples from Microsoft.  I want to try to minimize the "signal to noise ratio" of the app, if you will.  I still have a lot to learn about WPF, though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-5073703975814037982?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/5073703975814037982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=5073703975814037982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5073703975814037982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5073703975814037982'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/07/my-first-wpf-application.html' title='My First WPF Application'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-7588292554542838865</id><published>2008-07-13T01:28:00.000-07:00</published><updated>2008-07-28T03:03:38.044-07:00</updated><title type='text'>Reading Comprehension and Beyond</title><content type='html'>&lt;span style=";font-family:verdana;font-size:100%;"  &gt;You can clearly see from D-Roc's prior post that he missed the entire point of my previous post.  Namely, the blog was contingent upon his participation, and his willingness to participate (or in D-Roc's terms, his willingness to "take the first step"), was non-existent.&lt;br /&gt;&lt;br /&gt;His reading comprehension may need work, but despite this it's good to see D-Roc finally making blog posts, even if it took him a couple weeks to "take the initiative."&lt;br /&gt;&lt;br /&gt;Edit: I welcome the opportunity for this blog to serve a selfish secondary purpose of exposing common logical fallacies used in everyday life.  I expect D-Roc to be a veritable treasure trove, and he's off to a good start.  In D-Roc's last post, for example, we saw a clear example of a &lt;a href="http://www.nizkor.org/features/fallacies/straw-man.html"&gt;Straw Man&lt;/a&gt;:&lt;br /&gt;&lt;/span&gt;&lt;blockquote  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;"The Straw Man fallacy is committed when a person simply ignores a person's actual position and substitutes a distorted, exaggerated or misrepresented version of that position". &lt;/span&gt;&lt;/blockquote&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;Examine the following paragraph:&lt;br /&gt;&lt;/span&gt;&lt;blockquote  style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;"&gt;My cohert, Vargo, spoke endlessly of the ultimate blog, with promises of tutorials, vlogs, discussion boards, and the community that would come with it. What was the result, months after the vision? Nothing. The first step is the hardest, is this why he never takes it?&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;The underlying argument D-Roc is making: "Vargo promised a blog, etc. but didn't deliver, probably because he wasn't willing to take the first step."  Notice the false premise that D-Roc sneakily inserted.  He implies that I had intended to create a site independent of his participation, but as I blatantly spelled out in my previous posts, that was &lt;span style="font-style: italic;"&gt;never &lt;/span&gt;the intention.  Thus he's attacking a false argument, or... that's right, "straw man".  Here is where reading comprehension would have come in handy.&lt;br /&gt;&lt;br /&gt;Edit #2: Just to be clear, I never implied that I'm not lazy and unmotivated; just that D-Roc's argument holds zero weight.  You'll hear him criticize my lack of future action as evidence that he was correct, when in fact he's only verifying his straw man.  Common, tired tactic.  Move along, nothing to see here...&lt;br /&gt;&lt;/span&gt;&lt;blockquote style="font-family: verdana;"&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-7588292554542838865?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/7588292554542838865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=7588292554542838865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7588292554542838865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7588292554542838865'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/07/reading-comprehension-and-beyond.html' title='Reading Comprehension and Beyond'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-5711265299906152041</id><published>2008-07-12T11:23:00.000-07:00</published><updated>2008-09-22T23:05:17.243-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>Initiative and Beyond</title><content type='html'>There's a lot of talk out there with the promise of rich internet applications. Let me add to the pile of e-promises and tell you all right now what my purpose is: To put the &lt;span style="font-weight: bold;"&gt;BLING &lt;/span&gt;in rich internet applications. That's right, Bling. This blog will serve to document my adventures with Silverlight, something I'm equally excited and frustrated about. Excited, because it's a subset of WPF, and frustrated, because it's a ridiculously SMALL subset of WPF (No triggers! Seriously). There is already a very clean application that can be used with the Silverlight 2 beta 2 that you can find here: &lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;a href="http://www.farseergames.com/"&gt;http://www.farseergames.com/&lt;/a&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;My cohert, Vargo, spoke endlessly of the ultimate blog, with promises of tutorials, vlogs, discussion boards, and the community that would come with it. What was the result, months after the vision? Nothing. The first step is the hardest, is this why he never takes it? As is the norm, I took the liberty of relieving him of that step and created the page you are looking at now. Wow, action! Imagine that. I remember the last idea we had, another great one. Behold the glory of an internet multiplayer 3D platformer featuring shader instancing, shadow mapping, etc, which was code named Project Earnie:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_B1bTw4pieO8/SHptJNt1BVI/AAAAAAAAABY/mwxJFMeiLDU/s1600-h/ProjectEarnieLive.jpg"&gt;&lt;img style="cursor: pointer; width: 503px; height: 289px;" src="http://2.bp.blogspot.com/_B1bTw4pieO8/SHptJNt1BVI/AAAAAAAAABY/mwxJFMeiLDU/s400/ProjectEarnieLive.jpg" alt="" id="BLOGGER_PHOTO_ID_5222606722957641042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Who's idea was it? His. What did he do? Nothing. His sermons only yield inaction. But there is a hidden fruit to all this malice: He inspires me to be different. And so my disposition towards development has been cemented as: Don't talk, Do. I'll be sure to deliver something tangible within the next few months, mark my words.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;d-roc&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-5711265299906152041?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/5711265299906152041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=5711265299906152041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5711265299906152041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/5711265299906152041'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/07/initiative-and-beyond.html' title='Initiative and Beyond'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_B1bTw4pieO8/SHptJNt1BVI/AAAAAAAAABY/mwxJFMeiLDU/s72-c/ProjectEarnieLive.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-4480409228935017448</id><published>2008-07-07T08:40:00.000-07:00</published><updated>2008-07-07T13:24:02.206-07:00</updated><title type='text'>Blogs, Tutorials, and Beyond</title><content type='html'>As part of the grand blog idea, I wanted to include various coding tutorials, with the selfish goal of testing my own understanding and forcing me to learn things I don't (but want to) know.&lt;br /&gt;&lt;br /&gt;I've never been a fan of tutorials via blogs, though.  Don't get me wrong; if I Google a coding topic and find a blog post providing a tutorial, I'm certainly appreciative, but what if I want to browse all available tutorials by this person?  What, am I supposed to scroll through every story about this person's dog or new baby in order to find the occasional how-to article?  Of course not.  It's like we've taken a step backwards with this trend of tech professionals providing tutorials in blog posts.  What ever happened to the ability to browse?&lt;br /&gt;&lt;br /&gt;This is one of the reasons I didn't want to limit this site to a simple Blogger blog; I wanted to potentially have a browsable page of tutorials, vlog "episodes", or whatever the case may be.  Blogger may provide functionality to add widgets or whatever -- it seems to allow a lot of customization -- but then this brings up the issue of which web technology to use.  As far as I know, Blogger is based on PHP, and I'd rather Dimitri and I use ASP.NET (and I'm sure he'd agree).  I was researching several ASP.NET blogging/community site options prior to Dimitri "taking the initiative" and creating this site, and we may make the transition to one of these at some point in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-4480409228935017448?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/4480409228935017448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=4480409228935017448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4480409228935017448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/4480409228935017448'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/07/as-part-of-grand-blog-idea-i-wanted-to.html' title='Blogs, Tutorials, and Beyond'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-6994773283732163608</id><published>2008-06-28T17:33:00.000-07:00</published><updated>2008-06-29T13:01:26.973-07:00</updated><title type='text'>My Introduction</title><content type='html'>A couple months ago, wanting some motivation/inspiration for my coding projects, I decided that I wanted to create a blog with a coworker to document our software development efforts as well as our semi-informed opinions about various technologies, etc.  I figured it might be fun to also add an audio and/or video podcast, which has become so common these days.&lt;br /&gt;&lt;br /&gt;There's no shortage of software development blogs on the internet, but reading through these I often get lost or intimidated, feeling like a n00b due to my lack of knowledge of the subject being discussed.  But I also regularly encounter many newbie programmers who are just scratching the surface of professional software development, and I can imagine how intimidating it must be for &lt;span style="font-style: italic;"&gt;them&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Being stuck between these two groups, I find myself in a unique position to be a bridge between these classifications.  I can learn from the experts and will regularly read their blogs and listen to their podcasts, but I have a lot to offer newbies, and would likely be much more approachable than the alternative.  My co-author D-Roc can do the same, though he'd likely deny any hint of n00bness for his ego's sake.&lt;br /&gt;&lt;br /&gt;So it seemed natural that the primary audience for our blog/podcast besides ourselves would be these newbie developers, and I was set with the idea.  Whether or not we gained a huge following didn't matter so much, because one of the primary goals was self-motivation.  Thinking that my friend and coworker D-Roc would surely be on board, I approached him with the idea.&lt;br /&gt;&lt;br /&gt;"That sounds gay," D-Roc responded, all-too-familiarly.&lt;br /&gt;&lt;br /&gt;I may be embellishing a bit, because it's hard to keep track of whether he called an idea "gay" or "retarded" or just "stupid", but you get the jist.  He didn't like the idea at all.&lt;br /&gt;&lt;br /&gt;I pressed the issue in the weeks that followed, with no change in his response.  I didn't want to do this solo, because two people working together can feed off of each other's motivation.  It just wouldn't have the same dynamic without someone to bounce ideas off of.&lt;br /&gt;&lt;br /&gt;I had all but given up on the idea when one fateful day, in a far-too-common type of scenario, another coworker (a development lead) sent an email to the group with a link from a post at codinghorror.com.  In this post, Jeff Atwood writes a list of ways to improve one's coding skills.  One of the items was: "Write a blog."&lt;br /&gt;&lt;br /&gt;Not an hour later, D-Roc announced to me his brilliant idea: "I'm going to write a blog!  I think that's a really good idea!"&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;As I mentioned, I've encountered this scenario far too often in my life, in which someone else takes credit for embracing an idea that I all but force-fed down their throat previously. &lt;br /&gt;&lt;br /&gt;So, despite trying to get feedback from D-Roc about his preferred blogging site/technology/blog name for the past few weeks without any response devoid of the word "gay" or "retarded", that random email sparked D-Roc to create this Blogger account.  Further, he had the gall to claim that the reason "we" didn't have a blog was that I was incapable of initiating things, despite the fact that the creation of the blog was entirely contingent upon him accepting the idea, which he didn't until a few days ago.&lt;br /&gt;&lt;br /&gt;Needless to say, the name/host of this blog may likely change, but for now I have to settle with the mediocre amount of cooperation I have from D-Roc. &lt;br /&gt;&lt;br /&gt;Seriously, why do I code with this guy?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-6994773283732163608?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/6994773283732163608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=6994773283732163608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6994773283732163608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/6994773283732163608'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/06/my-introduction.html' title='My Introduction'/><author><name>Vargo</name><uri>http://www.blogger.com/profile/13679062624139257360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3788415011443104697.post-7651855621284425235</id><published>2008-06-25T11:37:00.001-07:00</published><updated>2008-09-22T23:05:30.117-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><title type='text'>WPF a must for Silverlight</title><content type='html'>If you're interested in Silverlight, be sure to learn WPF first. Or you could do everything backwards like me: traverse the logical tree and set Dependency Properties by hand in C# code (don't do it).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3788415011443104697-7651855621284425235?l=silverbling.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverbling.blogspot.com/feeds/7651855621284425235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3788415011443104697&amp;postID=7651855621284425235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7651855621284425235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3788415011443104697/posts/default/7651855621284425235'/><link rel='alternate' type='text/html' href='http://silverbling.blogspot.com/2008/06/birth.html' title='WPF a must for Silverlight'/><author><name>d-roc</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
