<?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>All Thumbs and No Fingers &#187; Web Development</title>
	<atom:link href="http://redjamjar.net/topics/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://redjamjar.net</link>
	<description>A bucket for all things by redjamjar</description>
	<lastBuildDate>Sat, 24 Dec 2011 08:41:39 +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>Book Review: Mobile First by Luke Wroblewski</title>
		<link>http://redjamjar.net/internet/book-review-mobile-first-by-luke-wroblewski/</link>
		<comments>http://redjamjar.net/internet/book-review-mobile-first-by-luke-wroblewski/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 09:09:57 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[user_centered_design]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=327</guid>
		<description><![CDATA[If you&#8217;ve not heard of A book Apart they are brilliant at providing short to the moment guides aimed at people without the time to spend digging around through reams of pages. Just perfect for the train! Luke Wroblewski doesn&#8217;t &#8230; <a href="http://redjamjar.net/internet/book-review-mobile-first-by-luke-wroblewski/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve not heard of <a href="http://www.abookapart.com/">A book Apart</a> they are brilliant at providing short to the moment guides aimed at people without the time to spend digging around through reams of pages. Just perfect for the train!</p>
<p><a href="http://www.abookapart.com/products/mobile-first"><img class="aligncenter size-medium wp-image-332" title="Mobile First" src="http://redjamjar.net/wp-content/uploads/2011/12/Screen-Shot-2011-12-18-at-09.01.25-300x137.png" alt="" width="300" height="137" /></a><a href="http://www.lukew.com/">Luke Wroblewski</a> doesn&#8217;t disappoint in this short guide on <a title="Mobile First Book" href="http://www.abookapart.com/products/mobile-first">Mobile First</a> for designers. Reading through this guide offers a wealth of advice, every second sentence it felt like another simple statement resonating within me. Here are just a few highlights (really) I particularly enjoyed, but for a few quid go and get the whole book:</p>
<p><span id="more-327"></span></p>
<p><strong>Growth</strong></p>
<ul>
<li>Websites and applications should be designed and built for mobile first.</li>
<li>Smartphones were boldly predicted to out-ship the combined global market of laptop, desktop, and notebook computers in 2012. <a href="http://www.smartonline.com/smarton-products/smarton-mobile/smartphones-pass-pc-sales-for-the-first-time-in-history/">They did so in the last quarter of 2010 &#8211; two years earlier than predicted. </a></li>
<li>&#8230; even if you can create native applications for each platform, the cost of maintaining them can quickly make it prohibitive.</li>
<li>The combination of mobile and desktop experiences results in more engaged users across both sets of devices.</li>
</ul>
<p><strong>Constraints</strong></p>
<ul>
<li>Screens are small, networks are unreliable, and people can find themselves in all kinds of situations when they pull out their mobile device.</li>
<li>&#8230; design is the process of gradually applying constraints until an elegant solution remains.</li>
<li>&#8230; 80% of the screen space from the desktop was missing.</li>
<li>&#8230; Thinking “<a href="http://blog.compete.com/2010/03/12/smartphone-owners-a-ready-and-willing-audience/">one eyeball, one thumb</a>” forces you to simplify mobile designs &#8230;</li>
</ul>
<p><strong>Capabilities</strong></p>
<ul>
<li>&#8230; mobile capabilities allow you to do: reinvent ways to meet people’s needs using exciting new tools &#8230;</li>
</ul>
<p><strong>Organisation</strong></p>
<ul>
<li>Aligning with mobile behaviors also naturally aligns your website with real-world needs.</li>
<li>&#8230; content takes precedence over navigation on mobile.</li>
<li>&#8230; allowing people to explore and pivot to relevant content doesn’t have to mean piles of navigation bars that bury content.</li>
<li>If you need a fixed menu, better to fix it to the top, as Twitter has done.</li>
<li>&#8230; fingers are imprecise pointing instruments&#8230; [ isn't that obvious?, many examples I see say not so ] bigger [not downsized] touch targets are essential.</li>
<li>Destructive actions like cancel or delete can be placed outside people’s comfort zone.</li>
<li>Consistency in interaction approaches and gestures more than diversity. See Luke&#8217;s detailed guide here: <a href="http://www.lukew.com/ff/entry.asp?1071">Common Gesture Reference.</a></li>
<li>We are in a transition phase from GUIs to NUIs (Natural User Interfaces).</li>
<li>Develop with progressive enhancement in mind</li>
</ul>
<p>Refer to <a href="http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html">Apples guidelines</a> for target sizes and much much more</p>
<p><strong>Inputs</strong></p>
<ul>
<li>Take advantage of input types, attributes, and masks to make mobile input easier.</li>
<li>Select menus are pretty tap-intensive: tap the menu once to open it, swipe the list that shows up to find the answer you want to select, tap it, and then tap down or close to go back to the form.</li>
<li>HTML5 input types can help people accurately answer questions that require a specific format.</li>
<li>&#8230; take the height of virtual keyboards into account &#8230;</li>
<li>Actively encourage input and allow people to contribute and create using their mobile devices.</li>
</ul>
<p><strong>Layout</strong></p>
<ul>
<li>&#8230; the meta viewport tag is really useful for designing mobile web experiences.</li>
<li>Forget pixels and instead concentrate on points, for example on all iPhones this is consistent at 320&#215;480, only the pixel density changes.</li>
<li>Render rounded borders &amp; graduated backgrounds using CSS3 but not to many or performance will be compromised.</li>
<li>Flexible layouts which expand and adjust to the available width of the device are essential.</li>
<li>Use break points to provide differing layout rules at significantly different device criteria. See more in <a href="http://www.abookapart.com/products/responsive-web-design">Responsive Web Design</a>.</li>
<li>Consider the differences between connected TVs, desktops/laptops, tablets, smartphones, and feature phones.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Book+Review%3A+Mobile+First+by+Luke+Wroblewski+http%3A%2F%2Fbit.ly%2Fsy7dcY" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Book+Review%3A+Mobile+First+by+Luke+Wroblewski+http%3A%2F%2Fbit.ly%2Fsy7dcY" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/book-review-mobile-first-by-luke-wroblewski/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching a rails app from mySQL 5.1 to postgresql 8.4</title>
		<link>http://redjamjar.net/internet/databases/switching-a-rails-app-from-mysql-5-1-to-postgresql-8-4/</link>
		<comments>http://redjamjar.net/internet/databases/switching-a-rails-app-from-mysql-5-1-to-postgresql-8-4/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:13:17 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[switching]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=256</guid>
		<description><![CDATA[Switching a rails app across to postgresql became a necessity recently due to the range of licencing and ownership considerations which have affected mySQL recently. Not wanting to be restricted in some way in how I utilise my app I &#8230; <a href="http://redjamjar.net/internet/databases/switching-a-rails-app-from-mysql-5-1-to-postgresql-8-4/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Switching a rails app across to postgresql became a necessity recently due to the range of licencing and ownership considerations which have affected mySQL recently. Not wanting to be restricted in some way in how I utilise my app I decided to investigate using the popular opensource postgresql database.</p>
<p><span id="more-256"></span></p>
<p>Firstly you need to understand how being more standards conformant may affect your application. If you have been avoiding activerecord for perhaps performance reasons in some queries check to make sure they are going to still work the way you expect.</p>
<p><strong>My checklist includes:</strong></p>
<ul>
<li>Text comparisons are now lowercase</li>
<li>Quotes follow the SQL standard and using single quotes not double as mysql accepts</li>
<li>tSearch2 as an alternative to solr and sphinx and its built in</li>
<li>Tests</li>
<li>The knowledge that my app doesn&#8217;t use anything non standard so should just work <img src='http://redjamjar.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<div><strong>How to install postgresql on Mac OS X Lion:  </strong></div>
<div>Installation is very simple and mostly covered elsewhere but as a quick reference I did the following:</div>
<div>
<ol>
<li>Download and install macports from <a href="http://www.macports.org/install.php">macports</a>. Take the .dmg as this is bar far the easiest option.<br />
From time to time you should run the following once installed to keep everything up to date.</p>
<pre class="brush: bash">sudo port -v selfupdate</pre>
</li>
<li>Open terminal.app</li>
<li>The following commands will install postgresql and postgresql-server
<pre class="brush: bash">sudo port install postgresql84 postgresql84-server</pre>
<p>If like me you want to know where everything is installed use this command:</p>
<pre class="brush: bash">port contents postgresql84</pre>
</li>
<li>If like me you fine the mySQL query browser and workbench useful then install the equivalent for postgresql
<pre class="brush: bash">sudo port install pgAdmin3</pre>
</li>
<li>Once installed you can get on with configuring and using the database.
<pre class="brush: bash">sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql84/defaultdb
sudo su postgres -c &#039;/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb&#039;</pre>
</li>
<li>If you create the database folders as postgres and initialise the database with this user they must also own the server process.</li>
<li>Finally start the database
<pre class="brush: bash">/opt/local/lib/postgresql84/bin/postgres -D /opt/local/var/db/postgresql84/defaultdb</pre>
<p>You can now launch pgAdmin3 and connect to your localhost. Macport apps can be found in /Applications/Macports</li>
</ol>
<div><strong>How to get Rails talking to Postgresql</strong></div>
<div>Once you&#8217;ve got a working postgresql server installed its time to setup rails. In my case I was converting an existing rails app which used mySQL. I did the following:</div>
<div>
<ol>
<li>Install Xcode &#8211; this will be required so that you can compile libraries. You already have it installed right?</li>
<li>Install the rails-pg gem.<br />
To accomplish this the gem will need to compile a library so it needs to know where to find the include folder and your architecture.</p>
<pre class="brush: bash">sudo env ARCHFLAGS=&quot;-arch x86_64&quot; gem install pg -- --with-pg-lib=/opt/local/lib/postgresql84/ --with-pg-include=/opt/local/include/postgresql84/</pre>
</li>
<li>Once installed you can now setup your rails application:</li>
<ol>
<li>For a new application based on Rails 3
<pre class="brush: bash">rails new #name_of_app# -d postgres</pre>
</li>
<li>For an existing application edit the following files<br />
Gemfile</p>
<pre class="brush: bash">gem &#039;pg&#039; </pre>
<p>config/database.yml</p>
<pre class="brush: bash">development:
adapter: postgresql
database: appname_development
username: postgres
password:
host: localhost
encoding: UTF8
pool: 5
</pre>
</li>
</ol>
<li>You should now be able to connect to the postgresql server from Rails and work as you would expect to. Its worth looking through the section below for some advice on the differences you should expect between mySQL and Postgresql before you use the system in anger.</li>
</ol>
</div>
</div>
<div><strong>Resources worth looking at:</strong></div>
<div>
<ul>
<li><a href="http://www.postgresql.org/">Postgresql</a> and the d<a title="8.4 Docs" href="http://www.postgresql.org/docs/8.4/interactive/index.html">ocs</a></li>
<li><a href="http://www.pgadmin.org/">pgAdmin3</a> &#8211; UI for Postgresql. See a demo of what can be done in pgAdmin3 thanks to Gary Carter at EnterpriseDB <p><a href="http://www.youtube.com/watch?v=1wvDVBjNDys"><img src="http://img.youtube.com/vi/1wvDVBjNDys/2.jpg"></a></p>
<p><a href="http://www.youtube.com/watch?v=1wvDVBjNDys">Click here</a> to view the video on YouTube.</p>
</li>
<li><a href="http://railsonpostgresql.com/">Railsonpostgresql.com</a> and specifically recommendations on <a href="http://railsonpostgresql.com/2009/09/04/rails-postgresql-and-database-drivers">rails database adapters</a></li>
<li>Why you should <a href="http://awesomeful.net/posts/45-postgresql-rails-and-why-you-should-care">care about postgresql</a> <em>slighlty old but good background</em></li>
<li>Converting from mySQL to <a href="http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL">postgresql &#8211; Wikibooks: things to know</a></li>
<li><a href="http://www.heroku.com">Heroku</a> support for Postgresql: <a href="http://devcenter.heroku.com/articles/database">Heroku Database Support</a></li>
<li>Lengthy article on stackoverflow on the thread of converting from mySQL to Postgresql: <a href="http://stackoverflow.com/questions/772111/switching-from-mysql-to-postgresql-tips-tricks-and-gotchas">Gotchas</a></li>
</ul>
</div>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Switching+a+rails+app+from+mySQL+5.1+to+postgresql+8.4+http%3A%2F%2Fbit.ly%2FuPoodl" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Switching+a+rails+app+from+mySQL+5.1+to+postgresql+8.4+http%3A%2F%2Fbit.ly%2FuPoodl" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/databases/switching-a-rails-app-from-mysql-5-1-to-postgresql-8-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: How to fix &#8216;rake/rdoctask&#8217; is deprecated. use rdoc/task instead</title>
		<link>http://redjamjar.net/internet/ruby-on-rails/quick-tip-how-to-fix-rakerdoctask-is-deprecated-use-rdoctask-instead/</link>
		<comments>http://redjamjar.net/internet/ruby-on-rails/quick-tip-how-to-fix-rakerdoctask-is-deprecated-use-rdoctask-instead/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 19:00:43 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rdoc]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=250</guid>
		<description><![CDATA[If you&#8217;ve recently found rails complaining about the following: rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) then open up your rakefile.rb and change require &#039;rake/rdoctask&#039; to look like this: require &#039;rdoc/task&#039; and remember to add the following to &#8230; <a href="http://redjamjar.net/internet/ruby-on-rails/quick-tip-how-to-fix-rakerdoctask-is-deprecated-use-rdoctask-instead/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://redjamjar.net/uncategorized/quick-tip-sudo-rake-command-not-found/' rel='bookmark' title='Quick Tip: sudo: rake: command not found'>Quick Tip: sudo: rake: command not found</a> <small>To resolve this issue which for me applies to Ubuntu...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve recently found rails complaining about the following:</p>
<pre class="brush: bash">rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)</pre>
<p>then open up your rakefile.rb and change</p>
<pre class="brush: ruby">
require &#039;rake/rdoctask&#039;
</pre>
<p>to look like this:</p>
<pre class="brush: ruby">
require &#039;rdoc/task&#039;
</pre>
<p> and remember to add the following to your Gemfile</p>
<pre class="brush: ruby">

group :development do
gem &#039;rdoc&#039;

end
</pre>
<p>You may need to run the following on the command line to freshen your gems</p>
<pre class="brush: bash">sudo bundle install</pre>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Quick+Tip%3A+How+to+fix+%E2%80%98rake%2Frdoctask%E2%80%99+is+deprecated.+use+rdoc%2Ftask+instead+http%3A%2F%2Fbit.ly%2FsL29bE" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Quick+Tip%3A+How+to+fix+%E2%80%98rake%2Frdoctask%E2%80%99+is+deprecated.+use+rdoc%2Ftask+instead+http%3A%2F%2Fbit.ly%2FsL29bE" title="Post to Twitter">Tweet This Post</a></p></div><p>Related posts:<ol>
<li><a href='http://redjamjar.net/uncategorized/quick-tip-sudo-rake-command-not-found/' rel='bookmark' title='Quick Tip: sudo: rake: command not found'>Quick Tip: sudo: rake: command not found</a> <small>To resolve this issue which for me applies to Ubuntu...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/ruby-on-rails/quick-tip-how-to-fix-rakerdoctask-is-deprecated-use-rdoctask-instead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails selection lists</title>
		<link>http://redjamjar.net/internet/ruby-on-rails/rails-selection-lists/</link>
		<comments>http://redjamjar.net/internet/ruby-on-rails/rails-selection-lists/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 18:08:15 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[select_tag]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=189</guid>
		<description><![CDATA[Problem: I&#8217;ve got the need to have a list of options presented in a drop down list but I really don&#8217;t mind them being hard coded somewhere (if I did I&#8217;d stuff them in a database table). Fix: Easy I &#8230; <a href="http://redjamjar.net/internet/ruby-on-rails/rails-selection-lists/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong>: I&#8217;ve got the need to have a list of options presented in a drop down list but I really don&#8217;t mind them being hard coded somewhere (if I did I&#8217;d stuff them in a database table).</p>
<p><strong>Fix</strong>: Easy I can add an array of arrays to my model file and them pull them through to the view. In each sub-array the first element in the name displayed, the second is that submitted with the request.</p>
<p><strong>Example</strong>: In the model for my bookings I add booking_status</p>
<pre class="brush: rails">class Booking &lt; ActiveRecord::Base

  BOOKING_STATUS = [
    [&#039;booked&#039;, &#039;booked&#039;],
    [&#039;request&#039;, &#039;request&#039;],
    [&#039;pending&#039;, &#039;pending&#039;],
    [&#039;approved&#039;, &#039;approved&#039;],
    [&#039;not-approved&#039;, &#039;not_approved&#039;],
    [&#039;other&#039;, &#039;other&#039;] ]

end</pre>
<p>In the view I can then include a selection tag which uses each of these items</p>
<pre class="brush: rails">
&lt;%= f.select :status, Booking::BOOKING_STATUS %&gt;
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Rails+selection+lists+http%3A%2F%2Fbit.ly%2FtpBCbM" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Rails+selection+lists+http%3A%2F%2Fbit.ly%2FtpBCbM" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/ruby-on-rails/rails-selection-lists/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails rapid prototyping &#8211; partials</title>
		<link>http://redjamjar.net/internet/ruby-on-rails/rails-rapid-prototyping-partials/</link>
		<comments>http://redjamjar.net/internet/ruby-on-rails/rails-rapid-prototyping-partials/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 12:01:00 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[partials]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=182</guid>
		<description><![CDATA[Rails script generators enable true prototyping from the command line. The simplicity of being able to generate a complete working application within a few commands is wonderful. However I often find that I&#8217;m spending time to ensure some very simple basics are &#8230; <a href="http://redjamjar.net/internet/ruby-on-rails/rails-rapid-prototyping-partials/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Rails script generators enable true prototyping from the command line. The simplicity of being able to generate a complete working application within a few commands is wonderful. However I often find that I&#8217;m spending time to ensure some very simple basics are better than the out of the box offering.</p>
<p>Yes I know I prototyping, yes I know I&#8217;m going to through it away at the end of the day but still there is no need for not making effective use of partials in forms.</p>
<p>Partials within forms makes sure functionality is rapidly updated in both the new and edit actions.</p>
<p>So typically I like to convert:</p>
<pre class="brush: rails">
&lt;h1&gt;Editing booking&lt;/h1&gt;

&lt;% form_for(@booking) do |f| %&gt;
  &lt;%= f.error_messages %&gt;

  &lt;p&gt;
    &lt;%= f.label :event_id %&gt;&lt;br /&gt;
    &lt;%= f.text_field :event_id %&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;%= f.label :user_id %&gt;&lt;br /&gt;
    &lt;%= f.text_field :user_id %&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;%= f.label :status %&gt;&lt;br /&gt;
    &lt;%= f.text_field :status %&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;%= f.submit &#039;Update&#039; %&gt;
  &lt;/p&gt;
&lt;% end %&gt;
</pre>
<p>to something which makes much more sense like: </p>
<pre class="brush: rails">
&lt;h1&gt;Editing booking&lt;/h1&gt;

&lt;% form_for(@booking) do |f| %&gt;
  &lt;%= render :partial =&gt; &#039;form&#039;, :locals =&gt; { :f =&gt; f } %&gt;
  &lt;p&gt;
    &lt;%= f.submit &#039;Update&#039; %&gt;
  &lt;/p&gt;
&lt;% end %&gt;
</pre>
<p>I&#8217;d encourage you to do the same and see how it saves you one more piece of hassle. And of course if your using text mate remember ctrl+shift+H will create the partial for you.</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Rails+rapid+prototyping+%E2%80%93+partials+http%3A%2F%2Fbit.ly%2FuKdm7o" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Rails+rapid+prototyping+%E2%80%93+partials+http%3A%2F%2Fbit.ly%2FuKdm7o" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/ruby-on-rails/rails-rapid-prototyping-partials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache &#8211; Name Virtual Host errors</title>
		<link>http://redjamjar.net/internet/apache-name-virtual-host-errors/</link>
		<comments>http://redjamjar.net/internet/apache-name-virtual-host-errors/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 08:12:55 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Computing & IT]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=167</guid>
		<description><![CDATA[For some time now apache has been bugging me that there is a configuration issue with my virtual hosts, so I decided to find out what the issue was and try to resolve it. As it happens the fix was &#8230; <a href="http://redjamjar.net/internet/apache-name-virtual-host-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">For some time now apache has been bugging me that there is a configuration issue with my virtual hosts, so I decided to find out what the issue was and try to resolve it. As it happens the fix was easy but not well documented.</div>
<div id="_mcePaste"><strong>Issue:</strong></div>
<div>[warn] NameVirtualHost *:80 has no VirtualHosts</div>
<div><strong>Resolution:</strong></div>
<div>You can resolve this by ensuring that you virtual hosts are configured correctly. To do this you should have a NameVirtualHost for each of your ports and then be using ServerName within each virtualhost. By configuring apache this way you allow it to correctly interpret requests for different virtual hosts on the same IP Address.</div>
<div><strong>Example:</strong></div>
<div id="_mcePaste">In my apache2.conf file I have the following declaration</div>
<blockquote>
<div id="_mcePaste">NameVirtualHost *:80</div>
</blockquote>
<div id="_mcePaste">And then each of the virtual hosts is configured:</div>
<blockquote>
<div id="_mcePaste">&lt;VirtualHost *:80&gt;</div>
<div id="_mcePaste">RailsEnv beta</div>
<div id="_mcePaste">ServerName my-app.redjamjar.net</div>
<div id="_mcePaste">DocumentRoot /home/rails/beta/my-app/current/public</div>
<div id="_mcePaste">&lt;Directory &#8220;/home/rails/beta/my-app/current/public&#8221;&gt;</div>
<div id="_mcePaste">allow from all</div>
<div id="_mcePaste">AllowOverride All</div>
<div id="_mcePaste">&lt;/Directory&gt;</div>
<div id="_mcePaste">&lt;/VirtualHost&gt;</div>
</blockquote>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Apache+%E2%80%93+Name+Virtual+Host+errors+http%3A%2F%2Fbit.ly%2FtuHbv3" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Apache+%E2%80%93+Name+Virtual+Host+errors+http%3A%2F%2Fbit.ly%2FtuHbv3" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/apache-name-virtual-host-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integration &#8211; how to plan for the unknown</title>
		<link>http://redjamjar.net/internet/integration-how-to-plan-for-the-unknown/</link>
		<comments>http://redjamjar.net/internet/integration-how-to-plan-for-the-unknown/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 22:06:50 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=164</guid>
		<description><![CDATA[No one has ever said integration of one system with another is straight forward. But does it always need to be a surprise a minute roller coaster ride? In a recent and slightly challenging (read evolving) integration projects I devised &#8230; <a href="http://redjamjar.net/internet/integration-how-to-plan-for-the-unknown/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>No one has ever said integration of one system with another is straight forward. But does it always need to be a surprise a minute roller coaster ride? In a recent and slightly challenging (read evolving) integration projects I devised a simple set of rules:</p>
<p>Action Plan:</p>
<ol>
<li>Identify the unknowns<br />
How? Start simply with broad questions. Don&#8217;t be too quick to get into the detail as this will be the natural tendency. At this stage understand nothing about the detail but fully comprehending the end user environment or capabilities will give you a greater barometer for detecting where the unknowns are essential or not.</li>
<li>Questions everything, assume nothing<br />
I&#8217;ve tripped over this many times, combined with one this is probably the largest probably when scoping, initiating or specify an integration piece of work. I find Excel is my friend in this situation, I can capture questions and responses as the knowledge flows</li>
<li>Seek documentation but don&#8217;t rely on it.<br />
Documentation in what ever form is usually well intentioned, but out of date, inaccurate or just plain wrong. Typically the documentation will look grand &#8216;Technical Specification for X.Y.Z version 1.2&#8242; however what tends to happen is that was written at the outset before a line of code had been written &#8211; ask yourself when you last went back and updated a specification at the end of project, yet you want to make key integration decisions based on it?</li>
<li>Get a setup of the system as close as possible to the real environment for use during development, verification testing and UAT</li>
<li>Commit, integrate and test regularly. Really if your not doing this forget it</li>
<li>Use real data not &#8216;lorem ipsum&#8217; or &#8216;test account 1&#8242;<br />
Demand this especially if you have translation or localisation considerations to consider.</li>
<li>Allow your/encourage your client to come and inspect your work &#8211; they may see things your developer mind over looked.<br />
Coming from a developer mind I&#8217;m always surprised how easy it is to be lulled by our perspective on systems.</li>
<li>Testing<br />
Even with all the automated testing, eyeballs and code reviews I&#8217;m still amazed by how often I come across developers who see it as acceptable to ship code from their development computer to a production environment without any testing.</li>
</ol>
<p>Have I overlooked anything you find works best for you? Let me have your comments and I&#8217;ll add them in.</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Integration+%E2%80%93+how+to+plan+for+the+unknown+http%3A%2F%2Fbit.ly%2Frw9Zp4" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Integration+%E2%80%93+how+to+plan+for+the+unknown+http%3A%2F%2Fbit.ly%2Frw9Zp4" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/integration-how-to-plan-for-the-unknown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure Copy How to</title>
		<link>http://redjamjar.net/internet/secure-copy-how-to/</link>
		<comments>http://redjamjar.net/internet/secure-copy-how-to/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 13:22:31 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Computing & IT]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=136</guid>
		<description><![CDATA[Heres a rough and ready introduction to using the power of SSH to perform a secure copy of a file or directory between computers. &#62; scp usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P &#8230; <a href="http://redjamjar.net/internet/secure-copy-how-to/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Heres a rough and ready introduction to using the power of SSH to perform a secure copy of a file or directory between computers. </p>
<pre class="brush: bash">
&gt; scp 

usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 [...] [[user@]host2:]file2</pre>
<p>So how does this matter for me well if you wanted to move a file from a server called Mojo.com to a server called Louis.com you&#8217;d enter</p>
<pre class="brush: bash">
&gt; scp file.txt my_login_name@louis.com:remote_directory
</pre>
<p>or if I want to copy a folder:</p>
<pre class="brush: bash">
&gt; scp -r my_login_name@louis.com:remote_directory my_files
</pre>
<p>Hope this helps. </p>
<p>By the way for those on Windows Penguinet has scp built in with a nice looking file browser/selection UI. </p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Secure+Copy+How+to+http%3A%2F%2Fbit.ly%2FvokVKB" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Secure+Copy+How+to+http%3A%2F%2Fbit.ly%2FvokVKB" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/secure-copy-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails localisation bug</title>
		<link>http://redjamjar.net/internet/ruby-on-rails/rails-localisation-bug/</link>
		<comments>http://redjamjar.net/internet/ruby-on-rails/rails-localisation-bug/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 07:25:44 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[i8n]]></category>
		<category><![CDATA[localisation]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=119</guid>
		<description><![CDATA[I&#8217;ve just gone through the challenge of working out what was wrong with the following piece of code: '/' do %> nil, nchange => 'this.form.submit()'}) %> Our client reported that on a signup page where they choose an alternative language &#8230; <a href="http://redjamjar.net/internet/ruby-on-rails/rails-localisation-bug/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just gone through the challenge of working out what was wrong with the following piece of code:</p>
<pre class="brush:ror"><% form_tag :controller => '/' do %>
				<%= t(:'txt.language') %> <%= select_tag("locale", options_for_select(LOCALES_AVAILABLE, I18n.locale), { :index => nil, <img src='http://redjamjar.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nchange => 'this.form.submit()'}) %>
			<% end %>
</pre>
<p>Our client reported that on a signup page where they choose an alternative language it got redirected and they could never reach the page in their native language.</p>
<p>How can this happen you might ask?</p>
<p>Well the request includes some values within the url which are used as a key. Only if the key is valid is the controller allowed to complete the request. The issue is the combining of maintaining the key and switching the language.</p>
<p>As it happens its a very simple fix and was pointed out to me by Juliana.</p>
<pre class="brush:ror"><% form_tag :controller => request.request_uri do %>
				<%= t(:'txt.language') %> <%= select_tag("locale", options_for_select(LOCALES_AVAILABLE, I18n.locale), { :index => nil, <img src='http://redjamjar.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nchange => 'this.form.submit()'}) %>
			<% end %>
</pre>
<p>In this fixed second example the alteration for the controller has been updated to direct the language selector to the controller of the current page. The documentation for this suggests that its broken on IIS (really should you be even trying to use this?) in fact I found that the source has had a significant amount of work go into it to work around the issue and even make it work on that webserver. Its a great little solution to ensure that the reloaded page is returned to the user in the state it was with the addition of the correct language. </p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Rails+localisation+bug+http%3A%2F%2Fbit.ly%2FsVTTJb" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Rails+localisation+bug+http%3A%2F%2Fbit.ly%2FsVTTJb" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/ruby-on-rails/rails-localisation-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>quiet afternoon &#8211; try this&#8230;</title>
		<link>http://redjamjar.net/internet/quiet-afternoon-try-this/</link>
		<comments>http://redjamjar.net/internet/quiet-afternoon-try-this/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 06:23:08 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Computing & IT]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[synth]]></category>

		<guid isPermaLink="false">http://redjamjar.net/?p=113</guid>
		<description><![CDATA[Felt like a little distraction and a link to this popped up on twitter so I just couldn&#8217;t resist having a play Try it for yourself over at http://www.themaninblue.com/experiment/JS-909/ Tweet This PostNo related posts. Related posts brought to you by &#8230; <a href="http://redjamjar.net/internet/quiet-afternoon-try-this/">Continue reading <span class="meta-nav">&#8594;</span></a>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Felt like a little distraction and a link to this popped up on twitter so I just couldn&#8217;t resist having a play<a href="http://redjamjar.net/wp-content/uploads/2009/08/ScreenShot186.png"><img class="aligncenter size-medium wp-image-114" title="909" src="http://redjamjar.net/wp-content/uploads/2009/08/ScreenShot186-300x160.png" alt="909" width="300" height="160" /></a></p>
<p>Try it for yourself over at<img src="file:///C:/DOCUME%7E1/paulb/LOCALS%7E1/Temp/moz-screenshot.png" alt="" /> <img src="file:///C:/DOCUME%7E1/paulb/LOCALS%7E1/Temp/moz-screenshot-1.png" alt="" /><a href="http://www.themaninblue.com/experiment/JS-909/">http://www.themaninblue.com/experiment/JS-909/ </a></p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=quiet+afternoon+%E2%80%93+try+this%E2%80%A6+http%3A%2F%2Fbit.ly%2FtcBiVJ" title="Post to Twitter"><img class="nothumb" src="http://redjamjar.net/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=quiet+afternoon+%E2%80%93+try+this%E2%80%A6+http%3A%2F%2Fbit.ly%2FtcBiVJ" title="Post to Twitter">Tweet This Post</a></p></div><p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/internet/quiet-afternoon-try-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: redjamjar.net @ 2012-02-05 23:45:20 -->
