<?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 skwp</title><link>http://disqus.com/by/skwp/</link><description></description><atom:link href="http://disqus.com/skwp/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 30 Oct 2017 13:36:13 -0000</lastBuildDate><item><title>Re: NO CHARGES OF TRUMP COLLUSION: Here&amp;#039;s What You Need To Know About The Manafort Indictment</title><link>http://www.dailywire.com/news/22918/no-charges-trump-collusion-heres-what-you-need-ben-shapiro#comment-3591965550</link><description>&lt;p&gt;&amp;gt; but emails, uranium, hillary&lt;br&gt;&amp;gt; but bill clinton got paid too much&lt;br&gt;&amp;gt; but ..&lt;/p&gt;&lt;p&gt;that was in the past. let it go. she didn't win the election. it's time to fix the mess we have&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Mon, 30 Oct 2017 13:36:13 -0000</pubDate></item><item><title>Re: NO CHARGES OF TRUMP COLLUSION: Here&amp;#039;s What You Need To Know About The Manafort Indictment</title><link>http://www.dailywire.com/news/22918/no-charges-trump-collusion-heres-what-you-need-ben-shapiro#comment-3591961914</link><description>&lt;p&gt;&amp;gt; there are literally no signs of collusion&lt;br&gt;donnie jr admits to meeting with russians to discuss magnitsky in exchange for dirt on hillary&lt;br&gt;&amp;gt; there are literally no signs of collusion&lt;br&gt;manafort is indicted&lt;br&gt;&amp;gt; there are literally no signs of collusion&lt;br&gt;trump goes on a tweet rampage&lt;br&gt;&amp;gt; there are literally no signs of collusion&lt;/p&gt;&lt;p&gt;I agree, there's probably no collusion here. But there sure is a whole lot of stupidity.&lt;/p&gt;&lt;p&gt;&amp;gt; but he's a great businessman&lt;br&gt;who picks terrible people to surround himself with&lt;/p&gt;&lt;p&gt;&amp;gt; but he's winning&lt;br&gt;can't pass any legislation with both houses under his control&lt;/p&gt;&lt;p&gt;&amp;gt; but he's working hard&lt;br&gt;golfs more than obama&lt;/p&gt;&lt;p&gt;&amp;gt; but he's draining the swamp&lt;br&gt;employing his family and billionaires&lt;/p&gt;&lt;p&gt;&amp;gt; but he's implementing policies we like&lt;br&gt;is he?&lt;/p&gt;&lt;p&gt;when the clown car crashes, who will be the one without an airbag? the internet has a long memory, mr shapiro. retain your dignity and stop this madness.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Mon, 30 Oct 2017 13:34:18 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Scalable code without bloat: DCI, Use Cases, and You</title><link>http://devblog.reverb.com/post/93075989836#comment-1508168661</link><description>&lt;p&gt;@lwoodson really good summary. I'm going to get into namespaces and such in a later post probably, but I agree wholeheartedly with all your points.&lt;/p&gt;&lt;p&gt;@Dave Aronson yes definitely, we can nounify the verbs, and I'm not at all preaching that verbs are the only way to go, simply that reifying the process is the key. I do have a weak opinion in favor of verbs because they often map the most closely to business process language. However, we do use nounified versions when they are the most intuitive to read in English. In fact, I argue that English readability and mapping to business domain should trump almost everything else in naming, including any kind of consistency (all verbs vs all nouns).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Mon, 28 Jul 2014 10:14:54 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | HAL, Siren, Rabl, Roar, Garner: Building Hypermedia APIs in Ruby/Rails</title><link>http://devblog.reverb.com/post/47197560134#comment-1465604934</link><description>&lt;p&gt;Are you talking about on the client side? No, generally on the client we are just using glorified hashes. So we're not deserializing into objects, we're just deserializing into openstructs/dotted hashes. So in a sense yes we have the associations because nested hashes turn into nested objects. But not anything railsy. Also it's because on the client side we are not usually inside of Rails so we don't want AR objects or anything like that.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Wed, 02 Jul 2014 16:32:59 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | HAL, Siren, Rabl, Roar, Garner: Building Hypermedia APIs in Ruby/Rails</title><link>http://devblog.reverb.com/post/47197560134#comment-1465461068</link><description>&lt;p&gt;hey Clay, we are serializing using Roar/Representable. I haven't used activemodel serializers so I'm not sure... Roar does have bi-directional serializer/deserializer but in practice we have not used it. Instead we serialize using Roar and typically read it in on the other side using something like Hashie::Mash/Trash. Not sure if this answers your question or confuses things further :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Wed, 02 Jul 2014 15:01:24 -0000</pubDate></item><item><title>Re: My GPA at Code Climate is 3.59: A refactoring story - Black Matter</title><link>http://cored.github.io/blog/2014/02/19/my-gpa-at-code-climate-is-3-dot-59-a-refactoring-story/#comment-1364620162</link><description>&lt;p&gt;You might also remove all conditionals entirely by putting the knowledge about which locations to store into the controllers themselves. I.e. UserConfirmationController can say `skip_before_filter :store_location` if you don't want to store that location. Then each controller knows whether it should be stored or not, and you have no conditional or regex.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 01 May 2014 16:53:50 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Testing complex conditionals</title><link>http://devblog.reverb.com/post/77909079581#comment-1275405143</link><description>&lt;p&gt;Hi, just a few clarifications on should syntax&lt;/p&gt;&lt;p&gt;1. the should syntax is not deprecated, it's simply not preferred&lt;/p&gt;&lt;p&gt;2. should syntax for one-liners like "it { should foo }" cannot be done with expect, and is actually fully supported. they decided to keep the syntax. See discussion here:&lt;/p&gt;&lt;p&gt;&lt;a href="https://github.com/rspec/rspec-expectations/pull/119#issuecomment-4311452" rel="nofollow noopener" target="_blank" title="https://github.com/rspec/rspec-expectations/pull/119#issuecomment-4311452"&gt;https://github.com/rspec/rs...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Fri, 07 Mar 2014 13:05:17 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1267076443</link><description>&lt;p&gt;Yes, most of the time when they belong to a specific part of the domain. So we might have workers/auctions for some of our auction related workers.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Sun, 02 Mar 2014 09:06:25 -0000</pubDate></item><item><title>Re: Fender American Deluxe Telecaster 2011 Aged Cherry Burst Price Guide | Reverb</title><link>https://reverb.com/price-guide/guide/2178-fender-american-deluxe-telecaster-2011-aged-cherry-burst#comment-1245957604</link><description>&lt;p&gt;Hey Matt, Reverb is a marketplace - you commented on one of our price guides here, but you can check out a similar tele for sale on the left&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Sat, 15 Feb 2014 13:42:23 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1221878660</link><description>&lt;p&gt;Exactly, although I have to say that app/workers feels a little wrong to me, since workers are not truly specific to the Rails app. They could in fact live in another application that just did sidekiq work. But we haven't broken out workers from the main app so it's fine for now.&lt;/p&gt;&lt;p&gt;The idea is the domain layer knows nothing of Rails. It may occasionally use activesupport for convenience, and it does talk to AR models, but it can theoretically be pulled out into a separate service layer, or non-Rails application.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Wed, 29 Jan 2014 10:49:56 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1221840288</link><description>&lt;p&gt;Hi Rafael,&lt;/p&gt;&lt;p&gt;We do have some structured folders (app/decorators, app/workers), but in our domain layer we lump together objects based on what some people would probably call a "bounded context", although we do it in a less religious fashion. Meaning, we'll have a namespace like "accounts" and inside we'll have CreateAccount, but if that uses some value object (say a Username), that object might just live there alogside the usecase. So far, we've been pretty narrow in our namespaces so that each folder ends up containing maybe 5 or so classes. In some cases if the domain is very complex, we'll create additional namespaces/folders inside there to hold subsections. However, we do not create folders like "services" or "value_objects" or etc.&lt;/p&gt;&lt;p&gt;So far we are preferring the modeling of the system to flow naturally - whatever english language and domain concepts are natural, rather than saying "these things are Services" and "these things are Foos" and assuming anything about their structure. The downside is that there isn't necessarily a clear pattern to what UseCase is in our system - but the upside is we haven't boxed ourselves in to any patterns either, as we're feeling out what works and what doesn't. Hope this made sense :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Wed, 29 Jan 2014 10:21:45 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1214174597</link><description>&lt;p&gt;Frankly we are trying to move away from autoloading as much as possible, but for now we have our autoload_paths having "#{config.root}/app" as a folder. This allows everything including app/reverb to get autoloaded in Rails. Although in our domain layer we explicitly require classes so we can fast_spec them.&lt;/p&gt;&lt;p&gt;We are starting to form the opinion that autoloading is toxic for the same reasons as outlined in Myron Marton's awesome blog here: &lt;a href="http://myronmars.to/n/dev-blog/2012/12/5-reasons-to-avoid-bundler-require" rel="nofollow noopener" target="_blank" title="http://myronmars.to/n/dev-blog/2012/12/5-reasons-to-avoid-bundler-require"&gt;http://myronmars.to/n/dev-b...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 23 Jan 2014 17:45:45 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1213659237</link><description>&lt;p&gt;You could probably also inherit from a model and define scopes there, thus making it more like a Role. Although I would prefer to implement Roles with composition/decoration, I'm not sure that AR scopes are definable in any way except through inheritance.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 23 Jan 2014 12:07:04 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1213657564</link><description>&lt;p&gt;To tell you the truth, this is a problem we have not solved sufficiently well.  The short answer is we haven't felt enough pain here to dig into it, but the long answers are:&lt;/p&gt;&lt;p&gt;One way to combat too many scopes is to think about externalizing scopes to related objects. For example instead of User having hundreds of scopes like "sold_products", maybe you just do Product.sold.for_user. Or externalize into query objects like SoldProducts.for(user). These are techniques we use rarely, usually in the case of complex queries or scopes. Another way I can think of doing this is by "DCI" style of extending a model at runtime, something like user.extend(ProductScopes). I don't know how well that would work.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 23 Jan 2014 12:05:53 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1207276423</link><description>&lt;p&gt;We typically test them in isolation, and stub the boundary in the controller using something like stub_wisper_publisher, which is an rspec extension I wrote for Wisper. I'm planning to improve that bit so that it can better test publishers that take arguments, which is currently not easy to do. Sometimes if it's hard to test with stubbing, we do one happy path integration test from the controller.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Sat, 18 Jan 2014 13:17:49 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Removing conditional logic, a thought experiment</title><link>http://devblog.reverb.com/post/73530264036#comment-1206099818</link><description>&lt;p&gt;That's a great technique Kris - I forgot to add it to my list above.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Fri, 17 Jan 2014 13:56:57 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Ten resources for taking your Ruby skills to the next level</title><link>http://devblog.reverb.com/post/65298078326#comment-1193162101</link><description>&lt;p&gt;John it's great to hear from you! What's this about students - are you teaching?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Wed, 08 Jan 2014 22:15:15 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1178912834</link><description>&lt;p&gt;Cool. Personally, I would opt for a "def &lt;a href="http://self.foo" rel="nofollow noopener" target="_blank" title="self.foo"&gt;self.foo&lt;/a&gt;" for module functions for reasons of clarity, as well as visibility within a larger file. You can instantly see that it's a class method / module method that way.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Fri, 27 Dec 2013 21:41:09 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1177568022</link><description>&lt;p&gt;Functional programming is fun but Ruby is still very OOP oriented. Trying to make it look and behave like a functional language likely leads to "unusual" code, e.g. the module_function which has not been used on any of the projects I've worked on. If you write unusual and nonstandard code, you put the burden of understanding on people who have to maintain it, which I would say is a very bad idea. I would write idiomatic code stylistically in line with what most people are doing on most major projects.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 26 Dec 2013 15:43:52 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1177566256</link><description>&lt;p&gt;Yes we try to have one public entry point per class. If you have more than one it usually implies the class is doing more than one thing. This is the case for use case classes; there is obviously a case for having classes with many public methods when you're talking about value objects or something like that, but for use cases, I believe there should be only one method. I'd like to hear differing opinions on this..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 26 Dec 2013 15:41:46 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1177563128</link><description>&lt;p&gt;Yes, there are good and limited uses for send and dynamic methods, but be careful of the trade off. You might one day think to delete the foo_sign_in_path method not realizing it's being called by this other bit. Of course if you have proper good 100% test coverage you should be ok...but the reality seems to be that once code like this sneaks into the code base it's harder to figure out all the usages. Not saying it's terrible, just that it has a potentially high maintenance cost as your codebase grows.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 26 Dec 2013 15:38:16 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1171504252</link><description>&lt;p&gt;Hi Ilya, our Use Cases are pretty varied depending on when they were written. As I mentioned, we sometimes just use #execute methods although recently we try to be a little more semantic in the naming. Here are a few examples:&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;br&gt;Reverb::Refunds::DirectCheckoutRefund.process_refund &amp;lt;-- newer usecase using a method name&lt;br&gt;Reverb::Checkout::FinalizeOrder.finalize_order &amp;lt;-- repetitive method name&lt;br&gt;Reverb::Curation::DisplayManager.random_for_homepage &amp;lt;-- this is a query to display stuff&lt;br&gt;Reverb::Billing::LineItemBuilder.build_line_item &amp;lt;-- more noun-based naming for a Factory/Builder class&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Many usecases will provide static methods as shown above, but are actually often used instantiated, because we use a listener framework (the excellent Wisper by Kris Leech). So we'll do something like this:&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;br&gt;refund_processor = Reverb::Refunds::DirectCheckoutRefund.new(order, amount: 100)&lt;br&gt;refund_processor.on(:success) do |refund|&lt;br&gt;  # some stuff&lt;br&gt;end&lt;br&gt;refund_processor.process_refund&lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;I don't know if these are great examples, we are still trying to figure out what works or what doesn't. As I said, the main consideration for us is how closely it maps to non-developer terms for these things. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Fri, 20 Dec 2013 09:30:21 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1170494727</link><description>&lt;p&gt;Hey Nathan, I agree with your approach above. In fact it is what we are doing most of the time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Thu, 19 Dec 2013 14:07:52 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1169500249</link><description>&lt;p&gt;Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Wed, 18 Dec 2013 19:57:08 -0000</pubDate></item><item><title>Re: Reverb.com Dev Blog | Five architecture anti-patterns and solutions for large Rails applications</title><link>http://devblog.reverb.com/post/70344683203#comment-1169125713</link><description>&lt;p&gt;Wow, I've been doing ruby for 8 years and have never heard of module_function. So my first reaction is - that sounds a bit obscure and unusual.&lt;/p&gt;&lt;p&gt;I always prefer real classes that can instantiate themselves, break their functionality up into small methods that may access some ivars set by the initializers. Even if you provide a public API that involves a class level method as an entry point, instantiating yourself can often lead to cleaner code, especially for non-trivial use case classes that will need to talk to a variety of data and collaborator objects. Initializers are a good place to offer injectable dependencies as well.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">skwp</dc:creator><pubDate>Wed, 18 Dec 2013 14:33:01 -0000</pubDate></item></channel></rss>