<div dir="ltr">Hello!<br>It's even better than I thought, the list of classes instead of asking for a string is great, I didn't know about that.<br><br>Thanks a lot,<br>Paolo</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun, 29 may 2023 a las 16:57, Hernán Wilkinson (<<a href="mailto:hernan.wilkinson@10pines.com">hernan.wilkinson@10pines.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Paolo,<div> I just uploaded your code.</div><div> I made a few changes:</div><div>1) Made PushDownMethod a superclass of PushDownMethodToOneSubclass (your code) and PushDownMethodToSubclasses</div><div>2) Renamed the appliers</div><div>3) Refactored the tests. There were tests in your code that did not apply to this refactoring.</div><div>4) Based on Christian Haider comment, if applying the change is not a refactoring, it will warn the user</div><div><br></div><div>Thank you for your suggestions!</div><div>I hope you liked how it ended up being and let me know any questions you may have.</div><div><br></div><div>Cheers!</div><div>Hernan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 25, 2023 at 11:33 AM Paolo Belforte <<a href="mailto:pbelforte2003@gmail.com" target="_blank">pbelforte2003@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, I made the changes suggested and added the tests to the package, hope it works this time!<br>The classes and related names changed to "PushDownMethodToSubclass..." and the applier now is responsible to ask for the subclass name.<br>Also, thanks for the information about refactoring, I thought any changes to code was considered a refactor.<br><br>Thanks, Paolo.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié, 24 may 2023 a las 18:23, Hernán Wilkinson (<<a href="mailto:hernan.wilkinson@10pines.com" target="_blank">hernan.wilkinson@10pines.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Paolo,<div> thanks for this change set, it is a useful one and you did a great job for a new smalltalker!! </div><div> There are some changes to be done before merging it.</div><div>1) The refactoring implementation, PushDownToMethod in your case, should not interact with the user, therefore it should not ask to witch subclass move the method to, it should not do: StringRequestMorph request: ....</div><div> The refactoring class should receive in its instance creation message all the necessary objects to do its job, in this case it should receive the subclass to pushdown the method to.</div><div>2) It should be the applier the one asking for the subclass to push down the method to</div><div>3) There are no tests for the refactoring and we want all refactoring to be tested. Please write the corresponding tests that should be part of the package <a href="http://BaseImageTests.pck.st" target="_blank">BaseImageTests.pck.st</a> This package is not automatically loaded in Cuis, you have to load it yourself (unless you are using CuisUniversity who has the tests loaded).</div><div>PushDownToMethod should receive the class from which to push down the method, the method to push down and the subclass to push down the method to. There you have many things to test, like is the method implemented in the class from where to push it down? Is the subclass really a subclass of the class that implements the method? And then you have all the assertions of the pushdown method refactoring. Look at PushDownMethod class>>#for: <br></div><div><br></div><div>BTW, PushDownToMethod is not a good name for this refactoring. I would call it PushDownMethoToSubclass.</div><div><br></div><div>Let me know if you have questions. </div><div>I'll wait for all these changes to integrate it!</div><div><br></div><div>Cheers</div><div>Hernan</div><div><br></div><div>PS: BTW, it is Smalltalk (lowercase t) not SmallTalk ... just a minor thing to have in mind :-)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 23, 2023 at 6:02 AM Christian Haider via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div lang="DE"><div><p class="MsoNormal"><span>Hi,<u></u><u></u></span></p><p class="MsoNormal"><span><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-CA">this is not a refactoring, since it changes the behavior of the system. See </span><a href="https://en.wikipedia.org/wiki/Code_refactoring" target="_blank"><span lang="EN-CA">Code refactoring - Wikipedia</span></a><span lang="EN-CA"> .<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-CA">Everything is fine when you call it a code transformation. But, please, don’t shift the meaning of “refactoring”.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-CA"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-CA">Happy hacking and have fun with Smalltalk,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-CA">Christian</span><span lang="EN-CA"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-CA"><u></u> <u></u></span></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm"><p class="MsoNormal"><b>Von:</b> Cuis-dev <<a href="mailto:cuis-dev-bounces@lists.cuis.st" target="_blank">cuis-dev-bounces@lists.cuis.st</a>> <b>Im Auftrag von </b>Paolo Belforte via Cuis-dev<br><b>Gesendet:</b> Dienstag, 23. Mai 2023 04:41<br><b>An:</b> <a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a><br><b>Cc:</b> Paolo Belforte <<a href="mailto:pbelforte2003@gmail.com" target="_blank">pbelforte2003@gmail.com</a>><br><b>Betreff:</b> [Cuis-dev] added push down to single subclass refactor option<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hello everyone,<br><br>I'm still new to SmallTalk, but I've made a change to the base image of Cuis, adding this new refactor option as I find it very useful.<br>When you click this refactor, a "StringRequestMorph" asks for a name to pass the desired method to a single subclass. You can find this option just down the "push down" refactor, it's the "push down to".<br><br><br>Thanks,<br>Paolo.<u></u><u></u></p></div></div></div>-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</div></blockquote></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>
</blockquote></div>