<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Disqus - Latest Comments for court3nay</title><link>http://disqus.com/people/f7d94c4c159ec28690c0190bbd304ec4/</link><description></description><language>en</language><lastBuildDate>Tue, 20 May 2008 01:32:10 -0000</lastBuildDate><item><title>Re: I am rice</title><link>http://dctanner.disqus.com/i_am_rice_87/#comment-10937</link><description>you don't need this since 1.1.1, just hit space twice.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Sun, 11 Nov 2007 17:17:56 -0000</pubDate></item><item><title>Re: New 24&amp;#8243; iMac</title><link>http://danielrm26.disqus.com/new_248243_imac/#comment-4358567</link><description>&lt;p&gt;The 24" imac is unique in that it has a S-IPS panel in it (better viewing angle, 24-bit color).  The S-IPS is basically the best panel available in consumer devices and is not present in the smaller imacs.  They tend not to advertise which panel is in a display, but you can infer it from the published viewing angle specs.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Tue, 20 May 2008 01:32:10 -0000</pubDate></item><item><title>Re: RESTful Programming and CSRF</title><link>http://drm.disqus.com/restful_programming_and_csrf/#comment-11183641</link><description>&lt;p&gt;It's a dirty little secret of rails apps that many of them are susceptible to csrf attacks.  However, if you designed your rails app correctly (i.e. GET actions only show data, to delete you have to post with DELETE) it makes it a little more difficult, because you need a POST to change any data.&lt;/p&gt;&lt;br&gt;&lt;p&gt;There was a twitter 'virus' a few months that we discovered and destroyed that essentially created a form which created a tweet and POSTed the form automatically with javascript.&lt;/p&gt;&lt;br&gt;&lt;p&gt;My colleague Rick Olson wrote CSRF_killer plugin which automatically puts some hidden form variables into all of your forms, and effectively squashes any such attacks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Sat, 29 Mar 2008 22:27:16 -0000</pubDate></item><item><title>Re: New 24&amp;#8243; iMac</title><link>http://drm.disqus.com/new_248243_imac/#comment-11187499</link><description>&lt;p&gt;The 24" imac is unique in that it has a S-IPS panel in it (better viewing angle, 24-bit color).  The S-IPS is basically the best panel available in consumer devices and is not present in the smaller imacs.  They tend not to advertise which panel is in a display, but you can infer it from the published viewing angle specs.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Tue, 20 May 2008 01:32:10 -0000</pubDate></item><item><title>Re: Rails don't know testing</title><link>http://giantrobots.disqus.com/rails_dont_know_testing/#comment-14585063</link><description>&lt;p&gt;Wow. First of all, you don&amp;#8217;t need Mysql to run tests. You do (mostly) need a database, since you really do want to test your whole stack.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;However, you don&amp;#8217;t actually need a database to test your controller.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;In fact, the way you have it set up above, you can&amp;#8217;t change the implementation of the &amp;#8216;search&amp;#8217; call without messing about in your controller tests, even though it&amp;#8217;s a database call.  You essentially are testing the framework, no your code.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;You could wrap your &amp;#8216;search&amp;#8217; call in a class method, so that:&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;code&gt;&lt;code&gt;def User.search(q)&lt;br&gt;  find(:all, :conditions =&amp;gt; ['name like ?', "#{q}"])&lt;br&gt;end&lt;/code&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;Now, your controller test looks like&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;code&gt;&lt;code&gt;User.expects(:search).with(q).returns users&lt;/code&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;And the controller looks like&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;code&gt;&lt;code&gt;def search&lt;br&gt;  @users = User.search(params[:q])&lt;br&gt;end&lt;/code&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;And you can change the ordering, add includes, or even switch in Ferret, and you wouldn&amp;#8217;t have to change the controller test.  Think about it&amp;#8212;those db calls (&amp;#8220;LIKE %&amp;#8220;) should be hidden away in the model, and they should be tested in your model&amp;#8217;s tests.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Sun, 18 Mar 2007 17:19:00 -0000</pubDate></item><item><title>Re: Introducing the Shoulda Testing Plugin</title><link>http://giantrobots.disqus.com/introducing_the_shoulda_testing_plugin/#comment-14585460</link><description>&lt;p&gt;Heh.  Haven&amp;#8217;t you heard of test/spec?&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;http://chneukirchen.org/blog/archive/2006/10/announcing-test-spec-0-2-a-bdd-interface-for-test-unit.html&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;http://poocs.net/2007/4/3/test-spec-on-rails-and-assert_difference&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;http://weblog.techno-weenie.net/2006/11/24/test-spec-kicks-simply_bdds-ass&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Fri, 06 Apr 2007 15:20:00 -0000</pubDate></item><item><title>Re: cruise_control.rb campfire plugin</title><link>http://giantrobots.disqus.com/cruise_controlrb_campfire_plugin/#comment-14585631</link><description>&lt;p&gt;woot, my li&amp;#8217;l marshmallow really gets around :) good to see he&amp;#8217;s still useful to people.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Sat, 21 Apr 2007 01:24:00 -0000</pubDate></item><item><title>Re: true or false</title><link>http://giantrobots.disqus.com/true_or_false/#comment-14585646</link><description>&lt;p&gt;You really really need to look into the State Machine plugin.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;It&amp;#8217;s a bit of a learning curve, but it will make your code much more powerful and foolproof. You can guard against changing states, provide callbacks on state changes, as well as only allow a ceratain pathway from/to each state.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;http://rubyi.st/2006/1/21/acts-as-state-machine&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	&lt;p&gt;http://www-128.ibm.com/developerworks/java/library/j-cb03137/index.html&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">court3nay</dc:creator><pubDate>Wed, 25 Apr 2007 14:53:00 -0000</pubDate></item></channel></rss>