<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for dchelimsky</title><link>http://disqus.com/by/dchelimsky/</link><description></description><atom:link href="http://disqus.com/dchelimsky/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 18 Oct 2016 08:28:05 -0000</lastBuildDate><item><title>Re: 
      
        Interactive Development with Clojure.spec
      
      </title><link>http://blog.cognitect.com/blog/2016/10/5/interactive-development-with-clojurespec#comment-2956282518</link><description>&lt;p&gt;Good point and, yes, you can add :kind sequential? to (s/def ::code ...).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Tue, 18 Oct 2016 08:28:05 -0000</pubDate></item><item><title>Re: 
      
        Interactive Development with Clojure.spec
      
      </title><link>http://blog.cognitect.com/blog/2016/10/5/interactive-development-with-clojurespec#comment-2944926677</link><description>&lt;p&gt;The `coll-of` spec doesn't deal with order, but it does maintain order when conforming. If you hand conform a coll-of spec and a sequential type, it will return a sequential type with the same values in the same order (assuming they conform) unless you specify that you want to pour them into an unordered collection (i.e. a set). Does that answer your question?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Tue, 11 Oct 2016 12:09:23 -0000</pubDate></item><item><title>Re: 
      
        Interactive Development with Clojure.spec
      
      </title><link>http://blog.cognitect.com/blog/2016/10/5/interactive-development-with-clojurespec#comment-2935185853</link><description>&lt;p&gt;Fixed - thanks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Wed, 05 Oct 2016 16:06:53 -0000</pubDate></item><item><title>Re: 
      
        Interactive Development with Clojure.spec
      
      </title><link>http://blog.cognitect.com/blog/2016/10/5/interactive-development-with-clojurespec#comment-2935005103</link><description>&lt;p&gt;Fixed the gist link - thanks for the pointer.&lt;/p&gt;&lt;p&gt;Yes, (rand-int (count secret)) would pass the specs for those fns, but we'd see failures in score when they produce e.g. all-matches 0 and exact-matches 1. And sure, I'm sure there's a way to modify the code so that all the existing specs continue to pass (like they always return 0), and that is a good argument for a couple of explicit example based tests.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Wed, 05 Oct 2016 14:19:07 -0000</pubDate></item><item><title>Re: Extending Transit — Cognitect Blog</title><link>http://blog.cognitect.com/blog/2015/9/10/extending-transit#comment-2247921187</link><description>&lt;p&gt;Fixed, but I went with transit instead of tranist :) Thanks for pointing it out!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Fri, 11 Sep 2015 08:23:15 -0000</pubDate></item><item><title>Re: Clojure FizzBuzz without Conditionals - Squid's Blog</title><link>http://gigasquid.github.io/blog/2014/11/13/clojure-fizzbuzz-without-conditionals/#comment-1697199258</link><description>&lt;p&gt;One interesting side effect of this exploration is the question "what is a conditional?" For example, DerGuteMoritz's beautifully terse and clever (in the good way!) example looks like there are no conditionals, but it uses default values for keying into a map which _could_ be viewed as shorthand for (if result result default). Same with filters in other examples, etc. Of course, my example could be viewed similarly: if the score is 0, use this fn, elsif the score is 1, etc. I'm curious to hear how other people think about what is a conditional and what is not.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Mon, 17 Nov 2014 09:27:14 -0000</pubDate></item><item><title>Re: Clojure FizzBuzz without Conditionals - Squid's Blog</title><link>http://gigasquid.github.io/blog/2014/11/13/clojure-fizzbuzz-without-conditionals/#comment-1697193017</link><description>&lt;p&gt;Here's one more approach. It uses transformation functions like (at least) one of the other submissions, but selects the correct one based on a "score" of the number: &lt;a href="https://gist.github.com/dchelimsky/b20b87023adb0c3b25f3" rel="nofollow noopener" target="_blank" title="https://gist.github.com/dchelimsky/b20b87023adb0c3b25f3"&gt;https://gist.github.com/dch...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Mon, 17 Nov 2014 09:22:17 -0000</pubDate></item><item><title>Re: Myron Marston and Andy Lindeman are RSpec's new project leads</title><link>http://blog.davidchelimsky.net/blog/2012/11/28/myron-marston-and-andy-lindeman-are-rspecs-new-project-leads/#comment-1072284745</link><description>&lt;p&gt;And thank you, Brian, for your contributions back in the 1.0 days. iirc you were responsible for, among other things, the initial support for nested example groups, which was an important differentiator at the time. Hope you're doing well.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Sun, 06 Oct 2013 04:33:47 -0000</pubDate></item><item><title>Re: Clean Clojure: Small functions - Connor Mendenhall</title><link>http://ecmendenhall.github.io/blog/blog/2013/09/05/clean-clojure-functions/#comment-1053381142</link><description>&lt;p&gt;I think everybody writing and interested in this thread is interested in clean code, but not everybody agrees on what that means :)&lt;/p&gt;&lt;p&gt;Thanks for your reply.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Fri, 20 Sep 2013 18:22:11 -0000</pubDate></item><item><title>Re: Clean Clojure: Small functions - Connor Mendenhall</title><link>http://ecmendenhall.github.io/blog/blog/2013/09/05/clean-clojure-functions/#comment-1052601618</link><description>&lt;p&gt;re: readability: there are costs and limits to everything. Breaking the original function down into 8 functions introduces 7 new opportunities to get the names wrong (more possibilities for error). At least one of the resulting names, `less-than-sum-of-digits-squared`, can easily be misinterpreted as "sum the digits, then square the result".&lt;/p&gt;&lt;p&gt;re: usability, I think it's more likely that `square` would be used elsewhere than `sum-of-squared-digits`, so all things are not equal.&lt;/p&gt;&lt;p&gt;re: testability, we now have 8 functions that have to be tested instead of 1. In an object language we might declare some of those methods private and leave them tested through their consumers, but this example doesn't really address that issue.&lt;/p&gt;&lt;p&gt;re: density, I think there is a balance between too dense and too thin. The reason S_Mosciatti's implementations of `sum-of-squared-digits` appear dense to you is that they are complecting two orthogonal concepts (I win the buzzword contest!): splitting the number into its digits and then summing the squares. I think it becomes much less dense if those two ideas are separated, per my other comment this thread: &lt;a href="http://ecmendenhall.github.io/blog/blog/2013/09/05/clean-clojure-functions/#comment-1052180978" rel="nofollow noopener" target="_blank" title="http://ecmendenhall.github.io/blog/blog/2013/09/05/clean-clojure-functions/#comment-1052180978"&gt;http://ecmendenhall.github....&lt;/a&gt; (would love to get your feedback on that example).&lt;/p&gt;&lt;p&gt;Lastly, the 3x longer but 3x more maintainable argument works in this example because you can see the entire program at one time at either size. I don't think that scales when you're talking about a 10k line program growing to 30k.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Fri, 20 Sep 2013 05:10:36 -0000</pubDate></item><item><title>Re: Clean Clojure: Small functions - Connor Mendenhall</title><link>http://ecmendenhall.github.io/blog/blog/2013/09/05/clean-clojure-functions/#comment-1052180978</link><description>&lt;p&gt;The name &lt;code&gt;less-than-sum-of-digits-squared?&lt;/code&gt; sounds to me like "sum the digits, and then square the result". I think it would make more sense if it was aligned with the first function, e.g.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;br&gt;count-less-than-sum-of-squared-digits&lt;br&gt;      less-than-sum-of-squared-digits?&lt;br&gt;                sum-of-squared-digits&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;At that point, however, the three functions with almost the same name bugs me and I want to roll the 3rd one up into the 2nd one e.g.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;br&gt;(defn split-digits [n]&lt;br&gt;  (map (comp read-string str) (str n)))&lt;br&gt;(defn sum-of-squares [s]&lt;br&gt;  (reduce + (map #(* % %) s)))&lt;br&gt;(defn less-than-sum-of-squared-digits? [n]&lt;br&gt;  (&amp;lt; n (sum-of-squares (split-digits n))))&lt;br&gt;(defn count-less-than-sum-of-squared-digits [s]&lt;br&gt;  (count (filter less-than-sum-of-squared-digits? s)))&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;At this point every fn is a one-liner with names that clarify the implementations (to me). Personally, I'd stop at this point absent a specific re-use need. WDYT?&lt;/p&gt;&lt;p&gt;(ps - sorry about the formatting - when I put spaces between each function it added extra empty lines)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Thu, 19 Sep 2013 18:23:22 -0000</pubDate></item><item><title>Re: The Plan for RSpec 3</title><link>http://rspec.info/blog/2013/07/the-plan-for-rspec-3#comment-966132880</link><description>&lt;p&gt;FYI - rspec-1 was in a single repo, but there were a few problems. One was that Rails used plugins in those days, which meant downloading the entire rspec git repo (which had a long history, so it was big) every time you updated plugins. Another was that it made it difficult to do patch releases on one gem without doing the same for all. Having separate repos makes it easier to release patches independently.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Wed, 17 Jul 2013 16:29:50 -0000</pubDate></item><item><title>Re: Rspec&amp;#8217;s be_an_instance_of is pretty useful</title><link>https://tosbourn.com/rspecs-be_an_instance_of-is-pretty-useful/#comment-966091170</link><description>&lt;p&gt;Hi Toby - I commented on this on [Reddit](&lt;a href="http://www.reddit.com/r/ruby/comments/1ierwn/rspecs_be_an_instance_of_is_pretty_useful/)" rel="nofollow noopener" target="_blank" title="http://www.reddit.com/r/ruby/comments/1ierwn/rspecs_be_an_instance_of_is_pretty_useful/)"&gt;http://www.reddit.com/r/rub...&lt;/a&gt;, but in case you didn't see it or for anybody else who sees this post: RSpec does no such type conversion. If this is happening to you in a project that uses ActiveSupport, that is likely the source of the type conversion (see &lt;a href="https://gist.github.com/dchelimsky/6023806)" rel="nofollow noopener" target="_blank" title="https://gist.github.com/dchelimsky/6023806)"&gt;https://gist.github.com/dch...&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;re:  `be_an_instance_of``, I agree that it is useful as an additional sanity check in this case because it solves a very specific problem you ran into, but I wouldn't recommend it generally because it creates additional noise and makes the code harder to change (consider that a decision to use Date instead of DateTime would require these examples changing).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Wed, 17 Jul 2013 15:53:53 -0000</pubDate></item><item><title>Re: RSpec Team Changes</title><link>http://rspec.info/blog/2013/04/rspec-team-changes#comment-856726245</link><description>&lt;p&gt;Congrats to Bradley, Jon, and Sam, and to Myron for doing such a great job of building the team.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Mon, 08 Apr 2013 17:17:20 -0000</pubDate></item><item><title>Re: MiniTest [Rails 4 Countdown to 2013] | The Remarkable Labs Blog</title><link>http://blog.remarkablelabs.com/2012/12/minitest-rails-4-countdown-to-2013#comment-751031640</link><description>&lt;p&gt;I'm pretty sure the directory structure will remain as described in this post (which, btw, was actually inspired by ZenTest back when I was first working on rspec-rails), even if ActiveSupport::TestCase &amp;lt; MiniTest::Unit::TestCase instead of MiniTest::Spec.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Sat, 29 Dec 2012 19:00:28 -0000</pubDate></item><item><title>Re: hone.heroku.com | Rubygems and the Dependency API</title><link>https://hone.herokuapp.com/bundler%20heroku/2012/10/22/rubygems-and-the-dependency-api.html#comment-690582215</link><description>&lt;p&gt;Worked as expected for `bundle install`, `bundle exec` and `bundle update`.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Tue, 23 Oct 2012 20:51:46 -0000</pubDate></item><item><title>Re: RSpec's New Expectation Syntax</title><link>http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax#comment-582378245</link><description>&lt;p&gt;Yi - would you please submit that as a feature request to &lt;a href="https://github.com/rspec/rspec-rails/issues?" rel="nofollow noopener" target="_blank" title="https://github.com/rspec/rspec-rails/issues?"&gt;https://github.com/rspec/rs...&lt;/a&gt; Better place to have that discussion. Thx.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Mon, 09 Jul 2012 14:49:34 -0000</pubDate></item><item><title>Re: Constant Stubbing in RSpec 2.11</title><link>http://rspec.info/blog/2012/06/constant-stubbing-in-rspec-2-11#comment-571834668</link><description>&lt;p&gt;Once again, Myron neglects to tell you that a new RSpec feature is _his_ work! Well done, Myron!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Fri, 29 Jun 2012 11:28:39 -0000</pubDate></item><item><title>Re: RSpec's New Expectation Syntax</title><link>http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax#comment-564481792</link><description>&lt;p&gt;Rodrigo - have you seen &lt;a href="https://github.com/rspec/rspec-mocks/issues/153" rel="nofollow noopener" target="_blank" title="https://github.com/rspec/rspec-mocks/issues/153"&gt;https://github.com/rspec/rs...&lt;/a&gt; re: expect(obj).to receive(message)?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Fri, 22 Jun 2012 09:51:01 -0000</pubDate></item><item><title>Re: RSpec's New Expectation Syntax</title><link>http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax#comment-560086746</link><description>&lt;p&gt;How objects are created has no impact here. Instead of `user.should be_active` you'd just say `expect(user).to be_active`.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Sat, 16 Jun 2012 19:02:01 -0000</pubDate></item><item><title>Re: LOLtests show rspec 2x slower than minitest</title><link>http://blog.zenspider.com/blog/2012/06/loltests-show-rspec-2x-slower-than-minitest.html#comment-558876571</link><description>&lt;p&gt;Here's an equally useless benchmark: if you make 10k groups of 1 example each instead of 1 group of 10k examples, RSpec is actually faster, though admittedly not as "faster" as minitest/spec is in this example: &lt;a href="https://gist.github.com/2938965" rel="nofollow noopener" target="_blank" title="https://gist.github.com/2938965"&gt;https://gist.github.com/293...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Fri, 15 Jun 2012 18:27:12 -0000</pubDate></item><item><title>Re: RSpec's New Expectation Syntax</title><link>http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax#comment-558557007</link><description>&lt;p&gt;What @myronmarston leaves out is that he developed this new feature! Thanks, Myron, for all the research and great work.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Fri, 15 Jun 2012 10:41:27 -0000</pubDate></item><item><title>Re: Improving the integration between Capybara and RSpec</title><link>http://blog.plataformatec.com.br/2012/06/improving-the-integration-between-capybara-and-rspec/#comment-557075516</link><description>&lt;p&gt;How do you envision this working? rspec-rails' example groups all include XXX::TestCase::Behavior from Rails, so I think we'd need something in Rails that provides RSpec all of the helpers it needs minus Rack::Test. Are you thinking there's nothing else we need from Rails for a Capy-specific type of group?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Thu, 14 Jun 2012 07:22:19 -0000</pubDate></item><item><title>Re: Improving the integration between Capybara and RSpec</title><link>http://blog.plataformatec.com.br/2012/06/improving-the-integration-between-capybara-and-rspec/#comment-555306924</link><description>&lt;p&gt;sabereent: I've been generally opposed to "acceptance" because I think it's understood differently by too many people. The naming in rspec-rails focuses on the things that are being spec'd (models, controllers, views, etc), so I'd be more inclined to use a name like "application" or "system" than "acceptance", which describes a process rather than a thing.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Tue, 12 Jun 2012 12:35:32 -0000</pubDate></item><item><title>Re: Stop. Write a Learning Test. - The Code Whisperer</title><link>http://blog.thecodewhisperer.com/permalink/when-to-write-learning-tests#comment-461645353</link><description>&lt;p&gt;Complete tangent, but I prefer `specify { thing.should matcher }` over `it { thing.should matcher }`. The `it { should ...` syntax works well with an implicit `subject`, but "it thing should" is like nails on chalkboard to me :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Chelimsky</dc:creator><pubDate>Sat, 10 Mar 2012 15:15:47 -0000</pubDate></item></channel></rss>