Messages coming out of order here. Odd.
On Saturday, December 25, 2004, at 2:05:51 PM, Kevin Lawrence wrote:
> I got to my solution in much the same way that you did :
> 1. I started with everything in Game.
> 2. Decided Game was doing too much and switched to an array of frame objects
> 3. Decided a linked list would be better because, without it, the Game
> object wanted to know too much about scoring.
> IIRC you didn't like my solution at all because you thought the
> recursion was unnatural ;-)
That /is/ interesting. I don't recall the discussion ...
> public int getScore() {
> return isFirstFrame()
> ? score
> : previous.getScore() + score;
> }
I wonder if part of my issue was that it goes backwards, which to me
doesn't obviously work, though of course it does.
It also shows a dark side to developing solo, which is that you
(well, I) can get locked in on one viewpoint. That's why I enjoy
working this same problem so many different ways. Keeps the joints
limber.
> I got to my Java solution much the way you did. I'll agree that your
> Smalltalk version looks much more natural than mine since you don't have
> all the punctuation overhead - but the overall 'shape' is very similar.
Yes ...
> I find your speculation about how you would not have reached the same
> solution in Java thought-provoking. You seem to allow the 'idiom' of the
> language that you are working with to constrain you more than I do and I
> wonder if that is because I work predominately with one language all the
> time. I try to make an effort to learn other languages - I learn one a
> year in accordance with the Pragmatic Recommendations - but, because I
> don't use those other languages frequently enough I forget them just as
> quickly. But the idoms rom the other languages seem to stick with me. I
> think I wrote my bowling game just after trying to learn Lisp and the
> recursion stuck with me (but not the functional approach oddly enough).
Yes, that is interesting! I don't think of myself as "allowing" the
language style to affect me, but quite likely it is. And certainly
I'm far less adept at Java / C# than I ever was at Smalltalk, C,
Pascal, or (gack) C++. So it might be that in Java / C# I hold back
from unfamiliarity.
> I have read all the arguments for dynamic typing and against dynamic
> typing and agree with them all - although I think they are a liitle
> over-stated. But no-one ever seems to touch on what I see as the biggest
> weakness of dynamic typing. When I learned Ruby, I had to keep switching
> to the manual to find a class or a method. I have become so accustomed
> to the magic that IntelliJ works that when I use any other
> language/editor it is like going back into the old days. Most of
> IntelliJ's tricks make heavy use of Java's typing and I don't know how
> they would be possible in a dynamic language. I learned Smalltalk in
> squeak and found the browser very hard to work with - maybe I should try
> a more modern browser ?
I spoke to this in a reply to a reply: I do like the intellisense or
equivalent capability, where the system pops up a list of what one
might be talking about. In Smalltalk one gets that same information
a different way, by opening a browser on the class in question.
That's still less helpful, I'd grant. I think I prefer Smalltalk
because of the other help it gives: the ready access to browsers,
the incremental compilation and coding in the debugger, and the
clarity yet compactness of the language itself. YMMV, of course.
> It's also odd that I am writing about bowling in Java on Christmas
> morning when I should be playing with my children :-p
It is. As my kids are about your age, I only got to play with them
in the afternoon and evening.
Ron Jeffries
www.XProgramming.com
This is how I develop software.
Take the parts that make sense to you.
Ignore the rest.
To Post a message, send it to: [EMAIL PROTECTED]
To Unsubscribe, send a blank message to: [EMAIL PROTECTED]
ad-free courtesy of objectmentor.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/extremeprogramming/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/