<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Virtuous Code - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-79d37fb2" type="application/json"/><link>http://virtuouscode.disqus.com/</link><description></description><atom:link href="http://virtuouscode.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 10 May 2013 06:58:02 -0000</lastBuildDate><item><title>Re: Configuring database_cleaner with Rails, RSpec, Capybara, and Selenium</title><link>http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/#comment-892052207</link><description>&lt;p&gt;Also worth adding that it's important, that in the config you put the before(:each, :js =&amp;gt; true) block above the DatabaseCleaner.start block (as it is in the example) - I just spent a while figuring out why my capybara tests were hanging, and this was the problem (clearly setting the strategy after starting the cleaner doesn't work so well...!). Thanks a bundle for the post though, extremely helpful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Colin Bradley</dc:creator><pubDate>Fri, 10 May 2013 06:58:02 -0000</pubDate></item><item><title>Re: Null Objects and Falsiness</title><link>http://devblog.avdi.org/2011/05/30/null-objects-and-falsiness/#comment-889527073</link><description>&lt;p&gt;You _can_ use `nil` if you dare:&lt;/p&gt;

&lt;p&gt;    class Object&lt;br&gt;      def method_missing (name, *args)&lt;br&gt;         nil&lt;br&gt;      end&lt;br&gt;    end&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jan Dvořák</dc:creator><pubDate>Wed, 08 May 2013 06:10:47 -0000</pubDate></item><item><title>Re: RubyMine, Spork, RSpec, Cucumber</title><link>http://devblog.avdi.org/2011/04/17/rubymine-spork-rspec-cucumber/#comment-884588602</link><description>&lt;p&gt;Still valid on RubyMine 5.4 for Guard users. Thanks for keeping the information available.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ricardo Keigo Andrade</dc:creator><pubDate>Sun, 05 May 2013 00:08:10 -0000</pubDate></item><item><title>Re: Your Code is My Hell</title><link>http://devblog.avdi.org/2011/08/22/your-code-is-my-hell/#comment-883617072</link><description>&lt;p&gt;I think the history of Java (lol @ java/C# devs having any more OOP discipline than people from other backgrounds btw - haven't seen much C++) is proof positive that you cannot enforce good practices through language or tool design. Anybody who thinks public vanilla getters and setters are somehow preserving encapsulation better than public properties should have their IDEs slapped out of their hands until they've learned to value maintainability and how to actually think about what they're doing from the act of writing code without one. The problem is that there will always be people who don't want to learn more than they have to and there will always be people delighted to pay them less now so somebody else can pay ten-fold later.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erik Reppen</dc:creator><pubDate>Fri, 03 May 2013 15:42:16 -0000</pubDate></item><item><title>Re: Your Code is My Hell</title><link>http://devblog.avdi.org/2011/08/22/your-code-is-my-hell/#comment-883598807</link><description>&lt;p&gt;Rails promises rapid results. Rapid results are attractive to people with short term priorities. In my experience in Chicago it's the popular choice for startups writing prototypes and marketing/interactive agencies writing throwaway apps. I don't personally like rails but I don't blame the technology so much as management for failing to understand how much value is lost when no effort is put on hiring experienced devs who can write maintainable code. For greenfield work it really shouldn't add that much time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erik Reppen</dc:creator><pubDate>Fri, 03 May 2013 15:17:43 -0000</pubDate></item><item><title>Re: Your Code is My Hell</title><link>http://devblog.avdi.org/2011/08/22/your-code-is-my-hell/#comment-883595145</link><description>&lt;p&gt;What good practices does jQuery break? It's just a function that spits out adapter/decorator objects for normalizing and reducing cruft in the DOM API. IMO, a very well-written one that you could a learn a lot about JavaScript from. But it mostly just covers the DOM. It doesn't architect apps for you.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erik Reppen</dc:creator><pubDate>Fri, 03 May 2013 15:12:50 -0000</pubDate></item><item><title>Re: Use revision control annotation in your editor</title><link>http://devblog.avdi.org/2012/06/22/use-revision-control-annotation-in-your-editor/#comment-867366192</link><description>&lt;p&gt;:-D&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Thu, 18 Apr 2013 16:12:45 -0000</pubDate></item><item><title>Re: Use revision control annotation in your editor</title><link>http://devblog.avdi.org/2012/06/22/use-revision-control-annotation-in-your-editor/#comment-867363766</link><description>&lt;p&gt;Absolutely amazing! Avdi, you made my day! Thank you very much! Now I love emacs far more! Emacs rocks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexander Petrov</dc:creator><pubDate>Thu, 18 Apr 2013 16:09:39 -0000</pubDate></item><item><title>Re: Preventing Recursion in Ruby</title><link>http://devblog.avdi.org/2012/02/01/preventing-recursion-in-ruby-2/#comment-867246661</link><description>&lt;p&gt;I tried to use this code to prevent recursion with a validate method in a model.  It didn't prevent.  Is there anything unique to the validate method that would prevent the prevent from working?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">FrankInBoise</dc:creator><pubDate>Thu, 18 Apr 2013 13:58:26 -0000</pubDate></item><item><title>Re: Why Linux</title><link>http://devblog.avdi.org/2011/08/09/why-linux/#comment-856610311</link><description>&lt;p&gt;Would agree with every word, having similar experience and getting back to linux every time I need something "reliable and with understandable problems and ways to debug them".&lt;br&gt;And we are in 2013 now, running ubuntu on Zenbook U32, after using mcb air for almost a year.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexei Pashkovsky</dc:creator><pubDate>Mon, 08 Apr 2013 14:45:11 -0000</pubDate></item><item><title>Re: Rack-Test and Capybara are uneasy bedfellows</title><link>http://devblog.avdi.org/2010/06/18/rack-test-and-capybara-are-uneasy-bedfellows/#comment-842374150</link><description>&lt;p&gt;I ran into this as well. When requesting a page via capybara with 'visit', rack-test's 'last_response' wasn't set at all. I kept getting "Rack::Test::Error: No response yet. Request a page first."&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben Lakey</dc:creator><pubDate>Tue, 26 Mar 2013 00:08:23 -0000</pubDate></item><item><title>Re: Taking a break from pair programming</title><link>http://devblog.avdi.org/2013/02/19/taking-a-break-from-pair-programming/#comment-842143265</link><description>&lt;p&gt;Offhand: &lt;a href="http://tripledogdare.net/" rel="nofollow"&gt;http://tripledogdare.net/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm hoping to compile a list of people offering similar services, but I'm behind on that project and I need to figure out how I "vet" them before recommending them.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Mon, 25 Mar 2013 19:53:30 -0000</pubDate></item><item><title>Re: Class.new and .inherited()</title><link>http://devblog.avdi.org/2008/08/26/classnew-and-inherited/#comment-842141305</link><description>&lt;p&gt;Yay!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Mon, 25 Mar 2013 19:49:55 -0000</pubDate></item><item><title>Re: Taking a break from pair programming</title><link>http://devblog.avdi.org/2013/02/19/taking-a-break-from-pair-programming/#comment-841068738</link><description>&lt;p&gt;As a former client of yours, any other people you'd like to recommend for pairing now that you are (temporarily) hanging up your boots?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tushar Saxena</dc:creator><pubDate>Sun, 24 Mar 2013 17:50:24 -0000</pubDate></item><item><title>Re: Class.new and .inherited()</title><link>http://devblog.avdi.org/2008/08/26/classnew-and-inherited/#comment-840373089</link><description>&lt;p&gt;Avdi, it looks like this behaviour was changed in 1.9. The output is no longer reversed when you do Class.new(A) { ... }.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dan Kubb</dc:creator><pubDate>Sun, 24 Mar 2013 02:34:23 -0000</pubDate></item><item><title>Re: Use revision control annotation in your editor</title><link>http://devblog.avdi.org/2012/06/22/use-revision-control-annotation-in-your-editor/#comment-834971934</link><description>&lt;p&gt;Great, thanks. I'll start investigating vc-mode&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kristian Hellquist</dc:creator><pubDate>Tue, 19 Mar 2013 16:02:43 -0000</pubDate></item><item><title>Re: Use revision control annotation in your editor</title><link>http://devblog.avdi.org/2012/06/22/use-revision-control-annotation-in-your-editor/#comment-833909034</link><description>&lt;p&gt;There is actually very little overlap between the two. Magit is for managing a whole project under revision control. It's what I use when I'm selecting files/hunks for a commit, for instance. Or pushing, pulling, rebasing---anything that takes effect project-wide.&lt;/p&gt;

&lt;p&gt;vc-mode, OTOH, is totally buffer/file-focused. It won't show you the state of your whole project, but it will tell you quite a bit about the file you are currently looking at.&lt;/p&gt;

&lt;p&gt;In short: they are complementary!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Mon, 18 Mar 2013 16:38:51 -0000</pubDate></item><item><title>Re: Use revision control annotation in your editor</title><link>http://devblog.avdi.org/2012/06/22/use-revision-control-annotation-in-your-editor/#comment-833893730</link><description>&lt;p&gt;You use both vc-* and magit? What is vc-* doing better than magit? Love to hear your take on that :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kristian Hellquist</dc:creator><pubDate>Mon, 18 Mar 2013 16:18:06 -0000</pubDate></item><item><title>Re: RubyTapas Freebie: Scanning a String</title><link>http://devblog.avdi.org/2013/03/04/rubytapas-freebie-scanning-a-string/#comment-833852987</link><description>&lt;p&gt;I'm putting it on the list!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Mon, 18 Mar 2013 15:24:07 -0000</pubDate></item><item><title>Re: Using &amp;#8220;and&amp;#8221; and &amp;#8220;or&amp;#8221; in Ruby</title><link>http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/#comment-833848772</link><description>&lt;p&gt;For better or for worse, Ruby is a very "big" language. I think if we are going to write all of our code with the newbie reader in mind (and that's not an awful idea), we'd be better off using a smaller language like Python or a Lisp.&lt;/p&gt;

&lt;p&gt;That said, I think you have to be sensitive to context. In some projects the expectation may be that everyone knows their way around Ruby. In others, where teams are larger and/or there's a lot of churn, it may be better to keep to a subset of the language.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Mon, 18 Mar 2013 15:18:40 -0000</pubDate></item><item><title>Re: Using &amp;#8220;and&amp;#8221; and &amp;#8220;or&amp;#8221; in Ruby</title><link>http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/#comment-833844349</link><description>&lt;p&gt;This is a good justification for never, ever using both 'and' and 'or' in the same line.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Mon, 18 Mar 2013 15:12:33 -0000</pubDate></item><item><title>Re: Using &amp;#8220;and&amp;#8221; and &amp;#8220;or&amp;#8221; in Ruby</title><link>http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/#comment-833695179</link><description>&lt;p&gt;Thanks for writing this up, Avdi. Even years later I find myself sending this post around to people as the de facto reference on "and/or" vs "&amp;amp;&amp;amp;/||".&lt;/p&gt;

&lt;p&gt;Do you feel that the benefits of "and" and "or" as control flow operators are significant enough to merit using them, given how commonly confused they are with the binary operators? I've always felt a concern that someone will read them in code and, like me some years ago, mistake them for being synonyms and then use them incorrectly. As such I feel it's safer to use &amp;amp;&amp;amp; and || for control flow, adding parentheses where needed to alter their precedence.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robby Grossman</dc:creator><pubDate>Mon, 18 Mar 2013 12:05:05 -0000</pubDate></item><item><title>Re: Use revision control annotation in your editor</title><link>http://devblog.avdi.org/2012/06/22/use-revision-control-annotation-in-your-editor/#comment-833668094</link><description>&lt;p&gt;Magit is indispensable! Best ui for git anywhere. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Avdi Grimm</dc:creator><pubDate>Mon, 18 Mar 2013 11:30:07 -0000</pubDate></item><item><title>Re: RubyTapas Freebie: Scanning a String</title><link>http://devblog.avdi.org/2013/03/04/rubytapas-freebie-scanning-a-string/#comment-833597070</link><description>&lt;p&gt;Avdi, if you do an episode on that, could you include code smells or best practices for match?  I often wind having something like this &lt;br&gt;obj.match.try(:[],1)  to protect me from nil bombs.&lt;br&gt;Thanks again,&lt;br&gt;Brad&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bradley</dc:creator><pubDate>Mon, 18 Mar 2013 09:52:56 -0000</pubDate></item><item><title>Re: Use revision control annotation in your editor</title><link>http://devblog.avdi.org/2012/06/22/use-revision-control-annotation-in-your-editor/#comment-833493036</link><description>&lt;p&gt;Thanks for the tip. You don't use magit? I found it a bit a slow sometimes.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kristian Hellquist</dc:creator><pubDate>Mon, 18 Mar 2013 07:48:15 -0000</pubDate></item></channel></rss>