<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/">
	<channel>
		<title>Best Ruby On Rails Refactoring Talks | Infinum</title>
		<atom:link href="https://infinum.com/blog/best-ruby-on-rails-refactoring-talks/feed/" rel="self" type="application/rss+xml" />
		<link>https://infinum.com/blog/best-ruby-on-rails-refactoring-talks/</link>
		<description>Building digital products</description>
		<lastBuildDate>Wed, 29 Apr 2026 14:21:05 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>

					<item>
				<image>
					<url>7979https://infinum.com/uploads/2015/07/best-ruby-on-rails-refactoring-talks-0.webp</url>
				</image>
				<title>Best Ruby On Rails Refactoring Talks</title>
				<link>https://infinum.com/blog/best-ruby-on-rails-refactoring-talks/</link>
				<pubDate>Tue, 21 Jul 2015 12:15:00 +0000</pubDate>
				<dc:creator>Damir Svrtan</dc:creator>
				<guid isPermaLink="false">https://infinum.com/the-capsized-eight/best-ruby-on-rails-refactoring-talks/</guid>
				<description>
					<![CDATA[<p>Refactoring is the craft of improving the design of an existing code without changing its external behavior. </p>
<p>The post <a href="https://infinum.com/blog/best-ruby-on-rails-refactoring-talks/">Best Ruby On Rails Refactoring Talks</a> appeared first on <a href="https://infinum.com">Infinum</a>.</p>
]]>
				</description>
				<content:encoded>
					<![CDATA[<div
	class="wrapper"
	data-id="es-157"
	 data-animation-target='inner-items'>
		
			<div class="wrapper__inner">
			<div class="block-blog-content js-block-blog-content">
	
<div class="block-blog-content-sidebar" data-id="es-92">
	</div>

<div class="block-blog-content-main">
	
<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-95"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-93">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-94'
	>
	Refactoring is the craft of improving the design of an existing code without changing its external behavior. Just like with everything else, you get better at it with practice and continuous learning.<br>Check out a couple of talks given by some of the best Ruby developers that point out common mistakes and how to deal with them.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-98"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-96">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-97'
	>
	I’ve curated five of my favorite talks on code refactoring taking into consideration the information presented, the quality of examples and the quality of the presentation itself.<br>Some of the talks are closely tied to Ruby on Rails, but most refactoring techniques are often language agnostic, so even if you’re not in the Ruby world, don’t hesitate to watch them.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-101"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-media">
	<div	class="media block-media__media media__border--none media__align--center-center"
	data-id="es-99"
	 data-media-type='image'>

	<figure class="image block-media__image-figure image--size-stretch" data-id="es-100">
	<picture class="image__picture block-media__image-picture">
												<img
					src="https://infinum.com/uploads/2015/07/best-ruby-on-rails-refactoring-talks-1.webp"
					class="image__img block-media__image-img"
					alt=""
										height="881"
															width="1400"
										loading="lazy"
					 />
					</picture>

	</figure></div></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-104"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-102">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-103'
	>
	Sandi Metz – <a href="https://www.youtube.com/watch?v=9lv2lBq6x4A">Nothing is something</a></h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-107"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-105">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-106'
	>
	Sandi Metz gave this talk at multiple conferences this year and it gained a lot of traction – and for a reason – it’s awesome! The first half of the talk is more oriented on her animosity towards conditionals, the dirtiness of nil checks and advocating the use of the Null Object pattern.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-110"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-108">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-109'
	>
	The second part is a real life example of the misleading usage of inheritance (used for shared behavior instead of specialization) and a step-by-step explanation on how to refactor the given code using composition with dependency injection.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-113"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-111">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-112'
	>
	If you like this talk, be sure to check out Sandi’s <a href="https://www.youtube.com/watch?v=8bZh5LMaSmE">All the little things</a> from Railsconf 2014, where Sandi explains on a real world example how to thoroughly refactor a stale and procedural code.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-116"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-114">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-115'
	>
	Bryan Helmkamp – <a href="https://www.youtube.com/watch?v=5yX6ADjyqyE">Refactoring Fat Models with Patterns</a></h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-119"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-117">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-118'
	>
	Bryan Helmkamp, the CEO of <a href="https://codeclimate.com">Code Climate</a>, gave this talk at the Ruby Conference in 2013, where he explained how to run from the methodology of Thin Controllers, Fat Models and presented other options such as Form Objects, Service Objects, Decorators, etc. There is also an <a href="http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/">associated blogpost</a> if you’re not up for watching the video.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-122"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-120">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-121'
	>
	There are some gems that Bryan doesn’t mention that can come quite in handy when implementing these patterns in Rails:</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-125"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="lists" data-id="es-123">
	<ul	class='typography typography--size-16-text-roman js-typography lists__typography'
	data-id='es-124'
	>
	<li>Form Objects – <a href="https://github.com/apotonick/reform">Reform</a></li><li>Service Objects – <a href="https://github.com/collectiveidea/interactor">Interactor</a></li><li>Decorators – <a href="https://github.com/drapergem/draper">Draper</a></li></ul></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-128"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-126">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-127'
	>
	Ben Orenstein – <a href="https://www.youtube.com/watch?v=DC-pQPq0acs">Refactoring from Good to Great</a></h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-131"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-129">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-130'
	>
	<a href="https://thoughtbot.com">Thoughtbot</a>’s Ben Orenstein kicked ass with this talk at the <a href="https://twitter.com/aloharubyconf">Aloha Ruby Conf</a> in 2012. If you want to know the basics of patterns such as the single responsibility principle, the <a href="https://robots.thoughtbot.com/tell-dont-ask">tell don’t ask principle</a>, the null object pattern or anti-patterns like Shotgun surgery, this is the talk for you.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-134"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-132">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-133'
	>
	Avdi Grimm – <a href="https://www.youtube.com/watch?v=T8J0j2xJFgQ">Confident Code</a></h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-137"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-135">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-136'
	>
	This is a talk that Avdi Grimm gave back in 2011 at <a href="http://www.rubymidwest.com/">Ruby Midwest</a>. It’s an excellent talk on how to construct methods and separate them into 4 parts:</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-140"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="lists" data-id="es-138">
	<ul	class='typography typography--size-16-text-roman js-typography lists__typography'
	data-id='es-139'
	>
	<li>gather input,</li><li>perform work,</li><li>deliver results,</li><li>handle failures.</li></ul></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-143"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-141">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-142'
	>
	There are examples of each part of a method, common mistakes that are usually made and how to fix them: embracing duck typing instead of using class checks, refactoring case equality statements with type coercion, using Hash#fetch for easier debugging, the Black Hole NilObject Pattern, etc.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-146"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-144">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-145'
	>
	If you want to find out more about the stuff he’s been talking about beyond this video, check out his book called Confident Ruby.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-149"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-heading" data-id="es-147">
	<h2	class='typography typography--size-52-default js-typography block-heading__heading'
	data-id='es-148'
	>
	Aja Hammerly – <a href="https://www.youtube.com/watch?v=Oxd_DBuX8R8">N design patterns you might actually use</a></h2></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-152"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-150">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-151'
	>
	Knowing your design patterns is the mother of all refactoring. Aja talks about design patterns you might actually use in Ruby. She goes fast through the examples in a sarcastic manner and wastes no time covering the following patterns: template, strategy, composite, command and decorators. For each, she gives real world examples and hands out code snippets.</p></div>	</div>

<div
	class="wrapper wrapper__use-simple--true"
	data-id="es-155"
	 data-animation='slideFade' data-animation-target='inner-items'>
		
			<div class="block-paragraph" data-id="es-153">
	<p	class='typography typography--size-16-text-roman js-typography block-paragraph__paragraph'
	data-id='es-154'
	>
	She mentions how the <a href="https://www.wikiwand.com/en/Design_Patterns">Gang Of Four book</a> is always lying around her office and recommends Rubyists to read a more applicable <a href="http://designpatternsinruby.com/">book on design patterns</a> by Russ Olsen. <a href="https://twitter.com/dougyun">Doug Yun</a> from Dockyard covered most of them well in a <a href="https://dockyard.com/blog/authors/doug-yun">series of blog posts on design patterns</a>.</p></div>	</div>
</div>
</div>		</div>
	</div><p>The post <a href="https://infinum.com/blog/best-ruby-on-rails-refactoring-talks/">Best Ruby On Rails Refactoring Talks</a> appeared first on <a href="https://infinum.com">Infinum</a>.</p>
]]>
				</content:encoded>
			</item>
		
	</channel>
</rss>