• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doThis doThat

 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, looking at the instructor's solution to Servlets-3 and wondering, so why did he do it that way?
Know what I mean?
Not sure if giving more details would give too much away - anyone up for a cryptic discussion?
 
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Umm.. *wink wink* *nudge nudge* *tap the nose* *tug on the sleeve*
If you're talking about what I think you are talking about, it's probably because the next assignments build off of this design, except inheritance gets thrown in and you only have to worry about one of the methods.
Make sense?
 
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I know what Pauline's talking about -- first I thought it was weird, then I was impressed, then I reacted against it slightly and have been struggling with that reaction since. I like my chunks to be more meaningful, if you know what I mean. (You can quote me on that!)
If I know what Jason's talking about -- I think you're jumping ahead a bit. If that's the case, then what you're hinting is not the only way of doing things (and passing, at least for Servlets-4a). I've gone the precipitous route of trying to follow the extra secret hint in the JDBC assignments... (That puts into context some of my (now long deleted) exclamations of surprise about the instructor's solution for Servlets-4a.)
 
Michael Matola
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh. After posting (and reseeing the title) I realized that I missed the point of Pauline's post. (But I'm not going to edit or delete my original off-the-mark post out of the spirit of embracing crypticism as my new worldview.)
My rethunk response -- the instructor did it that way because I wouldn't have liked the semantic implications had the instructor done it the other way.
(If anyone's still in doubt whether it's all about me...)
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jason said:If you're talking about what I think you are talking about
*points to nose*
let's assume we're doing this telepathically and it's working *wink wink*
it's probably because the next assignments build off of this design, except inheritance gets thrown in and you only have to worry about one of the methods.
OK, this could make sense. You refer to "this design". Is this a certain pattern?
Further, is there a nifty design idea behind it that will keep me awake until I find out what it is, or should I take in on faith for now and it will become clear with later assignmnents?
*points to Jason*
*nudge, nudge*
[ April 05, 2002: Message edited by: Pauline McNamara ]
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Quoting Mike:

I like my chunks to be more meaningful, if you know what I mean.


*bows to the crypticism in MM*
Yeah, sorry about that. If less is more, then that was a lot. Anyway, I think maybe from your second post that you know what I'm referring to.
So you think: the instructor did it that way because I wouldn't have liked the semantic implications had the instructor done it the other way
Hmm, musn't take it all too personally, want to talk about it? So, what about the other way and it's semantic implications?

Kinda weird, but fun, no?
 
Michael Matola
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pauline McNamara:
If less is more,...


Me and Mies -- we're like this < holds up hand with two fingers crossed > .
 
Michael Matola
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given the following code:

Do you prefer this?

Or that?

Semantic implication-wise, that is.
 
jason adam
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The "design" I refer to in Servlet-3 is not a pattern (at least that I see), but was just a general "design" statement, saying the way he constructed his code.
Now Servlet-4b uses something similar to a Template pattern, except that you aren't dealing with abstracts. Mr. Matola could probably pinpoint the exact one, if he's so inclined
And as far as which one I would prefer (MM's code), I like the first one. It makes more "sense".
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excellent analogy Mike, we can finally talk clearly now. *crash sound after crypticism gets thrown out the window*
...I wouldn't have liked the semantic implications had the instructor done it the other way
So the other way is the second option you gave (and the way I did it).

I think I can understand the difference now and agree with Jason about liking the first version better. Though initially the second seemed more compact and somehow more direct, I find the first more readable. The playing gets done in one place and the access to the play (calling for Jason or calling for Pauline) is kept separate from what is actually done while playing.
It's so much fun to play with you guys.
[ April 05, 2002: Message edited by: Pauline McNamara ]
 
Michael Matola
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The implication of the second approach that makes me a little uncomfortable is that if your mother tells you to go out and play with Jason, the way you go about doing that is to first go out and play with Pauline (though with either pal, the resulting play ends up being the same).
Incidentally, my solution doesn't match either of these approaches exactly, but I did end up liking the instructor's solution better than mine.
 
jason adam
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since both methods call play(), you don't have to go and play with Pauline if you only want to play with me, because I know how play by... ummm, anyways, you get the idea.
That way, if one or the other needs to do a couple of chores before going out and playing, they can get their stuff done first, independent of what the other is doing. They might even have some behavior that causes each one to play a little differently than the other, which is a good thing.
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think I would allow my kids to play with either of you.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, everyone for a thread that I will certainly be re-visiting when I get to this assignment!
rick
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's good to hear Rick. I hesitated to throw that question out there, wondered if I was the only one scratching their head over it.
Must admit, I took the lazy way out and didn't try a search first...
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Incidentally, my solution doesn't match either of these approaches exactly, but I did end up liking the instructor's solution better than mine.
That was going to be my next question.
Oh and regarding "more is less", is it Mies van der Roe? of Bauhaus fame? Didn't realize that came from him. You a fan?
Jason, just wait 'til you come calling for me to go out and play, *harumpf, grumble, mutter, playing by the, well I never...*
 
Michael Matola
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pauline McNamara:
Oh and regarding "more is less", is it Mies van der Roe? of Bauhaus fame? Didn't realize that came from him. You a fan?


Yes, kinda-sorta, but not exactly. (To answer both questions.)
Surely van der Rohe wasn't the first to express that sentiment, but I think he used those exact words as a commentary on the Farnsworth house, and I believe the quote is often attributed to him.
If you search "Less is more" and "mies" on Google, the very first link cites a Robert Browning poem (mentions MvdR and Buckminster Fuller). But you'll find many sites linking MvdR with the expression.
I have a vague interest in 20th century architecture. By "vauge interest" I mean I kinda like it, it's on my long list of things to learn more about, but reading anything remotely serious about architecture is so mind-numbingly tedious (I can handle crypticism, but not obscurantism) that it sucks away all the fun.
 
Michael Matola
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jason adam:
Now Servlet-4b uses something similar to a Template pattern, except that you aren't dealing with abstracts. Mr. Matola could probably pinpoint the exact one, if he's so inclined


Mr. Matola hasn't passed that one yet, so he doesn't really know what you're talking about. And despite my fondness for the template method pattern, there sure isn't any of that going on around my version of Servlets-4b. (Maybe that's why I'm on my 4th attempt...)
reply
    Bookmark Topic Watch Topic
  • New Topic