So A Model, A View, and a Controller Walk Into a Bar

code 0 comments suggest edit

At the risk of embarrassing myself and eliciting more groans, I am going to share a joke I made up for my Code Camp talk. I was inspired to come up with some humor based on Jeff’s Sesame Street Presentation Rule post. I fully understand his post was addressing something deeper than simply telling a gratuitous joke in the presentation.

The context is that I just finished explaining the various dependencies between the Model, View, and Controller within the MVC pattern.

UPDATE: Updating this joke as the feedback comes in. The original is at the bottom.

So a Model, a View, and a Controller walk into a bar and sit down to order some drinks from the bartender. The View has a few more drinks than the others and turns to the Model and says,

“Can you give me a ride home tonight? I know I always burden you with this, but I can never depend on that guy.”

Ba dum dum.

I am refining it a bit and posting it here in the hopes that I can improve upon it with your feedback. :)

Here’s the original as a point of comparison.

So a Model, a View, and a Controller walk into a bar and sit down to order some drinks from the bartender. The Model has a few more drinks than the others and turns to the Controller and says,

“Can you give me a ride home tonight? I know I always burden you with this and never ask him, but I can never depend on that guy.”

Thanks for the feedback!

Technorati Tags: Humor,ASP.NET MVC

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.

Comments

avatar

27 responses

  1. Avatar for Joke Editor
    Joke Editor January 29th, 2008

    and never ask him

  2. Avatar for silky
    silky January 29th, 2008

    a model, a view, and a controller walk into a bar. "why didn't you see it!?" claims the model to the view. "i did!" says the view, "why didn't you stop us from walking into it!?" says the view to the controller. "*shrug*" says the controller "nobody wrote a test to covert that".
    okay that needs work.

  3. Avatar for Kent Sharkey
    Kent Sharkey January 29th, 2008

    [cricket]
    [cricket]

  4. Avatar for Matthew Podwysocki
    Matthew Podwysocki January 29th, 2008

    *golf clap*

  5. Avatar for Jeff Norris
    Jeff Norris January 29th, 2008

    view not defined in model requires ride.

  6. Avatar for lorg
    lorg January 29th, 2008

    Well, you reminded of a few that were going around a few years back:
    * Two packets walk into a pcap bar. One says to the other, "can I sniff you?"
    In Israel we have a variation on that one, adding something about going to the TLV (which is a name of a club, shorthand for Tel Aviv).
    * The very famous and slightly better that the last one: Two c-strings walk into a bar. The first one says to the bartender, "Can I have a beer and some kcdasffdsfasd%$$%#%#@%$#%@". The other string turns to the bartender and says "You have to excuse my friend, he is not null terminated".

    * And a variation on the last one: A c-strings walk into a bar. It says to the bartender, "Can I have a beer and some fadsh543%$%lkjfdslfj/bin/sh". The bartender turns and says "Welcome root, You've got mail".

    And before you say anything, you started it! :)

  7. Avatar for Jeremy
    Jeremy January 29th, 2008

    A model, view and controller walk into a bar. They each order a round of drinks and proceed to get hammered. As they are walking out, the model says to the view, "Can you drive home again? The last time you got pulled over, the cop had no idea how to test you."
    Disclaimer: This joke in no way supports or condones drunk driving... nor does it support any claims of being funny.

  8. Avatar for Alex Barnett blog
    Alex Barnett blog January 29th, 2008

    Yup, I've  definitely missing my feedreader (and now FeedDemon is free I really have no excuses

  9. Avatar for Scott Bellware
    Scott Bellware January 29th, 2008

    If the model could turn around and talk to the controller, the model would need a reference to the controller. I hope this isn't the flavor of MVC going into the new framework...

  10. Avatar for Haacked
    Haacked January 29th, 2008

    @Scott You're right, it should be "the View turns to the Model"...
    Slip up on my part!

  11. Avatar for teedyay
    teedyay January 29th, 2008

    In the current version he "turns to the Model", which had me scratching my head; in the original he "turns to the Controller", which makes more sense. That's not a deliberate change, is it?

  12. Avatar for Haacked
    Haacked January 29th, 2008

    Yeah, it's a deliberate change. If you think of "talking to" as a "dependency on", then the View can talk to the Model, but can't talk directly to the controller.
    This diagram illustrates the point.
    I guess the View could ask the controller indirectly, but that level of detail makes the joke even less funny than it already is, if that were possible.

  13. Avatar for Danny
    Danny January 29th, 2008

    Barman says, "you three married?"
    View replies, "nah, just loosely coupled"

  14. Avatar for Gustaf Lindqvist
    Gustaf Lindqvist January 29th, 2008

    It should be:
    <blackquote>
    So a Model, a View, and a Controller walk into a bar and sit down to order some drinks from the bartender. The Model has a few more drinks than the others and turns to the Controller and says,
    “Can you give me a ride home tonight? I know I always burden you with this and never ask View, but I can never depend on that guy.
    Controller turns to View and says,
    "Model is way to drunk so give him a ride home you have no voice here - bitch!”
    </blackquoute>
    :)

  15. Avatar for Lance Fisher
    Lance Fisher January 29th, 2008

    So a Model, View, and Controller walk into a bar, and the View turns to the Controller and says, "is it just me or is it hot in here?" And the controller says, "Holy Crap! A talking view!"

  16. Avatar for Carl
    Carl January 29th, 2008

    Yeah, it's a deliberate change. If you think of "talking to" as a "dependency on", then the View can talk to the Model, but can't talk directly to the controller.


    Lol, this more than reminds me of the few times I've tried to tell a techy joke to my other half - it leaves me exhausted and wishing that I never opened my mouth...

  17. Avatar for William
    William January 30th, 2008

    Seriously, this is not funny at all and I've been a programmer for over 20 years and love it! I did not find this funny; not the slightest bit!!
    haacked.Dispose();

  18. Avatar for Alex Barnett
    Alex Barnett January 30th, 2008

    Danny: that's actually quite funny.

  19. Avatar for lorg
    lorg January 31st, 2008

    I agree with Alex, Danny's version actually made me laugh. The runner up is Gustaf with his addition...

  20. Avatar for secretGeek
    secretGeek February 1st, 2008

    Um, did I mention how much i like your code? And your other blog entires?
    wow those crickets are distracting.

  21. Avatar for adminjew
    adminjew February 3rd, 2008

    Where is IoC?

  22. Avatar for WileECoyote
    WileECoyote February 4th, 2008

    from an MVC implementation I have just come across
    Barman says: Are you three married
    All three speak at the same time..
    Model replies: Yes
    View replies: Its complicated
    Presenter replies: No

  23. Avatar for dimi3
    dimi3 February 7th, 2008

    @William:
    Nobody forces you to read this post... Or?

  24. Avatar for Mark
    Mark February 16th, 2008

    So the bartender says to the Controler, can I take the Model out? The controler doesn't respond, but the View says Sure. :)

  25. Avatar for Derek
    Derek March 9th, 2008

    "Yeah, it's a deliberate change. If you think of "talking to" as a "dependency on", then the View can talk to the Model, but can't talk directly to the controller.
    This diagram illustrates the point."
    Just for the sake of trivia, the original Smaltalk-80 MVC implementation did couple View to Controller and vice-versa (see: http://st-www.cs.uiuc.edu/u....
    How about this version?
    "So a Model, a View, and a Controller walk into a bar and sit down to order some drinks from the bartender. View has a bit too much to drink, so the bartender asks View for his keys. Controller reaches into Model's pants and pulls out a set of keys which he then hands over to the bartender. Model yells out: "Somebody has just reached into my pants!" View hears Model yelling and turns to the bartender and says" "You have my keys now."

    Derek

  26. Avatar for ??
    ?? March 15th, 2008

    sooooooooo not funny

  27. Avatar for mp3 files search
    mp3 files search June 24th, 2010

    What about ASP.NET people who see ASP.NET MVC as a game-changer, but more from a REST perspective than a TDD/patterns one? (Not to take away from those, of course.)