<?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>DEfusion.org.uk &#187; Productivity</title>
	<atom:link href="http://www.defusion.org.uk/archives/category/productivity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.defusion.org.uk</link>
	<description>I too will force my opinions on you</description>
	<lastBuildDate>Mon, 04 Jul 2011 19:28:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Courtesy Car For Your Internet</title>
		<link>http://www.defusion.org.uk/archives/2008/07/29/courtesy-car-for-your-internet/</link>
		<comments>http://www.defusion.org.uk/archives/2008/07/29/courtesy-car-for-your-internet/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 18:53:15 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Outer Monologue]]></category>
		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2008/07/29/courtesy-car-for-your-internet/</guid>
		<description><![CDATA[I&#8217;ve just read a lovely rant by Dave Gorman about BT and his internet service being down. It&#8217;s the kind of post I&#8217;m trying not to write about my (ongoing) trials and tribulations of trying to get an iPhone 3G and some kind of semi-decent customer service during the process. But I digress, the reason [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just read a lovely rant by <a href="http://gormano.blogspot.com/">Dave Gorman</a> about <a href="http://gormano.blogspot.com/2008/07/bt-hello-geoff.html">BT and his internet service being down</a>. It&#8217;s the kind of post I&#8217;m trying not to write about my (ongoing) trials and tribulations of trying to get an iPhone 3G and some kind of semi-decent customer service during the process. But I digress, the reason I&#8217;m writing about this is that this point stood out for me:</p>
<blockquote cite="http://gormano.blogspot.com/2008/07/bt-hello-geoff.html"><p>You can get a courtesy car when your motor is crocked so why not a courtesy internet connection? Especially when the bit that&#8217;s broken down is at their end of things.</p></blockquote>
<p><span id="more-177"></span><br />
I currently work from home so use the internet pretty much 24/7 at home as a reference, communications tool and news source. I could live (and have done recently) for a short period of time without the news and the communications, at least now with an iPhone I should be able to access those in the future, but the biggest thing I&#8217;d miss is the reference. As a developer I&#8217;ve always found that I learn best by doing rather than by reading, so I have very few technical books on my physical bookshelves (and only one reference book) but I find myself visiting multiple language/api references, performing searches for plug-ins, methods and techniques every day. </p>
<p>Last time my internet was down (for only a few hours) it was like someone had removed an intangible appendage, my productivity was severely hampered.</p>
<p>Daves idea was that BT should provide him with a <acronym title="Universal Serial Bus">USB</acronym> modem which he could plug in while his service was down, they eventually gave him dial-up access &#8212; which I think is just adding insult to injury. A backup <acronym title="Universal Serial Bus">USB</acronym> modem that you can use in an emergency would be perfect and I&#8217;m sure they could give you it as a secondary connection for when you&#8217;re away from home and not near a wireless hotspot. With the obvious caveat being that if you standard broadband connection is down that they wouldn&#8217;t charge you anything for using the <acronym title="Universal Serial Bus">USB</acronym> modem.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2008/07/29/courtesy-car-for-your-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: If Parallels Suddenly Goes Slow</title>
		<link>http://www.defusion.org.uk/archives/2008/07/24/quick-tip-if-parallels-suddenly-goes-slow/</link>
		<comments>http://www.defusion.org.uk/archives/2008/07/24/quick-tip-if-parallels-suddenly-goes-slow/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 15:31:01 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Outer Monologue]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Quick Link]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2008/07/24/quick-tip-if-parallels-suddenly-goes-slow/</guid>
		<description><![CDATA[I&#8217;ve noticed a few times that my Ubuntu VM, running in Parallels, suddenly goes slow. 
First time round I was totally confused and re-booted the VM (I access it via SSH), that didn&#8217;t work, and was also really slow. So I shut it down and then I noticed when I returned to Parallels to stop [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed a few times that my Ubuntu <acronym title="Virtual Machine">VM</acronym>, running in Parallels, suddenly goes slow. </p>
<p>First time round I was totally confused and re-booted the <acronym title="Virtual Machine">VM</acronym> (I access it via <acronym title="Secure SHell (encrypted protocol replaces telnet and FTP)">SSH</acronym>), that didn&#8217;t work, and was also really slow. So I shut it down and then I noticed when I returned to Parallels to stop the <acronym title="Virtual Machine">VM</acronym> that a dialog box was waiting for me (telling me there was an update or something). It turned out that this was the issue. It seems to happen to me for any dialog box as just now I&#8217;ve had the same issue when there is a dialog box asking if I want the <acronym title="Virtual Machine">VM</acronym> to connect to a <acronym title="Universal Serial Bus">USB</acronym> device.</p>
<p>Seems silly to me that this should slow down the <acronym title="Virtual Machine">VM</acronym>, but just thought I&#8217;d mention it.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2008/07/24/quick-tip-if-parallels-suddenly-goes-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uploading Files and Images With Flex and Rails</title>
		<link>http://www.defusion.org.uk/archives/2008/04/21/uploading-files-and-images-with-flex-and-rails/</link>
		<comments>http://www.defusion.org.uk/archives/2008/04/21/uploading-files-and-images-with-flex-and-rails/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 21:23:58 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2008/04/21/uploading-files-and-images-with-flex-and-rails/</guid>
		<description><![CDATA[Having spent most of Saturday trying to get files to upload from a Flex application to a Rails backend, fighting against both Flex and Rails all the way, I thought I&#8217;d collect together some of the things that have helped me work through this in the hope that others don&#8217;t have to spend quite as [...]]]></description>
			<content:encoded><![CDATA[<p>Having spent most of Saturday trying to get files to upload from a Flex application to a Rails backend, fighting against both Flex and Rails all the way, I thought I&#8217;d collect together some of the things that have helped me work through this in the hope that others don&#8217;t have to spend quite as long battling through this. Note however that these are not necessarily best pratices, more a collection of tips that helped me in my situation, there are probably better ways to do some or all of the things that I&#8217;ll be writing about &#8211; and if you know of any improvements/alternatives I&#8217;d love to hear about them.<br />
<span id="more-165"></span><br />
In my situation I am uploading images to Rails which is using attachment_fu to handle the images and the thumbnail generation. Some of these tips will be relevant to all more generic issues, such as uploading files from Flex, and some will be more specific, such as making attachment_fu work with images uploaded from Flex.</p>
<p><strong>Uploading files with Flex</strong><br />
To upload files with flex you need to use either the <a href="<br />
http://livedocs.adobe.com/flex/3/langref/flash/net/FileReference.html&#8221;>FileReference</a> or <a href="http://livedocs.adobe.com/flex/3/langref/flash/net/FileReferenceList.html">FileReferenceList</a> classes, the main difference between these two is that FileReference is for uploading single files and FileReferenceList allows multiple file uploads.</p>
<h2>Issue 1: How to send other data, such as meta/model data with the file upload:</h2>
<p>Say you want to upload an image and save that using Rails along with other model data for that image (such as a title etc.) then you&#8217;ll have to hack that into the request that FileReference sends. </p>
<p><a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=5534a12f&#038;sliceId=1">This Adobe tech note</a> recommends using the <span class="code">uploadDataFieldName</span> argument of the <span class="code">upload()</span> method, however to me this seems like a really awful hack as you&#8217;ll then have to parse the name/value pair string in your <span class="code">uploadDataFieldName</span> param at the backend. What you really want is separate parameters (ideally within the POST body).</p>
<p>The only viable solution I could come across was using the query string to pass the parameters through, your mileage may vary on this depending on the parameters you are sending, but I&#8217;m pretty sure that no modern browsers enforce the 255 character limit on a <acronym title="Uniform Resource Locator">URL</acronym> anymore.</p>
<h2>Issue 2: Session cookie not sent in Firefox:</h2>
<p>This problem is <a href="http://thanksmister.com/?p=59">explained really well over at Thanks Mister!</a>, it may apply to other browsers (probably the other gecko-based browsers work the same) but quite simply it means that if you&#8217;re relying on some data in your session during the upload you need to manually pass the session cookie through, however this raises further issues with Rails, so I&#8217;ll break it down further.</p>
<p><strong>Issue 2: Part 1 &#8212; Passing the cookie when uploading files with FileReference:</strong><br />
It&#8217;s fairly simple to get around this part of the problem, you just need to include your session identifier within the query string, the biggest issue with this is getting the cookie value &#8212; as Flash doesn&#8217;t have native access to the browsers cookies.<br />
To get the cookie you&#8217;ll need to use the <a href="http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html">ExternalInterface</a> to call some JavaScript to retrieve the cookie, this is <a href="http://www.restlessthinker.com/blog/?p=39">covered quite nicely in this post</a>. So when working with Rails we just need to retrieve the cookie that lives in whatever we&#8217;re using as the session ID and pass that through via the query string, but that brings us to another problem:</p>
<p><strong>Issue 2: Part 2 &#8212; Rails won&#8217;t let you pass session ids in the query string:</strong><br />
So now we need to tweak Rails to let us pass the session id via the query string, luckily there is <a href="http://blog.inquirylabs.com/2006/12/09/getting-the-_session_id-from-swfupload/">another great post on this</a>, however some of the Rails 2 security improvements require further workarounds which are in the comments on that post.</p>
<p>To quickly cover what you need to do is as follows:</p>
<ol>
<li>Add the patch (make sure you get the one for Mongrel/Apache linked at the bottom of the <a href="http://blog.inquirylabs.com/2006/12/09/getting-the-_session_id-from-swfupload/">post</a>) to the <span class="code">CGI::Session</span> class to your application &#8212; it really deserves to live in a plugin rather than the environment.rb file, which you&#8217;ll have to roll yourself.</li>
<li>For Rails 2 you have to add another override by adding <span class="code">session :cookie_only => false</span> at the controller level. I personally feel it is best to do this in just the controller that you&#8217;re using to upload the files with.</li>
<li>I still had issues with it not picking up my session &#8212; I was using the Rails 2 default of saving the session information in the cookie. There is probably another hack or change that I could make to get around this, but I chose to move (back to) Active Record sessions but this time using the <a href="http://blog.kovyrin.net/2008/02/06/fastsessions-rails-plugin-released/">Fast Sessions</a> plugin for a bit of a performance boost.
<p>I&#8217;ll probably look into this again at a later date, but right now I just wanted to get this part working and move on.
</li>
</ol>
<p>So now we&#8217;ve got our file uploading to the backend, within our session and our other model/meta data being sent as well. &#8220;Great we&#8217;re done, what else could go wrong now?&#8221; is just the kind of thought you&#8217;d be forgiven for having. Of course there was another issue that came up which needed to be handled.</p>
<h2>Issue 3: Attachment_fu and Flex file uploads</h2>
<p>FileReference uploads all files with the MIME type of <span class="code">application/octet-stream</span> which gives us a couple of problems:</p>
<ol>
<li>Your attachment_fu <span class="code">content-type</span> filter will probably reject all uploads out of hand &#8211; the easy hack would seem to be to add in the <span class="code">application/octet-stream</span> to your acceptable content-types, but that&#8217;s an awful hack that basically removes the content-type filtering and doesn&#8217;t address our second issue.</li>
<li>If using attachment_fu to create thumbnails and you do accept the <span class="code">application/octet-stream</span> MIME then you won&#8217;t have any thumbnails generated, because as far as attachment_fu is concerned your upload is not an image.</li>
</ol>
<p>Again the solution was only a few searches away, and the changes covered in <a href="http://blog.vixiom.com/2007/12/28/hacking-attachment_fu-to-work-with-flashflex-uploads-and-crop-square-images/">this post over at Vixiom Axioms</a> do fix the issue &#8212; although note that I had issues with that fix and had to apply my own changes &#8211; see the comment on that post.</p>
<h2>Conclusion</h2>
<p>So finally we have file uploads working from Flex to Rails, our session information is maintained, we&#8217;re passing along our model data and our images are being handled as they are supposed to.</p>
<p>This really shouldn&#8217;t have been this difficult, it should have been a simple case of using FileReference add some data to be POSTed and we&#8217;d be done but alas decisions made in/or issues with the Flash player lead to this merry dance of hacks, tweaks and workarounds to make everything sing to the same hymn-sheet.</p>
<p>Hopefully covering this and collecting together these links will save someone else from a wasted day of figuring out the solution to the myriad of problems that I encountered.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2008/04/21/uploading-files-and-images-with-flex-and-rails/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Code: CFStatShot Yahoo Widget</title>
		<link>http://www.defusion.org.uk/archives/2007/08/02/code-cfstatshot-yahoo-widget/</link>
		<comments>http://www.defusion.org.uk/archives/2007/08/02/code-cfstatshot-yahoo-widget/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 21:00:53 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2007/08/02/code-cfstatshot-yahoo-widget/</guid>
		<description><![CDATA[
I&#8217;m releasing a Yahoo Widget that I created a long time ago and have been meaning to release for quite a while too.
The story all begins when I took over the Coldfusion platform support for, I started to find myself spending a bit of time watching cfstat on the servers to get a feel for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/code/cfstatshot-cfstat-yahoo-desktop-widget/"><img class="featureImg" src="/wp-content/uploads/2007/08/cfstatshot.png" alt="CFStatShot watching multiple Coldfusion servers" /></a><br />
I&#8217;m releasing a <a href="http://widgets.yahoo.com/">Yahoo Widget</a> that I created a long time ago and have been meaning to release for quite a while too.</p>
<p>The story all begins when I took over the Coldfusion platform support for, I started to find myself spending a bit of time watching <span class="code">cfstat</span> on the servers to get a feel for the current status of the machines. As we had multiple servers (then 4, now 6) and only being able to get to cfstat directly on the machine, this was not really practicable.</p>
<p>What I really wanted was a little desktop application that could give me the headlines of <span class="code">cfstat</span> for as many servers as we had, all in an easy to digest format, the result is the <a href="/code/cfstatshot-cfstat-yahoo-desktop-widget/">CFStatShot Yahoo Desktop Widget</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2007/08/02/code-cfstatshot-yahoo-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>allSnap, Oh Yeah</title>
		<link>http://www.defusion.org.uk/archives/2006/11/28/allsnap-oh-yeah/</link>
		<comments>http://www.defusion.org.uk/archives/2006/11/28/allsnap-oh-yeah/#comments</comments>
		<pubDate>Tue, 28 Nov 2006 20:00:44 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Outer Monologue]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2006/11/28/allsnap-oh-yeah/</guid>
		<description><![CDATA[As I&#8217;ve mentioned before I&#8217;m a little bit anal when it comes to organising things on my computer and just have to have it all the way I want it. When listening to a recent edition of the Security Now podcast (that&#8217;s right I said podcast, Netcast my ass) on my way home last night [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve <a href="/archives/category/software/">mentioned before</a> I&#8217;m a little bit anal when it comes to organising things on my computer and just have to have it all the way I want it. When listening to a recent edition of the <a href="http://www.twit.tv/SN">Security Now</a> podcast (that&#8217;s right I said podcast, Netcast my ass) on my way home last night I couldn&#8217;t help get excited by the mention of <a href="http://www.cs.utoronto.ca/~iheckman/allsnap/">allSnap</a>. As, from the description of it, this offers something I&#8217;ve wanted for almost ever, but never really searched for &#8212; it allows all top level windows (in Windows) to snap to each other and the desktop boundaries.<br />
<span id="more-92"></span><br />
This is just fantastic, no longer do I have to spend time tweaking Windows to align up with the desktop boundaries (I rarely maximize things, on my <a href="/archives/2006/09/22/say-hello-to-my-little-friends/">new monitors</a> I do it even less) and then curse when I accidentally drag it out of position. I&#8217;ve only just started using this utility but I know I&#8217;ll be installing it on all my Windows machines, if there is a similar utility available for OS X then I&#8217;d love to hear about those too.</p>
<p>Finally one thing I&#8217;ve noticed is that when having a dual monitor setup is that some programs don&#8217;t handle that too well, <a href="http://www.cs.utoronto.ca/~iheckman/allsnap/">allSnap</a> handles them perfectly, each monitor has it&#8217;s own snap for its desktop boundaries, fantastic.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2006/11/28/allsnap-oh-yeah/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Say Hello To My Little Friends</title>
		<link>http://www.defusion.org.uk/archives/2006/09/22/say-hello-to-my-little-friends/</link>
		<comments>http://www.defusion.org.uk/archives/2006/09/22/say-hello-to-my-little-friends/#comments</comments>
		<pubDate>Fri, 22 Sep 2006 13:33:24 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Outer Monologue]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2006/09/22/say-hello-to-my-little-friends/</guid>
		<description><![CDATA[
At the weekend I took delivery of my two new Samsung SyncMaster 205BW monitors which are fantastic. I&#8217;ve had a dual head setup for about the last 4 years but always as a couple of different size &#038; resolution monitor. I&#8217;ve always thought it was a great improvement from a productivity point of view and [...]]]></description>
			<content:encoded><![CDATA[<p><a class="imagelink" href="http://www.defusion.org.uk/wp-content/uploads/2006/09/screens.jpg" title="Photograph of my two new widescreen monitors." rel="lightbox"><img id="image79" src="http://www.defusion.org.uk/wp-content/uploads/2006/09/screens_thumb.jpg" alt="Photograph of my two new widescreen monitors." class="featureImg" /></a></p>
<p>At the weekend I took delivery of my two new Samsung SyncMaster 205BW monitors which are fantastic. I&#8217;ve had a dual head setup for about the last 4 years but always as a couple of different size &#038; resolution monitor. I&#8217;ve always thought it was a great improvement from a productivity point of view and would never choose to be on one monitor again, unless it was a nice <a href="http://www.apple.com/uk/displays/">Apple 30&quot; plasma</a> (but saying that for the price difference between my setup and the Apple 30&quot; I&#8217;d stick with my current setup).<br />
<span id="more-78"></span><br />
The new monitors were a massive improvement over my old setup, unbelievably bright compared to my old CRTs and obviously a lot bigger in every way. My desktop space is now 3360 x 1050 pixels that&#8217;s over 3.5 million pixels for me to play around with, or in other words it&#8217;s 83.6 centimetres or 2 feet and 10 inches of horizontal visible screen!</p>
<p>The productivity improvements by the extra space have also been much more than I was expecting, I can now easily work with 3 or 4 documents open side by side in <a href="http://www.eclipse.org/">Eclipse</a>, which is great when I&#8217;m working on stylesheets for pages as I can have the source &amp; all the appropriate stylesheets open at once.</p>
<p>Another improvement that I wasn&#8217;t expecting was in terms of sound quality, not because the monitors have built in speakers but because I now don&#8217;t have two huge lumps of plastic and vacuum tubes on my desk interfering with the sound from the speakers next to them; its a massive difference.</p>
<p>One thing more thing I expect to improve in the long run is my neck strength, as I have to physically turn my head to move from the far left of the screen setup to the far right.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2006/09/22/say-hello-to-my-little-friends/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

