From the category archives:

Musings

Model, View, Controller by James Dempsey

January 24, 2008

No Gravatar


I found this little gem on YouTube the other day, after poking around a bit I found actually lyrics!

Model, View, Controller

Lyrics and music by James Dempsey.

Model View, Model View, Model View Controller
MVC’s the paradigm for factoring your code,
into functional segments so your brain does not explode.
To achieve reusability you gotta keep those boundaries clean,
Model on the one side, View on the other, the Controller’s in between.

Model View - It’s got three layers like Oreos do.
Model View creamy Controller

Model objects represent your applications raison d’tre.
Custom classes that contain data logic and et cetra.
You create custom classes in your app’s problem domain,
then you can choose to reuse them with all the views,
but the model objects stay the same.

You can model a throttle in a manifold,
Model level two year old.
Model a bottle of fine Chardonnay.
Model all the twaddle stuff people say.
Model the coddle in a boiling eggs.
Model the waddle in Hexley’s legs.

One, two, three, four.
Model View - You can model all the models that pose for GQ.
Model View Controller

View objects tend to be controls that view and edit,
Cocoa’s got a lot of those, well written to its credit.
Take an NSTextView, hand it any old Unicode string,
the user interacts with it, it can hold most anything.
But the view don’t knows about the Model:
That string could be a phone number or the words of Aristotle.
Keep the coupling loose and so achieve a massive level of reuse.

Model View - All rendered very nicely in Aqua blue
Model View Controller

You’re probably wondering now.
You’re probably wondering how,
the data flows between Model and View.
The Controller has to mediate,
between each layer’s changing state,
to synchronize the data of the two.
It pulls and pushes every changed value.
Yeah.

Model View - mad props to the smalltalk crew!
for Model View Controller

Model View - it’s pronouced Oh Oh not Uh Uh
Model View Controller

There’s a bit more on this story,
a few more miles upon this road,
well nobody seems to get much glory
writing controller code.
Well the model is mission critical
and gorgeous is the view,
But I’m not being lazy, but sometimes it’s just crazy
how much code i write is just glue.
And it wouldn’t be so tragic,
but the code ain’t doing magic:
it’s just moving values through.
And I wish I had a dime
for every single time
I set a TextField’s stringValue.

Model View - how we’re gonna deep-six all that glue
Model View Controller

Controller’s know the Model and View very
uahh - intimately
They often are hardcoding
which is very verboten for reusability.
But now you can connect any value you select
to any view property.
And I think you’ll start binding,
then you’ll be finding less code in your source tree.
Yeah I know I was astounded,
that’s not even a rhyme.

But I think it bares repeating
all the code you won’t be needing,
when you hook it up in IB.

Model View - it even handles multiple selections too
Model View Controller

Model View - hope I get my G5 before you
Model View Controller

Yeah, yeah, yeah. Yeah.

{ View Comments }

JMI Motoring in Smokey Point does great work!

January 20, 2008

No Gravatar

I dropped my B6 S4 off last week to have some body pieces painted and installed. I thought, hell, while I’m at it maybe I can have them paint my race bike body work the same color. I worked with Jeff, he’s a great guy! He  painted and installed my side skirts, blacked out my front grills, and painted my race bodywork. I could not be happier.

Before:

After:

Check them out if you need anything done!

{ View Comments }

The Seahawks Coug’d It

January 13, 2008

No Gravatar

14 points in the first 5 minutes, and we can’t win a damn game? Reminds me of Applecup ’07 :/

{ View Comments }

Yet another snow storm hits the Cascades

January 10, 2008

No Gravatar

I’m planning on heading over to Walla Wall this weekend and it’s apparent I’ve got poor planning.

Looks like there’s going to be up to 20 inches of snow…let’s see how the winter tires and Quattro holds up!

{ View Comments }

JL Audio’s 10w7

January 9, 2008

No Gravatar

Well…I get an email from the shop telling me I have a few packages. Curious, I drop by…and what do I see? My JL Audio 10w7! My first reaction was, wow, the box has two handles on it…eek!

After unwrapping my new toy, I was very impressed with the overall construction of the speaker. Everything from the surround, to the wiring terminals looked to be of high quality. I hope to run the amp wires this week and drop this sucker in! 

{ View Comments }

Should we expect more snow in WA?

January 8, 2008

No Gravatar

I was up last night working and when I looked outside it was snowing…should we expect more snow, and will it stick?…I hope so!

{ View Comments }

I is graduated!!!

August 17, 2007

No Gravatar

It’s official, I am finally done with school!

{ View Comments }

UW’s Gun Free Status

April 20, 2007

No Gravatar

This is a letter I wrote our University President.

President Emmert,

I am not normally one to write letters, but in light of tragic events at Virginia Tech and the suicide murder at UW just weeks ago, a lot has been going through my head. The thought that has been most prominent is how could one person with a handful of weapons wreak so much havoc without being stopped?

A Virginia bill was defeated in the subcommittee stage that would change the University’s policy on concealed carry, allowing college students and employees who were of legal age, that have successfully passed government screening, and have had the appropriate training. Virginia Tech spokesman Larry Hincker said he was happy to hear the bill had been defeated, “I’m sure the university community is appreciative of the General Assembly’s actions because this will help parents, students, faculty and visitors feel safe on our campus.”

To me, the this seems illogical. Every day, you and I go about our lives, and every day we encounter individuals who responsibly carry handguns; individuals who statistically are the least likely to commit violent crimes. Though I understand there are polarized views on handguns, the statistics are clear: each year, the Centers for Disease Control reports civilians, like you and I, prevent at least 500,000 crimes using firearms. Taking a comparative approach and looking to the world we see that Great Britain’s strict gun control has resulted in skyrocketing violent crime rates higher than our own, while Israel’s armed teachers have been preventing potential massacres.

During the mid 1990s which was also around the time the Gun Free School Zones act was created, schools started becoming hot spots for mass murders. Though the law was enacted to deter gang violence, it ultimately made schools shooting ranges for deranged individuals. Regardless on your views on guns, would you put a sign on your home that said, “Gun free zone”? Individuals who go on their killing sprees are insane, but they are not stupid; Virginia Tech’s anti-carry law did not deter Cho Seung-Hui, instead it made victims out of the students it was meant to protect. How many shootings have occurred at police stations, NRA meetings, or gun stores? By labeling our University as a gun free zone, we are inviting violence into our home. including

In light of the Virginia Tech massacre, on April 18th, the Tennessee House panel has voted ito repeal the state law that forbids the carrying of handguns on property and buildings owned by state, county and city governments…parks and playgrounds. By denying students the right to protect themselves, we are forcing them to rely on a higher authority to ensure their self preservation, judging from the events that have transpired that is not enough. Will UW continue to be swayed by anti-gun, anti-defense rhetoric; do we continue to choose to be reactive, how many more mass murders need to occur before we to start becoming proactive?

{ View Comments }

MC Rove, in the house

April 2, 2007

No Gravatar

Hiphop is dead.

{ View Comments }

Adrenaline Freaks – 3/30

March 30, 2007

No Gravatar

On Friday March 30th I spent the day at the Adrenaline Freaks track day. The temps were in the 30s in the morning, but the track was dry. More than anybody could hope for during March in Seattle! I arrived about 7:30AM and set up the pit with Arthur and Mitchell, Arthur was excited to get back on the track and ride his ’05 R6 and Mitchell was stoked to be back riding in general…even more so on a Fluid Suspension tuned ’06 GSX-R 750!

I was able to get in a few sessions before the rain crept in, ah well, nap time! As usual, the rain came and went and the track dried up a little bit….emphasis on a little. The front side was decent with some dry lines, but the back was still puddling. I went out a few sessions and decided to call it quits…hell, I had two more days of riding coming up.

Overall, it was a good day. I was able to spend some more time working on familarizing myself with the bike and spend some time with brake points and turn in markers.

{ View Comments }