Hi, There is also this book : Clean Code: A Handbook of Agile Software Craftsmanship Some of you probably already knew about it, still it is good to recall :) Abdelghani
| | | | | | | | | | | Clean Code: A Handbook of Agile Software CraftsmanshipBook by Martin Robert C | | | | Afficher sur www.amazon.fr | Aperçu par Yahoo | | | | | Date: Thu, 02 Jul 2015 07:37:11 +0200 From: Joachim Tuchel <jtuc...@objektfabrik.de> To: stepharo <steph...@free.fr> Cc: Any question about pharo is welcome <pharo-users@lists.pharo.org> Subject: Re: [Pharo-users] an elegant way to return a result Message-ID: <mailman.312.1435823336.8793.pharo-users_lists.pharo....@lists.pharo.org> Content-Type: text/plain; charset=utf-8 Just found this on twitter: http://www.cs.wm.edu/~denys/pubs/ICSE%2715-BadSmells-CRC.pdf Am 01.07.2015 23:35 schrieb stepharo <steph...@free.fr>: > > I know :D > > Le 1/7/15 15:19, jtuc...@objektfabrik.de a ?crit : > > Stef, > > > > you're shooting the wrong man! ;-) The crime was committed in your > > team ;-)))) > > > > See you in Brescia > > > > Joachim > > > > Am 30.06.15 um 19:19 schrieb stepharo: > >> > >> > >> Le 30/6/15 14:39, jtuc...@objektfabrik.de a ?crit : > >>> Ah, Okay, you are mentioning the one and only one case in which this > >>> could make sense.... ;-) > >>> > >>> Something like > >>> > >>> stream next ifNil: [^stream next]. > >> > >> so ugly. > >> Please we should not teach how to do exception with blocks :) > >>> > >>> So there may be cases where the two sends do not return the same > >>> result. But that is, of course, not what the OP suggested. > >>> Nevertheless, I was too fast in criticizing ;-) > >>> > >>> I would consider code like that "less easy" to maintain, however. > >>> > >>> Nice thinking Kata ;-) > >>> > >>> Joachim > >>> > >>> > >>> > >>> Am 30.06.15 um 14:22 schrieb Esteban Lorenzano: > >>>> ah yeah :) > >>>> > >>>> I assumed > >>>> > >>>> first "something aMsg" ~= second "something aMsg? > >>>> > >>>> In case is the same, the correct way is as you say: > >>>> > >>>> ^ something aMsg ifNil: [ anotherResult ] > >>>> > >>>> (sorry, he :P) > >>>> > >>>>> On 30 Jun 2015, at 13:43, jtuc...@objektfabrik.de wrote: > >>>>> > >>>>> Am 30.06.15 um 13:40 schrieb Peter Uhn?k: > >>>>>> Make sense if there's code in between. > >>>>> not sure what you're saying. I mean, sending the message twice > >>>>> makes sense if you already know the outcome? Hmmm... > >>>>> > >>>>>> something aMsg ifNil:[ ^ something aMsg ]. "yay for guards!" > >>>>>> "much more code" > >>>>>> ^ aNotherResult > >>>>>> > >>>>>> Peter > >>>>> > >>>>> -- > >>>>> ----------------------------------------------------------------------- > >>>>> > >>>>> Objektfabrik Joachim Tuchel mailto:jtuc...@objektfabrik.de > >>>>> Fliederweg 1 http://www.objektfabrik.de > >>>>> D-71640 Ludwigsburg http://joachimtuchel.wordpress.com > >>>>> Telefon: +49 7141 56 10 86 0???????? Fax: +49 7141 56 10 86 1 > >>>>> > >>>>> > >>>> > >>>> > >>> > >>> > >> > >> > >> > > > > > > >