Get Refactoring in Ruby PDF

By William C. Wake

ISBN-10: 0321545044

ISBN-13: 9780321545046

The First Hands-On, useful, All-Ruby Refactoring Workbook!


Refactoring–the artwork of bettering the layout of current code–has taken the realm via hurricane. So has Ruby. Now, for the 1st time, there’s a refactoring workbook designed from the floor up for the dynamic Ruby language.


Refactoring in Ruby gives you the entire lifelike, hands-on perform you must refactor Ruby code fast and successfully. You’ll observe how one can realize “code smells,” which sign possibilities for development, after which ideal your program’s layout one small, secure step at a time.


The publication indicates you while and the way to refactor with either legacy code and through new test-driven improvement, and walks you thru real-world refactoring intimately. The workbook concludes with numerous purposes designed to assist perform refactoring in lifelike domain names, plus a convenient code assessment record you’ll discuss with time and again. alongside the best way, you’ll study robust classes approximately designing better caliber Ruby software–lessons that might assist you adventure the enjoyment of writing regularly nice code.


Refactoring in Ruby will support you

  • Recognize why negative code layout happens, so that you can hinder it from taking place on your personal code
  • Master higher layout strategies that bring about extra effective, trustworthy, and maintainable software
  • Fix code that’s too lengthy, huge, or tough to follow
  • Ferret out duplication, and convey each one suggestion “once and merely once”
  • Recognize lacking or inadequately shaped classes
  • Simplify overly complicated relationships among periods and their subclasses
  • Achieve the best stability of duties between objects
  • Make your code more straightforward to check and change
  • Cope with incomplete library modules, and fasten runaway dependencies
  • Learn the following steps to take after you refactor

Show description

Read Online or Download Refactoring in Ruby PDF

Best systems analysis & design books

Practical Guide to Enterprise Architecture, A by James McGovern, Scott W. Ambler, Michael E. Stevens, James PDF

In a realistic advisor to firm structure, six top specialists current integral technical, technique, and enterprise perception into each point of firm structure. you will find start-to-finish suggestions for architecting potent approach, software program, and service-oriented architectures; utilizing product strains to streamline firm software program layout; leveraging robust agile modeling recommendations; extending the Unified technique to the total software program lifecycle; architecting presentation levels and person event; and using the technical path of the full company.

New PDF release: Project Management for Information Systems (5th Edition)

Cadle and Yeates' undertaking administration for info platforms is appropriate for undergraduate scholars learning venture administration in the IT surroundings. This accomplished and functional ebook is a wonderful start line for any scholars of venture administration for info platforms, whether or not they are from a computing or a company history, at undergraduate or masters point.

Download e-book for kindle: Crystal Reports 2008 Official Guide by Neil Fitzgerald

CRYSTAL stories® 2008 reliable consultant no matter if you’re a DBA, info warehousing or enterprise intelligence expert, reporting expert, or developer, this ebook has the solutions you wish. via hands-on examples, you’ll systematically grasp Crystal reviews and Xcelsius 2008’s strongest beneficial properties for developing, dispensing, and providing content material.

Extra resources for Refactoring in Ruby

Example text

Following is a list of refactorings. Next to each refactoring, write the name of the refactoring that undoes its effects. A. Collapse Hierarchy B. Extract Method C. Hide Delegate D. Inline Temp E. Parameterize Method F. Rename Method See page 216 for solution ideas. What’s Next We’ve discussed the overall process of refactoring and the environment needed to tackle refactoring safely and productively; we’ve examined in detail the steps that make up a single refactoring move; and we’ve explored a generic pattern for refactoring.

It’s now time to address the specifics. As we mentioned in Chapter 2, “The Refactoring Cycle,” perhaps the most difficult part of the refactoring cycle is in recognizing code that needs to be refactored. Part II, “Code Smells,” looks in detail at all of the common—and some of the not so common—code smells; by doing the exercises you’ll learn how to recognize and eliminate them. Then Part III, “Programs to Refactor,” provides you with a few complete applications, each of which is full of the kind of problems you’ll encounter during reallife development.

Before we dive in and change things, take a moment to review the script. Which aspects of it strike you as convoluted, or unreadable, or even unmaintainable? Part II, “Code Smells,” of this book lists over forty common code problems: Each kind of problem is known as a code smell, and each has very specific From the Library of Lee Bogdanoff Sparkline Script 5 characteristics, consequences, and remedies. For the purposes of this quick refactoring demonstration, we’ll use the names of these smells (so that you can cross-reference with Part II, “Code Smells,” if you wish), but otherwise we just want to get on with fixing the code.

Download PDF sample

Refactoring in Ruby by William C. Wake

by Jason

Rated 4.50 of 5 – based on 9 votes