tag:blogger.com,1999:blog-12467669.post116847300320506123..comments2023-04-29T07:23:25.825-04:00Comments on Jay Fields' Thoughts: Ruby: Refactoring - a First ExampleJayhttp://www.blogger.com/profile/14491442812573747680noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-12467669.post-74583909727689258252007-03-21T15:25:00.000-04:002007-03-21T15:25:00.000-04:00Thanks for showing us the work in progress. I hav...Thanks for showing us the work in progress. I haven't picked up Fowler's tome yet. I think it's the $60 price point that scares me away, and the lack of a PDF version that would cut the costs, too. But having the work in Ruby format would lower the barrier of entry to me, and I'm looking forward to it.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-27017297802975372422007-02-04T05:55:00.000-05:002007-02-04T05:55:00.000-05:00Ah wonderful :-) I think that changing variable na...Ah wonderful :-) I think that changing variable names is one of those subtle refactoring techniques that people don't even realise is part of the refactoring process.<br /><br />I bought the Fowler book, but put it on the post PhD 'must-read' pile. I'm thinking I should just ignore it now, and follow your progress.<br /><br />I am very happy that you are doing this. I don't want to subject myself to any more Java code than is necessary after I submit my thesis :-)Sam Aaronhttps://www.blogger.com/profile/07718211095858116397noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-22395364072960840722007-02-04T01:22:00.000-05:002007-02-04T01:22:00.000-05:00samaaron,
I followed the examples that Martin orig...samaaron,<br />I followed the examples that Martin originally used. Later in the examples he changes the name to a more descriptive name and explains why it is important. We'll be following his lead in this area.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-46016696267190553922007-02-03T18:29:00.000-05:002007-02-03T18:29:00.000-05:00It's great that there's a Ruby refactoring book co...It's great that there's a Ruby refactoring book coming out. It's one of the large holes in the Ruby library - that and patterns. I'm looking forward to the finished version.<br /><br />Meanwhile, I have a question: Is there any reason why you chose the undescriptive names arg and element instead of something more descriptive such as rental:<br /><br />def add_rental(arg)<br />@rentals.each do |element|Sam Aaronhttps://www.blogger.com/profile/07718211095858116397noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-52480752792443057952007-01-13T15:16:00.000-05:002007-01-13T15:16:00.000-05:00"Did Fowler gave his authorization to copy the who..."Did Fowler gave his authorization to copy the whole chapter of his book? Is it legal?"<br /><br />Uhm, yeah... I seriously doubt Jay is stupid enough to plagiarize the work of the Chief Scientist at his own company and then post it on a weblog that is aggregated by the same company.<br /><br />Jay -- looking forward to reading more.Johnhttps://www.blogger.com/profile/12801400085004151295noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-9394105206313405852007-01-13T15:14:00.000-05:002007-01-13T15:14:00.000-05:00This comment has been removed by the author.Johnhttps://www.blogger.com/profile/12801400085004151295noreply@blogger.comtag:blogger.com,1999:blog-12467669.post-1055654305984150422007-01-13T10:18:00.000-05:002007-01-13T10:18:00.000-05:00Did Fowler gave his authorization to copy the whol...Did Fowler gave his authorization to copy the whole chapter of his book? Is it legal?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-1168554281959203222007-01-11T17:24:00.000-05:002007-01-11T17:24:00.000-05:00Looking forward to this. I'm particularly wonderi...Looking forward to this. I'm particularly wondering how much programming language affects best refactorings and if refactoring will be tough to do in Ruby without the great IDE support that java has?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-1168542484207667392007-01-11T14:08:00.000-05:002007-01-11T14:08:00.000-05:00Glad to see a Ruby port of this book. However, I t...Glad to see a Ruby port of this book. However, I think this post should be more clear that the original content is by Martin Fowler. You did mention that it's a port in another post, but this post doesn't mention him.<BR/><BR/>Looking forward to seeing the refactored version in Ruby.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-12467669.post-1168534089492005422007-01-11T11:48:00.000-05:002007-01-11T11:48:00.000-05:00Jay, I think your example is great. Sure, refactor...Jay, I think your example is great. Sure, refactoring become more necessary as the code base crows, but your example shows up one common mistake in a very condensed way and the reasons for refactoring the code should be plausible to programmers who haven't worked on huge code bases. Looking forward to your book!<BR/><BR/>BTW., the getPriceCode call in the interaction diagram is a wonderful visualization of a violation of the law of demeter...Anonymousnoreply@blogger.com