<?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>False Positives</title>
	<atom:link href="http://www.falsepositives.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.falsepositives.com</link>
	<description>Ian Irving&#039;s Code and Culture from Toronto</description>
	<lastBuildDate>Wed, 28 Jul 2010 18:10:27 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='www.falsepositives.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Quick links as of June 4th 2010</title>
		<link>http://www.falsepositives.com/index.php/2010/06/04/quick-links-as-of-june-4th-2010/</link>
		<comments>http://www.falsepositives.com/index.php/2010/06/04/quick-links-as-of-june-4th-2010/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 14:14:52 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[GreaseMonkey]]></category>
		<category><![CDATA[Startup]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2620</guid>
		<description><![CDATA[
May 28
Jeffery To&#8217;s Show Short Link GreaseMonkey Script displays an existing short link for the current page (in the bottom left corner of the window), taking advantage of the short link microFormat. Flickr, YouTube, TechCrunch and all WordPress blogs already use the rel=&#8221;shortlink&#8221; mircoFormat.  Nice!


Clarify Your Story Excerpt is a set of questions will [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><em>May 28</em><br />
Jeffery To&#8217;s <a href="http://userscripts.org/scripts/show/77795">Show Short Link GreaseMonkey Script</a> displays an existing short link for the current page (in the bottom left corner of the window), taking advantage of the <a href="http://microformats.org/wiki/rel-shortlink">short link microFormat</a>. Flickr, YouTube, TechCrunch and all WordPress blogs already use the rel=&#8221;shortlink&#8221; mircoFormat.  Nice!
</li>
<li>
<a href="http://www.sramanamitra.com/clarify-your-story-excerpt/">Clarify Your Story Excerpt</a> is a set of questions will help you through the process of testing and validating your idea.  Aimed at &#8220;Enterprise and Small / Medium Facing Businesses (EME)&#8221; they are equal valuable as a questions for any startup.
</li>
<li><em>May 31</em><br />
Mathew Ingram does a great job puncturing gasbag Nick Carr in <a href="http://www.mathewingram.com/work/2010/05/31/nick-carrs-retreat-from-the-internet-continues/">Nick Carr’s Retreat From the Internet Continues</a>.  </p>
<p><a href="http://en.wikipedia.org/wiki/Nicholas_G._Carr">Mr Carr</a> likes to make big (big) contrary positions and watch as people read and buy his work.  He does a service in setting up (some of) these debates, but they rarely seem to hold up.  </p>
<p>Nick Carr’s <a href="http://www.roughtype.com/archives/2010/05/experiments_in.php">argues</a> that links (aka HyperLinks, aka &#8220;the web&#8221;) are bad because readers might click on them and get distracted from the quality of the writing or argument. This looks like the 2010 version of Plato saying &#8220;Writing is bad because it causes people not to rely on memory but to rely on something external to them and depend on signs belonging to another.&#8221; (<a href="http://en.wikipedia.org/wiki/Phaedrus_%28dialogue%29">Phaedrus</a>).  </p>
<p>This de-values the reader by not connecting them to the referred content, and de-values the writing in assuming the quality of the writing can not hold them or that the content (the argument) cannot stand up, either to the referred content, or to comments.  Maybe in a age of finite page size and dead (fixed media), but this goes against the nature and the technology of the web.  It also does not trust the reader.  In this age, link to the primary sources, the raw data and to the debate.  How to link may be a interesting question.  But not linking is to show lack of trust and respect to your audience and to suggest you have something to hide.  </p>
<p>See also The Economist&#8217;s Tech Blogger Babbage in <a href="http://www.economist.com/blogs/babbage/2010/06/pros_and_cons_hyperlinks">To link, or not to link? That is the question.</a></li>
<li>
An interesting, and non trival test of <a href="http://fightingforalostcause.net/misc/2006/compare-email-regex.php">Comparing E-mail Address Validating Regular Expressions</a> using PHP&#8217;s ereg() and preg_match() function finds a winner (where it&#8217;s better to accept a few invalid addresses than reject any valid ones) :</p>
<p>/^([\w\!\#$\%\&#038;\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&#038;\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i</p>
<p>I wonder if these results in torturing regexp email address recognizers will hold up given the <a href="http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines">variations in regular_expression engines</a>?
</li>
<li><em>June 2</em><br />
<a href="http://www.readwriteweb.com/archives/twitter_exposes_intersections_in_the_social_graph.php">Twitter Exposes Intersections in the Social Graph</a> like my Greasemonkey Follow Rank script <a title="was http://bit.ly/FollowRank" href="http://userscripts.org/scripts/show/64286" class="tweet-url web" rel="nofollow" target="_blank">http://userscripts.org/scripts/show/64286</a>.
</li>
<li><em>June 3rd</em><br />
 via <a href="http://twitter.com/geoffreywiseman/status/15329473786">Geoffrey Wiseman</a>, Git support in Eclipse getting stronger with the release of <a href="http://aniszczyk.org/2010/06/02/egit-and-jgit-0-8-1-released/">EGit and JGit 0.8.1</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/06/04/quick-links-as-of-june-4th-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building a Cascading Drop Down Selection List for Ruby on Rails with jQuery Ajax</title>
		<link>http://www.falsepositives.com/index.php/2010/05/28/building-a-casscading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/</link>
		<comments>http://www.falsepositives.com/index.php/2010/05/28/building-a-casscading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/#comments</comments>
		<pubDate>Fri, 28 May 2010 16:07:20 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ruby and Rails]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2594</guid>
		<description><![CDATA[A frequent need in building web site application is to have users select one value and then, based on that value, select another value.  Real world needs for related values might be : Select a Country and then State or Province; Select a Car Manufacture and then a Car Model.  Generically it&#8217;s about [...]]]></description>
			<content:encoded><![CDATA[<p>A frequent need in building web site application is to have users select one value and then, based on that value, select another value.  Real world needs for related values might be : Select a Country and then State or Province; Select a Car Manufacture and then a Car Model.  Generically it&#8217;s about selecting some Category or Section and then selecting the Sub Category or sub Section, the selection of one field cascades the results in another related field.</p>
<p>Also called Related Drop Down fields or Dependant Drop Down lists or Dynamic Drop Downs or Dependent Drop Downs.</p>
<p>What you want to have happen is something that will look and act like this<br />
If you select Veg&#8217;s<br />
<img src="http://www.falsepositives.com/wp-content/uploads/2010/05/RORCDDWA_1.jpg" alt="Select Veg" title="RORCDDWA_1" width="159" height="163" class="alignnone size-full wp-image-2604" /><br />
and then if you select Meat :<br />
<img src="http://www.falsepositives.com/wp-content/uploads/2010/05/RORCDDWA_2.jpg" alt="select beef" title="select beef" width="131" height="170" class="alignnone size-full wp-image-2606" /></p>
<p>Also, in the underlying html select tag code, you want values stored and names displayed so you can a)change or correct the names, b) display the names in a different languages but keep the underlying key values.</p>
<p>In the bad old days you might have them select the first value and the go to a new page for the related values, or at best refresh the entire page.  Thankfully this is the days of shinny and we haz ajax!!   But we still need to get the ducks lined up and quacking in order for this to work.  This is my code to do that.</p>
<p>Note that this solution has been tested with RoR 2.3.5 and jQuery 1.4.2 (standard flavours as of early 2010)</p>
<p>you need to have jQuery loaded on the page and the easest way (althought not always the best way) is to pull all the script for m the public/javascrip direcroty of your application with :</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span> <span style="color: #339933;">%=</span> javascript_include_tag <span style="color: #339933;">:</span>defaults <span style="color: #339933;">%&gt;</span></div></td></tr></tbody></table></div>
<p>in the sample I assuming a Section field and a dependent Sub-Section field.  From a data model perspective the Section mode has a Id and a Name and  has_one :sub_section; and the SubSection has a Id, a Name and a Section Id and  belongs_to :section</p>
<p>in the sub_sections controller</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> for_sectionid<br />
&nbsp; &nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@subsections</span> = SubSection.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#ff3333; font-weight:bold;">:all</span>, <span style="color:#ff3333; font-weight:bold;">:conditions</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot; section_id = ?&quot;</span>, params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:id</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span> &nbsp;<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">sort_by</span><span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>k<span style="color:#006600; font-weight:bold;">|</span> k<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'name'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#125;</span> &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; respond_to <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>format<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">json</span> &nbsp;<span style="color:#006600; font-weight:bold;">&#123;</span> render <span style="color:#ff3333; font-weight:bold;">:json</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@subsections</span> <span style="color:#006600; font-weight:bold;">&#125;</span> &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp; &nbsp;<span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>this is a pretty straight forward piece of code that uses an id passed in the parameters, returns all the subsection objects for that section_id, sorts that collection of subsections by the subsection.name, and renders that collection as a json object.  </p>
<p>As per the notes on the rails wiki for <a href="http://wiki.rubyonrails.org/howtos/security/sql_injection">SQL Injection</a>, you need to sanitize the variables being passed as a parameter, and Ruby on Rails has a built in filter for special SQL characters which you need to apply, as above. :conditions => [" section_id = ?", params[:id]] </p>
<p>Note, you could also use a Dynamic attribute-based finders to get the subsection object :</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color:#0066ff; font-weight:bold;">@subsection</span> = SubSection.<span style="color:#9900CC;">find_all_by_section_id</span><span style="color:#006600; font-weight:bold;">&#40;</span> params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:id</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">sort_by</span><span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>k<span style="color:#006600; font-weight:bold;">|</span> k<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'name'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#125;</span></div></td></tr></tbody></table></div>
<p>which is shorter code (less change of a syntax error?) and, as a bonus, automatically applies the sanitize countermeasure. </p>
<p>Further, you might want to create a custom json view for this routine with, only the sub section name and sub section id, if you a) have values want to keep private, or b) the SubSection objection has a lot of data (since we are only interested in 2 fields).  That&#8217;s the reason its in the SubSections Controller, to keep related stuff together.</p>
<p>in the new or edit view for (in this case) gallery</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt; % form_for<span style="color: #66cc66;">&#40;</span>@gallery<span style="color: #66cc66;">&#41;</span> do |f| %&gt;</span><br />
...<br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt; %<span style="color: #66cc66;">=</span> f.<span style="color: #000066;">label</span> :section_id %&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a> <span style="color: #66cc66;">/</span>&gt;</span> &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&lt; %<span style="color: #66cc66;">=</span> &nbsp;collection_select<span style="color: #66cc66;">&#40;</span>:gallery, :section_id, Section.all, :<span style="color: #000066;">id</span>, :<span style="color: #000066;">name</span> , options <span style="color: #66cc66;">=</span><span style="color: #66cc66;">&#123;</span>:<span style="color: #000066;">prompt</span> <span style="color: #66cc66;">=</span>&gt;</span> &quot;&quot;} ) %&gt;<br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt; %<span style="color: #66cc66;">=</span> f.<span style="color: #000066;">label</span> :sub_section_id %&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a> <span style="color: #66cc66;">/</span>&gt;</span> &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&lt; %<span style="color: #66cc66;">=</span> collection_select<span style="color: #66cc66;">&#40;</span>:gallery, :sub_section_id, SubSection.find_all_by_section_id<span style="color: #66cc66;">&#40;</span>@gallery.section_id<span style="color: #66cc66;">&#41;</span>, :<span style="color: #000066;">id</span>, :<span style="color: #000066;">name</span>, options <span style="color: #66cc66;">=</span><span style="color: #66cc66;">&#123;</span>:<span style="color: #000066;">prompt</span> <span style="color: #66cc66;">=</span>&gt;</span> &quot;&quot;}) %&gt;<br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br />
..<br />
<span style="color: #009900;">&lt; % end %&gt;</span></div></td></tr></tbody></table></div>
<p>Again, a fairly typical piece of Rails ERB code for display a html select tag used to create a select list (or drop-down list).  </p>
<p>The collection_select help used for the Section field displays all the valid value Name&#8217;s and stores the id&#8217;s, notes the selected value (as needed in a edit) and a empty string prompt (as needed in a new).</p>
<p>In the case of the Sub Section field the &#8220;extra&#8221; stuff is to populate the drop down for an edit of an exiting value.</p>
<p>That one line &#8220;< %=  collection_select(:gallery, :section_id, Section.all, :id, :name , options ={:prompt => &#8220;&#8221;} ) %>&#8221; replaces all of my 2005 posting <a href="http://www.falsepositives.com/index.php/2005/12/10/building-a-better-drop-down-selection-list-for-ruby-on-rails/">Building a Better Drop Down Selection List for Ruby on Rails</a> written for Rails 1.x.  That&#8217;s progress!!</p>
<p>There&#8217;s the magic sauce for all of this, assuming that you are including the <a href="http://jquery.com/">jQuery</a> javascript library (tested with version jQuery 1.4.2) on the page.  I have this in a partial used in the new and edit pages for the gallery.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;select#gallery_section_id&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">change</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> id_value_string <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>id_value_string <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// if the id is empty remove all the sub_selection options from being selectable and do not do any ajax</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;select#gallery_sub_section_id option&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> row <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;option value=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/option&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;select#gallery_sub_section_id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Send the request and update sub category dropdown </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dataType<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;json&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cache<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'/sub_sections/for_sectionid/'</span> <span style="color: #339933;">+</span> id_value_string<span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">2000</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>XMLHttpRequest<span style="color: #339933;">,</span> errorTextStatus<span style="color: #339933;">,</span> error<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Failed to submit : &quot;</span><span style="color: #339933;">+</span> errorTextStatus<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot; ;&quot;</span><span style="color: #339933;">+</span>error<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Clear all options from sub category select </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;select#gallery_sub_section_id option&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//put in a empty default line</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> row <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;option value=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/option&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;select#gallery_sub_section_id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Fill sub category select </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>data<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> j<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; row <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;option value=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">+</span> j.<span style="color: #660066;">sub_section</span>.<span style="color: #660066;">id</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">+</span> j.<span style="color: #660066;">sub_section</span>.<span style="color: #000066;">name</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/option&gt;&quot;</span><span style="color: #339933;">;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;select#gallery_sub_section_id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
<p>The Code is wrapped up in standard jQuery code for doing unobtrusive javascript, waiting for the DOM to finish load and then watching for changes on the select tag with the gallery_section_id tag id.</p>
<p>The first section of code (lines 5-9) just reacts if the Section field is set to my default prompt of blank, in which case it blanks out the sub section values and does nothing else.</p>
<p>The next piece (line 14-16) is the meat of the <a href="http://api.jquery.com/jQuery.ajax/">$.ajax</a> request: setting the dataType to &#8220;json&#8221; (which ensures the controller routine renders as expected), doing &#8220;cache: false&#8221; is best for development but is someting to look at in production if your supporting data is very very static.  setting the url is Key! in this case &#8221; url: &#8216;/sub_sections/for_sectionid/&#8217; + id_value_string &#8221;  so that it calls the &#8220;sub_sections&#8221; controller and the &#8220;for_sectionid&#8221; routine and passes the id string.</p>
<p>If the ajax returns successfully, then the code removes the exiting option&#8217;s (important! it works on the option part of the DOM) from the sub_section select tag, adds my default blank line, and than append the id and name values from the returned json object.</p>
<p>Using Firefox firebug extension will make your life much easier in debug this, in particular confirming the ajax request fires off the way (and to the url) you expected, and returns what you expect.</p>
<p>Update : thanks to <a href="http://tom.meinlschmidt.org/">Tom Meinlschmidt</a>&#8217;s feedback I&#8217;ve added &#8220;.sort_by{ |k| k['name'] }&#8221; to the function in the sub_sections controller to return the results in order by the sub section name, as it should have been. (and I fixed up a typo!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/05/28/building-a-casscading-drop-down-selection-list-for-ruby-on-rails-with-jquery-ajax/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mesh10 : five years of Meshing in Toronto</title>
		<link>http://www.falsepositives.com/index.php/2010/05/21/mesh10-five-years-of-meshing-in-toronto/</link>
		<comments>http://www.falsepositives.com/index.php/2010/05/21/mesh10-five-years-of-meshing-in-toronto/#comments</comments>
		<pubDate>Fri, 21 May 2010 22:49:54 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[Toronto]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Mesh]]></category>
		<category><![CDATA[Mesh10]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2568</guid>
		<description><![CDATA[This was the week for MESH and MESH U,which is a Toronto based conference which looks at &#8220;The Web&#8221; and how it is affecting the media, marketing, business and society as a whole.  Mesh is in its 5th year and Mesh U (which is a more focused one for the on design, development and [...]]]></description>
			<content:encoded><![CDATA[<p>This was the week for <a href="http://www.meshconference.com/">MESH </a>and <a href="http://www.meshu.ca/">MESH U</a>,which is a Toronto based conference which looks at &#8220;The Web&#8221; and how it is affecting the media, marketing, business and society as a whole.  Mesh is in its 5th year and Mesh U (which is a more focused one for the on design, development and management people who are building that &#8220;Web&#8221;) is in it&#8217;s second year.</p>
<p>Several thing stood out is this year (my 4th Mesh) :</p>
<ul>
<li>Chris Thorpe, from The Guardian newspaper, did &#8220;Data Chemistry&#8221; (a older version of which is <a href="http://www.slideshare.net/jaggeree/the-new-raw-materials-and-data-chemistry">The New Raw Materials and Data Chemistry</a>)and a Keynote which delved into the work the The Guardian is doing to create a interface allowing full access to the content and / or the data behind that content.  I was not aware of the full breadth and depth of what they were doing.  It was also interesting to near some of the story behind the curtain.  After the conference was the official <a href="http://www.guardian.co.uk/media/pda/2010/may/20/guardian-open-platform">Guardian announces commercial launch of Open Platform</a>.</li>
<li>Diana Clarke, from <a href="http://www.freshbooks.com/">FreshBooks</a> (Online Billing and Bookkeeping) talked about <a href="http://prezi.com/q0t2nxohrd7q/evolve/">Evolving the Platform</a> and how they moved from legacy php to a RESTful python web service.  Excellent!! I use Freshbooks, it always impressed me, and now only more so.</li>
<li>Joseph Menn&#8217;s keynote and <a href="http://fatalsystemerror.org/">book</a> about the new Cyber Crime lord ecology was enlightening and scary.</li>
<li>one of the panel&#8217;s was tapped as part of the TVO&#8217;s <a href="http://www.tvo.org/cfmx/tvoorg/theagenda/">The Agenda</a> in a discussion about the evolution and changing face of privacy in the digital age with Ann Cavoukian, Mathew Ingram, Joseph Menn, Alan Sawyer, David Fewer.<br />
<img style="visibility: hidden; width: 0px; height: 0px;" src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyNzQ*NTE2OTM5OTcmcHQ9MTI3NDQ1MTcxMzE4NSZwPTI2Njc1MSZkPXR2b1ZpZGVvUGFnZSZnPTImbz*yODg3Y2Yx/MmM5NmU*YjhlOGJlOWVjNDZlYjkzZTcyNyZvZj*w.gif" border="0" alt="" width="0" height="0" /><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="486" height="412" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="flashObj" /><param name="bgcolor" value="#ffffff" /><param name="align" value="middle" /><param name="flashvars" value="videoRefID=86875006001&amp;videoPlay=manual&amp;gig_lt=1274451693997&amp;gig_pt=1274451713185&amp;gig_g=2" /><param name="src" value="http://www.tvo.org/video/tvoMain.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="quality" value="high" /><embed type="application/x-shockwave-flash" width="486" height="412" src="http://www.tvo.org/video/tvoMain.swf" quality="high" allowfullscreen="true" wmode="transparent" flashvars="videoRefID=86875006001&amp;videoPlay=manual&amp;gig_lt=1274451693997&amp;gig_pt=1274451713185&amp;gig_g=2" align="middle" bgcolor="#ffffff" name="flashObj"></embed></object></p>
<p>(Link is here for the above <a href="http://www.tvo.org/TVO/WebObjects/TVO.woa?videoid?86875006001"><br />
The Agenda live from Mesh: Canada&#8217;s Web Conference</a>)</p>
<p>FaceBook came in for heavy criticism, with Leigh Honeywell making the best comment of the session!</p>
<p>And yes I&#8217;m like all over the back ground shots.  (Hi Mom! I&#8217;m on Television!!)</li>
<li>The Agenda also tapped 3 interviews form Mesh Speakers : <a href="http://www.tvo.org/cfmx/tvoorg/theagenda/index.cfm?page_id=7&amp;bpn=779787&amp;ts=2010-05-19%2020:00:00.0">Joseph Menn: Fatal System Error | Chris Thorpe: Future of Newspapers | Avril Benoît: Social Media to the Rescue</a>. Very worth watching.</li>
<li>All in all a great conference with lots of insight, and good gut check of what people are doing and where they what to go.   I&#8217;m still recovering and processing.  I got my annual <a href="http://www.rannieturingan.com/events/mesh-portraits-2010/img_9967-2/">Mesh Portrait</a> by the magical Rannie Turingan aka <a href="http://twitter.com/photojunkie">Photo Junkie</a>Also I got to lick an iPad. Yummy. :Q</li>
<li>other writeups for <a href="http://twitter.com/#search?q=%23Mesh">Mesh : </a>
<ul>
<li><a href="http://www.blogto.com/tech/2010/05/mesh_conference_2010_highlights/">BlogTo highlights</a></li>
<li><a href="http://cdblog.centraldesktop.com/2010/05/meshu-2010-wrap-up.html">Isaac Garcia does a wrap up</a></li>
<li>from Digital Journal we have : <a href="http://www.digitaljournal.com/article/292231">mesh 2010: How social media are transforming newsrooms (Includes first-hand account)</a> and <a href="http://www.digitaljournal.com/article/292233">mesh 2010: Dissecting new media&#8217;s &#8216;fast-food content&#8217;</a></li>
<li>Soldier of Code&#8217;s Kaptain Krispy also had a <a href="http://soldierofcode.com/2010/05/20/mesh-2010/">Mesh 2010</a> report</li>
</ul>
<p>this was extracted this from the <a href="http://www.falsepositives.com/index.php/2010/05/21/quick-links-as-of-may-21th-2010/">Quick links as of May 21th 2010</a> post, and expanded.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/05/21/mesh10-five-years-of-meshing-in-toronto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick links as of May 21th 2010</title>
		<link>http://www.falsepositives.com/index.php/2010/05/21/quick-links-as-of-may-21th-2010/</link>
		<comments>http://www.falsepositives.com/index.php/2010/05/21/quick-links-as-of-may-21th-2010/#comments</comments>
		<pubDate>Fri, 21 May 2010 14:49:37 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Canada]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Culture]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2550</guid>
		<description><![CDATA[
May 15th:
at Smashing Magazine comes a revisit of _why: Tale of a Post-Modern Genius, the sad tale of &#8220;Why the Lucky Stiff&#8221;, who made many vibrant and colourful contributions to the community, before deleting his online existence last August.  The article is a great review of the whole arc and some useful links.  [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><em>May 15th</em>:<br />
at Smashing Magazine comes a revisit of <a class="tweet-url web" title="was http://bit.ly/9WGDTB" href="http://www.smashingmagazine.com/2010/05/15/why-a-tale-of-a-post-modern-genius/">_why: Tale of a Post-Modern Genius</a>, the sad tale of &#8220;Why the Lucky Stiff&#8221;, who made many vibrant and colourful contributions to the community, before deleting his online existence last August.  The article is a great review of the whole arc and some useful links.   He is missed, and I hope he is doing better.</li>
<li><em>May 18th</em><br />
<a href="http://debuggable.com/posts/understanding-node-js:4bd98440-45e4-4a9a-8ef7-0f7ecbdd56cb">Understanding node.js</a> is helping me understand the activity that&#8217;s happening in the Node.js space.  This could be very very big.  Javascript has become very important in the last couple of years and this is the biggest push I&#8217;ve seen for Javascript on the server.  With this JavaScript has become a first class Dynamic scripting languages up there with Ruby and Python.</li>
<li><em>May 17 to 19th</em>:<br />
Most of the week was occupied by <a href="http://www.meshconference.com/">MESH </a>and <a href="http://www.meshu.ca/">MESH U</a>,which is a Toronto based conference which looks at &#8220;The Web&#8221; and how it is affecting the media, marketing, business and society as a whole.  Mesh is in its 5th year and Mesh U (which is a more focused one for the on design, development and management people who are building that &#8220;Web&#8221;) is in it&#8217;s second year.</p>
<p>I moved the details on to a seprate post : <a href="http://www.falsepositives.com/index.php/2010/05/21/mesh10-five-years-of-meshing-in-toronto/">Mesh10 : five years of Meshing in Toronto</a></li>
<li><em>May 18th</em><br />
Via <a href="http://www.ie6-must-die.com/">IE6 must die</a>, Microsoft claims IE6 similar to old milk <a href="http://www.ibtimes.com/articles/23972/20100518/microsoft-claims-ie6-similar-to-old-milk.htm">Microsoft stated</a>, &#8220;You would not drink nine-year-old milk, so why use a nine-year-old browser?&#8221;<br />
<a href="http://www.falsepositives.com/wp-content/uploads/2010/05/Clipboard01.jpg"><img width="620px" src="http://www.falsepositives.com/wp-content/uploads/2010/05/Clipboard01.jpg" alt="" /></a></li>
<li><em>May 19th</em><br />
Very happy to <a href="http://io9.com/5540991/cory-doctorow-and-charles-stross-team-up-for-rapture-of-the-nerds">hear</a> that <a href="http://craphound.com/">Cory Doctorow</a> and <a href="http://www.antipope.org/charlie/">Charles Stross</a> are teaming up for a follow up to their &#8220;Jury Service&#8221; and &#8220;Appeals Court&#8221; stories and will be working on &#8220;Rapture of the Nerds&#8221;.  Yeah!!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/05/21/quick-links-as-of-may-21th-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another episode of &#8220;It&#8217;s Charlie&#8217;s Stross&#8217;s fiction, we are just living in it&#8221; : Will Wall Street require Python?</title>
		<link>http://www.falsepositives.com/index.php/2010/04/21/another-episode-of-its-charlies-strosss-fiction-we-are-just-living-in-it-will-wall-street-require-python/</link>
		<comments>http://www.falsepositives.com/index.php/2010/04/21/another-episode-of-its-charlies-strosss-fiction-we-are-just-living-in-it-will-wall-street-require-python/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 14:20:27 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Sci Fi]]></category>
		<category><![CDATA[Written]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2525</guid>
		<description><![CDATA[Saw &#8220;Will Wall Street require Python? &#124; ITworld&#8221;, on the Hot Links website and thought &#8220;interesting&#8221;,  and then I read the description !
&#8220;Charles Stross was right. &#8220;with Release 33-9117, the SEC is considering substitution of Python or another programming language for legal English as a basis for some of its regulations.&#8221;
I remembered the use [...]]]></description>
			<content:encoded><![CDATA[<p>Saw &#8220;<a href="http://dev.upian.com/hotlinks/archives/2010/04/21/#item107068">Will Wall Street require Python? | ITworld&#8221;</a>, on the Hot Links website and thought &#8220;interesting&#8221;,  and then I read the description !</p>
<p>&#8220;Charles Stross was right. &#8220;with Release 33-9117, the SEC is considering substitution of Python or another programming language for legal English as a basis for some of its regulations.&#8221;</p>
<p>I remembered the use of python in <a href="http://www.antipope.org/charlie/">Charlie Stross&#8217;s</a> novel <a href="http://www.amazon.com/gp/product/0441014984?ie=UTF8&#038;tag=falsepositive-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0441014984">Halting State</a><img src="http://www.assoc-amazon.com/e/ir?t=falsepositive-20&#038;l=as2&#038;o=1&#038;a=0441014984" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> , (which would seem to be the most relevant one), but I can&#8217;t recall that one!<br />
<a href="http://www.amazon.com/gp/product/0441014984?ie=UTF8&#038;tag=falsepositive-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0441014984"><img border="0" src="https://images-na.ssl-images-amazon.com/images/I/51q6jiLzxbL._SL160_.jpg"/></a></p>
<p>I may need to do some greping on the BT text I have <img src='http://www.falsepositives.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>UPDATE : from the comments, Lee says : &#8220;The actual reference is in Accelerando – Manfred Macx’s swarm of robot companies have their regulations written in Python. (p. 41 in my copy)&#8221;  Indeed! good catch, Lee! <a href="http://www.amazon.com/gp/product/0441014151?ie=UTF8&#038;tag=falsepositive-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0441014151">Accelerando (Singularity)</a><img src="http://www.assoc-amazon.com/e/ir?t=falsepositive-20&#038;l=as2&#038;o=1&#038;a=0441014151" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> it is :</p>
<blockquote><p>Malice — revenge for waking him up — sharpens Manfred&#8217;s voice. &#8220;The president of agalmic.holdings.root.184.97.AB5 is agalmic.holdings.root.184.97.201. The secretary is agalmic.holdings.root.184.D5, and the chair is agalmic.holdings.root.184.E8.FF. All the shares are owned by those companies in equal measure, and I can tell you that their regulations are written in Python. Have a nice day, now!&#8221; He thumps the bedside phone control and sits up, yawning, then pushes the do-not-disturb button before it can interrupt again. After a moment he stands up and stretches, then heads to the bathroom to brush his teeth, comb his hair, and figure out where the lawsuit originated and how a human being managed to get far enough through his web of robot companies to bug him.</p></blockquote>
<p><a href="http://www.amazon.com/gp/product/0441014151?ie=UTF8&#038;tag=falsepositive-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0441014151"><img border="0" src="https://images-na.ssl-images-amazon.com/images/I/41AJZ116B2L._SL160_.jpg"/></a></p>
<p>Although the use of code as a financial contract makes some sense since all non standard derivative contracts are excel spreadsheets.</p>
<p>A relevant quote (via a sub link on Prof. Jayanth R. Varma’s Financial Markets Blog <a href="http://jrvarma.wordpress.com/2010/04/16/the-sec-and-the-python/">The SEC and the Python</a> ) from the SEC proposal :</p>
<blockquote><p>&#8220;We are proposing to require that most ABS (asset backed securities) issuers file a computer program that gives effect to the flow of funds, or “waterfall,” provisions of the transaction. We are proposing that the computer program be filed on EDGAR in the form of downloadable source code in Python. … (page 205)&#8221;</p></blockquote>
<p>The proposal also would require detailed asset level data in XML format, and that if there is a conflict between the software and textual description, the software should prevail.  The purpose of the proposal being to allow an investor with the ability to programmatically input the user’s own assumptions regarding the future performance and cash flows from the pool assets.</p>
<p>Wired Magazine had a article in February 2009 on <a href="http://www.wired.com/techbiz/it/magazine/17-03/wp_reboot">Road Map for Financial Recovery: Radical Transparency Now!</a> which is worth a re-read.</p>
<p>My Python friends will be very very happy!</p>
<p>Update: I wonder if you could create a DSL (<a href="http://en.wikipedia.org/wiki/Domain-specific_language">Domain Specific Language</a>) for financial and legal contracts? Probably in Ruby, something <a href="http://cukes.info/">Cucumber</a> like?  Or has it been done already?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/04/21/another-episode-of-its-charlies-strosss-fiction-we-are-just-living-in-it-will-wall-street-require-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Social Networking for Small Businesses</title>
		<link>http://www.falsepositives.com/index.php/2010/04/20/social-networking-for-small-businesses/</link>
		<comments>http://www.falsepositives.com/index.php/2010/04/20/social-networking-for-small-businesses/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 18:56:27 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2515</guid>
		<description><![CDATA[This is the result of a couple of conversations I&#8217;ve had with small shop keepers.  They may use some web technologies outside of their business for personal use : ebay, facebook, email, a few e-commerce sites.  They may a iPod or smart phone.  They may have a one page website for the [...]]]></description>
			<content:encoded><![CDATA[<p>This is the result of a couple of conversations I&#8217;ve had with small shop keepers.  They may use some web technologies outside of their business for personal use : ebay, facebook, email, a few e-commerce sites.  They may a iPod or smart phone.  They may have a one page website for the store, and are listed on (one or more) business directories, they don&#8217;t see how a FaceBook page or Twitter is applicable to their business at all.  They are, literally in some cases, &#8220;meat and potato&#8221; &#8220;brick and mortar&#8221; corner stores servicing a very local market.</p>
<p>This got me to thinking of the HOW, WHAT, WHERE, WHEN and WHY  (The 5 W&#8217;s?) of Social Networks for Small Business, and in particular, the small retail business, as apposed to more service orientated businesses.</p>
<p>(this is likely be a expanding list and if you have additional suggestions then make a comment!)</p>
<h3>The HOW.</h3>
<p>So how are they going to do Social Networking?  Probably either via the web browser on their smart phone (in the shop) or on their home computer at home.</p>
<p>They may not have a need for a Internet connection at work because it is so removed from what they do and their customer interaction, or (in the case of some coffee/bake shops) not something they would think of providing to their customers as a service or enticement.</p>
<p>They probably do some bookkeeping and inventory which ends up on the computer but their business are primarily paper based.</p>
<p>Many still have analog cash registers, and not computerized Point of Sells (PoS) systems.  (This might be a cost issue of the hardware software?).  The good news is that mobile computing is becoming easier and cheaper.</p>
<h3>The WHERE</h3>
<p>I would be tempted to lead with Twitter, because its open to all, and it does not take long to write 140 characters, although fitting every into 140 characters can be very challanging.</p>
<p>And then place the same message on a public accessible FaceBook FAN with expended additional text, and an added an image (always good) about the product/person/thing.</p>
<p>I would also have the last several Twitter status messages (Twits) on the your website homepage, done auto-magically via a javascript tool.</p>
<p>You can have interesting discussion, (and a whole other posting) about if you need a web page at all now.  At most these businesses might have a who are we, where are we, &#8220;when we are (our hours), &#8220;what are we&#8221; (our products, possibly just a high level list of products or suppliers).  So 2 to X pages where X is a single digit. &#8220;who&#8221; and &#8220;what&#8221; can collapsed, as can &#8220;When&#8221; and &#8220;where&#8221;.  The &#8220;what can be expanded to considerable details but be careful.</p>
<p>You might get away with only a FaceBook FAN page, if it&#8217;s open to Google but I&#8217;m a little nervous about putting to much of your on line marketing presence in FaceBook&#8217;s owned garden.  From a medium to long term Marketing and Branding angle it just looks like a bad idea.  But very short term is okay.</p>
<p>You probably don&#8217;t need to edit your company website more that once a year or season (for Seasonal product), but you do need to keep it up to date when things change.  If you can&#8217;t update your web site content as easily as your FaceBook FAN page, your doing it wrong.  One of the nice things about showing your Twitter stream on the home page (or on a side bar) is it is a trivially easy way to keep some fresh content on the web site.</p>
<p>It would be good to become aware of location based sites like of Yelp and Urban Spoon (or other in your category) as well a the newest up and comers FourSqure and GoWalla.</p>
<p>Seek out and learn about tools that let you know when other people mention you, and your brand.</p>
<p>Your Website should be usable on a mobile web browser.  That means to allows for appropriate size and styling, and no flash! (restaurants and hotels are really bad at this!)</p>
<h3>The WHAT.</h3>
<p>What should you be messaging on?</p>
<ul>
<li>The arrival of new products, a special shipment or season item.</li>
<li>Your having a sale.</li>
<li>You had to close the store temporally due to : medical emergency; water/gas leak; a holiday.  But you will be open tomorrow!! (please visit)</li>
<li>You are back from the Holiday, hope you enjoyed yours and am eager to service you!</li>
<li>You are all out of stock, but more will be in on Monday! (don&#8217;t you wish you had come by earlier?  Don&#8217;t worry you too can get one of these popular things on Monday, While supplies last)</li>
<li>Wish Dave a happy birthday and get a discount.</li>
<li>The First 4 people to say the secret word today, get a free Gadget-Thingy!!</li>
<li>This wonderful event is happening in the neighborhood! Check it out! (don&#8217;t we live/work in a great place?)</li>
<li>The store next door is having a promotion! (and come  visit us too!)</li>
<li>We were mentioned in the local/national newspaper (with the link to the mention).</li>
<li>Here&#8217;s a interesting Fact about something we sell, it&#8217;s name comes from A meaning B, or it&#8217;s made from solvent green!!</li>
<li>Sharing information about your industry.</li>
<li>Re Twitter things that other people Twitted about your business or the neighbor. (and thank them)</li>
<li>Regular customer Sue is doing this big deal thing</li>
<p><em>Don&#8217;t</em> be purely promoting your self, that is &#8220;traditional&#8221; marketing and quickly becomes being seen as spam.  <em>Do</em> promote your neighbors and neighborhood, your customers; and promote your &#8220;industry&#8221; and peers.  Grow the pie, not (just) your piece of it.</p>
<p>You can do this in a funny manner, just be careful they share or understand your sense of humour.  It should be done in a informal tone. Make it a win for your customers.  Over all, it should be Sincere, Positive, and it should be you.</p>
<h3>The WHEN.</h3>
<p>This is a function of the HOW and the WHAT : At most daily (except for emergencies. and likely done at the beginning or the end of the work day.</p>
<p>Of course, the lack of time is another reason these business don&#8217;t do &#8220;Social Networking&#8221;).  Try to do it at minimum weekly (this is where the neighbourhood stuff and interesting facts come in handy) and never never less than monthly.   Try doing a little learning about this &#8220;Social Networking&#8221; every day/week or month.   It is a challenge to do these, when running your business is a full time job (or more).  Ask for help!  Pay someone (like me) for help!</p>
<h3>The WHY.</h3>
<p>Social Networking, done well, is the most cost effective advertising and marketing available.</p>
<ul>
<li>Give them a reason to visit you.</li>
<li>Exceed their expectations;</li>
<li>Do not disappoint your customers (and potential customers);</li>
<li>Telling them your story and how your are different; but a face to your business.</li>
<li>Experiment, but remember the &#8220;Golden Rule&#8221; (Treat others as you would wish to be treated).</li>
<li>Showing them you are connected to the place(s) you share.</li>
<li>Be Patient.</li>
<li>Generate positive word of mouth.</li>
</ul>
<p>People are -probably- already talking about you, if you know about it you can : learn from listening, apologies for mistakes; correct errors; inform and educate; connect.</p>
<p>It&#8217;s all about being Social!</p>
</ul>
<h3>June 14 update</h3>
<p>Mashable post <a href="http://mashable.com/2010/06/13/small-business-advice/">Why Small Businesses Shouldn’t Take Social Media for Granted</a> makes some good points, including : &#8220;Simple Works&#8221;, and &#8220;Your Size Works in Your Favor&#8221; and makes a great suggestion :  </p>
<blockquote><p>Who are your most frequent customers? Make a Twitter List called “Regulars,” and add your regulars on Twitter to it.</p></blockquote>
<p>To which I would add making a Twitter list of your (premium) suppliers!  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/04/20/social-networking-for-small-businesses/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Toronto DemoCamp 26, still going strong with noodles, Lean Marketing and 5 Demos.</title>
		<link>http://www.falsepositives.com/index.php/2010/03/30/toronto-democamp-26-still-going-strong-with-noodle-lean-marketing-and-5-demos/</link>
		<comments>http://www.falsepositives.com/index.php/2010/03/30/toronto-democamp-26-still-going-strong-with-noodle-lean-marketing-and-5-demos/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 21:59:35 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[DemoCamp]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[Startup]]></category>
		<category><![CDATA[Toronto]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2489</guid>
		<description><![CDATA[Last night was the 26th DemoCamp in Toronto, and the 3rd held at Ryerson University's Ted Rogers School of Management with a crowd of ~300 or so.  We had a Key Note by April Dunford and Demos by  Kobo Books, Status.net, OpenApps, TeamSave, SWIX.  and food.  kick ass!!]]></description>
			<content:encoded><![CDATA[<p>Last night was the 26th <a href="http://democamp.com/2010/03/30/wrestlemania-26/" rel="tag">DemoCamp</a> in Toronto, and the 3rd held at Ryerson University&#8217;s Ted Rogers School of Management with a crowd of ~300 or so.  We are now in our 5th year (Five!!) of DemoCamps and this one felt like it retained some of the spirit of the older days.</p>
<p>The pre Demo activity was food catered by <a href="http://libertynoodle.com/">Liberty Noodle</a><a> which was some good beef/chicken/veg with noddles/rice and it a cost effective way to grab some grub before the main event (not always the easiest thing after a busy day) &#8211; plus per-event gossiping. </p>
<p>The main event was a keynote and 5 quick demo&#8217;s (the current DemoCamp format):</p>
<p>The Keynote was a interesting and informative talk by </a><a href="http://www.rocketwatcher.com/" rel="tag">April Dunford</a> who related her experiences marketing with startups, and talked about <a href="http://steveblank.com/category/customer-development/">customer  development</a> and product fit as it related to the Lean Startup.  (Call it Lean Marketing?)  April has a summary of it up on her site at <a href="http://www.rocketwatcher.com/blog/2010/03/startup-marketing-101.html" rel="tag" >Startup Marketing 101</a> with links to the slides, but the really good parts were in the talk!<br />
<a href="http://www.flickr.com/photos/blucier/4474993283/" title="DCTo26 - 01 by BenLucier, on Flickr"><img src="http://farm5.static.flickr.com/4035/4474993283_5b30fc550c.jpg" width="500" height="333" alt="DCTo26 - 01" /></a></p>
<p>Then after a short break there where the demos :
<ul>
<li>First up was <a href="http://openapps.com/"rel="tag">OpenApps</a>, as demo&#8217;d by Kristan &#8220;Krispy&#8221; Uccello, which would allow you, as a web site owner, to add new functionality or content to your site with the same look and feel.  It currently (march 2010 ) has a few (free) search shopping and shopping applications, it also allows developers to build new many new applications and sell them on a marketplace,  so there should be many more &#8220;Apps&#8221; in the near future.  OpenAPps has done a amazing job of building a framework, which is as eay to use as it is powerful,and the beginnings of a marketplace for website plugins and/or micro applications.  Krispy is a <strike>cereal</strike> serial presenter at DemoCamp and it&#8217;s always great to see him pull the whiz bang out of the hat!! <a href="http://www.flickr.com/photos/lexnger/4476763983/" title="OpenApps at DemoCamp by LexnGer, on Flickr"><img src="http://farm5.static.flickr.com/4050/4476763983_cb59cf84c3.jpg" width="500" height="333" alt="OpenApps at DemoCamp" /></a></li>
<li>Next up were Chris Nguyen and Lee Liu who are also veterans of <a href="http://www.falsepositives.com/index.php/2006/07/27/toronto-demo-camp-eat-8/" rel="tag">DemoCamp 8</a> being 2 of 5 young founders (at the time Ryerson students, now alumni) having shown their <a href="http://www.jobloft.com/" rel="tag">JobLoft</a> site for the service industry, before going on to CBC Dragons Den TV show, and then <a href="http://www.startupnorth.ca/2007/10/29/jobloft-makes-an-exit/">acquired</a> by onTargetjobs.<br />
Having learned a lot from their previous experiance, we where presented with a early look at the soon to launch (10 days?) <a href="http://www.teamsave.com"/ rel="tag">TeamSave</a> a group buy &#8211; or Social Buying &#8211; web site.  I&#8217;m looking forward to seeing this launched as it looked good and it sounds like they understand the infrastructure issues, plus who doesn&#8217;t like saving money!!  I think they have another hit on their hands, this time in the direct Marketing space.<br /> <a href="http://www.teamsave.com/">TeamSave</a> is Launched!  BlogTo has a writeup <a href="http://www.blogto.com/tech/2010/04/collective_buying_sites_battle_for_the_attention_and_wallets_of_torontonians/">Collective buying sites battle for the attention and wallets of Torontonians</a>.
</li>
<li><a href="http://kobobooks.com/" rel="tag">Kobo Books</a> is a e books platform (iPhone, Blackberry, Palm Prē and Android, Desktop), as well a having their own slick eReader (regretting I did not try to play with it) and they showed off their upcoming iPad application.  The eReader looks very nice with a good balance of features (like usb syc and sd card for data and eInk for the display) at a decent price (I&#8217;m hearing ~CND$ 149).  If it was < $99 dollar I would so jump on it, but even at that price it's tempting </li>
</li>
<li> <a href="http://swixhq.com/SWIX.html">SWIX</a> is a analytics for social media tool (currently in beta but soon to be launched) will give you metrics on a bunch of Social Media web sites.  They have made it very easy to gather all this data in one place &#8211; none trivial &#8211; in a way that very easy to use.  Try it! Now!</li>
<li>Last for the night was James Walker, another <strike>cereal</strike> serial presenter at DemoCamp, from <a href="http://status.net/" rel="tag">Status.net</a>.  Status.net is the wordpress of Microbloging/Twitter/FriendFeed which might be better know for it&#8217;s <a href="http://identi.ca/">Identica</a> web site, a twitter micro-blogging  like site/service powered StatusNet open source software.  Status.net with let you run or own Twitter service either open or closed, within your firewall or outside, and let you run it in a federated or distributed manner, as opposed to Twitter centralized model (hence the Twitter fail whale issue).<br />
<a href="http://www.flickr.com/photos/blucier/4474997429/" title="DCTo26 - 31 by BenLucier, on Flickr"><img src="http://farm3.static.flickr.com/2791/4474997429_1b077bb0de.jpg" width="500" height="333" alt="DCTo26 - 31" /></a><br />
After answering the what is Status.net question, James went on to talk about some of the underlining and emerging protocols used by Status.net and other services, covered by the wrapper protocol for Open Micro Blogging called <a href="http://ostatus.org/">OStatus</a> which uses existing protocols like: </p>
<ul></ul>
</li>
</ul>
<ul>
<li><a href="http://activitystrea.ms/">Activity Streams</a> encode social events in standard Atom or RSS feeds.</li>
<li><a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub</a> pushes those feeds in realtime to subscribers across the Web.</li>
<li><a href="http://www.salmon-protocol.org/">Salmon</a> notifies people of responses to their status updates.</li>
<li><a href="http://code.google.com/p/webfinger/">Webfinger</a> makes it easy to find people across social sites.</li>
</ul>
<p>Really cool and interesting stuff which will have a big impact in the next couple of years.  Now big? Well early in that day a post come up on Read Write Web titled <a href="http://www.readwriteweb.com/archives/cross-network_commenting_protocol_could_crack_face.php">Cracking Facebook&#8217;s Dominance: New Cross-Network Commenting Protocol Could Be a Game Changer</a> all about Salmon and Status.net.</p>
<p>A great DemoCamp. <a href="http://www.flickr.com/photos/lexnger/4476764219/" title="DemoCamp TO by LexnGer, on Flickr"><img src="http://farm3.static.flickr.com/2725/4476764219_0b70605a35.jpg" width="500" height="281" alt="DemoCamp TO" /></a></p>
<p> (and that was before beers and Ben&#8217;s &#8220;the Hand in the Gum&#8221; incident).</p>
<p>2 additional writeups to point to :<br />
Sandy Kemsley wrote an in-depth look at <a href="http://www.column2.com/2010/03/openapps-at-democamp-26-easy-functional-extensions-of-your-website/">OpenApps at DemoCamp 26: Easy Functional Extensions of Your Website</a> and Ian Chan reviewed all the Demos in <a href="http://chanian.com/2010/03/30/democamp-26/">DemoCamp26 : What You Missed</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/03/30/toronto-democamp-26-still-going-strong-with-noodle-lean-marketing-and-5-demos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE 6 Death Watch gets a Funeral Service and at least a few more Nails in it&#8217;s coffin</title>
		<link>http://www.falsepositives.com/index.php/2010/02/23/ie-6-death-watch-gets-a-funeral-service-and-at-least-a-few-more-nails/</link>
		<comments>http://www.falsepositives.com/index.php/2010/02/23/ie-6-death-watch-gets-a-funeral-service-and-at-least-a-few-more-nails/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 19:52:57 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2454</guid>
		<description><![CDATA[Part 2.
 Six Months ago I declared One Year to Go on the IE 6 Deathwatch
In the beginning of this year it was disclosed that Google (as well as and 20+ other companies) had been the victim of Chinese cyber attack, attackers called the operation “Aurora” .  Microsoft had admitted that Explorer was used [...]]]></description>
			<content:encoded><![CDATA[<p>Part 2.<br />
<img src="http://www.falsepositives.com/wp-content/uploads/2010/03/ie6_logo_small.jpg" alt="" /> Six Months ago I declared <a href="http://www.falsepositives.com/index.php/2009/07/14/ie-6-deathwatch/">One Year to Go on the IE 6 Deathwatch</a></p>
<p>In the beginning of this year it was disclosed that Google (as well as and 20+ other companies) had been the victim of Chinese cyber attack, attackers called the operation “Aurora” .  Microsoft had admitted that Explorer was used in Google China hack (via <a href="http://news.bbc.co.uk/2/hi/8460819.stm">BBC</a>), and it now known that the attack took advantage of a zero-day vulnerability in Internet Explorer 6 &#8211; <a href="http://www.microsoft.com/technet/security/advisory/979352.mspx">CVE-2010-0249</a> &#8211; to drop malware onto compromised systems. (via <a href="http://www.theregister.co.uk/2010/01/19/google_china_attack_malware_analysis/">The Register</a>)</p>
<p>This has <a href="http://www.readwriteweb.com/archives/to_switch_or_not_to_switch_debating_the_internet_e.php">promoted </a>France,  Germany (and then Australia) to suggesting that its citizens switch from Internet Explorer. </p>
<p>Thomas Kristensen, the chief security officer for Secunia a company that specializes in looking for security vulnerabilities, commented :<br />
<blockquote>
&#8220;Currently it is evident that running IE6 on XP or Windows 2000 is a very bad idea, and any other browser would be a better choice for XP and Windows 2000 users,&#8221; </p></blockquote>
<p>
In other news : </p>
<p>Goggle has announced <a href="http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html">Modern Browsers for Modern Applications</a>  declaring :</p>
<blockquote><p>Many other companies have already stopped supporting older browsers like Internet Explorer 6.0 as well as browsers that are not supported by their own manufacturers. We’re also going to begin phasing out our support, starting with Google Docs and Google Sites. As a result you may find that from March 1 key functionality within these products &#8212; as well as new Docs and Sites features &#8212; won’t work properly in older browsers.</p></blockquote>
<p>But more importantly, <a href="http://www.google.com/support/youtube/bin/answer.py?hl=en&#038;answer=175292">Google-owned YouTube will end support for Internet Explorer 6 on March 13</a>, just two weeks after ending support on Google Docs. </p>
<p>This will have the effect of getting many non corporate users to upgrdae their browsers off of IE6, and more than a few off of Internet Explorer altogether.</p>
<p>This has lead to the <a href="http://ie6funeral.com/">announcement</a> that &#8220;Internet Explorer Six, resident of the interwebs for over 8 years, died the morning of March 1, 2010 in Mountain View, California, as a result of a workplace injury sustained at the headquarters of Google, Inc.&#8221;</p>
<p>Hence, a funeral services for Internet Explorer Six will be held at 7pm on March 4, in Denver, Colorado.</p>
<p>Can someone be sure to put a stake in it&#8217;s heart to ensure it does not come back? <img src='http://www.falsepositives.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It&#8217;s still the most dreaded 3 letters in a web developers life. </p>
<p>Beta New just published (March 1) <a href="http://www.betanews.com/joewilcox/article/Let-the-Internet-Explorer-6-death-watch-begin/1267468004">Let the Internet Explorer 6 death watch begin</a> will many amusing statements :</p>
<blockquote><p>IE6&#8217;s heart turned evil long ago. .. During IE6&#8217;s reign of terror Website designers paid tribute by using a DOCTYPE ..  Meanwhile, IE6 amassed a great group of worshipers &#8212; malware writers looking to exploit security vulnerabilities for profit. .. IE6 will be missed by malware worshipers and enterprise IT managers too dependent on ActiveX controls to easily switch browsers. </p></blockquote>
<p>(and how soon till we can start the &#8220;Flash Death Watch&#8221;? It&#8217;s the IE6 of the 10&#8217;s!)</p>
<p>Update March 5th : Post ie6 funeral report: <a href="http://techcrunch.com/2010/03/05/ie6-funeral">IE6 Laid To Rest. Pictures, Videos, And Flowers From Microsoft.</a> and Protesters (!?!).</p>
<p>And see CSS Squirrel, Kyle Weems, for <a href="http://www.cssquirrel.com/comic/?comic=57">Goodbye, Six, and good riddance. So Say We All!</a> and <a href="http://www.cssquirrel.com/2010/03/10/comic-update-so-say-we-all/trackback/">then read the related blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/02/23/ie-6-death-watch-gets-a-funeral-service-and-at-least-a-few-more-nails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>different behavior for Prototype JavaScript childElements() in FF and IE</title>
		<link>http://www.falsepositives.com/index.php/2010/02/19/different-behavior-for-prototype-javascript-childelements-in-ff-and-ie/</link>
		<comments>http://www.falsepositives.com/index.php/2010/02/19/different-behavior-for-prototype-javascript-childelements-in-ff-and-ie/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 20:26:01 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=1384</guid>
		<description><![CDATA[Or now to lose the rest of one&#8217;s limited hair     &#8230;. I&#8217;ve come across a &#8220;doesn&#8217;t work as expect&#8221; issue while working in Prototype 1.6.0.2 JavaScript framework (&#8221;Easy Ajax and DOM manipulation for dynamic web applications&#8221; for sure!)
1$('someIdName').parentNode.childElements()
works fine in FireFox (v3) but not in Internet Explorer ( v6), in particular it seems [...]]]></description>
			<content:encoded><![CDATA[<p>Or now to lose the rest of one&#8217;s limited hair  <img src='http://www.falsepositives.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   &#8230;. I&#8217;ve come across a &#8220;doesn&#8217;t work as expect&#8221; issue while working in <a href="http://www.prototypejs.org/" rel="tag">Prototype 1.6.0.2 JavaScript framework</a> (&#8221;Easy Ajax and DOM manipulation for dynamic web applications&#8221; for sure!)</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$('someIdName').parentNode.childElements()</div></td></tr></tbody></table></div>
<p>works fine in FireFox (v3) but not in Internet Explorer ( v6), in particular it seems the the</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$('someIdName').childElements()</div></td></tr></tbody></table></div>
<p>fails giving a &#8220;Object doesn&#8217;t support this property or method&#8221;</p>
<p>thankfully</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$('someIdName').siblings()</div></td></tr></tbody></table></div>
<p>worked just fine. <img src='http://www.falsepositives.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  but I still worried about the Fail.</p>
<p>I think the problem was that in some cases the</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&quot;ParentNode&quot;</div></td></tr></tbody></table></div>
<p>was a</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&quot;div&quot;</div></td></tr></tbody></table></div>
<p>element and strictly speaking Div&#8217;s do have children. Is this a difference in the DOM between IE and FF?</p>
<p>perhaps $(&#8217;someIdName&#8217;).parentNode.childNodes would work?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/02/19/different-behavior-for-prototype-javascript-childelements-in-ff-and-ie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Agile Web Development with Rails, erratum</title>
		<link>http://www.falsepositives.com/index.php/2010/02/16/agile-web-development-with-rails-erratum/</link>
		<comments>http://www.falsepositives.com/index.php/2010/02/16/agile-web-development-with-rails-erratum/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 00:33:13 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Ruby and Rails]]></category>

		<guid isPermaLink="false">http://www.falsepositives.com/?p=2429</guid>
		<description><![CDATA[from the Agile Web Development with Rails, Third Edition. (fourth printing), in Chapter 8.3 iteration C2: Creating a Smarter Cart (page 104), when creating the initial CartItem model class, the price function is defined thusly :
123&#160; &#160; def price
&#160; &#160; &#160; @product.price = @quantity
&#160; &#160; end
Unfortunately that sets the price to the number of items [...]]]></description>
			<content:encoded><![CDATA[<p>from the Agile Web Development with Rails, Third Edition. (fourth printing), in Chapter 8.3 iteration C2: Creating a Smarter Cart (page 104), when creating the initial CartItem model class, the price function is defined thusly :</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> price<br />
&nbsp; &nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@product</span>.<span style="color:#9900CC;">price</span> = <span style="color:#0066ff; font-weight:bold;">@quantity</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>Unfortunately that sets the price to the number of items set in the cart (if you add the item 3 times the price is 3, not $99.88).  It should be   :</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">def</span> price<br />
&nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@product</span>.<span style="color:#9900CC;">price</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#0066ff; font-weight:bold;">@quantity</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>or you could do</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">def</span> price<br />
&nbsp; &nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@product</span>.<span style="color:#9900CC;">price</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>If you do it the second way, the total_price needs to be adjusted (8.5 Iteration C4:finishing the Cart, page 114) be modifying the total_price function from:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp;<span style="color:#9966CC; font-weight:bold;">def</span> total_price<br />
&nbsp; &nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@items</span>.<span style="color:#9900CC;">sum</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>item<span style="color:#006600; font-weight:bold;">|</span> item.<span style="color:#9900CC;">price</span> <span style="color:#006600; font-weight:bold;">&#125;</span> &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>to the correct :</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp;<span style="color:#9966CC; font-weight:bold;">def</span> total_price<br />
&nbsp; &nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@items</span>.<span style="color:#9900CC;">sum</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>item<span style="color:#006600; font-weight:bold;">|</span> item.<span style="color:#9900CC;">price</span> <span style="color:#006600; font-weight:bold;">*</span> item.<span style="color:#9900CC;">quantity</span> <span style="color:#006600; font-weight:bold;">&#125;</span> &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>see <a href="http://www.pragprog.com/titles/rails3/errata">http://www.pragprog.com/titles/rails3/errata</a> for more corrections of this otherwise great guide.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.falsepositives.com/index.php/2010/02/16/agile-web-development-with-rails-erratum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
