[Pharo-users] Re: [exercism bowling challenge] Is there a better way to do this

2021-01-02 Thread Roelof Wobben via Pharo-users
oke, im haskell  I see how things are working but pharo is not smalltalk. So how do you see this in smalltalk. Roelof Op 23-12-2020 om 01:29 schreef Richard O'Keefe: Yes, there is a better

[Pharo-users] Re: [exercism bowling challenge] Is there a better way to do this

2020-12-22 Thread Richard O'Keefe
Yes, there is a better way to do it. I found this particular problem at the Programming Praxis web site, which took it from http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata This is a superb example of how an informal specification and a set of test cases can diverge. The specification

[Pharo-users] Re: [exercism bowling challenge] Is there a better way to do this

2020-12-21 Thread Roelof Wobben via Pharo-users
Op 21-12-2020 om 13:56 schreef Russ Whaley: I had a lot of fun putting my bowling game together back when you first brought this up. I have a Bowling (Game) class, a Frame class, aThrow class and a Score(ing) class.  I made the Throws a class that I put in an OrderedCollection - but instVars

[Pharo-users] Re: [exercism bowling challenge] Is there a better way to do this

2020-12-21 Thread Russ Whaley
I had a lot of fun putting my bowling game together back when you first brought this up. I have a Bowling (Game) class, a Frame class, aThrow class and a Score(ing) class. I made the Throws a class that I put in an OrderedCollection - but instVars would work as well... the rest of your game shoul

[Pharo-users] Re: exercism bowling challenge

2020-10-01 Thread Russ Whaley
Yes, my thoughts - since I'm not as technical as the rest of you: BowlingGame class "runs the game a calls each frame to 'process'" - frames (1-10 aFrame objects) - score (aScore object) - currentFrame Frame class "frame handles #throws, pins remaining, and lets Game know when to advance to next

[Pharo-users] Re: exercism bowling challenge

2020-09-25 Thread DavidBajger
Thanks for your reply! Anyway.. wow, 3 lines of code, I'd like to see that! I didn't really get into FLP (except some small howeworks on University and that's alraeady forgotten), so I don't know, what is the advantage here. I thought that Pharo (Smalltalk) can be considered as functional language

[Pharo-users] Re: exercism bowling challenge

2020-09-25 Thread Roelof Wobben via Pharo-users
Hello, Maybe developing is not my cup of tea, I get more and more confused with this discussion. Roelof Op 25-9-2020 om 14:37 schreef Richard O'Keefe: It turns out that this problem has appear

[Pharo-users] Re: exercism bowling challenge

2020-09-25 Thread Richard O'Keefe
It turns out that this problem has appeared elsewhere, at least twice to my knowledge, and I had already solved the version at Programming Praxis over a year ago. I actually wrote two solutions, in different programming languages. One of them was 8 lines. That was the longer. The Haskell version

[Pharo-users] Re: exercism bowling challenge

2020-09-25 Thread David Bajger
Hi Richard, I want to reply to some of your insights here, because I think it is sometimes a matter of personal preference on a problem solution, so I want to compete with your opinion here. I might be totally wrong, when I see your way of solution and tell just 'you were right, your solution is mo

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Roelof Wobben via Pharo-users
As the other Richard seemed to suggest, this isn't an object rich problem. It's largely a question of how to implement an algorithm. Working examples on paper will help with internalising how to do it. Oops, and I thinking of a solution with 3  classes. the given class a class Frame which

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Richard Sargent
On Thu, Sep 24, 2020, 18:08 Sean P. DeNigris wrote: > Richard O'Keefe wrote > > there is obviously no unique "right" factoring of this problem into > > classes. > > This. And, in my experience, with non-trivial problems, some (many?) times > you just have to try to implement an idea to see if it'

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Sean P. DeNigris
Richard O'Keefe wrote > there is obviously no unique "right" factoring of this problem into > classes. This. And, in my experience, with non-trivial problems, some (many?) times you just have to try to implement an idea to see if it's really going to work because it's just too hard to see all the

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Roelof Wobben via Pharo-users
Hello Richard, Thanks for your feedback and I hope you slept well and did not dream about this one. And this exercise is exactly why I ask so many questions how I can make this work the OOP way. Hopefully it's getting better with v3 where I he

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Richard O'Keefe
Since the problem can be solved, and has been solved, in programming languages that do not support object-oriented programming, there is obviously no unique "right" factoring of this problem into classes. I'll be honest with you: this is the only Pharo exercism I have not tackled, and the reason i

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Roelof Wobben via Pharo-users
Op 24-9-2020 om 13:52 schreef Roelof Wobben via Pharo-users: Op 24-9-2020 om 13:42 schreef DavidBajger: Hi Roelof, I always wonder, what kind of answer you expect from your prior statement. To your question: "Can this plan be working or is there improvements to this plan." I can have this answ

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Roelof Wobben via Pharo-users
Op 24-9-2020 om 13:42 schreef DavidBajger: Hi Roelof, I always wonder, what kind of answer you expect from your prior statement. To your question: "Can this plan be working or is there improvements to this plan." I can have this answer: Yes, it could be both: working or fail, but you don't know b

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread DavidBajger
Hi Roelof, I always wonder, what kind of answer you expect from your prior statement. To your question: "Can this plan be working or is there improvements to this plan." I can have this answer: Yes, it could be both: working or fail, but you don't know before you try. This exercise is a bit trick

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Roelof Wobben via Pharo-users
Op 21-9-2020 om 18:49 schreef Roelof Wobben via Pharo-users: hello, I need now to make code that calculates the full score of a bowling game like one of the tests shown. test09_ConsecutiveStrikesEachGetTheTwoRollBonus