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

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: ,

What others have said

Requesting Gravatar... Joke Editor Jan 29, 2008 7:09 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
and never ask him
Requesting Gravatar... silky Jan 29, 2008 7:19 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
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.
Requesting Gravatar... Kent Sharkey Jan 29, 2008 7:21 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
[cricket]
[cricket]
Requesting Gravatar... Matthew Podwysocki Jan 29, 2008 7:24 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
*golf clap*
Requesting Gravatar... Jeff Norris Jan 29, 2008 7:30 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
view not defined in model requires ride.
Requesting Gravatar... lorg Jan 29, 2008 8:35 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
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! :)
Requesting Gravatar... Jeremy Jan 29, 2008 11:23 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
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.
Requesting Gravatar... Alex Barnett blog Jan 29, 2008 12:37 PM
# Geek Juice
Yup, I've  definitely missing my feedreader (and now FeedDemon is free I really have no excuses
Requesting Gravatar... Scott Bellware Jan 29, 2008 2:54 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
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...
Requesting Gravatar... Haacked Jan 29, 2008 4:35 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
@Scott You're right, it should be "the View turns to the Model"...
Slip up on my part!
Requesting Gravatar... teedyay Jan 29, 2008 5:34 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
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?
Requesting Gravatar... Haacked Jan 29, 2008 6:06 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
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.
Requesting Gravatar... Danny Jan 29, 2008 7:25 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
Barman says, "you three married?"
View replies, "nah, just loosely coupled"
Requesting Gravatar... Gustaf Lindqvist Jan 29, 2008 8:59 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
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>

:)
Requesting Gravatar... Lance Fisher Jan 30, 2008 1:17 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
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!"
Requesting Gravatar... Carl Jan 30, 2008 1:19 AM
# re: So A Model, A View, and a Controller Walk Into a Bar

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...
Requesting Gravatar... William Jan 30, 2008 6:29 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
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();
Requesting Gravatar... Alex Barnett Jan 30, 2008 9:37 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
Danny: that's actually quite funny.
Requesting Gravatar... lorg Feb 01, 2008 1:25 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
I agree with Alex, Danny's version actually made me laugh. The runner up is Gustaf with his addition...
Requesting Gravatar... secretGeek Feb 01, 2008 7:24 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
Um, did I mention how much i like your code? And your other blog entires?

wow those crickets are distracting.
Requesting Gravatar... adminjew Feb 03, 2008 3:41 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
Where is IoC?
Requesting Gravatar... WileECoyote Feb 05, 2008 2:00 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
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
Requesting Gravatar... dimi3 Feb 07, 2008 6:07 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
@William:

Nobody forces you to read this post... Or?
Requesting Gravatar... Mark Feb 17, 2008 12:39 AM
# re: So A Model, A View, and a Controller Walk Into a Bar
So the bartender says to the Controler, can I take the Model out? The controler doesn't respond, but the View says Sure. :)
Requesting Gravatar... Derek Mar 09, 2008 1:21 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
"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/users/smarch/st-docs/mvc.html).

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
Requesting Gravatar... ?? Mar 15, 2008 6:10 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
sooooooooo not funny
Requesting Gravatar... mp3 files search Jun 24, 2010 6:13 PM
# re: So A Model, A View, and a Controller Walk Into a Bar
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.)

What do you have to say?

(will show your gravatar)
Please add 2 and 7 and type the answer here: