<?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>Adam Caudill&#039;s Blog &#187; Web Development</title>
	<atom:link href="http://adamcaudill.com/tag/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://adamcaudill.com</link>
	<description>Adam&#039;s view on technology, software development, and world domination.</description>
	<lastBuildDate>Sat, 04 Feb 2012 19:01:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Why Cringely is wrong about Java</title>
		<link>http://adamcaudill.com/2011/10/15/why-cringely-is-wrong-about-java/</link>
		<comments>http://adamcaudill.com/2011/10/15/why-cringely-is-wrong-about-java/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 19:47:52 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Business of Software]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=996</guid>
		<description><![CDATA[<p>A couple of days ago I was sent a link to Robert Cringely&#8217;s latest treatise:  <a href="http://www.cringely.com/2011/10/the-second-coming-of-java/">The second coming of Java</a> &#8211; and to say I disagreed was a bit of an understatement. To me, it represents a fundamental flaw in his perception of developers, and more importantly the economics of software development.</p> <p>The key to Cringely&#8217;s argument [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I was sent a link to Robert Cringely&#8217;s latest treatise:  <span style="direction: ltr;"><em><a href="http://www.cringely.com/2011/10/the-second-coming-of-java/">The second coming of Java</a></em> &#8211; and to say I disagreed was a bit of an understatement. To me, it represents a fundamental flaw in his perception of developers, and more importantly the economics of software development.</span></p>
<p>The key to Cringely&#8217;s argument comes down to this:</p>
<p style="padding-left: 30px;">When SSDs gain enough capacity there will be a shift from the Ruby world back to the Java world. Not for prototyping, because, well, it’s prototyping. But simply because the statement “<strong>Ruby is <em>incredibly</em> slow but I don’t care because my database is slower</strong>” will no longer be true.</p>
<p><!--EndFra-->What he&#8217;s missing here is the real reason people use frameworks like Rails; it&#8217;s not about it being Ruby, or being the latest cool thing &#8211; it&#8217;s about developer productivity. That&#8217;s it, and that&#8217;s all there is to it &#8211; Rails allows a developer to do more in less time. That&#8217;s one of the key reasons so many Java web developers jumped ship (though I can think of a few others), and what pushed Microsoft to invest so heavily in their <a href="http://www.asp.net/mvc">MVC framework</a>.</p>
<p>I could fully rehash the argument, but in what I consider to be one of Jeff Atwood&#8217;s best articles,  <span style="direction: ltr;"><em><a href="http://www.codinghorror.com/blog/2008/12/hardware-is-cheap-programmers-are-expensive.html">Hardware is Cheap, Programmers are Expensive</a></em>, he covers a key point to my argument &#8211; developer time is vastly more expensive than hardware. Atwood&#8217;s take on the issue is clear:</span></p>
<p style="padding-left: 30px;">Clearly, <strong>hardware is cheap, and programmers are expensive</strong>. Whenever you&#8217;re provided an opportunity to leverage that imbalance, it would be incredibly foolish not to.</p>
<p>When there&#8217;s a choice between developer productivity, and spending money on hardware &#8211; the conclusion should be the same. It&#8217;s much cheaper to throw more hardware at a slower framework than it is to invest more developer time in a faster framework. For any non-trivial application, throwing more front-end servers at it will always be cheaper than slowing the development process down with a non-productivity-centric toolkit.</p>
<p>It&#8217;s simple economics; server hardware is getting faster and cheaper, developer time is only getting more expensive.</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/10/15/why-cringely-is-wrong-about-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pen-Testing Silverlight+RIA with SoapUI</title>
		<link>http://adamcaudill.com/2011/07/06/pen-testing-silverlightria-with-soapui/</link>
		<comments>http://adamcaudill.com/2011/07/06/pen-testing-silverlightria-with-soapui/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 21:39:37 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Pen-test]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[SoapUI]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=957</guid>
		<description><![CDATA[<p>I was recently given the task of ensuring that a Silverlight+RIA application that could contain private information was secure for deployment to a public web site. So I started searching for automated pen-testing tools that could work against Microsoft&#8217;s Binary SOAP protocol (msbin1, a.k.a &#8220;application/soap+msbin1&#8220;) and found only disappointment. For various reasons, it&#8217;s significantly more complex to pen-test [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently given the task of ensuring that a Silverlight+RIA application that could contain private information was secure for deployment to a public web site. So I started searching for automated pen-testing tools that could work against Microsoft&#8217;s Binary SOAP protocol (<code>msbin1</code>, a.k.a &#8220;<code>application/soap+msbin1</code>&#8220;) and found only disappointment. For various reasons, it&#8217;s significantly more complex to pen-test a application using <code>msbin1</code> than traditional <code>SOAP</code> + <code>WSDL</code>.</p>
<p>To properly test the services, I had to make a compromise: temporarily modify the application to expose a <code>SOAP</code> endpoint. While this changes the state of the application and thus reduces the validity of the tests, it does provide a reasonable way of testing the web services to ensure that they are behaving as intended.</p>
<p>The recently released <a href="http://www.soapui.org/About-SoapUI/go-pro.html">SoapUI Pro 4</a> adds new <a href="http://www.soapui.org/Security/getting-started.html">security testing tools</a> that makes this a viable (and attractive option). To get this working, there are a few small changes that need to be made to the solution:</p>
<p>First, you&#8217;ll need to add a reference to &#8220;<code>Microsoft.ServiceModel.DomainServices.Hosting.EndPoints</code>&#8221; which is part of the RIA Services Toolkit; this allows you to expose different End Points for the service such as <code>SOAP</code> and <code>OData</code>.</p>
<p>Next, you&#8217;ll want to add the following <code>configSections</code> entry to your <code>Web.config</code>:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;configuration&gt;
 &lt;configSections&gt;
   &lt;sectionGroup name=&quot;system.serviceModel&quot;&gt;
     &lt;section name=&quot;domainServices&quot;
      type=&quot;System.ServiceModel.DomainServices.Hosting.DomainServicesSection,
      System.ServiceModel.DomainServices.Hosting,
      Version=4.0.0.0,
      Culture=neutral,
      PublicKeyToken=31bf3856ad364e35&quot; /&gt;
   &lt;/sectionGroup&gt;
 &lt;/configSections&gt;
 ...
</pre>
<p>Finally, to expose the <code>SOAP</code> end point:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;configuration&gt;
 ...
 &lt;system.serviceModel&gt;
  ...
  &lt;domainServices&gt;
   &lt;endpoints&gt;
    &lt;add name=&quot;Soap&quot;
     type=&quot;Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory,
     Microsoft.ServiceModel.DomainServices.Hosting,
     Version=4.0.0.0,
     Culture=neutral, PublicKeyToken=31bf3856ad364e35&quot; /&gt;
   &lt;/endpoints&gt;
  &lt;/domainServices&gt;
  ...
</pre>
<p>Finally, just follow the <a href="http://www.soapui.org/Security/security-scans-overview.html">instructions</a> for SoapUI to setup your tests, and you can feel (just a little) more confident in your application. Passing with flying colors obviously doesn&#8217;t mean your application is bulletproof, but it helps to confirm that web service code is solid.</p>
<p>Now, while this does provide some insight into your application and should help find common issues, it&#8217;s not a replacement for a professional assessment by a qualified auditor. If you are handling credit cards or other highly targeted information, <em>please</em> consult a security specialist before a public deployment.</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/07/06/pen-testing-silverlightria-with-soapui/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>bbPress 2.0 (beta-1) released!</title>
		<link>http://adamcaudill.com/2011/05/21/bbpress-2-0-beta-1-released/</link>
		<comments>http://adamcaudill.com/2011/05/21/bbpress-2-0-beta-1-released/#comments</comments>
		<pubDate>Sat, 21 May 2011 18:25:18 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bbPress]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=833</guid>
		<description><![CDATA[<p>This morning, the latest version of my favorite forum software, bbPress, was <a href="http://bbpress.org/blog/2011/05/bbpress-2-0-beta-1/">released</a>. While this is a beta and not a final release, it&#8217;s still a major event for the project: this release is in the form of a WordPress plugin, instead of a stand-alone application as it&#8217;s been in the past. In December [...]]]></description>
			<content:encoded><![CDATA[<p>This morning, the latest version of my favorite forum software, bbPress, was <a href="http://bbpress.org/blog/2011/05/bbpress-2-0-beta-1/">released</a>. While this is a beta and not a final release, it&#8217;s still a major event for the project: this release is in the form of a WordPress plugin, instead of a stand-alone application as it&#8217;s been in the past. In December 2009 <a href="http://adamcaudill.com/2009/12/16/bbpress-is-the-end-near/">I wrote about this decision</a> &#8211; and at the time I was rather disappointed with the change in direction; but now my views have changed. I&#8217;m also excited to see that <a href="http://ma.tt/">Matt</a> and his company, <a href="http://automattic.com/">Automattic</a> have decided to invest the time and money needed to make this happen; there for a while it looked like bbPress really was dying.</p>
<p>Thanks to services like <a href="http://stackexchange.com/">StackExchange</a> and its numerous clones, it seems the days of standalone forums are numbered; when combined with the increasing strength of WordPress as a full-blown CMS, this move actually makes a lot of sense.</p>
<p>I&#8217;m excited both as a user and developer &#8211; this opens many new doors from both perspectives, and will certainly increase adoption of the software, as integration with the current version is <a href="http://adamcaudill.com/2011/03/06/bbpress-wordpress-3-1-registration-issues/">a bit tricky</a>.</p>
<p>Congratulations to the entire team on this release; it really is a major milestone for the project!</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/05/21/bbpress-2-0-beta-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Errors on &#8216;gem install mysql2&#8242;</title>
		<link>http://adamcaudill.com/2011/05/16/errors-on-gem-install-mysql2/</link>
		<comments>http://adamcaudill.com/2011/05/16/errors-on-gem-install-mysql2/#comments</comments>
		<pubDate>Mon, 16 May 2011 05:29:19 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=808</guid>
		<description><![CDATA[<p>On my fresh Ubuntu 11.04 box running Ruby 1.9.2 instead of the standard Ruby 1.8, I ran into some undocumented errors while installing the mysql2 gem. Here&#8217;s what I was seeing:</p> <p>This obviously isn&#8217;t all that helpful, nor did I find anything all that useful on Google &#8211; thankfully the issue is easy to solve. [...]]]></description>
			<content:encoded><![CDATA[<p>On my fresh Ubuntu 11.04 box running Ruby 1.9.2 instead of the standard Ruby 1.8, I ran into some undocumented errors while installing the <code>mysql2</code> gem. Here&#8217;s what I was seeing:</p>
<pre class="brush: plain; title: ; notranslate">$ gem install mysql2
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
	ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
          &lt;internal:lib/rubygems/custom_require&gt;:29:in `require':
          no such file to load -- mkmf (LoadError)
	from &lt;internal:lib/rubygems/custom_require&gt;:29:in `require'
	from extconf.rb:2:in `&lt;main&gt;'

Gem files will remain installed in
  /usr/lib/ruby/gems/1.9.1/gems/mysql2-0.3.2 for inspection.
Results logged to
  /usr/lib/ruby/gems/1.9.1/gems/mysql2-0.3.2/ext/mysql2/gem_make.out</pre>
<p>This obviously isn&#8217;t all that helpful, nor did I find anything all that useful on Google &#8211; thankfully the issue is easy to solve. All that&#8217;s needed is to ensure that the following packages are installed:</p>
<pre class="brush: plain; title: ; notranslate">sudo apt-get install libmysqlclient-dev libmysql-ruby1.9 ruby1.9.1-dev</pre>
<p>Then you can try installing the gem, it should work, hopefully</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/05/16/errors-on-gem-install-mysql2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>You can&#8217;t fix stupid&#8230;</title>
		<link>http://adamcaudill.com/2011/05/10/you-cant-fix-stupid/</link>
		<comments>http://adamcaudill.com/2011/05/10/you-cant-fix-stupid/#comments</comments>
		<pubDate>Tue, 10 May 2011 06:06:05 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Business of Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=760</guid>
		<description><![CDATA[<p>For those outside of the IT field, developers are looked at as miracle workers &#8211; through us, business leaders think anything is possible (and they often see no reason why we can&#8217;t work our latest miracle by the next morning). In reality though, we do work miracles; we save companies vast amounts of money every [...]]]></description>
			<content:encoded><![CDATA[<p>For those outside of the IT field, developers are looked at as miracle workers &#8211; through us, business leaders think anything is possible (and they often see no reason why we can&#8217;t work our latest miracle by the next morning). In reality though, we do work miracles; we save companies vast amounts of money every year through increased worker efficiency and automation, we enable new lines of business that wouldn&#8217;t be possible otherwise, and reduce energy costs because we keep the office lights turned off. Well, that&#8217;s more or less how they see us.</p>
<p>But for all of the wonders we are responsible for, there is one thing we can&#8217;t do (no matter what amazing powers some executives <em>think</em> we have to make them look better or earn them more bonuses):</p>
<p><strong>You can&#8217;t fix stupid.</strong></p>
<p>I&#8217;ve often described development as being a professional problem solver, and we are often tasked with rather challenging problems to solve. Sometimes the problems are purely technical &#8211; making something new possible that previously was impracticable or even impossible, sometimes it&#8217;s all about efficiency, other times it&#8217;s about image and controlling how people see a company. When the problem is the user though, you know you&#8217;re in for a rough day.</p>
<p>I was recently given such a task &#8211; the users weren&#8217;t listening to their supervisors and they wanted the software to force these users to do whatever it was that management told them they should be doing. I was given less than a week to find ways to make people that don&#8217;t want to work, work.</p>
<p>Basically, users fall into three simple categories:</p>
<ul>
<li>Power Users &#8211; these users understand software, and require little, if any instruction &#8211; more than anything, you give these users a tool and stay out of their way.</li>
<li>Average Users &#8211; odds are, your mother or father falls into this category. They understand enough to get by, and with a little instruction they should have no trouble.</li>
<li>Idiots* &#8211; odds are, you work with one of these users. You lead them by they hand, and show them exactly what to do &#8211; just in time for the boss to walk by and praise them for doing a good job (and 10 minutes later you find them playing in traffic, somehow defying <a href="http://en.wikipedia.org/wiki/Survival_of_the_fittest">Darwin</a> in the process).</li>
</ul>
<p>For users of the last category, there&#8217;s just not much you can do.</p>
<p>I always do my due diligence while building software; doing all I can to make it simple to use, flexible, and forgiving of user error. I always use extensive data validation, carefully worded instructions and dialogs, and do my best to follow the various best-practice guides for UI and UX; yet for all this effort and design &#8211; I can&#8217;t write software that thinks for people or makes judgement calls based on business rules that only they know (probably because they make it up as they go).</p>
<p>No matter how helpful or intelligent an application is, or how idiot-proof you think you&#8217;ve made it, reality is that you simply can&#8217;t fix stupid &#8211; you can&#8217;t take an incompetent person that refuses to think for themselves and turn them to into a great, productive asset. After years in this industry (which has made me just a little cynical [in the way that <a href="http://en.wikipedia.org/wiki/Sun">Sol</a> only seems little when compared to <a href="http://en.wikipedia.org/wiki/Betelgeuse">Betelgeuse</a>]), I&#8217;ve come to understand something rather disturbing: idiots keep getting better.</p>
<p style="padding-left: 30px;"><em>Somewhere, right now, idiots are working to build even better idiots &#8211; and that&#8217;s a really scary thought.</em></p>
<p>We can make a user more efficient by automating tasks, providing better information, or helping to manage their workload &#8211; what we can&#8217;t do is make them smarter, make them think through their actions, or force them to do what their managers tell them. Yet we are, at least on occasion, asked to fix this problem. <span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium;"> </span></p>
<p style="display: inline !important;">Despite our best efforts as professionals and passionate developers; if a user won&#8217;t think &#8211; we just can&#8217;t fix it.</p>
<p>&nbsp;</p>
<p><span style="font-size: x-small;">* &#8211; I define an idiot about the same way I do someone that&#8217;s lazy; they have no medical issues or legitimate handicap. They just don&#8217;t want to think or work (probably both). Those that are handicap or have learning or medical issues are a very different story and not the target of this article; I donated time and services to charities that served the disabled for a number of years, I highly recommend that all developers do it &#8211; it&#8217;s a very rewarding experience to see your work make somebody&#8217;s life better and it teaches you quite a bit about how people interact with technology.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/05/10/you-cant-fix-stupid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>bbPress &amp; WordPress 3.1 (Registration Issues)</title>
		<link>http://adamcaudill.com/2011/03/06/bbpress-wordpress-3-1-registration-issues/</link>
		<comments>http://adamcaudill.com/2011/03/06/bbpress-wordpress-3-1-registration-issues/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 08:39:49 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bbPress]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=733</guid>
		<description><![CDATA[<p>While building a new website for a small ISV, I was asked to integrate a forum &#8211; should be simple I thought, I&#8217;ll just use WordPress as a CMS and <a href="http://bbpress.org/">bbPress</a>. Simple? Not quite.</p> <p>To make things easier, I used <a href="http://www.pagelines.com/themes/platformpro/">Platform Pro</a> by Pagelines (a great platform IMHO) and so used their &#8220;deep [...]]]></description>
			<content:encoded><![CDATA[<p>While building a new website for a small ISV, I was asked to integrate a forum &#8211; should be simple I thought, I&#8217;ll just use WordPress as a CMS and <a href="http://bbpress.org/">bbPress</a>. Simple? Not quite.</p>
<p>To make things easier, I used <a href="http://www.pagelines.com/themes/platformpro/">Platform Pro</a> by Pagelines (a great platform IMHO) and so used their &#8220;deep integration&#8221; <a href="http://www.pagelines.com/docs/bbpress-forums">instructions</a> (while they are intended for Platform Pro users, the steps are virtually identical for all other setups). While the setup went quite smoothly, it wasn&#8217;t until it came time to test user registrations that the issue came up: when a new user tried to register they would receive an error stating that &#8220;email is required,&#8221; even if they had entered a valid email address. This effectively made it impossible for users to register, and thus made the forum useless.</p>
<p>After a bit of research, it looks like there is a conflict between newer versions of WordPress (3.0+) and bbPress 1.0.2 (I&#8217;m not sure if older versions have the same issue, but I would assume so). The fix for this is actually quite simple: install a <a href="http://bbpress.org/plugins/topic/zaerl-wordpress-3-integration/">plugin</a>. The plugin itself is quite simple &#8211; containing only around a half-dozen executable lines of code, and works around the issue with a simple hack.</p>
<p>Unfortunately, the plugin description is rather vague and required a fair bit of research to identify as the fix, and the official documentation makes no reference to the issue or that this plugin can be used as a workaround.</p>
<p>Overall, a simple workaround but a major issue if you don&#8217;t notice that it&#8217;s broke (as is quite easy to do).</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/03/06/bbpress-wordpress-3-1-registration-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 3 &amp; Dreamhost PS</title>
		<link>http://adamcaudill.com/2011/01/28/rails-3-dreamhost-ps/</link>
		<comments>http://adamcaudill.com/2011/01/28/rails-3-dreamhost-ps/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 07:47:01 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=717</guid>
		<description><![CDATA[<p>I recently had an idea for a small web application, and seeing as I&#8217;ve not spent as much time as I&#8217;ve wanted to using <a href="http://rubyonrails.org/">Rails</a> &#8211; I opted to build it the latest version of Rails. A decision that caused far more grief than I expected.</p> <p>If you are using <a href="http://www.dreamhost.com/r.cgi?485850">Dreamhost&#8217;s</a> PS offering (a managed [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had an idea for a small web application, and seeing as I&#8217;ve not spent as much time as I&#8217;ve wanted to using <a href="http://rubyonrails.org/">Rails</a> &#8211; I opted to build it the latest version of Rails. A decision that caused far more grief than I expected.</p>
<p>If you are using <a href="http://www.dreamhost.com/r.cgi?485850">Dreamhost&#8217;s</a> PS offering (a managed VPS for those that don&#8217;t know), the seemingly simple task of getting a Rails 3 application up and running is actually quite complex. The root cause of this is that Dreamhost&#8217;s OS image is based on Debian <a href="http://www.debian.org/releases/etch/">etch</a>, which was released in April 2009 and has since been replaced; which means etch has become fairly outdated.</p>
<p>Here&#8217;s the process I used, and so far it seems to be working quite well:</p>
<p><strong>Domain Setup:</strong></p>
<p>When adding your domain to the Dreamhost panel, you&#8217;ll want to enable <a href="http://wiki.dreamhost.com/Passenger">Passenger</a>.</p>
<p><img src="http://adamcaudill.com/files/2011-01-28_0048.png" alt="" width="409" height="217" /></p>
<p>Once your application is uploaded to the server, you&#8217;ll be greeted with a particularly unhelpful error message (something like &#8220;<code>uninitialized constant Bundler</code>&#8220;) from Passenger (or perhaps just a 500 error page).</p>
<p><strong>Server Updates:</strong></p>
<p>This is where the work starts, and gets somewhat ugly. As a warning, it&#8217;s quite possible that you could damage your configuration doing this; though thankfully you can <a href="https://panel.dreamhost.com/index.cgi?tree=vserver.reboot&amp;">restore</a> your server to a working state within a few minutes from the Dreamhost panel should something go wrong. You&#8217;ll also need to have an &#8220;<a href="https://panel.dreamhost.com/index.cgi?tree=vserver.adminusers&amp;">admin user</a>&#8221; for this task, as much of what needs to be done has to be done as root.</p>
<p>First step: Get your PS up to date; even after performing a restore on my server, there were a number of updates that are available to be installed. So let&#8217;s start off by getting those out of the way.</p>
<pre class="brush: plain; title: ; notranslate">sudo apt-get update
sudo apt-get upgrade
sudo apt-get -f install</pre>
<p>Once you get past those three commands, the next step is to update SQLite to the latest version, as the version Dreamhost uses is quite old and won&#8217;t work with Rails 3.0 (well, to be accurate it won&#8217;t work with the latest version of sqlite3-ruby, which is the default database provider for Rails 3).</p>
<pre class="brush: plain; title: ; notranslate">wget http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz
tar zxvf sqlite-autoconf-3070400.tar.gz
cd sqlite-autoconf-3070400
sudo ./configure --bindir=/usr/bin --libdir=/usr/lib
sudo make
sudo make install</pre>
<p>If you don&#8217;t update SQLite you&#8217;ll get an error like this:</p>
<pre class="brush: plain; title: ; notranslate">sudo gem install sqlite3
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_initialize()... no
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** extconf.rb failed ***</pre>
<p>or if you install the updated version, but don&#8217;t force it to <code>/usr/lib</code> you&#8217;ll get an error like this:</p>
<pre class="brush: plain; title: ; notranslate">sudo gem install sqlite3
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Try 'port install sqlite3 +universal' or 'yum
install sqlite3-devel'
*** extconf.rb failed *** </pre>
<p>Once that is taken care of SQLite, the rest is easy.</p>
<pre class="brush: plain; title: ; notranslate">sudo gem update</pre>
<p>At this point if you visit your new Rails site, it <em>should</em> be working!</p>
<p>Notes:</p>
<ol>
<li>I&#8217;ve not tested this extensively, and I&#8217;ve no idea if this breaks anything. All I can say for certain, if that all of <em>my</em> sites still work, but your mileage may vary. &lt;Disclaimer /&gt;</li>
<li>I was a fairly early Dreamhost PS adopter, and part way through this process I reset my server to get it back to a clean state. After resetting, I noticed some differences with the behavior of <code>apt-get</code> (404s on <code>update</code> and <code>upgrade</code> are gone), so for other early adopters it may be necessary to perform a reset to get your servers configuration in-sync with the latest official setup.</li>
<li>I can&#8217;t say for a fact that this is completely necessary, though you&#8217;ll likely need to selectively update a few packages if you skip this step. Also, for me, <code>gem</code> was broken until I ran <code>sudo apt-get -f install</code>.</li>
<li>Special thanks to <a href="http://matthewjlittle.com/">Matt</a> for helping me get this working; troubleshooting the SQLite install was more than a little time consuming.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/01/28/rails-3-dreamhost-ps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome and H.264</title>
		<link>http://adamcaudill.com/2011/01/12/google-chrome-and-h-264/</link>
		<comments>http://adamcaudill.com/2011/01/12/google-chrome-and-h-264/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 07:00:42 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[News & Events]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[H.264]]></category>
		<category><![CDATA[IE9]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=699</guid>
		<description><![CDATA[<p>In a somewhat (but not entirely) surprising <a href="http://blog.chromium.org/2011/01/html-video-codec-support-in-chrome.html">announcement</a>, Google is removing support for <a href="http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC">H.264</a> video from Chrome. This change to their implementation of the often controversial HTML5 &#60;video&#62; tag is both a major step by Google and a furtherance of the already complicated world of video online.</p> <p style="padding-left: 30px;">&#8230; To that end, we are changing Chrome’s [...]]]></description>
			<content:encoded><![CDATA[<p>In a somewhat (but not entirely) surprising <a href="http://blog.chromium.org/2011/01/html-video-codec-support-in-chrome.html">announcement</a>, Google is removing support for <a href="http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC">H.264</a> video from Chrome. This change to their implementation of the often controversial HTML5 <code>&lt;video&gt;</code> tag is both a major step by Google and a furtherance of the already complicated world of video online.</p>
<p style="padding-left: 30px;"><em>&#8230; To that end, we are changing Chrome’s HTML5  support to make it consistent with the codecs already supported by the open Chromium project. Specifically, we are supporting the WebM (VP8) and Theora video codecs, and will consider adding support for other high-quality open codecs in the future. Though H.264 plays an important role in video, as our goal is to enable open innovation, <strong>support for the codec will be removed</strong> and our resources directed towards completely open codec technologies.</em></p>
<p>When Google <a href="http://techcrunch.com/2010/05/19/webm-google-h-264/">released</a> <a href="http://www.webmproject.org/">WebM</a> (a royalty-free codec which Google <a href="http://techcrunch.com/2009/08/05/google-acquires-video-compression-technology-company-on2-for-106-million/">acquired</a> as part of On2), it was clear that the intention was to take on H.264 and with this move there seems little doubt that the gauntlet has been thrown down. Although, now that H.264 has such a <a href="http://techcrunch.com/2010/05/01/h-264-66-percent-web-video/">strong base</a> (it&#8217;s included in <a href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/200712/120407adobemoviestar.html">Flash</a>, <a href="http://blogs.msdn.com/b/ie/archive/2010/04/29/html5-video.aspx">IE9</a>, Safari, Mobile Safari, and Android), it really makes one wonder if Google has picked a fight that has long since been lost.</p>
<p><strong>So why would Google do this?</strong></p>
<p>Here&#8217;s my best guess: Money (specifically, patent licensing).</p>
<p>H.264 is heavily encumbered by numerous patents owned by companies like Microsoft, Apple, and Cisco, and controlled by <a href="http://www.mpegla.com/main/default.aspx">MPEG LA</a>, the consortium charged with turning these patents into profit (<a href="http://www.mpegla.com/main/programs/avc/Documents/avc-att1.pdf">here&#8217;s</a> the 70 page list of patents for those interested). While I&#8217;m sure many people recall that MPEG LA made a very public pledge that H.264 would be <a href="http://gigaom.com/video/mpeg-la-h-264-streaming-will-be-free-forever/">free forever</a>, as is often the case, things aren&#8217;t quite that simple.</p>
<p><a href="http://www.blogger.com/profile/06696465857424753507">Peter Csathy</a> wrote a fairly <a href="http://digitalmediaupdate.blogspot.com/2010/09/think-h264-is-now-royalty-free-think.html">detailed post</a> on the matter, pointing out some key details that many in the media skipped. Here&#8217;s the core of what wasn&#8217;t discussed after the MPEG LA announcement (but should have been):</p>
<p style="padding-left: 30px;"><em>But, you say, MPEG LA recently announced that it will no longer charge royalties for the use of H.264. Yes, it’s true – MPEG LA recently bowed to mounting pressure from, and press surrounding, WebM and announced something that kind of sounds that way. But, I caution you to read the not-too-fine print. H.264 is royalty-free only in one limited case – for Internet video that is delivered free to end users. Read again: </em><em><strong>for (1) Internet delivery that is (2) delivered free to end users</strong></em><em>. In the words of MPEG LA’s own press release, “Products and services other than [those] continue to be royalty-bearing.”</em></p>
<p><a href="http://shaver.off.net/diary/">Mike Shaver</a>, Mozilla&#8217;s VP of Engineering offer&#8217;s a somewhat similar take in &#8220;<a href="http://shaver.off.net/diary/2010/08/27/free-as-in-smokescreen/">Free as in Smokescreen</a>:&#8221;</p>
<p style="padding-left: 30px;"><em>What MPEG-LA announced is that their current moratorium on charging fees for the <strong>transmission of H.264 content</strong>, previously extended through 2015 for uses that don’t charge users, is now permanent. You still have to pay for a license for H.264 if you want to make things that create it, consume it, or your business model for distributing it is direct rather than indirect.</em></p>
<p style="padding-left: 30px;"><em>What they’ve made permanently free is distribution of content that people have already licensed to encode, and will need a license to decode. This is similar to Nikon announcing that they will not charge you if you put your pictures up on Flickr, or HP promising that they will never charge you additionally if you photocopy something that you printed on a LaserJet.</em></p>
<p>I&#8217;m just waiting for one of the licensors to reinterpret the license and claim that ads constitute a form of payment or some similar excuse to exclude them from the exception they granted. I&#8217;ve yet to get my hands on the latest licensing agreement to see exactly what it says about this, but I wouldn&#8217;t be surprised at all to see this card played at some point to wring extra revenue from these patents.</p>
<p>Given that Google owns the massive video sharing site YouTube, which <a href="http://youtube-global.blogspot.com/2010/01/introducing-youtube-html5-supported.html">uses H.264</a>, plus whatever unknown projects relating to <a href="http://www.google.com/tv/">Google TV</a> &#8211; it stands to reason that Google would certainly save some money by moving away from such an encumbered technology; not to mention avoid future risk should rules change. Though personally, I also have to wonder if it could be fears of a repeat of the <a href="http://burnallgifs.org/archives/">GIF patent</a> debacle.</p>
<p><strong>Now where does this leave us?</strong></p>
<p>Right now HTML5 <code>&lt;video&gt;</code> is a mess, at best. There is a war for which codec becomes the de facto standard, and there is a <em>lot</em> of money at stake depending on who wins. At this point there is no single codec that works across all major browsers; to get full coverage the best option now looks to be a combination of H.264, WebM, and Flash. Doesn&#8217;t really sound like the progress that was promised with HTML5 does it?</p>
<p>It&#8217;s worth noting though that Google isn&#8217;t the first browser developer to reject H.264; both <a href="http://shaver.off.net/diary/2010/01/23/html5-video-and-codecs/">Firefox</a> and <a href="http://my.opera.com/core/blog/2009/12/31/re-introducing-video">Opera</a> have decided against including it in their browsers as well. As painful as the fragmentation is now in regard to who supports what, this move by Google actually does little to change the landscape. Support has been fragmented from the beginning, and all this really does it push H.264 a step away from being the de facto standard; a title that it has been very close to seizing.</p>
<p>Had Firefox added support for H.264, I think the fight would be over and would have made today&#8217;s announcement almost suicidal for the project. Though with such a major player holding out against it, Google&#8217;s move becomes a minor tactical shift in the short-term (though the long-term impact could be significant).</p>
<p>I could go on for pages about what works are where we are now, but <a href="http://diveintomark.org/">Mark Pilgrim</a> (an infinitely better writer than I) sums it all up here: &#8220;<a href="http://diveintohtml5.org/video.html#what-works">Dive into HTML5: Video on the Web</a>&#8221; &#8211; well worth reading if you want to really understand what&#8217;s going on.</p>
<p>So in summary &#8211; video needs to be encoded to multiple formats, which today&#8217;s announcement does little to alter due to the fragmentation that was already in place. In the long run, WebM may be better for the community due to its license, though many of the internet&#8217;s biggest players have a vested interest in H.264. So when you factor in politics and propaganda between competing companies, distrust, and possible patent claims that haven&#8217;t been addressed yet; this all leads me to an even simpler summary:</p>
<p>Yesterday, HTML5 <code>&lt;video&gt;</code> was a mess; tomorrow it will still be a mess.</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2011/01/12/google-chrome-and-h-264/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure Password Storage</title>
		<link>http://adamcaudill.com/2010/02/01/secure-password-storage/</link>
		<comments>http://adamcaudill.com/2010/02/01/secure-password-storage/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:08:35 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=556</guid>
		<description><![CDATA[<p>Do you use MD5 or SHA1 to store passwords? Think they are secure? Think again.</p> <p>While generic hashing algorithms are certainly better than storing passwords in <a title="TechCrunch: One Of The 32 Million With A RockYou Account? You May Want To Change All Your Passwords. Like Now." href="http://www.techcrunch.com/2009/12/14/rockyou-hacked/">plain text</a>, it&#8217;s still not as secure as it should [...]]]></description>
			<content:encoded><![CDATA[<p>Do you use MD5 or SHA1 to store passwords? Think they are secure? Think again.</p>
<p>While generic hashing algorithms are certainly better than storing passwords in <a title="TechCrunch: One Of The 32 Million With A RockYou Account? You May Want To Change All Your Passwords. Like Now." href="http://www.techcrunch.com/2009/12/14/rockyou-hacked/">plain text</a>, it&#8217;s still not as secure as it should be. Users place great trust in us to ensure that their credentials will be secure and treated with the utmost respect; it&#8217;s our responsibility to live up to these expectations.</p>
<p>With the simplicity and speed of these general purpose algorithms, it&#8217;s possible to generate hashes looking for <a href="http://en.wikipedia.org/wiki/Collision_(computer_science)">collisions</a> (or even the original value) extremely quickly. It&#8217;s this speed that introduces the fatal flaw; with a database dump containing MD5 hashed passwords, with a fairly small investment most could be recovered within a very small amount of time (mere days for a large database).</p>
<p>Many people are moving to bcrypt as a solution. In Coda Hale&#8217;s &#8220;<a href="http://codahale.com/how-to-safely-store-a-password/">How To Safely Store A Password</a>&#8221; he covers this topic in more detail, complete with useful stats and links to implementations in languages from <a title="C# bcrypt" href="http://derekslager.com/blog/posts/2007/10/bcrypt-dotnet-strong-password-hashing-for-dotnet-and-mono.ashx">C#</a> to <a title="Ruby bcrypt" href="http://github.com/codahale/bcrypt-ruby">Ruby</a> (even <a title="Erlang bcrypt" href="http://github.com/skarab/erlang-bcrypt">Erlang</a> is represented).</p>
<p>If you are looking for ways to better protect your user&#8217;s data, take a closer look at your password storage.</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2010/02/01/secure-password-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s your Code Legacy?</title>
		<link>http://adamcaudill.com/2009/12/20/whats-your-code-legacy/</link>
		<comments>http://adamcaudill.com/2009/12/20/whats-your-code-legacy/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 03:42:59 +0000</pubDate>
		<dc:creator>Adam Caudill</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://adamcaudill.com/?p=526</guid>
		<description><![CDATA[<p>When you move on to your next challenge how will those that inherit your code think of you? Noble or notorious, innovator or insane? This is a question that all developers should ask themselves frequently; though too few ever do. You should always write with the assumption that someday a new developer will take over [...]]]></description>
			<content:encoded><![CDATA[<p>When you move on to your next challenge how will those that inherit your code think of you? Noble or notorious, innovator or insane? This is a question that all developers should ask themselves frequently; though too few ever do. You should always write with the assumption that someday a new developer will take over your code, and they will question every decision and assumption you&#8217;ve made. When this happens, what will they think of you?</p>
<p>Perhaps I&#8217;m more aware of this because I maintain an internally developed shared library that my company uses in every application; but regardless of the scope of the project you should always assume that someday you will hand the project off. Many developers think little about what happens to their code after it passes on to another; what other developers will have to deal with, or how their efforts will be perceived.</p>
<p>When I&#8217;m training a new developer there are a few points I try to reinforce as much as possible:</p>
<ol>
<li>Code is only good if other developers can work on it without extensive training. If it takes days or weeks of introduction to get a new developer up to speed, then you&#8217;ve done something wrong<sup>1</sup>.</li>
<li>Clever solutions are no better than an ugly hack if it&#8217;s not clear what you are doing. If the code isn&#8217;t clear then it&#8217;s not maintainable, if it&#8217;s not maintainable then it&#8217;s junk.</li>
<li>Assume you&#8217;ll be hit by a bus. Always write code with the assumption that you won&#8217;t have the opportunity to cleanly pass the code off to a new maintainer. Never assume that you&#8217;ll have time to come back and clean things up later.</li>
<li>Always perform design reviews, no matter the size of the project<sup>2</sup>. Once you have a design in mind, talk it through with a at least two other developers. Just because you think it&#8217;s clean and clear doesn&#8217;t mean that others will see it that way as well.</li>
<li>Be consistent, always. I&#8217;ve seen more projects ruined by people doing things &#8220;their way&#8221; than anything else. Match style and design when working on an existing project. Be careful when adding new techniques, technologies, or methodologies to an existing project; unless you are willing to update the entire code-base, you can easily create a minefield without realizing it.</li>
</ol>
<p>If you want your work to be seen positively after you move on, start thinking about your heirs today. The opinion they have of you will be almost entirely based on what they see in your code &#8211; not the stories or memories left behind.</p>
<p><sup>1</sup> &#8211; There are always exceptions; these are generalized guidelines, not hard and fast rules.<br />
<sup>2</sup> &#8211; This includes &#8220;throw away&#8221; projects, many projects that are intended to have a short life end up living far longer than intended. This is the most likely place that your heirs will find code that makes them question the quality of your work.</p>
]]></content:encoded>
			<wfw:commentRss>http://adamcaudill.com/2009/12/20/whats-your-code-legacy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

