Create your own shelf sign up

Together we find better books

[−]
  • Search Conteggio caratteri ISBN valido ISBN non valido Codice a barre valido Codice a barre non valido loading search

Refactoring

Improving the Design of Existing Code

By ,,,,

Publisher: Pearson Education (US)

4.6
(194)

Language:English | Number of Pages: 464 | Format: Hardcover | In other languages: (other languages) Chi simplified , Chi traditional

Isbn-10: 0201485672 | Isbn-13: 9780201485677 | Publish date:  | Edition 1st

Also available as: eBook

Category: Computer & Technology , Professional & Technical , Science Fiction & Fantasy

Do you like Refactoring ?
Join aNobii to see if your friends read it, and discover similar books!

Sign up for free
Book Description
Demonstrates where opportunities for refactoring typically lie, and how to go about reworking a bad design into a good one using elementary steps. DLC: Software refactoring.
Sorting by
  • 5

    很值得一看的書

    大推侯捷的書。很值得一看。這本是中文的。原作者是Martin fowler,他寫了不少書都蠻推薦的。

    said on 

  • 5

    Refactoring is the process of rewriting software, without changing the way it functions, in order to improve its readability, testability or maintanability. A book has been written on the subject by Martin Fowler. Some of the chapters were written by other people.


    “Refactoring: Improving t ...continue

    Refactoring is the process of rewriting software, without changing the way it functions, in order to improve its readability, testability or maintanability. A book has been written on the subject by Martin Fowler. Some of the chapters were written by other people.

    “Refactoring: Improving the Design of Existing Code” is focused on OO programming (lots of Java examples) and Agile practices. It is setup as a catalog of refactoring techniques. Each page dedicated to a refactoring is clearly marked, so that you can easily look up a refactoring.

    The book was written a decade ago. At that time IDE’s did not support advanced refactorings. Most of the methods described are fully automated in modern IDE’s. This means that you don’t have to follow the text that closely any more.
    Refactoring Book

    The first chapter starts with a simple example. Java code is used throughout the example as well as UML diagrams.

    2. Principles in Refactoring

    The Why and When of refactoring are discussed. Also we get instructions on what to tell our manager about refactoring. This seems a bit silly to me, since I have never had to explain refactoring to my managers.

    3. Bad Smells in Code

    “Code Smells” is a frequently used Agile phrase. A phrase I don’t care that much about. Code works or it doesn’t, it can be ugly or unreadable, but it doesn’t smell. The list of “smells” makes sense, however some of the names are downright confusing. For instance, would you be able to tell me what “Refused Bequest” means?

    4. Building Tests

    This chapter talks about JUnit at length. I am sure you are aware that there are many other unit testing frameworks for programming languages other than Java such as PyUnit. We are told that before you start refactoring, you need to have tests. I think it is more of a chicken/egg dilemma. Sometimes you need to refactor first in order to test. Unit tests and functional tests are mentioned. Integration tests, however are completely ignored. How would you know whether the performance and memory usage of your system remained the same? Clearly, this chapter was written by a software developer, and not by somebody who likes breaking applications, I mean testing applications.

    5. Toward a Catalog of Refactorings

    Chapter 5 describes the catalog of refactorings to follow. It is the catalog metada in a sense.

    6. Composing methods

    This chapter is the beginning of the catalog, which forms the “meat” of the book. I am just going to mention a few of the techniques listed in chapter 6.”Extract Method” is one of those refactorings I use on a daily basis. Sometimes things go wrong so we have to do the opposite refactoring “Inline Method”. The author starts using the term “temp” to mean temporary local variables.

    7. Moving Features Between Objects

    The author admits that he has trouble assigning responsibilities to objects. We are supposed to fix errors with “Move Method”, “Move Field”, “Extract Class” or other refactorings in this chapter.

    8. Organizing Data

    This chapter discusses a lot of different ways to simplify working with data. For instance, with these refactorings:

    Replace Data Value with Object
    Replace Array with Object

    Also the refactoring “Replace Magic Number with Symbolic Constant” is explained a.k.a “Extract Constant”.

    9. Simplifying Conditional Expressions

    In my opinion the refactorings in this chapter need to be renamed. Apart from “Decompose Conditional”, which is clear enough. Although “Breaking up Conditional” might have been better.
    10. Making Method Calls Simpler

    Make method calls simpler by renaming them or replacing long parameter lists by objects. The latter technique could be a problem in concurrent programs. It is common to pass immutable values as parameters. You might not be able to replace them by immutable objects.

    11. Dealing with Generalization

    Generalization or in OO terms inheritance is a powerful mechanism, that tends to be overused a lot. You can push/pull a method or a field. Inheritance can be replaced by delegation and vice versa.

    12. Big Refactorings

    In this chapter starts what we can call the “dessert” part. No more simple refactoring recipes. Instead four refactorings that take a considerable amount of time.

    13. Refactoring, Reuse and Reality

    This chapter is an essay on Refactoring by William Opdyke.

    14. Refactoring Tools

    IDE’s have come a long way since this book was written. Most of the issues in this chapter are no longer valid.

    15. Putting It All Together

    This final chapter by Kent Beck is a bit mystical and vague. Those are his own words by the way. Some of the points make sense, but the chapter is written too much in a master talking to an apprentice style.

    The book has a list of soundbites at the end. Literally. The fun thing is that you probably have heard or are going to hear a lot of these soundbites. “Refactoring” is a very useful book, albeit too focused on Java. Most recipes would work for another Object Oriented language. I give this book 5 stars out of 5.

    said on 

  • 5

    我推薦這本書,他可以幫忙我們的程式碼內部行為改造變更好

    這本書裡面除了解釋什麼是 Refactoring 意義之外,包含了幾個重要概念以及些程式設計上的技巧與試用時機。而且概念搭配適用時機,再加上程式碼對照看,學習起來變容易。

    Refactoring 是一個很好的設計工具,他可以幫忙協助我們的程式碼將內部行為改造,讓未來可以更好維護與增進。http://edwardinaction.blogspot.com/2011/01/improving-design-of-existing-code.html

    said on 

  • 5

    Capolavoro assoluto

    Una pietra miliare per chiunque sviluppi software.
    Mai letto un libro che sia riuscito a darmi tanto in cosi tanto poco (citazione di una frase di Churchill ;))
    La sua spettacolarità la manifesta proprio nella capacità di concretizzare istantaneamente i consigli che vengono riportati. ...continue

    Una pietra miliare per chiunque sviluppi software.
    Mai letto un libro che sia riuscito a darmi tanto in cosi tanto poco (citazione di una frase di Churchill ;))
    La sua spettacolarità la manifesta proprio nella capacità di concretizzare istantaneamente i consigli che vengono riportati.
    Ha stravolto il mio modo di pensare al software...non avevo mai letto niente riguardo al refactoring e prima di questo libro neanche conoscevo il termine. Ha creato un nuovo punto di vista da cui osservare lo sviluppo del software...un nuovo cardine su cui far ruotare la creazione.
    Fantastico...senza mezzi termini...fantastico!

    said on 

  • 4

    I wish I've got ahold of Refactoring Ruby Edition before of Refactoring because the content is the same and I'd rather have read it with Ruby code.


    The book was quite interesting but I've felt it didn't provided much new to me. I suppose I always considered refactoring part of programming ...continue

    I wish I've got ahold of Refactoring Ruby Edition before of Refactoring because the content is the same and I'd rather have read it with Ruby code.

    The book was quite interesting but I've felt it didn't provided much new to me. I suppose I always considered refactoring part of programming and that I inferred how to do it by playing with the advance Java refactoring tools we have today. If I've read this book when it appeared it probably would have been revolutionary.

    If you don't know what refactoring is, how to do it, when to do it, then this book is for you.

    said on 

  • 5

    Fondamentale per chiunque sviluppi software. È un catalogo di refactoring molto ben organizzato e con esempi pratici passo per passo. Da tenere sempre a portata per consultazione.

    said on 

  • 4

    The First thing: although it is dated - out of date - I think it is a good book to consult.


    The Second: A practical guide for those wishing to learn more about software design and development; I think It is recommended for all people that work in a development team and who want to learn th ...continue

    The First thing: although it is dated - out of date - I think it is a good book to consult.

    The Second: A practical guide for those wishing to learn more about software design and development; I think It is recommended for all people that work in a development team and who want to learn the basic of obìject oriented programming. It is also useful for who want to improve their productivity.

    Absolutely recommended.

    said on