<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34108582</id><updated>2012-04-16T01:19:55.154+01:00</updated><category term='demos'/><category term='slides'/><category term='width'/><category term='select'/><category term='javascript'/><category term='ia'/><category term='vision impared'/><category term='web'/><category term='ajax'/><category term='development'/><category term='property'/><category term='object'/><category term='dddsw'/><category term='img'/><category term='hash'/><category term='dimension'/><category term='ipad'/><category term='new'/><category term='rex'/><category term='size'/><category term='regexp'/><category term='ux'/><category term='merb'/><category term='measure'/><category term='conference'/><category term='elderly'/><category term='well written code'/><category term='create'/><category term='presentation'/><category term='form'/><category term='senior citizen'/><category term='OAP'/><category term='regex'/><category term='jquery'/><category term='ui'/><category term='accessibility'/><category term='build'/><category term='js'/><category term='software'/><category term='comparison'/><category term='best practice'/><category term='lookup'/><category term='compare'/><category term='height'/><category term='performance'/><category term='pensioner'/><category term='image'/><category term='usability'/><title type='text'>Web development and Usability</title><subtitle type='html'>Web development, Usability, UX, IA, Accessibility, CSS, Javascript, AJAX, Web 2.0 and all that malarky</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34108582.post-1021947689907479008</id><published>2010-06-16T22:18:00.008+01:00</published><updated>2010-06-17T08:51:35.345+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='elderly'/><category scheme='http://www.blogger.com/atom/ns#' term='accessibility'/><category scheme='http://www.blogger.com/atom/ns#' term='OAP'/><category scheme='http://www.blogger.com/atom/ns#' term='senior citizen'/><category scheme='http://www.blogger.com/atom/ns#' term='vision impared'/><category scheme='http://www.blogger.com/atom/ns#' term='ux'/><category scheme='http://www.blogger.com/atom/ns#' term='pensioner'/><category scheme='http://www.blogger.com/atom/ns#' term='ipad'/><title type='text'>Senior citizens' first iPad encounter</title><content type='html'>Last week I had the opportunity to witness an elderly couple try out the iPad for the first time. They each had some &lt;b&gt;limited experience&lt;/b&gt; of using email and web browsing on a slow old PC. They are a little &lt;b&gt;scared&lt;/b&gt; of computers on the whole. One of them has &lt;b&gt;impaired vision&lt;/b&gt;, unable to see a whole screen at once and what can be seen is somewhat blurred.&lt;br /&gt;&lt;br /&gt;Before this began I was anticipating that the iPad's &lt;b&gt;screen size&lt;/b&gt; was going to be a problem and that it would be too &lt;b&gt;fiddly&lt;/b&gt; for some not-so-dexterous hands. I also expected that the on-screen keyboard would prove awkward and we may have to resort to a full size external keyboard for typing emails etc. What transpired came a bit of a &lt;b&gt;surprise&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;I gave them almost no instruction other that to say what the device might be used for.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;First impressions&lt;/b&gt;&lt;br /&gt;Both subjects immediately remarked on how clear the screen was. They were rather nervous of touching it to begin with, worried that they might press something wrong and break it. Indeed they were not sure where to press at all. Once shown the email and web icons however, they soon got the hang of navigating with a tap of a finger. Some confusion was caused when not every tap was accepted but they got more accurate and confident with their taps after some minutes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Playing&lt;/b&gt;&lt;br /&gt;Once they got into the mindset that they they weren't going to break it they transitioned from helpless "battling" to confident "playing".&lt;br /&gt;Interestingly the more relaxed approach also lead to both subjects picking up the iPad with their other hand. Prior to this evolution they had dared not pick it up. This seemed to help with their confidence and feeling of control.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Accidental drags&lt;/b&gt;&lt;br /&gt;Some difficulties continued to arise from accidental taps and drags. Particularly drags. Some taps became drags because of lack of dexterity or other parts of the hand touching the screen. Again, this improved with practice and the realisation that you can't rest your hand on the screen!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Scrolling the wrong way&lt;/b&gt;&lt;br /&gt;One curious expectation that the subjects had was the direction of &lt;b&gt;vertical scrolling&lt;/b&gt; when content extended below the visible area of the screen. They found it odd that the content scrolled &lt;b&gt;up in order to move down&lt;/b&gt; it. The rest of us take the scrolling direction for granted and never think to question it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Feedback&lt;/b&gt;&lt;br /&gt;After the session the subjects were generally pleased with the iPad. Both agreed it was the easiest computery thing they had used.&lt;br /&gt;&lt;br /&gt;They made a couple of intriguing points:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;They loved the way iPad's &lt;b&gt;single button&lt;/b&gt; returned them to the main menu. They saw it as a way to escape from trouble. To "&lt;b&gt;get me out of here&lt;/b&gt;". It made them feel safe.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;The on-screen keyboard turned out to be much favoured over a separate keyboard because they did not have to &lt;b&gt;re-focus their eyes&lt;/b&gt; to look at it. It was definitely a feature that made the device &lt;b&gt;more accessible&lt;/b&gt; for them.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;One last experiment...&lt;/b&gt;&lt;br /&gt;Out of interest I let the couple loose on a MacBook after using the iPad. It was described as "ok" but both subjects found they disliked having to locate and move a little pointer around the screen now that they were used to point-and-tap.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-1021947689907479008?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/1021947689907479008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=1021947689907479008&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/1021947689907479008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/1021947689907479008'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2010/06/senior-citizens-first-ipad-encounter.html' title='Senior citizens&apos; first iPad encounter'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-7840743999084889161</id><published>2010-06-08T21:57:00.003+01:00</published><updated>2010-06-16T22:30:36.394+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='demos'/><category scheme='http://www.blogger.com/atom/ns#' term='dddsw'/><category scheme='http://www.blogger.com/atom/ns#' term='slides'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><title type='text'>DDDSouthWest 2010 jQuery AJAX slides and demos</title><content type='html'>Here we are DDDSW folks, my slides and demos.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.softwareunity.com/conferences/2010/dddsw/DDDSW%20Demos.zip"&gt;DDDSW jQuery AJAX Demos all zipped up&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.softwareunity.com/conferences/2010/dddsw/DDDSW%20prezi.zip"&gt;DDDSW jQuery AJAX Slides (AKA Agenda! ;o) all zipped up&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A great crowd. All up for a laugh so thank your for your enthusiastic feedback etc!&lt;br /&gt;&lt;a href="http://twitter.com/GeorgeAdamson"&gt;@GeorgeAdamson&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-7840743999084889161?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/7840743999084889161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=7840743999084889161&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/7840743999084889161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/7840743999084889161'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2010/06/dddsouthwest-2010-jquery-ajax-slides.html' title='DDDSouthWest 2010 jQuery AJAX slides and demos'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-1112657893989669116</id><published>2010-05-13T21:29:00.004+01:00</published><updated>2010-05-13T21:36:07.780+01:00</updated><title type='text'>DDDScotland jQuery slides and demos</title><content type='html'>You lot asked for the slides and demos so here they are.&lt;br /&gt;&lt;br /&gt;Many thanks to those who attended my jQuery session at &lt;a href="http://www.developerdeveloperdeveloper.com/scotland2010"&gt;DDDScotland&lt;/a&gt;, and for the lovely feedback and &lt;a href="http://guysmithfe1.eweb101.discountasp.net/post/2010/05/DDD-Scotland-Enforcing-Code-Beauty-With-StyleCop.aspx"&gt;mentions&lt;/a&gt;. Glad you enjoyed it. (Apologies for the two who did not find it "structured" enough! ;o)&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.softwareunity.com/conferences/2010/dddscot/dddscotland_jquery_demos.zip"&gt;jQuery intro demos all zipped up&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.softwareunity.com/conferences/2010/dddscot/dddscotland_jquery_slides.pdf.zip"&gt;jQuery intro slides in pdf all zipped up&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Looking forward to speaking about AJAX with jQuery at &lt;a href="http://www.dddsouthwest.com"&gt;DDDSouthWest&lt;/a&gt; on 5th June 2010&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;George&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-1112657893989669116?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/1112657893989669116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=1112657893989669116&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/1112657893989669116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/1112657893989669116'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2010/05/jquery-slides-and-demos-from.html' title='DDDScotland jQuery slides and demos'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-4118225511946371575</id><published>2009-10-29T16:14:00.000Z</published><updated>2009-10-29T16:14:16.731Z</updated><title type='text'>New Twitter "lists"</title><content type='html'>It seems that Twitter has started offering a new "lists" feature to a limited number of users. Playing with &lt;a href="http://twitter.com/georgeadamson/ux"&gt;my lists&lt;/a&gt; today I think they could be useful for organising followers into related groups. Not sure how helpful the current implementation will be for organising large numbers of followers but what they've done so far is nice.&lt;br /&gt;&lt;br /&gt;There's some more info on a &lt;a href="http://blog.twitter.com/2009/09/soon-to-launch-lists.html"&gt;twitter blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-4118225511946371575?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/4118225511946371575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=4118225511946371575&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/4118225511946371575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/4118225511946371575'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2009/10/new-twitter-lists.html' title='New Twitter &quot;lists&quot;'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-8780860900912073824</id><published>2009-10-15T15:00:00.001+01:00</published><updated>2010-06-16T22:31:05.980+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='create'/><category scheme='http://www.blogger.com/atom/ns#' term='property'/><category scheme='http://www.blogger.com/atom/ns#' term='new'/><category scheme='http://www.blogger.com/atom/ns#' term='form'/><category scheme='http://www.blogger.com/atom/ns#' term='merb'/><category scheme='http://www.blogger.com/atom/ns#' term='select'/><title type='text'>Merb "select" list form field causes error on create or save new</title><content type='html'>A little note for Merb enthusiasts...&lt;br /&gt;&lt;br /&gt;If Merb throws this message when you try to submit a new item from a form:&lt;br /&gt;&lt;b&gt;undefined method `new_record?' for "":String"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;then it could be because you have a &amp;lt;%= select :propertyName ... %&amp;gt; element and you've used the property name just as you would with text_field etc. Try using the table name instead, such as :property_name_id.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-8780860900912073824?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/8780860900912073824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=8780860900912073824&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/8780860900912073824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/8780860900912073824'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2009/10/merb-select-list-form-field-causes.html' title='Merb &quot;select&quot; list form field causes error on create or save new'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-2401251917912737837</id><published>2009-09-26T21:29:00.014+01:00</published><updated>2010-06-16T22:32:32.763+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='dimension'/><category scheme='http://www.blogger.com/atom/ns#' term='width'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='height'/><category scheme='http://www.blogger.com/atom/ns#' term='img'/><category scheme='http://www.blogger.com/atom/ns#' term='size'/><category scheme='http://www.blogger.com/atom/ns#' term='measure'/><title type='text'>Measure raw image dimensions using jQuery</title><content type='html'>In a recent project I needed to be able to display the original dimensions of a bunch of images pulled from other servers. Using JavaScript to measure image width and height is fairly straightforward (as long as you don't measure the dimensions applied through CSS by mistake!). I bundled the functionality into a little jQuery plugin. Might be useful for someone.&lt;br /&gt;&lt;br /&gt;To use it just call .imgSize(callback) on a jQuery array of images.&lt;br /&gt;Provide it with a callback function as a parameter. The callback will receive the dimensions as its first parameter in the the form of an object hash of { width, height, fileSize }&lt;br /&gt;(I included fileSize as a bonus, though it practice it can only be measured in Internet Explorer. It will be zero in other browsers.)&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;jQuery("IMG").imgSize(function(size){&lt;br /&gt; alert(size.width + "x" + size.height + "px " + size.fileSize + " bytes");&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So why not just return the width and height right away instead of requiring a callback function? In order to measure image dimensions without reading the style values or affecting the display of the page we have to load a hidden dummy image and measure that instead. Images load asynchronously so the best we can do is let the script carry on running while we wait for the dummy image to load. When it loads we measure it's dimensions and trigger the callback function.&lt;br /&gt;&lt;br /&gt;(By the way, Mozilla and Chrome provide properties called .&lt;b&gt;naturalHeight&lt;/b&gt; and .&lt;b&gt;naturalWidth&lt;/b&gt; on an image element.)&lt;br /&gt;&lt;br /&gt;Here's the plugin: (Apologies for ugly formatting. My fault for using Blogger I suppose!)&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;// Measure the dimensions of all images in the current jQuery array of elements:&lt;br /&gt;// Optional: Specify deep=true to also measure dimensions of all images within the array of elements.&lt;br /&gt;// Required: Provide a callback to receive the measurements. (This is necessary because images are loaded asynchronously)&lt;br /&gt;// The callback will be triggered for every IMG in the jQuery array that has a "src" attribute.&lt;br /&gt;// The callback is passed 2 params:&lt;br /&gt;// - The first param is an object of {width,height,fileSize}.&lt;br /&gt;// - The second param is the temporary IMG element that was used for measuring. (It gets destroyed after callback)&lt;br /&gt;// Inside the callback you can use "this" to refer to the IMG element that was in the original jQuery array. &lt;br /&gt;// Note that fileSize can only be measured in IE. This value will be 0 in browsers that doe not support IMG.fileSize.&lt;br /&gt;jQuery.fn.imgSize = function(deep,callback){&lt;br /&gt;&lt;br /&gt; callback = callback || deep;&lt;br /&gt; var $images = this.filter("IMG[src]");&lt;br /&gt; if(deep) $images.add( this.find("IMG[src]") );&lt;br /&gt;&lt;br /&gt; $images.each(function(){&lt;br /&gt;&lt;br /&gt;  var origImg = this;&lt;br /&gt;  var url = $(origImg).attr("src");&lt;br /&gt;&lt;br /&gt;  $("&amp;lt;img&amp;gt;").load(function(){&lt;br /&gt;   var $dummy = $(this), size = { width:$dummy.width(), height:$dummy.height(), fileSize:0 };&lt;br /&gt;   try{ size.fileSize = parseInt($dummy.attr("fileSize")) || 0 }catch(e){};&lt;br /&gt;   jQuery.isFunction(callback) &amp;amp;&amp;amp; callback.apply( origImg, [size,this] );&lt;br /&gt;   $dummy.remove();&lt;br /&gt;  })&lt;br /&gt;  // To be on the safe side, apply inline styles to prevent any css styles affecting our measurements:&lt;br /&gt;  // (We use a try-catch workaround for IE7 because it raises errors when we try to set maxWidth/maxHeight)&lt;br /&gt;  .css({ display:"none", width:"auto", height:"auto", minWidth:"auto", minHeight:"auto" })&lt;br /&gt;  .each(function(){ try{ $(this).css({ maxWidth:"auto", maxHeight:"auto" }) }catch(e){}; })&lt;br /&gt;  .addClass("imgSize-temp-img")&lt;br /&gt;  .appendTo(document.body)    // The width/height would be zero if img is not added to DOM.&lt;br /&gt;  .attr({ src:url });&lt;br /&gt;&lt;br /&gt; });&lt;br /&gt;&lt;br /&gt; return this;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-2401251917912737837?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/2401251917912737837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=2401251917912737837&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/2401251917912737837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/2401251917912737837'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2009/09/measure-raw-image-dimensions-using.html' title='Measure raw image dimensions using jQuery'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-3138140261077527066</id><published>2009-06-13T20:47:00.005+01:00</published><updated>2010-06-16T22:32:50.876+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conference'/><category scheme='http://www.blogger.com/atom/ns#' term='usability'/><category scheme='http://www.blogger.com/atom/ns#' term='ia'/><category scheme='http://www.blogger.com/atom/ns#' term='ux'/><category scheme='http://www.blogger.com/atom/ns#' term='ui'/><title type='text'>Yay! UXLondon next week</title><content type='html'>&lt;a href="http://www.uxlondon.com/banners/img/uxl-120x90-1.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" src="http://www.uxlondon.com/banners/img/uxl-120x90-1.png" style="cursor: pointer; float: right; height: 90px; margin: 0pt 0pt 10px 10px; width: 120px;" /&gt;&lt;/a&gt;Very much looking forward to &lt;a href="http://www.uxlondon.com/"&gt;UXLondon&lt;/a&gt; next week. Some great speakers and a spot of networking. (Provides a nice break from building BBC web sites too!)&lt;br /&gt;See you there...?!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-3138140261077527066?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/3138140261077527066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=3138140261077527066&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/3138140261077527066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/3138140261077527066'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2009/06/yay-uxlondon-next-week.html' title='Yay! UXLondon next week'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-9190686654577622721</id><published>2009-05-28T21:40:00.003+01:00</published><updated>2009-05-28T22:08:00.159+01:00</updated><title type='text'>Presented "Get going with jQuery" at DDD South West</title><content type='html'>The other day was the excellent &lt;a href="http://www.dddsouthwest.com/"&gt;DDD South West&lt;/a&gt; conference in Taunton, UK. Many superb speakers plus me. Happily my &lt;a href="http://www.slideshare.net/george.adamson/get-going-with-jquery-by-george-adamson-at-ddd-south-west"&gt;Get going with jQuery presentation&lt;/a&gt; seemed to be well received. The feedback ranged from "like Eddie Izzard doing tech" to "Lee Evans" to "I think the speaker was on drugs", so I think I'll take those as compliments! Thanks to everyone who attended and a big pat on the back to the very energetic &lt;a href="http://www.guysmithferrier.com/"&gt;Guy Smith Ferrier&lt;/a&gt; and the team for organising the whole thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-9190686654577622721?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/9190686654577622721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=9190686654577622721&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/9190686654577622721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/9190686654577622721'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2009/05/other-day-was-excellent-ddd-south-west.html' title='Presented &quot;Get going with jQuery&quot; at DDD South West'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-4159251821582874465</id><published>2009-03-01T08:17:00.005Z</published><updated>2009-05-28T21:40:10.858+01:00</updated><title type='text'>"Cosmetic" bugs are never minor for long</title><content type='html'>It is a shame that some testers often log UI bugs as "minor"?  You soldier on with their "major" bugs and then get flack when the client rants about the incomplete UI.&lt;br /&gt;&lt;br /&gt;Whatever we create, the client (and here I also mean the real users of course) will mostly judge an app by its cover. Does not matter how many amazing layers of complex programming there are under the water level of your eye-candy iceberg, it is still only as good as the shiny bit on top.&lt;br /&gt;&lt;br /&gt;We all do it.&lt;br /&gt;&lt;br /&gt;Truth is, the back-end below-the-surface guys work pretty damn hard and do some amazing stuff. If the client is going to judge that work fairly then they need to be able to get past the candy layer. I find there are two useful ways to achieve this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Mock up the parts of the page that are not complete yet. Using hand drawn doodles in place of icons or fields is useful for this. Just place them where the ui is not ready. You make it clear that this bit is not broken but &lt;span style="font-style: italic;"&gt;incomplete&lt;/span&gt;. The expectation is set.&lt;/li&gt;&lt;li&gt;Log visual bugs as major. Get them sorted right away.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-4159251821582874465?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/4159251821582874465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=4159251821582874465&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/4159251821582874465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/4159251821582874465'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2009/03/cosmetic-bugs-are-never-minor-for-long.html' title='&quot;Cosmetic&quot; bugs are never minor for long'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-3343927634297867099</id><published>2009-02-02T20:11:00.005Z</published><updated>2009-02-02T21:14:36.204Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='js'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='comparison'/><category scheme='http://www.blogger.com/atom/ns#' term='regexp'/><category scheme='http://www.blogger.com/atom/ns#' term='rex'/><category scheme='http://www.blogger.com/atom/ns#' term='object'/><category scheme='http://www.blogger.com/atom/ns#' term='hash'/><category scheme='http://www.blogger.com/atom/ns#' term='lookup'/><category scheme='http://www.blogger.com/atom/ns#' term='compare'/><category scheme='http://www.blogger.com/atom/ns#' term='regex'/><title type='text'>Performance of javascript object hash vs RegExp</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;jQuery makes regular use of regex statements like this one, used in the position() and offsetParent() methods:&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: trebuchet ms;"&gt;&lt;li&gt;/^body|html$/i.test(offsetParent.tagName)&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: trebuchet ms;"&gt;For situations like this I wonder if a simple object hash&lt;/span&gt; would do the same thing faster:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;{BODY:true, HTML:true}&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;[offsetParent.tagName];&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: trebuchet ms;"&gt;I did some crude experiments and found that the hash technique was at least 4 times faster in IE7 and 15 times faster in FF3.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;The hash above does not allow for upper/lower case variations but converting the lookup to the same case adds quite a performance hit:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;{BODY:true, HTML:true}&lt;/span&gt;&lt;span style="font-family: trebuchet ms;"&gt;[offsetParent.tagName.toUpperCase()]&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;The example I chose above was being used in a loop where any performance gain would be more noticable, but this technique nonetheless be used to speed up other bits in jQuery, such as...&lt;br /&gt;&lt;ul&gt;&lt;li&gt;/^t(able|d|h)$/i.test(elem.tagName) becomes {TABLE:true,TD:true,TH:true}[elem.tagName]&lt;/li&gt;&lt;li&gt;/href|src|style/.test(name) becomes {href:true,src:true,style:true}[name]&lt;/li&gt;&lt;/ul&gt;I've talked about using this in jQuery but of course it could be used in your own js or other libraries. I'd be interested to hear about other people experiences with this technique.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-3343927634297867099?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/3343927634297867099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=3343927634297867099&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/3343927634297867099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/3343927634297867099'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2009/02/performance-of-javascript-object-hash.html' title='Performance of javascript object hash vs RegExp'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34108582.post-7389908462596462753</id><published>2006-11-15T13:25:00.000Z</published><updated>2006-11-15T20:44:18.470Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='build'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='well written code'/><category scheme='http://www.blogger.com/atom/ns#' term='best practice'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Tssh.. which cowboy put that in?!</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;Sloppy code costs the Customer more...&lt;/strong&gt; Customers don't really give a monkey's how speedy your algorithm is or how cunning your quirk-workaround is. They see their application doing its stuff and that is pretty much all that needs to matter from where they're standing. Quite right too, they're experts at what they do so why should they care about how fab your code is anyway. They shouldn't have to really, but sloppy code will cost them more down the line when they get the next guy to tinker with the code. &lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Every software developer has, at some time or another, had to take on someone else's old code to fix bugs or add features etc. We'll take one look at it, rub our chin and suck air through our teeth, like some plumber that has just emerged from inpecting pipes under the sink.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Understanding old code can be a painful and time consuming process. Plenty of programmers out there will have thoughts along the lines of "&lt;em&gt;Other peoples'&lt;/em&gt; old code just isn't a patch on the beautifully crafted masterpieces that &lt;em&gt;I&lt;/em&gt; produce, surely anyone can see that?" Well er, no, too many programmers are as guilty as the next at producing sloppy code. Sure it might work ok, but some day another poor sucker has to work out what the heck you've done.&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;Well written software code is not just about churning out code that works. Surely us programmers have a responsibility to think about who else is going to read our masterpiece? Our code must make no secret of what it is up to and why, so that it is easy to follow and supportable.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;em&gt;Ooh, you mean you want more comments?&lt;/em&gt;&lt;/strong&gt; Definately not. Light commenting is ok, but if you find yourself explaining your every move then you probably need to think of a better way to write your code. "Self-documenting code" is not about the number of comments you jam in there but about making your code self describing.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Some simple examples please...&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;Why use a variable called &lt;em&gt;j&lt;/em&gt; when you could call it &lt;em&gt;customerID&lt;/em&gt;. All of a sudden we know what you're on about.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="left"&gt;Building a cryptic multi-command expression might make you feel like a programming god but splitting it into a few different lines with some choice variable names etc could stop the next guy from cursing your very existence.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="left"&gt;Can your fantastic algorithm be moved to a separate function with a nice chummy name and expanded onto a few more lines of code?&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="left"&gt;There will always be some cryptic bits that we can't improve, things like Regular Expressions for instance are good candidates for a comment or two.&lt;/p&gt;&lt;p align="left"&gt;When we think about how someone else will view our code it changes everything. Well written code is a joy to read and maintain because it really is self-describing.&lt;/p&gt;&lt;p align="left"&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34108582-7389908462596462753?l=blog.softwareunity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.softwareunity.com/feeds/7389908462596462753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34108582&amp;postID=7389908462596462753&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/7389908462596462753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34108582/posts/default/7389908462596462753'/><link rel='alternate' type='text/html' href='http://blog.softwareunity.com/2006/11/tssh-which-cowboy-put-that-in.html' title='Tssh.. which cowboy put that in?!'/><author><name>George</name><uri>http://www.blogger.com/profile/08693501853593478414</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_KZ6qETLvmok/TBnS677xPxI/AAAAAAAAAB0/yg61E-4rLag/S220/george__twitter_icon__bigger.JPG'/></author><thr:total>0</thr:total></entry></feed>
