[Pharo-dev] Ugly smell: really long symbols/selectors

Guillermo Polito guillermopolito at gmail.com
Wed Aug 16 03:49:41 EDT 2017


(ByteSymbol allInstances select: [ :e | e size > 50 ]) size
"638"
(ByteSymbol allInstances select: [ :e | e size > 50 and: [ e beginsWith:
'test' ] ]) size
"200"

Still 438 non test selectors. Some of them are class creation methods
(#subclass:instanceVariables:...)

I'm just saying this is a smell, wanted to share some of my catarsis :).

Guille

On Wed, Aug 16, 2017 at 9:35 AM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

> Hi Guile,
> have you inspect-ed the list?
> I wouldn't be surprise that these are whole sentence acting as
> specification in unit TestCase,
> like whenBrowserReceiveOpenItShouldReturnTheWindowMorph...
>
> 2017-08-16 3:51 GMT+02:00 Guillermo Polito <guillermopolito at gmail.com>:
>
>> #'thisIsAVeryLongSelectorAndIfYoureHereWeHaveOnly49ImagineIH
>> aveToWriteAllThisToArriveTo87ThenThisTo100'
>>
>> (ByteSymbol allInstances select: [ :e | e size > 100 ]) size
>>   => 36
>>
>> (ByteSymbol allInstances select: [ :e | e size between: 50 and: 100 ])
>> size
>>   => 653
>>
>>
>> --
>>
>>
>>
>> Guille Polito
>>
>>
>> Research Engineer
>>
>> French National Center for Scientific Research - *http://www.cnrs.fr*
>> <http://www.cnrs.fr>
>>
>>
>>
>> *Web:* *http://guillep.github.io* <http://guillep.github.io>
>>
>> *Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
>>
>
>


-- 



Guille Polito


Research Engineer

French National Center for Scientific Research - *http://www.cnrs.fr*
<http://www.cnrs.fr>



*Web:* *http://guillep.github.io* <http://guillep.github.io>

*Phone: *+33 06 52 70 66 13
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20170816/ad54b52c/attachment.html>


More information about the Pharo-dev mailing list