<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Spencer Uresk</title>
	<atom:link href="http://www.spenceruresk.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spenceruresk.com</link>
	<description>Random stuff from a software developer</description>
	<lastBuildDate>Sat, 03 Mar 2012 19:43:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>State of Authentication</title>
		<link>http://www.spenceruresk.com/2012/03/state-of-authentication/</link>
		<comments>http://www.spenceruresk.com/2012/03/state-of-authentication/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 04:35:10 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=64</guid>
		<description><![CDATA[I&#8217;ve been working on some new websites the past month or so, and one thing that has me second-guessing myself and generally wasting a bunch of time is authentication. Ever since I read Jeff Atwood&#8217;s post on this issue, I&#8217;ve been trying to figure out the ideal authentication setup for websites. Currently, I see 4 options: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on some new websites the past month or so, and one thing that has me second-guessing myself and generally wasting a bunch of time is authentication. Ever since I read <a href="http://www.codinghorror.com/blog/2010/12/the-dirty-truth-about-web-passwords.html">Jeff Atwood&#8217;s post</a> on this issue, I&#8217;ve been trying to figure out the ideal authentication setup for websites. Currently, I see 4 options:</p>
<p><strong>Classic username/password</strong></p>
<p>Pros:</p>
<ul>
<li>Fairly straightforward to implement.</li>
<li>Everyone is used to it.</li>
</ul>
<p>Cons:</p>
<ul>
<li>A fair amount of work (ie, a signup page, login page, reset password page, session handling, etc)</li>
<li>Forces your users to remember (or more likely, re-use) a password.</li>
<li>You put your users at risk if you don&#8217;t use good practices to manage passwords.</li>
<li>Since most users re-use login info across multiple sites, if they get compromised on one of those sites, and unauthorized user can access their account on your site and cause problems.</li>
</ul>
<p><strong>Facebook Authentication</strong></p>
<p>Pros:</p>
<ul>
<li>Easy to implement.</li>
<li>Easier for your users to gain access to your website.</li>
<li>A very large percentage of the internet has a Facebook account.</li>
<li>No risk of compromising your users.</li>
</ul>
<p>Cons:</p>
<ul>
<li>Not everyone has a Facebook account.</li>
<li>Those who do might not want to associate it with sites they use.</li>
<li>Frighteningly large numbers of Facebook accounts are compromised daily, meaning you can still face unauthorized use of your site.</li>
</ul>
<p><strong>Basic OpenID</strong></p>
<p>Pros:</p>
<ul>
<li>Doesn&#8217;t require your users to signup on your site.</li>
<li>Doesn&#8217;t compromise users if your database is compromised.</li>
</ul>
<p>Cons:</p>
<ul>
<li>Slightly more difficult to implement.</li>
<li>Can be unfriendly to non-technical users.</li>
</ul>
<p><strong>JanRain Engage (or similar service)</strong></p>
<p>Pros:</p>
<ul>
<li>Very easy to implement (I&#8217;ve implemented JanRain in half a dozen languages/platforms now, and it is incredibly easy).</li>
<li>Gives your users lots of options (ie, if you offer Google, Facebook, Twitter, Yahoo, LinkedIn, and Windows Live as options, chances are pretty high that any given user is going to use at least one of those).</li>
<li>Doesn&#8217;t compromise your users if your database is compromised.</li>
<li>No requirement for a user to signup on your site, but you can still get a lot of useful data in some cases (although relying on it probably isn&#8217;t a good idea).</li>
</ul>
<p>Cons:</p>
<ul>
<li>Expensive if you create a lot of sites with low revenue per user (JanRain starts at $10/month).</li>
<li>Giving your users a lot of options is nice, but for those who have accounts with a lot of the options you provide, it can be tricky to remember which one you used to signup for which sites.</li>
<li>Relying on a third-party for authentication can make your website unusable if there is a technical outage, they terminate their relationship with you, or they go out of business. There are ways to mitigate the last two, but they require a lot of work.</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>I&#8217;m still not sure of the best option when it comes to authentication. It is clear to me that requiring a unique (or pseudo-unique, since users tend to use the same login info for every site) login for each site on the internet is a broken paradigm, but the other solutions have drawbacks of their own. I used JanRain on my last 2 sites, and am generally very happy with it, but I am still fairly uneasy about relying on a third-party service to handle such a critical part of my websites.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2012/03/state-of-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ScalaCareers is back up</title>
		<link>http://www.spenceruresk.com/2012/02/scalacareers-is-back-up/</link>
		<comments>http://www.spenceruresk.com/2012/02/scalacareers-is-back-up/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 08:12:02 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[play]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=61</guid>
		<description><![CDATA[Just wanted to post a quick (and somewhat belated) note about some work I&#8217;ve been doing the past few weeks, putting my ScalaCareers.com website back up and adding some new features. Several years ago, I built it as an experiment with Lift. Then, some months ago, someone (there&#8217;s a really good chance it could have [...]]]></description>
			<content:encoded><![CDATA[<p>Just wanted to post a quick (and somewhat belated) note about some work I&#8217;ve been doing the past few weeks, putting my <a href="http://www.scalacareers.com/">ScalaCareers.com</a> website back up and adding some new features.</p>
<p>Several years ago, I built it as an experiment with <a href="http://www.liftweb.net/">Lift</a>. Then, some months ago, someone (there&#8217;s a really good chance it could have been me&#8230;) mistakenly shut down the VPS it was running on without realizing it. I tried to get the old codebase running again, but as it was depending on an old snapshot version of Lift, I couldn&#8217;t get it fixed very quickly, so I ended up deciding to rewrite it from scratch when I got some time.</p>
<p>This time around, I decided to build the site with <a href="http://www.playframework.org/2.0">Play 2.0</a>, which was a fun experience. I&#8217;ll try to find some time this week to post some of my experiences from that.</p>
<p><strong>Scala career outlook</strong></p>
<p>I think the outlook for Scala-related employment is much better now than when it was when I first built the site. While it may never replace Java, it certainly has enough traction now that it is going to stick around and be supported for a while, and more employers are starting to use it and look for developers who are familiar with it.</p>
<p><strong>New Authentication mechanism</strong></p>
<p>I&#8217;ve begun to look for ways to avoid forcing users to create a username and password for my sites. Not only is it annoying for me to create all the functionality related to it, but requiring users to remember yet another username and password and exposing them to further risk that their password (which they likely use for a lot of sites) may be compromised (even though I&#8217;ve always used pretty good password management practices) isn&#8217;t ideal either. I&#8217;m also not a fan of forcing users to use Facebook to login, like a lot of sites are these days &#8211; not everybody has a Facebook account, and not all of those who do want it tied to everything they do on the internet.</p>
<p>So, I&#8217;m experimenting with <a href="http://www.janrain.com/">JanRain</a>, which lets users choose from a handful of OpenID providers. In my case, I&#8217;m allowing &#8211; OpenID, Google, LinkedIn, Twitter, Facebook, and Yahoo. I realize that still probably doesn&#8217;t cover 100% internet users, but I hope it is close enough that it doesn&#8217;t scare people away. I realize this isn&#8217;t perfect, but I think a long-term migration path away from people having a login for every site is worth some work and short-term pain. Any feedback or thoughts on this is appreciated.</p>
<p><strong>Developer profiles</strong></p>
<p>I know there are a number of folks in the Scala community who want to find some contract or full-time work doing Scala development, but may not be aware of opportunities. So, I added a <a href="http://www.scalacareers.com/profiles">developer profile</a> section where developers who want to find work can post information about them and some links to show their ability (for example, it has sections to put your GitHub and StackOverflow accounts). This is pretty basic right now, but there is some potentially interesting functionality I want to work on if it looks like it is something people will use.</p>
<p>Feedback and suggestions are welcomed. Hopefully this site adds some value to the employment situation in the Scala community. If not, at least it was a good excuse to have some fun with Scala, Play 2.0, and MongoDB.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2012/02/scalacareers-is-back-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP DELETE requests that include a body</title>
		<link>http://www.spenceruresk.com/2011/11/http-delete-requests-that-include-a-body/</link>
		<comments>http://www.spenceruresk.com/2011/11/http-delete-requests-that-include-a-body/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 04:51:12 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=60</guid>
		<description><![CDATA[I&#8217;ve had an enjoyable time getting down into a lot of gritty details about HTTP over the past year or so as I&#8217;ve worked on some webservices and a HTTP client tool for OS X. Every month, it seems like, I learn a little more about it based on the way my users use my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had an enjoyable time getting down into a lot of gritty details about HTTP over the past year or so as I&#8217;ve worked on some webservices and a <a href="http://www.uresk.net/httpclient/">HTTP client tool for OS X</a>. Every month, it seems like, I learn a little more about it based on the way my users use my app.</p>
<p>This past month, over the course of a few weeks, I got several tickets stating:</p>
<blockquote><p>DELETEs are broken &#8211; they show as a POST on my server.</p></blockquote>
<p>I was a little concerned when the first one came in &#8211; something as simple as sending the correct verb shouldn&#8217;t be broken, but if it were, that was pretty bad. A quick test showed that DELETEs were, in fact, working. After requesting a saved .httpreq file, I quickly pinpointed the problem &#8211; DELETEs normally worked, but when a request body was present, they were magically turned into POSTs.</p>
<p>Further investigation revealed the problem to be in the library I use to actually assemble and send the HTTP requests (this behavior is actually present in a number of HTTP libraries, it turns out).W hile fixing the problem (version 1.0.6 contains the fix and should be available on the app store soon), I wondered &#8211; <strong>Is it valid to include a body with a DELETE request</strong>?</p>
<p>I spent a bunch of time reading through the <a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP specification</a>, and saw nothing that would indicate this situation was explicitly forbidden. In practice, however, a number of HTTP clients and servers seem to not approve &#8211; as I mentioned, a number of clients silently turn them into POSTs, and per this <a href="http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request">Stack Overflow thread</a>, a number of servers silently discard the body of a DELETE request.</p>
<p>Regardless of whether it is allowed, or how it is implemented by popular clients and serveres, I think it is a <strong>bad idea</strong> in general. If you are consuming a service, you don&#8217;t really have a lot of choice in the matter, but if you are creating one, I think you shouldn&#8217;t create DELETE services that require bodies. This is due to how inconsistently it is implemented, and the fact that it doesn&#8217;t make a lot of sense to include a body with a delete in the first place &#8211; a body is supposed to represent the entity, but you are deleting it, so why do you need to send it?</p>
<p>There are a few reasons I think folks may try to develop services that rely on a body being sent with the DELETE request, and I think there are better ways to accomplish them:</p>
<p><strong>1. To identify WHAT is to be deleted.</strong></p>
<p>This should be specified by the URI itself.</p>
<p><strong>2. To specify metadata about the delete request itself &#8211; for example, who deleted it or a comment related to the action.</strong></p>
<p>In most cases, a header is much more appropriate for these metadata fields.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/11/http-delete-requests-that-include-a-body/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ad supported vs $.99 &#8211; My experience</title>
		<link>http://www.spenceruresk.com/2011/09/ad-supported-vs-99-my-experience/</link>
		<comments>http://www.spenceruresk.com/2011/09/ad-supported-vs-99-my-experience/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 01:31:44 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[marketing]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=57</guid>
		<description><![CDATA[I love football, and I can&#8217;t tell you how excited I am that it is back on this week. I love playing fantasy football even more, and have even made an iPhone app for fantasy football drafts the past few years. This isn&#8217;t my day job, and I know I&#8217;ll never get rich doing it. [...]]]></description>
			<content:encoded><![CDATA[<p>I love football, and I can&#8217;t tell you how excited I am that it is back on this week. I love playing fantasy football even more, and have even made an iPhone app for fantasy football drafts the past few years.</p>
<p>This isn&#8217;t my day job, and I know I&#8217;ll never get rich doing it. My main goals are to get some more experience developing for iOS, earn back my expenses, and help pay for NFL Sunday Ticket.</p>
<p>Last year, my app was sold for $.99, and I made a small, but reasonable amount of money (something between $400-$500). This year, I decided to see what the results would be like if I offered it for free, but monetized it using advertising. At the last minute, I decided to make another version that cost $.99, but was identical except for the fact that it lacked ads &#8211; ads are sometimes kind of annoying, and as a user I&#8217;ll often opt to pay $.99 rather than deal with them.</p>
<p>Now that the fantasy football draft season is over, I thought it would be kind of interesting to take a look at the results. The limited shelf-life of this app (drafting season is at most 2 months long, and the average user won&#8217;t use it more than a few hours per year) makes a less than ideal case study for ad-supported vs paid, but I think there is some interesting data anyway. So, here is some stuff I learned from this:</p>
<p><strong>1) Free apps get downloaded way, way more than even $.99 apps</strong></p>
<p>This is obvious, of course, but the magnitude of the difference is worth pointing out. The free version of my app was downloaded <strong>11,450</strong> times, whereas the $.99 version was downloaded only <strong>239</strong> times.</p>
<p>My takeaway from this is, if you&#8217;re going to try to sell an app that is going to have free competitors, you&#8217;re really going to have to work hard to differentiate yourself from the free versions. Free apps are simply going to eat up the lion&#8217;s share of the market.</p>
<p><strong>2) But they don&#8217;t make nearly as much, per-user</strong></p>
<p>Those 11,450 downloads translated into several hundred thousand ad views, resulting in total revenue of <strong>$111.25</strong> for me. This is very slightly less than $.01 per download. The paid version brought in <strong>$167.34</strong> from its 239 downloads &#8211; despite having roughly 1/50th of the downloads, it actually out-earned the ad-supported version by ~$55.</p>
<p>I almost certainly made a lot less money this year by offering a free version supported by ads &#8211; if even 2% of the users who downloaded my free version would have shelled out $.99 for the paid version had it been the only option, I would have come out ahead.</p>
<p>Had this app been something people would use year-round, it might have worked out a little better.</p>
<p><strong>Lessons for next time</strong></p>
<p>Despite this not being the ideal outcome, I learned a few lessons from this. Your app has to be immensely popular to make any sort of worthwhile revenue from advertising. I don&#8217;t think niche apps or apps with limited lifespans are good candidates for ad-supported versions. Also, I think there are probably better ways to utilize a free app than just throwing ads on it.</p>
<p>Probably the best use of an ad-supported app is to use it to promote additional, paid functionality. You could do this through In-App Purchase or by selling a different version of the app altogehter. The important thing is to differentiate the two beyond just advertising &#8211; the paid version should also offer more features. I would have done something like this, but I given the short life-span of these apps and my late decision to offer both versions, I didn&#8217;t have time.</p>
<p>Going this route gives you a chance to use your likely more popular free download as an opportunity to promote the paid functionality. Just be careful to offer enough functionality in the free version to make it worth downloading &#8211; free apps that are utterly useless platforms to promote paid functionality get (rightly) harsh reviews in the app store.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/09/ad-supported-vs-99-my-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP Message basics, and POSTing form data in Graphical HTTP Client</title>
		<link>http://www.spenceruresk.com/2011/09/http-message-basics-and-posting-form-data-in-graphical-http-client/</link>
		<comments>http://www.spenceruresk.com/2011/09/http-message-basics-and-posting-form-data-in-graphical-http-client/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 04:08:25 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[http client]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=55</guid>
		<description><![CDATA[&#8220;The POST body isn&#8217;t working correctly! I add in something like name=spencer&#038;age=29, but the server doesn&#8217;t get the parameters. Please fix your program!&#8221; After a few support requests and 1 one-star review related to this issue, I figured it was at the very least worth a deeper explanation. If you&#8217;ve googled this and are just [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;The POST body isn&#8217;t working correctly! I add in something like name=spencer&#038;age=29, but the server doesn&#8217;t get the parameters. Please fix your program!&#8221;</p>
<p>After a few support requests and 1 one-star review related to this issue, I figured it was at the very least worth a deeper explanation. If you&#8217;ve googled this and are just looking for the answer here it is:</p>
<p><strong>You need to set the Content-Type header to &#8216;application/x-www-form-urlencoded&#8217;.</strong></p>
<p>That said, I think it is worth spending a few minutes to learn about HTTP messages and why this is required. Removing levels of abstraction and learning more about what is going on underneath makes you a better developer and is usually a lot of fun, too. This is a big part of the reason I&#8217;m giving up my evenings and weekends to go back to school for a CS degree.</p>
<p>Anyway, here is a quick primer on HTTP messages and why you have to add the header above&#8230;</p>
<p><strong>The HTTP message</strong></p>
<p>When you make an HTTP request, you&#8217;re connecting to an HTTP server at a given IP on a certain port and sending it a message. It then processes that message and gives you some sort of response.</p>
<p>What does that message look like? It consists of 3 parts:</p>
<blockquote><p>
<em>Request Line.</em> This tells the server what resource you&#8217;re looking for and what HTTP method (ie, one of GET, POST, PUT, DELETE, etc..) you are using. It also specifies the version of the HTTP protocol to use.<br />
<em>Headers.</em> These give metadata about the message, such as the Content-Type, the Host, what type of content you&#8217;ll accept, and a whole bunch of other things.<br />
<em>[CRLF]</em><br />
<em>Optional message body.</em>
</p></blockquote>
<p>So, for example, if you came to the homepage of my blog, your browser sent a message to my server that looked something like this:</p>
<blockquote><p>
GET / HTTP/1.1<br />
Host: www.spenceruresk.com<br />
[CRLF]
</p></blockquote>
<p>Pretty simple, right? Let&#8217;s look at a slightly more complex example. Let&#8217;s say I was hosting a Twitter-like service that allowed you to post status updates with simple HTTP POSTs. A request you&#8217;d send might look something like this:</p>
<blockquote><p>
POST /twitterClone/updateStatus HTTP/1.1<br />
Host: www.spenceruresk.com<br />
Content-Type: text/plain<br />
[CRLF]<br />
Check out this crappy cellphone pic I took at a concert!
</p></blockquote>
<p>In this case, we&#8217;re POSTing some data and telling the server what kind of content it is &#8211; in this case, it is just plain text. Pretty simple, right?</p>
<p><strong>Content-Type and message bodies</strong></p>
<p>One header in particular &#8211; Content-Type &#8211; is relevant to the issue and is worth talking about. When you send a message body, it can represent any number of types of data. For example, it could be plain text, a GIF, form data, or a JSON document. In order for the server to properly decode the body, you have to tell it what it is you&#8217;re sending it. The Content-Type header is how you do this. For a list of common MIME types, this <a href="http://en.wikipedia.org/wiki/Mime_type">Wikipedia</a> article is useful.</p>
<p><strong>Submitting forms</strong></p>
<p>So, what HTTP message is generated and sent to the server when a user submits a form in their browser? The answer is that it depends. If the form is submitted via GET request, the message would look something like this:</p>
<blockquote><p>
GET /signupform?name=Spencer&#038;age=29 HTTP/1.1<br />
Host: www.spenceruresk.com<br />
[CRLF]
</p></blockquote>
<p>Your web framework will then take the key/value pairs in the query string and make them available as request parameters.</p>
<p>What if it is a POST?</p>
<blockquote><p>
POST /signupform HTTP/1.1<br />
Host: www.spenceruresk.com<br />
Content-Type: application/x-www-form-urlencoded<br />
[CRLF]<br />
name=Spencer&#038;age=29
</p></blockquote>
<p>The Content-Type line is critical &#8211; it tells the server &#8220;I&#8217;m sending you URL-encoded form data in the message body.&#8221; Most/All web frameworks see that, then decode the body and make each key/value pair available as request parameters.</p>
<p>If you don&#8217;t tell it that you are sending URL-encoded form data, it doesn&#8217;t decode the body and make the parameters available.</p>
<p><strong>Conclusion</strong></p>
<p>Hope that helps make it at least a little bit clearer. In the next version of the app, I&#8217;m thinking about adding some sort of Content-Type autodetection (that you can turn off) to help avoid people getting confused and frustrated in situations like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/09/http-message-basics-and-posting-form-data-in-graphical-http-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphical HTTP Client 1.0.3 submitted to the App Store</title>
		<link>http://www.spenceruresk.com/2011/07/graphical-http-client-1-0-3-submitted-to-the-app-store/</link>
		<comments>http://www.spenceruresk.com/2011/07/graphical-http-client-1-0-3-submitted-to-the-app-store/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 04:29:03 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=49</guid>
		<description><![CDATA[Graphical HTTP Client has been in the app store for roughly 2 months now and has had a few updates, but I haven&#8217;t quite added as much as I&#8217;d original hoped to. I&#8217;ve been able to devote more time to it recently and have just submitted 1.0.3 to the App Store. If history is any [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.uresk.net/httpclient/">Graphical HTTP Client</a> has been in the app store for roughly 2 months now and has had a few updates, but I haven&#8217;t quite added as much as I&#8217;d original hoped to. I&#8217;ve been able to devote more time to it recently and have just submitted 1.0.3 to the App Store. If history is any indication, it should be available in roughly a week. I plan to submit 1.0.4 in the next few weeks and generally update the app more frequently over the next few months.</p>
<p>On a side note &#8211; I spent some time playing around with NoSQL technologies (Riak and MongoDB, specifically) over the weekend. One interesting thing about the current crop of NoSQL solutions is that many of them offer an HTTP interface. I found this tool to be quite handy when interacting with Riak and Mongo, and I&#8217;m now brainstorming ideas for making it even more useful for working with NoSQL solutions &#8211; I am kind of excited by some of the possibilities! If this interests you at all, please let me know what ideas you have.</p>
<h1>New Features in 1.0.3</h1>
<h2>1. Improved header entry</h2>
<p>Probably the worst thing about Graphical HTTP Client in its current state is the way you enter and update request headers. It works, but it is kind of clunky and some unexpected things can happen if you aren&#8217;t careful. It turns out, a table view isn&#8217;t the easiest thing to work with for this kind of data. In 1.0.3, I&#8217;ve modified it so that there is a new sheet for adding and updating headers. Clicking on the + button will bring up this sheet, which lets you pick from a list of header names. You can also enter your own if it is a non-standard header. To edit a header, just double-click on its entry in the table. It won&#8217;t let you save over another header, which was a problem with the old table (actually, it would sometimes lock up if you even tried).</p>
<p><a href="http://www.spenceruresk.com/wp-content/uploads/2011/07/header.png"><img src="http://www.spenceruresk.com/wp-content/uploads/2011/07/header.png" alt="" title="header" width="300" height="290" class="alignnone size-full wp-image-51" /></a></p>
<p>I think this is a much better interaction, and in future releases I&#8217;m going to make it even better. Here are some plans for this functionality for the next release:</p>
<p>- Documentation for standard headers, including example values.<br />
- Some form of auto-complete for values (for example, if you select &#8216;Accept&#8217; or &#8216;Content-Type&#8217;, we can give you a list of standard content types to choose from).</p>
<p>Also, double-clicking on a response header row will pop up a read-only sheet that shows the full header name and header value &#8211; this can be helpful if you are dealing with longer header values.</p>
<h2>2. New Options</h2>
<p>Above the &#8216;Request Headers&#8217; box, there is a new &#8216;Options&#8217; button. This will grow over time, but for now it has 4 options:</p>
<p>- Validate Certificates. True by default. This allows you to tell it to NOT validate SSL certificates, which can be handy if you are using self-signed or internal certificates for your sites/services.<br />
- Follow Redirects. True by default. Unchecking this will cause the tool to stop when it encounters a redirect.<br />
- Compress Request Body. False by default. If checked, this will compress the request body.<br />
- Allow Compressed Responses. False by default. If checked, this will allow the server to send GZIPped responses.</p>
<p>All of these options are scoped to the request and will be saved along with the request, so if you load it back up later, it will remember your options.</p>
<p><a href="http://www.spenceruresk.com/wp-content/uploads/2011/07/options.png"><img src="http://www.spenceruresk.com/wp-content/uploads/2011/07/options-300x106.png" alt="" title="options" width="300" height="106" class="alignnone size-medium wp-image-52" /></a></p>
<h2>3. Redirect Count</h2>
<p>This is a fairly trivial feature that shows you the number of times your request was redirected. In the future, I plan to record information (url and headers) about each redirect and provide a way for you to view that data, which could be helpful for diagnosing redirect issues.</p>
<h2>4. If the response is an image, it will show up instead of the text box</h2>
<p>If we can see that the response is an image (by looking at the content-type header), we&#8217;ll try to show it instead of the blank text view. Not a huge feature, but if you are ever loading images via the tool, it will save you from having to save the image and go to another program to view it.</p>
<p><a href="http://www.spenceruresk.com/wp-content/uploads/2011/07/images.png"><img src="http://www.spenceruresk.com/wp-content/uploads/2011/07/images-300x105.png" alt="" title="images" width="300" height="105" class="alignnone size-medium wp-image-53" /></a></p>
<h1>Bug Fixes</h1>
<p>1. Fixed an issue where the &#8216;Copy to Clipboard&#8217; functionality wouldn&#8217;t work properly in certain cases.<br />
2. Fixed an issue where sometimes old data hung around when you loaded a request from a file.</p>
<h1>What&#8217;s coming in 1.0.4</h1>
<p>1. The ability to upload binary data. This is something I badly wanted to get into this release, but it will for sure make it into the next one.<br />
2. More improvements to the header functionality, as mentioned above.<br />
3. Also as mentioned above, more information about redirects.<br />
4. The ability to set preferences for certain things.<br />
5. It will save your last X number of URLs, so you can re-use them easily.</p>
<h1>1.1 and beyond</h1>
<p>1. The #1 feature folks have requested is the ability to use OAuth integration. This is useful for working with services like Twitter.<br />
2. Better formatting for non-JSON responses.<br />
3. Color-coding for response bodies (ie, JSON and XML).<br />
4. The ability to paste in a CURL command and have it be parsed into the tool. This was suggested by someone on the <a href="http://support.uresk.net/">suggestion forum</a>, and once I went through the <a href="http://wiki.basho.com/The-Riak-Fast-Track.html">Riak tutorial</a>, I realized how handy it could be.</p>
<p>Thanks to everyone who uses this tool, has provided feedback, and left ratings/reviews on the app store. If you have feedback on how this tool could improve, don&#8217;t hesitate to let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/07/graphical-http-client-1-0-3-submitted-to-the-app-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nl2br example in ASP.NET MVC 3</title>
		<link>http://www.spenceruresk.com/2011/06/nl2br-example-in-asp-net-mvc-3/</link>
		<comments>http://www.spenceruresk.com/2011/06/nl2br-example-in-asp-net-mvc-3/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 22:59:03 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=48</guid>
		<description><![CDATA[I&#8217;ve been playing around with ASP.NET 3.5 this weekend, and am building my first real website with it. Much to my horror, as a long-time Java developer, I&#8217;m finding it to be incredibly delightful to work with. C# feels like a slightly-improved version of Java, the tooling is pretty good (even though I&#8217;m still not [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with ASP.NET 3.5 this weekend, and am building my first real website with it. Much to my horror, as a long-time Java developer, I&#8217;m finding it to be incredibly delightful to work with. </p>
<p>C# feels like a slightly-improved version of Java, the tooling is pretty good (even though I&#8217;m still not thrilled with the code editor in VS2010), the Razor syntax used in views is quite clean, and the whole thing is pretty easy to work with. It isn&#8217;t perfect, and I haven&#8217;t tried to go to production with my website yet, but all-in-all, it is a pretty good developer experience.</p>
<p>Working on my website this weekend, I ran into a problem that I &#8211; like probably every other web developer &#8211; have run into many times before: I needed to take some data that had line breaks in it and display it on a page, and somehow figure out how to convert those line endings into &lt;br&gt; tags. A lot of languages and frameworks have something built-in to handle this &#8211; PHP&#8217;s nl2br(), for example &#8211; but I couldn&#8217;t find anything in the documentation far ASP.NET MVC. This is a fairly trivial problem, but it is also a pretty common one and doing it wrong can lead to security problems, so I figured it was worth spending a few minutes figuring out the best way to do it and documenting it.</p>
<p>Doing some research, it seems like folks were recommending 2 main approaches to solving this:</p>
<p>1. Convert the line-endings to  &lt;br&gt;&#8217;s before saving the content to the database. I didn&#8217;t care for this because saving HTML into the database complicates Cross-Site Scripting (XSS) defense. It also makes it problematic if you later want to display that same content outside of HTML (for example, in a mobile phone app).</p>
<p>2. Call Replace(&#8220;\r\n&#8221;, &#8220;&lt;br&gt;&#8221;) on the string when displaying it. I don&#8217;t care for this either &#8211; it seems repetitive (I&#8217;m lazy &#8211; I hate having to do something once, much less 500 times), and even worse, since you have to use @Html.Raw() to display it, it can open you up to XSS attacks.</p>
<p>Thankfully, MVC&#8217;s Html Helpers and C#&#8217;s extension methods provide a way to come up with a relatively simple and robust solution. My requirements were:</p>
<p>1. It had to be easy to use.<br />
2. It had to protect against XSS attacks.<br />
3. It should probably try to take into account the fact that there are (naturally) a number of different ways to end a line: \r\n on Windows, \r on really old Macs, and \n just about everywhere else.</p>
<p>This is what it ended up looking like:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">static</span> Regex LineEnding <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Regex<span style="color: #008000;">&#40;</span><span style="color: #666666;">@&quot;(\r\n|\r|\n)+&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> MvcHtmlString Nl2br<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span> HtmlHelper html, <span style="color: #6666cc; font-weight: bold;">string</span> text, <span style="color: #6666cc; font-weight: bold;">bool</span> isXhtml <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
  var encodedText <span style="color: #008000;">=</span> HttpUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">HtmlEncode</span><span style="color: #008000;">&#40;</span>text<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
  var replacement <span style="color: #008000;">=</span> isXhtml <span style="color: #008000;">?</span> <span style="color: #666666;">&quot;&lt;br /&gt;&quot;</span> <span style="color: #008000;">:</span> <span style="color: #666666;">&quot;&lt;br&gt;&quot;</span><span style="color: #008000;">;</span>
  <span style="color: #0600FF; font-weight: bold;">return</span> MvcHtmlString<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span><span style="color: #008000;">&#40;</span>LineEnding<span style="color: #008000;">.</span><span style="color: #0000FF;">Replace</span><span style="color: #008000;">&#40;</span>encodedText, replacement<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>And here is how you&#8217;d use it:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">@Html<span style="color: #008000;">.</span><span style="color: #0000FF;">Nl2br</span><span style="color: #008000;">&#40;</span>@Model<span style="color: #008000;">.</span><span style="color: #0000FF;">Description</span><span style="color: #008000;">&#41;</span></pre></div></div>

<p>And here are a few tests for good measure:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>TestMethod<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> TestCRLF<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var input <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello<span style="color: #008080; font-weight: bold;">\r</span><span style="color: #008080; font-weight: bold;">\n</span>World!&quot;</span><span style="color: #008000;">;</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> result <span style="color: #008000;">=</span> MyHelpers<span style="color: #008000;">.</span><span style="color: #0000FF;">Nl2br</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, input<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToHtmlString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var expected <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello&lt;br /&gt;World!&quot;</span><span style="color: #008000;">;</span>
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span>expected, result<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&#91;</span>TestMethod<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> TestLF<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var input <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello<span style="color: #008080; font-weight: bold;">\n</span>World!&quot;</span><span style="color: #008000;">;</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> result <span style="color: #008000;">=</span> MyHelpers<span style="color: #008000;">.</span><span style="color: #0000FF;">Nl2br</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, input<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToHtmlString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var expected <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello&lt;br /&gt;World!&quot;</span><span style="color: #008000;">;</span>
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span>expected, result<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&#91;</span>TestMethod<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> TestNonXhtmlOnOldMac<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var input <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello<span style="color: #008080; font-weight: bold;">\r</span>World!&quot;</span><span style="color: #008000;">;</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> result <span style="color: #008000;">=</span> MyHelpers<span style="color: #008000;">.</span><span style="color: #0000FF;">Nl2br</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, input, <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToHtmlString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var expected <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello&lt;br&gt;World!&quot;</span><span style="color: #008000;">;</span>
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span>expected, result<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&#91;</span>TestMethod<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> TestXSS<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var input <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello<span style="color: #008080; font-weight: bold;">\n</span>World!<span style="color: #008080; font-weight: bold;">\r</span><span style="color: #008080; font-weight: bold;">\n</span>Special Message: &lt;script&gt;alert('pwned!');&lt;/script&gt;&quot;</span><span style="color: #008000;">;</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> result <span style="color: #008000;">=</span> MyHelpers<span style="color: #008000;">.</span><span style="color: #0000FF;">Nl2br</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, input<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToHtmlString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var expected <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello&lt;br /&gt;World!&lt;br /&gt;Special Message: &amp;lt;script&amp;gt;alert(&amp;#39;pwned!&amp;#39;);&amp;lt;/script&amp;gt;&quot;</span><span style="color: #008000;">;</span>
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span>expected, result<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>A few notes:</p>
<p>- You&#8217;ll note that we HtmlEncode the raw text first, then replace the line breaks with &lt;br&gt; tags. This is so that any potentially malicious user-supplied content gets escaped, but our HTML doesn&#8217;t.<br />
- If the page you are working with is XHTML, the &lt;br&gt; tags should be self-closing. I&#8217;ve made this the default in this case, but you could pass in false to denote that they shouldn&#8217;t be self-closing.<br />
- It is worth noting that you can&#8217;t pass dynamic parameters (such as ViewBag.Message) into an extension method, so you&#8217;ll have to explicitly cast them to a string.<br />
- I&#8217;m quite new to C# and the .NET platform, so any comments or criticisms about this approach are certainly welcome.</p>
<p>Anyway, extension methods make it pretty easy to create your own HTML helpers &#8211; I&#8217;ve already ended up making handful of them to save time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/06/nl2br-example-in-asp-net-mvc-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Patent Insanity &#8211; When will it end?</title>
		<link>http://www.spenceruresk.com/2011/06/software-patent-insanity-when-will-it-end/</link>
		<comments>http://www.spenceruresk.com/2011/06/software-patent-insanity-when-will-it-end/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 04:25:40 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=46</guid>
		<description><![CDATA[I&#8217;ve been sick today, and so I&#8217;ve been laying in bed watching TV and using my iPad for most of the day. As I sat there, I couldn&#8217;t help thinking &#8220;I&#8217;m so grateful for the brilliant insight and tireless effort of Dan Abelow, who has made it possible for me to take my railroad baron [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been sick today, and so I&#8217;ve been laying in bed watching TV and using my iPad for most of the day. As I sat there, I couldn&#8217;t help thinking &#8220;I&#8217;m so grateful for the brilliant insight and tireless effort of <a href="http://www.lodsys.com/the-inventor.html">Dan Abelow</a>, who has made it possible for me to take my railroad baron skills in Ticket to Ride to the European theater, by way of In App Purchase.&#8221;</p>
<p>Actually, though, I did read <a href="http://www.avc.com/a_vc/2011/06/enough-is-enough.html">Fred Wilson&#8217;s blog post</a> on how the current patent system, abused more and more by lowly patent trolls, is a threat to innovation.</p>
<p>This isn&#8217;t a new problem &#8211; I&#8217;ve had discussions about the problems with software (and business process) patents over a decade ago, and even then it probably wasn&#8217;t new. What is changing, however, is the willingness of patent trolls to go after smaller and smaller businesses, and the fact that technology is so much more a part of every day life for everyone today.</p>
<p>Before, patent suits were largely behind-the-scenes affairs between big companies that resulted in boring settlements or cross-licensing agreements. Or, as I&#8217;ve seen firsthand, the threat of patent lawsuits prevented small startups from receiving financing. Unfair and a huge impediment to innovation? Yes. Exciting and interesting to the average American citizen? Not really.</p>
<p>But as actions like the Lodsys suit against mobile apps that utilize in app purchasing become more common, the effects of a horribly-implemented patent system, abused by unscrupulous patent trolls like Lodsys, has the potential to affect the every-day lives of your average person &#8211; and perhaps shed some more light on the problem.</p>
<p><strong>The scope of the Problem</strong></p>
<p>The scope of the problem with software patents isn&#8217;t obvious at first, but it is an important part of realizing why they are such a threat to innovation and economic growth. Let&#8217;s go through a short little exercise -</p>
<p>Grab your smartphone or tablet if you have one. Scroll through the pages and pages of apps you&#8217;ve downloaded. Pop open your browser and look through the bookmarks and history items that contain all of your favorite websites. Look through the list of applications listed on your computer.</p>
<p>What do all of these have in common? The vast majority (if not all) of them violate one or more  patents. Indeed, any marginally non-trivial app, service, or website probably violates dozens of patents.</p>
<p>Who are these people who have been providing you with applications or services chock-full of patent violations? Are they hardened criminals, numb to the harm they cause others? Or, are they shameless copycats who copy whatever they can find? Or, perhaps, they are hackers who&#8217;ve used their computer skills to steal secret designs from competitors?</p>
<p>None of the above. Most patents (especially the ones used by patent trolls) don&#8217;t exist as an implemented product, a documented library one can buy, or anything of that nature. They exist solely as one of millions of software patents filed with the PTO, written in legalese so heavy you or I would have a hard time knowing what they are describing.</p>
<p>Figuring out which patents your technology violates is so expensive and time consuming that it is effectively impossible for any small or medium business.</p>
<p>Think about that for a minute. Every small business that creates a technology product or service is sitting on dozens of bombs, any one of which can kill it. How is that fair? How is that good policy for promoting innovation and economic growth?</p>
<p><strong>The worst kind of tax</strong></p>
<p>When it comes to talking about economic growth (or lack thereof), it is hard to get very far without talking about the economic impact of taxes. Patents are a form of a tax, but they are the very worst kind of tax &#8211; a tax that is unpublished, seemingly random, and can wipe out your business.</p>
<p>The worst part is that for many of the small victims of these patent trolls, there is very little that can be done to fight this government-enforced monopoly &#8211; the very act of defending themselves will at worst case leave them bankrupt, and at best case cost countless hours and tens of thousands (at the very least) of dollars merely to continue to be able to exist.</p>
<p>It isn&#8217;t a bad business model &#8211; document some basic and broad idea, wait for others to come up with and implement the same idea, then sue them for a percentage of the profits.</p>
<p><strong>Arguments for the patent system</strong></p>
<p>There are lots of arguments for some form of a patent system. The main one is that if I think someone is going to steal my idea (which presumably took a lot of work to come up with), then I won&#8217;t bother coming up with new stuff because it will be hard for me to make money off of my work.</p>
<p>As a society that very highly values competition, we are willing to effectively kill competition by granting a monopoly on an idea in exchange for the value of someone coming up with it. This requires 2 things to be true &#8211; 1) Your &#8216;idea&#8217; must be genuinely novel and take a lot of investment to come up with, and 2) The only way you were willing to invest in coming up with the idea was if you were granted a temporary monopoly on it.</p>
<p>A government-enforced monopoly is a pretty drastic &#8211; and potentially harmful &#8211; thing, so if we are going to buy into that concept we&#8217;d better be getting a lot out of it. As I&#8217;ll try to explain in the next few sections, I don&#8217;t think we are getting even close to enough out of the deal (at least with regards to software patents) to make it worth the cost.</p>
<p><strong>Necessity, the mother of invention</strong></p>
<p>Software development, as a profession, is largely about coming up with solutions to problems. For a given problem, there are generally only a handful of reasonable ways to solve it, and developers independently working on a similar problem will likely come up with generally similar solutions.</p>
<p>If you were to get 100 developers who were ignorant of the Lodsys patents (which, until Lodsys began firing off lawsuits, could have been pretty much any developer) and tell them you need to be able to sell expansions of your game to your users, and give them each an afternoon to come up with a rough solution, you&#8217;d likely get back ideas that could be grouped into half a dozen or so similar distinct ideas. Of those half-dozen distinct approaches, at least a few of them would probably violate the Lodsys patents.</p>
<p>The fact is that most of us solve similarly-difficult problems on a consistent basis &#8211; it is part of our job, and it is part of the reasons software developers are compensated somewhat more than average. The business side of the organization comes to us and says &#8220;We need to be able to do X.&#8221; So, we sit in front of a whiteboard for an hour or whatever, and then start implementing it.</p>
<p>Most of us don&#8217;t think &#8220;Hey, that&#8217;s a good idea! I should write my name on it and send it to the PTO so nobody else can do that without my blessing.&#8221; If we&#8217;re nice enough (and/or our egos are big enough), we&#8217;ll even write about it so others can use our idea.</p>
<p>Some people, however, feel like every idea they come up with is special and that nobody else should be able to do something like it unless they first pay for a license. Those people are assholes.</p>
<p><strong>The cost of an idea</strong></p>
<p>When I look at patents involved in some of these lawsuits, one thing almost always jumps out at me &#8211; once you get past all the lawyer-speak and understand what the patent is describing, it becomes clear that there wasn&#8217;t a lot of work involved in coming up with the idea. In fact, I wouldn&#8217;t be shocked to find that the effort to file the patent significantly outweighed the effort in coming up with the original idea.</p>
<p>If your patent is for a medication that your company spent years of effort and billions of dollars to research and produce, I can get behind patenting it. If your software patent describes something I wrote in High School using Perl, I&#8217;m going to have a hard time accepting your idea as a patentable one.</p>
<p><strong>Counterpoint: Open Source Software</strong></p>
<p>Open sourcing your software is pretty much the opposite of patenting it &#8211; rather than claim a monopoly on my idea, I&#8217;m going to go to great lengths to give it away to others so they can use it. It is a powerful counterpoint to the argument that patents foster innovation.</p>
<p>Go back to the original exercise I had you do earlier. Now consider this &#8211; all of those apps, services, and websites most likely rely heavily on open-source software (yes, even iOS uses plenty of open-source components). This simple blog relies heavily on open-source: The software used is WordPress &#8211; an open-source blogging platform, which is written in PHP &#8211; an open-source programming language. The content is stored in mySQL &#8211; an open-source database. All of it is running on Linux &#8211; an open-source operating system. To write this post, I&#8217;m using Chrome &#8211; an open-source web browser, which is running on Mac OS X &#8211; an operating system that relies heavily on open-source components.</p>
<p>Even you &#8211; one of my 3 or 4 readers &#8211; are almost certainly utilizing a wide array of open-source software to view this post.</p>
<p>The fact that open-source software plays such a pivotal role in everything we do is clear, convincing evidence to me that we can have invention and innovation on a breathtakingly large scale without the need to patent every idea we come up with.</p>
<p><strong>The &#8216;small inventor&#8217; myth</strong></p>
<p>The final defense patent supporters like to throw out is a hypothetical one &#8211; patents are needed to help the small inventor who has his ideas ripped off by a big, evil corporation. I have to ask &#8211; how many times has a small inventor &#8216;invented&#8217; some software and successfully used a patent to keep a big corporation from stealing it? We have a long history of patent trolls abusing software patents, but have we ever seen someone legitimately use one in this way? I haven&#8217;t.</p>
<p><strong>Conclusion</strong></p>
<p>So, to summarize &#8211; most software patents encapsulate something that an average developer could reasonably come up with on their own, are overly broad, and don&#8217;t typically represent a large amount of investment. The people at the PTO should hate themselves for approving them. Even worse &#8211; patents don&#8217;t even seem to be required to get people to innovate and invent new software. So why are we continuing to allow them?</p>
<p>A lot of people talk about half-measures that could be used to improve the patent system, while still allowing software patents &#8211; and a lot of the ideas are decent, but come with their own set of drawbacks.</p>
<p>The real thing that scares me, though, is the fact that much of the damage has already been done. Millions of incredibly simple, overly broad software patents already litter the landscape &#8211; much like how cluster bombs and land mines make an area unsafe even long after the conflict has been resolved. Even if we were to stop issuing software patents immediately, the ones already issued are broad enough to hinder innovation for the next decade.</p>
<p>How will we get out of this mess we&#8217;ve allowed to happen? I don&#8217;t know. But like Fred Wilson said, enough is enough. At some point, this madness has to end.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/06/software-patent-insanity-when-will-it-end/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Mac OS X app released &#8211; Graphical Http Client</title>
		<link>http://www.spenceruresk.com/2011/05/new-mac-os-x-app-released-graphical-http-client/</link>
		<comments>http://www.spenceruresk.com/2011/05/new-mac-os-x-app-released-graphical-http-client/#comments</comments>
		<pubDate>Sun, 01 May 2011 04:40:50 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=40</guid>
		<description><![CDATA[I&#8217;m a huge fan of the app store model that has sprung up over the past few years, and I Apple&#8217;s introduction of the iPhone App Store may have been more influential than the iPhone itself. Part of the reason I like it so much is that I think it is a good business model, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a huge fan of the app store model that has sprung up over the past few years, and I Apple&#8217;s introduction of the iPhone App Store may have been more influential than the iPhone itself. Part of the reason I like it so much is that I think it is a good business model, but it also brings back memories of my Dad and I making applications and sharing them via CompuServe and AOL message boards when I was in Jr High. It is pretty cool to build something that entertains or helps thousands of people across the world (and make a few bucks to fuel your computer habit in the process!)</p>
<p>Nostalgia aside &#8211; I&#8217;ve released a new Mac (desktop) app to the Mac App Store called &#8216;Graphical Http Client&#8217;. This is a developer tool aimed at helping developers test and interact with REST-based services. Typically, when experimenting with or testing these services, you&#8217;ll use a command-line tool (like curl), access it with your browser (if it is a really simple GET request), or write tests to work with these services. My software aims to make this interaction somewhat easier. Some features include:</p>
<p>- Perform any HTTP method (GET, POST, PUT, DELETE, etc..)<br />
- Ability to set request headers<br />
- Ability to set authentication (Basic or Digest)<br />
- When you perform the request, you&#8217;ll see the HTTP status code, how long the request took, the response headers, and the response body<br />
- Nice formatting for requests that return JSON<br />
- Ability to view HTML responses in a web view<br />
- You can save the response body as a file (useful for when it returns binary data like an image)<br />
- You can also save your requests and open them up later to save time<br />
- Plus a bunch of other stuff</p>
<p>You can view it on my website <a href="http://www.uresk.net/httpclient/">here</a>, or directly on the <a href="http://itunes.apple.com/us/app/graphicalhttpclient/id433095876?mt=12&amp;ls=1">Mac App Store</a>.</p>
<p>If you do download it, please leave feedback in the App Store and/or at my <a href="http://support.uresk.net/">User Voice</a> site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/05/new-mac-os-x-app-released-graphical-http-client/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>5 good books I&#8217;ve read this past year</title>
		<link>http://www.spenceruresk.com/2011/04/5-good-books-ive-read-this-past-year/</link>
		<comments>http://www.spenceruresk.com/2011/04/5-good-books-ive-read-this-past-year/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 08:40:31 +0000</pubDate>
		<dc:creator>Spencer Uresk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.spenceruresk.com/?p=38</guid>
		<description><![CDATA[I&#8217;m a huge fan of reading &#8211; especially science and history books &#8211; and I don&#8217;t even want to know how much money I&#8217;ve spent at Amazon.com and Barnes and Noble over the years. I&#8217;ve read (or, in some cases, re-read) a number of really good books over the past year or so, and wanted [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a huge fan of reading &#8211; especially science and history books &#8211; and I don&#8217;t even want to know how much money I&#8217;ve spent at Amazon.com and Barnes and Noble over the years. I&#8217;ve read (or, in some cases, re-read) a number of really good books over the past year or so, and wanted to share them along with some short notes about what liked or thought about them.</p>
<p><strong>1. <a href="http://www.amazon.com/gp/product/0307885151/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0307885151">A Short History of Nearly Everything</a> by Bill Bryson</strong></p>
<p>A Short History of Nearly Everything is a fun examination physics, chemistry, biology, and general science. The book is quite enjoyable to read and Bill Bryson is quickly becoming one of my favorite authors (<a href="http://www.amazon.com/gp/product/0767919394/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0767919394">Life at Home: A Short History of Private Life</a> is another book of his that I recently read and really enjoyed).</p>
<p>One major theme that stands out is just how tenuous our existence on Earth is. Consider this quote:</p>
<blockquote><p>&#8220;To appreciate just how narrow, you have only to look at Venus. Venus is only twenty-five million miles closer to the Sun than we are. The Sun&#8217;s warmth reaches it just two minutes before it touches us. In size and composition, Venus is very like Earth, but the small difference in orbital distance made all the difference to how it turned out. It appears that during the early years of the solar system Venus was only slightly warmer than Earth and probably had oceans. But those few degrees of extra warmth meant that Venus could not hold on to its surface water, with disastrous consequences for its climate.&#8221;</p></blockquote>
<p>The book is full of examples of how tiny changes to one of a number of variables result in us not being here &#8211; a truly humbling notion. If you are looking for a fun, easy to read introduction to a great deal of interesting science, this book is worth picking up &#8211; I got the illustrated version for my Dad for his birthday, and he&#8217;s been enjoying it as much as I did.</p>
<p><strong>2. <a href="ttp://www.amazon.com/gp/product/1416542108/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1416542108">1776</a> (Illustrated Edition) by David McCullough</strong></p>
<p>David McCullough has written a number of well-researched, interesting historical books. My interest in his work was kicked of by 1776, which examines the military side of the beginning of the founding of our country.</p>
<p>Calling this new version of 1776 &#8220;Illustrated&#8221; is selling it a bit short &#8211; there are indeed a lot of interesting illustrations, but it also includes a number of sealed pouches that contain maps, letters, and historical articles that help bring the most important year of our country to life. McCullough&#8217;s writing also has a way of bringing the main cast of characters in the revolution to life.</p>
<p>Much like Bryson shows us how fragile our very existence is, McCullough shows us how victory in our fight for independence was never assured and was often close to failing, only sustained by unlikely and lucky events &#8211; Washington&#8217;s crossing of the East River, aided by a fortuitous fog comes to mind.</p>
<p>1776 is a great read, and the documents that accompany the illustrated edition make it come alive even more.</p>
<p>Other books from David McCullough I&#8217;ve really enjoyed: <a href="http://www.amazon.com/gp/product/067145711X/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=067145711X">The Great Bridge</a> &#8211; a history of the Brooklyn Bridge and the men who built it. <a href="http://www.amazon.com/gp/product/0671869205/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0671869205">Truman</a> &#8211; A look at an unlikely president who oversaw a lot of important events in American history.</p>
<p><strong>3. <a href="http://www.amazon.com/gp/product/0375412026/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0375412026">American Prometheus: The Triumph and Tragedy of J. Robert Oppenheimer</a> by Kai Bird and Martin J. Sherwin</strong></p>
<p>I have a huge interest in World War II history, and I&#8217;m also interested in science and technology, so this book about Oppenheimer seemed like it would be a good read. I found the book to be an interesting look at Oppenheimer&#8217;s life, the development of the atomic bomb, and the terrible way in which he was treated after the war.</p>
<p>I find it somewhat disgraceful the way the western allies treated some of their scientists after the war &#8211; these were men who applied their genius to hasten the end of the war and undoubtedly save millions of lives. Oppenheimer and many of his fellow Manhattan project scientists became casualties of McCarthyism. Alan Turing, the British scientist instrumental in breaking German ciphers and an important figure in the history of computer science, was relentlessly persecuted for being a homosexual and eventually committed suicide in 1954 (Britain issued an official public apology for this in 2009).</p>
<p>Interestingly, Truman is portrayed somewhat less charitably in this book than in McCullough&#8217;s &#8220;Truman&#8221; &#8211; as Oppenheimer is dealing with feelings of guilt about developing the atomic bomb, Truman (who ultimately approved its use) grows impatient with him, perhaps dealing with his own feelings about it.</p>
<p><strong>4. <a href="http://www.amazon.com/gp/product/0743270754/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0743270754">Team of Rivals</a> by Doris Kearns Goodwin</strong></p>
<p>This year marks the 150th anniversary of the start of the Civil War, and perhaps no single individual is more central to this period of history than Abraham Lincoln. Team of Rivals concentrates on Lincoln&#8217;s relationships with important members of his cabinet &#8211; Seward, Bates, Chase, and Stanton &#8211; who were once his bitter political enemies. Unlike many political and business leaders who surround themselves with yes-men, Lincoln recognized the intelligence and usefulness of his political rivals (who, for the most part, had little respect for him at the time) and included them in his cabinet, knowing full-well they would challenge him.</p>
<p>Team of Rivals shows the intelligence and shrewdness of Lincoln, and how he eventually earned respect and friendship from his former enemies.</p>
<p><strong>5. <a href="http://www.amazon.com/gp/product/0767911792/ref=as_li_ss_tl?ie=UTF8&amp;tag=uresknetworks&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0767911792">Conspiracy of Fools</a> by Kurt Eichenwald</strong></p>
<p>Greed, corruption, and incompetence have been major components of corporate america and wall street for the last few decades, and I really enjoy books that go into the details of some of our biggest scandals. Conspiracy of Fools takes a look at one of the more infamous scandals &#8211; Enron.</p>
<p>Eichenwald tells a fascinating story about what went on at Enron, and how the company was ultimately ruined by greedy executives who did anything they could to make more money. The large amount of research that went into Conspiracy of Fools is evident, as is some of the bias in that research &#8211; Ken Lay is portrayed as almost completely oblivious to any wrongdoing going on, Jeff Skilling&#8217;s portrayal is likewise somewhat sympathetic, and others like Andy Fastow, Dick Causey, and David Duncan are portrayed quite negatively.</p>
<p>Ultimately, it is a fun and interesting inside look at one of the bigger business scandals in recent history.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spenceruresk.com/2011/04/5-good-books-ive-read-this-past-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

