Re: [Pharo-users] how to rewrite this to use a stream

2018-12-15 Thread Roelof Wobben
And found the culprit after some good night sleep. But any feedback is appreiciated. Roelof Op 15-12-2018 om 10:34 schreef Roelof Wobben: Thanks for the reviews. I have change my code a little b

Re: [Pharo-users] how to rewrite this to use a stream

2018-12-15 Thread Roelof Wobben
Thanks for the reviews. I have change my code a little bit. I now check for 1 string and at the end I check for every word the three filters So I looks now like this: checkForbiddenParts: word     "checks if a word contains some

Re: [Pharo-users] how to rewrite this to use a stream

2018-12-15 Thread p...@highoctane.be
Thx for those reviews. And interesting paper. Phil On Sat, Dec 15, 2018, 04:20 Richard O'Keefe Starting from the top:\ > (0) It's not *wrong* to start a selector with a capital letter, but > it is certainly unusual. > (1) Intention-revealing names are good. That's why this name is bad. >

Re: [Pharo-users] how to rewrite this to use a stream

2018-12-14 Thread Richard O'Keefe
Starting from the top:\ (0) It's not *wrong* to start a selector with a capital letter, but it is certainly unusual. (1) Intention-revealing names are good. That's why this name is bad. It does not *delete* anything. (2) The comment again says "delete" but nothing is deleted. Comments

Re: [Pharo-users] how to rewrite this to use a stream

2018-12-13 Thread Richard Sargent
On Thu, Dec 13, 2018 at 12:44 PM Roelof Wobben wrote: > there is a method but then I ran into another warning > > FindAndDeleteWordsWithForbiddenParts > "deletes all the words that contain forbidden parts" > > | result | > result := words > select: [ :word | > [ (f

Re: [Pharo-users] how to rewrite this to use a stream

2018-12-13 Thread Roelof Wobben
there is a method but then I ran into another warning FindAndDeleteWordsWithForbiddenParts     "deletes all the words that contain forbidden parts"     | result |     result := words         select: [ :word |             [ (forbidd

Re: [Pharo-users] how to rewrite this to use a stream

2018-12-13 Thread Richard Sargent
It's bad advice in this case, but correctly indicates there is a problem with your code. See below. On Thu, Dec 13, 2018 at 8:13 AM Roelof Wobben wrote: > Hello, > > I have this code : > > FindAndDeleteWordsWithForbiddenParts > "deletes all the words that contain forbidden parts" > > |

[Pharo-users] how to rewrite this to use a stream

2018-12-13 Thread Roelof Wobben
Hello, I have this code :  FindAndDeleteWordsWithForbiddenParts "deletes all the words that contain forbidden parts" | result | result := words select: [ :word | [ (forbiddenWords reject: [ :forbidden | '*' , forbidden , '*' match: word ]) isNotEmpt