<?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>James Wilding&#039;s Weblog &#187; development</title>
	<atom:link href="http://jameswilding.net/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://jameswilding.net</link>
	<description>Buddhist businessman, freelance web developer</description>
	<lastBuildDate>Sun, 05 Sep 2010 09:38:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Lessons Learnt With Rails</title>
		<link>http://jameswilding.net/feeder/?FeederAction=clicked&amp;feed=Posts+%28RSS2%29&amp;seed=http%3A%2F%2Fjameswilding.net%2F2010%2F01%2F21%2Flessons-learnt-with-rails%2F&amp;seed_title=Lessons+Learnt+With+Rails</link>
		<comments>http://jameswilding.net/2010/01/21/lessons-learnt-with-rails/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 13:14:02 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://jameswilding.net/?p=423</guid>
		<description><![CDATA[Things I've learnt from working on a massive Rails application that needed tidying. Routes, simplicity, Ruby, REST -- all sorts of Rails goodness.]]></description>
			<content:encoded><![CDATA[<p>Some lessons I&#8217;ve learnt working on my latest Rails project, a piece of tidy-and-fix work on an existing Rails application. Working on this project has really taught me a lot about the right and wrong ways to use Rails.</p>
<h3>1. Routes are important</h3>
<p>The app that I was asked to rebuilt had no routes. Nothing.</p>
<p>That&#8217;s not to say that no URLs worked with the app, just that the mappings between URLs and controllers/actions was defined in the code itself &#8212; mostly using the old Rails convention:</p>
<p><script src="http://gist.github.com/282785.js?file=urlfor.rb"></script></p>
<p>This makes it very difficult to discover how a Rails app responds to a particular URL, without hunting through the controllers to find a corresponding action. It also makes working with REST a nightmare!</p>
<p><strong>Lesson learnt:</strong> use routes.rb</p>
<h3>2. Conventions are important</h3>
<p>Rails is all about convention over configuration, of course. But when you&#8217;re coding a Rails app &#8212; especially if you&#8217;re new to Rails &#8212; it&#8217;s easy to ignore those conventions, or just be plain unaware of them.</p>
<p>This leads to a lot of unnecessary work. I&#8217;ve spent a lot of time over the past few months translating unconventional code into code that more closely fits the Rails way of doing things: the result is code that&#8217;s easier to test, easier to maintain, and much, much faster.</p>
<p><strong>Lesson learnt: </strong>take some time to understand Rails&#8217; conventions</p>
<h3>3. Simplicity is important</h3>
<p>The more I write code, the more I find myself thinking: complicated code is a Bad Thing. Of course, as a kind pedant once told me, there&#8217;s a difference between <em>complicated</em> and <em>complex</em>.</p>
<p>(If you don&#8217;t have a dictionary handy, &#8220;complicated&#8221; roughly means messy, difficult to understand; &#8220;complex&#8221; means many interconnected parts, or a large system. The key difference is that complex systems can be well designed: <em>complicated</em> systems are not.)</p>
<p>OK, dictionary rant over :) Messy, complicated Rails applications come about when a developer doesn&#8217;t take the time to think things through. Simplicity is normally easy if you take some time to plan your work upfront &#8212; messy code happens when things are rushed or not thought through.</p>
<p><strong>Lesson learnt:</strong> think before you start coding</p>
<h3>4. Ruby is important</h3>
<p>Obvious, but very true: Ruby is important to Rails applications. If you&#8217;re new to coding, or new to Rails, then take some time to learn Ruby first: otherwise, you&#8217;ll miss out on the power (and beauty) of a great language and a great framework.</p>
<p><strong>Lesson learnt: </strong>learn Ruby <em>and</em> Rails, not just Ruby <em>on </em>Rails!</p>
<h3>You are important, too</h3>
<p>Conclusions? All of the above (and more) is important when you&#8217;re developing a Rails app. And you, the developer, are important too &#8212; have fun, keep learning, and don&#8217;t work too hard. Rails should be fun :)</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilding.net/2010/01/21/lessons-learnt-with-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Passwords and Security</title>
		<link>http://jameswilding.net/feeder/?FeederAction=clicked&amp;feed=Posts+%28RSS2%29&amp;seed=http%3A%2F%2Fjameswilding.net%2F2010%2F01%2F21%2Fon-passwords-and-security%2F&amp;seed_title=On+Passwords+and+Security</link>
		<comments>http://jameswilding.net/2010/01/21/on-passwords-and-security/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 12:40:24 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://jameswilding.net/?p=416</guid>
		<description><![CDATA[Why do ordinary users care so little about passwords, and what can developers do about it?]]></description>
			<content:encoded><![CDATA[<p><a title="Password #fail" href="http://twitter.com/skap5/status/8023405339">This tweet from Saul Kaplan</a> got me thinking: there are really two ways of looking at passwords.</p>
<p>Developers, geeks, and the security conscious think like this:</p>
<blockquote><p>I need to protect this website/application so criminals don&#8217;t steal my personal details, bank account number, or email address. I should choose something secure: preferably a random collection of letters, numbers, and symbols. Plenty of websites store passwords as plain text, too, so I should pick a password that&#8217;s unique. I won&#8217;t be able to remember it, but my browser/keychain can handle that and the website/application will be much more secure.</p></blockquote>
<p>Ordinary users think of passwords like this:</p>
<blockquote><p>I have to type something into this box to make the website work. I&#8217;ll type &#8220;12345&#8243;: that&#8217;s easy to remember.</p></blockquote>
<p>This is a problem.</p>
<p>Most ordinary users are aware of security as a vague, secondary concern: &#8220;someone might take my credit card details&#8221; or &#8220;emails can contain bad stuff&#8221;. Most ordinary users do not see passwords as a key part of security, and even if they do, they don&#8217;t really understand the implications of choosing a bad one.</p>
<p>To ordinary users, a password is not a security feature: it&#8217;s a hurdle to be jumped before they can do what they want to do.</p>
<p>How do we combat this? I don&#8217;t know. The tough option would be to check password strength <em>and force users to choose a strong password.</em> In the same way that websites validate email addresses on signup forms, they could validate passwords too.</p>
<p>Imagine if, in HTML5, you could do this:</p>
<p><script src="http://gist.github.com/282764.js"></script></p>
<p>Where &#8220;secure&#8221; is some attribute that requires the browser to validate the strength of the password&#8221; (alert message &#8220;The password you chose is too weak: please pick another&#8221;).</p>
<p>I don&#8217;t know how well-recieved this would be by users. At the moment, there is a slight attempt to encourage users to understand the importance of strong passwords, but this is second- or third-hand information to most users, at best.</p>
<p>As developers, we have a responsibility to help users understand the importance of passwords. I do it all the time, but I&#8217;ve come to think that a simple password field (with no validations) isn&#8217;t enough. Something needs to change.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswilding.net/2010/01/21/on-passwords-and-security/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
