Evil Geniuses

Download our free app to listen on your phone

Download on the App StoreGet it on Google Play

On today’s show, we embark on a new, evil adventure, one on which we hope you will join us! We’ll be looking at another refactoring problem and this will make up the first part of a short series of episodes dealing with this issue. Emmanuel lays out the topic, which takes the shape of a code used to run the rental of videos in an old style video store. During this week’s discussion, we deal with the first areas of the topic, looking at what Emmanuel’s work takes directly from Martin Fowler’s Refactoring and where his actions diverge. We discuss the conditions and objects that deal with the duration of a rental and how these differ across genres of movies. We also unpack test names and start on the topic of his commits. Be sure to tune in for this especially evil episode!   Key Points From This Episode: Setting out today’s refactoring problem. The lessons Emmanuel took directly from Martin Fowler’s book. Conditions around the code of renting a movie for a certain amount of days. Understanding Emmanuel’s test names for rentals. A summary of the objects and what they are responsible for. The problem-dump commit and how Emmanuel worked this out. And much more! Talking Points Present the problem You have to add tests. Assume that the application works as is; change no current behavior A teaser episode Commits Use YoutubVideoClient to abstract away talking to youtube Ok, cool, class for YouTube here Update test to use YoutubeVideoClientMock What is (ids=:NotGiven) doing? Can you break down that code? Add test cases  for statement What did you add that wasn’t in the book? Curious. Why did you choose minitest over rspec? What do the test names mean? test_2day_new_4day_child_3day_reg Can you summarize the objects here and their responsibilities? Add notes from book stating the problem Summarizing the problem for our listeners Links Mentioned in Today’s Episode: Evil Geniuses on Twitter Stride Martin Fowler Refactoring Ruby Java Blockbuster Hollywood Video Cars RSpec MiniTest Flickr AJAX Facebook Myspace AOL WhatsApp Messenger BitTorrent

More episodes from Evil Geniuses