Tags

20 videos are tagged with refactoring

Vlcsnap 2014 10 02 08h35m16s179 thumb
Rating: Everyone
Viewed 4,127 times
Recorded at: September 19, 2014
Date Posted:

Monads are in danger of becoming a bit of a joke: for every person who raves about them, there's another person asking what in the world they are, and a third person writing a confusing tutorial about them. With their technical-sounding name and forbidding reputation, monads can seem like a complex, abstract idea that's only relevant to mathematicians and Haskell programmers.

Forget all that! In this pragmatic talk we'll roll up our sleeves and get stuck into refactoring some awkward Ruby code, using the good parts of monads to tackle the problems we encounter along the way. We'll see how the straightforward design pattern underlying monads can help us to make our code simpler, clearer and more reusable by uncovering its hidden structure, and we'll all leave with a shared understanding of what monads actually are and why people won't shut up about them.

Vlcsnap 2014 05 16 10h56m45s151 thumb
Rating: Everyone
Viewed 4,874 times
Recorded at: April 25, 2014
Date Posted:

You just wanted to add some nice interactive functionality to your Rails app. But then one jQuery plugin turns to three, add a dash of statefulness, some error handling, and suddenly you can't sleep at night.

We'll walk through using Ember Components to test-drive a refactor until your front-end code is understandable, usable, and extensible. Armed with TDD and components, you can start to get excited, not exasperated, when asked to add advanced client-side interactions to your website.

Brandon left the world of marketing to find that creating software made him happy. Brandon lives in Austin, TX, where he helps run The Frontside, a Rails and Ember.js consultancy. Brandon's lifelong mission is to hug every developer.

Corey hemke thumb
Rating: Everyone
Viewed 1,879 times
Recorded at: July 19, 2013
Date Posted:

Rails as a framework is famous for getting an application up and running quickly, but the very paradigms that make it so easy at the start can lead to maintenance nightmares down the road. Successful applications grow rapidly larger, more complex, and harder to extend and maintain. One way to approach refactoring a monolithic application is dividing it up into a series of smaller applications that organize the work of the system through internal APIs and message queues. In this presentation you will be introduced to tools to enable this architecture, gain insight on how best to use them, and explore the guiding principles behind the SOA approach to refactoring.

  nickel city ruby 2013 smash the monolith  refactoring into soas by corey ehmke   youtube thumb
Rating: Everyone
Viewed 2,137 times
Recorded at: September 21, 2013
Date Posted: October 30, 2013

2336 mwrc2013 code smells your refactoring cheat codes thumb 0004 thumb
Rating: Everyone
Viewed 4,951 times
Recorded at: April 4, 2013
Date Posted: April 27, 2013

Sure, the TDD cycle is red-green-refactor but what exactly are we refactoring? We just wrote the code, it's green, and it seems reasonable to us. Let's move onto the next test. We're have a deadline, remember?
Whether we're working with code we just wrote or opening up a project for the first time, being able to listen to the hints the code is trying to give you about how it wants to be constructed is the most direct path toward successful refactoring. What the code is telling you nuanced however: no code smell is absolute and none in itself is an indication of a problem. How do we know we need to refactor? What are the code smells telling us to do? How do we balance our short terms needs of shipping our software with the long term maintainability of the code base? In this talk we'll talk through some of the classical code smells and dive into examples of how to put these smells to work for you.

Anthony eden thumb
Rating: Everyone
Viewed 646 times
Recorded at: June 23, 2012
Date Posted: December 18, 2012

You know you should be testing all the time, but do you know why you are testing all the time? One of the main benefits of testing all the time is that it lets you refactor with impunity. Unfortunately too many times we leave the “refactor” out of the red-green-refactor. In this talk I will convince you that you should be refactoring all the time and I’ll show you some of the techniques on how you can do it. With good refactoring techniques and regular refactoring even the hairiest of codebases can be tamed.

Vlcsnap 2015 04 29 11h18m35s227 thumb
Rating: Everyone
Viewed 2,383 times
Recorded at: April 23, 2015
Date Posted: April 29, 2015

Rails apps start out quickly and beautifully, but after a year features are a struggle, tests are slow, developers are grinding, and stakeholders are unhappy. "Skinny controllers and fat models" hasn't worked, and "use service objects!" is awfully vague.

This talk explains how to compact the "big ball of mud" at the heart of your app into a bedrock of reliable code. It gives the steps to incrementally refactor models into a functional core and gives explicit rules for how to write light, reliable tests.

https://push.cx/2015/railsconf

Vlcsnap 2015 05 01 10h28m44s201 thumb
Rating: Everyone
Viewed 1,091 times
Recorded at: April 21, 2015
Date Posted: May 1, 2015

New programmers often react with dread when the word "refactoring" starts getting thrown around at standup. Maybe you've seen fellow Rubyists struggle with old code, or a colleague spend days on one module only to end up with exactly zero changes to functionality. What exactly is refactoring, and why would anyone want to do it? What are some tips for approaching a refactor, both generally and in Rails?

984 goruco2012 maintaining balance while reducing duplication part ii thumb 0002 thumb
Rating: Everyone
Viewed 1,831 times
Recorded at: June 23, 2012
Date Posted: July 1, 2012

This talk is a sequel to the talk David gave at RubyConf 2010, and will focus on refactorings that we rely on to reduce duplication, and their implications, both positive and negative.

763 rubymidwest2011 confident code thumb 0000 thumb
Rating: Everyone
Viewed 5,754 times
Recorded at: November 5, 2011
Date Posted: January 9, 2012

Are your methods timid? Do they constantly second-guess themselves, checking for nil values, errors, and unexpected input?
Even the cleanest Ruby codebases can become littered over time with nil checks, error handling, and other interruptions which steal attention away from the essential purpose of the code. This talk will discuss strategies for writing your Ruby classes and methods in a confident, straightforward style; without sacrificing functionality or robustness. In the process, we'll cover concepts and techniques points including:
The narrative style of method construction
The four parts of a method
Three strategies for dealing with uncertain input
Massaging input with coercion and the Decorator pattern
Lightweight preconditions
Exterminating nils from your code
The chaining and iterative styles of method construction
Eliminating conditionals with the Special Case and Null Object patterns
Isolating errors with the Bouncer and Checked Method patterns