jQuery 1.4.3 is out, here's why i care

another "minor" release in the 1.4.x line -- read the blog for more details: http://blog.jquery.com/2010/10/16/jquery-143-released/

it's got some cool stuff in it, and shows to me that the jQuery team has their shit together in a huge way. They call a release like this minor, where a lot of development teams would consider that much work a substantial release. In any case, I don't normally bother to write about release updates, but there's something pretty juicy in this one relating indirectly to templating via a small change in the .data() methods. 

first imagine a template like:

<div id="user" data-id="1" data-name="John">
Hi  {{name}}
</div>

previously you had to monkey about doing things like var id = $('#user").attr('data-id'); to get that id and pass it to your templating engine. if you were passing several bits of data this could be tedious so you probably improved the above template to look like this:

<div id="user" data-user="{ id: '1', name:'john'}">
Hi  {{name}}
</div>

allowing you to pull all your attributes in one object, but you still had to manually pull your attributes all the time. 

enter 1.4.3 and all html 5 data attributes (you have been using the data-xxx format right?) are automagically read into the elements .data() object. this seems minor but is going to save a lot of tedious work because if the above template is used now you can just call $('#user').data('user'); and have access to all those values right out of the gate. 

sometimes small intuitive changes have the biggest impact. 

I can immediately go through some code on the app i'm working on and trim out a bunch of .attr() calls saving me code. but more interestingly anywhere i've already been using the html5 data tags (and i have) i already have access to those as data if i need them and this is key for me. It encourages the proper use of a new standard (html5) and rewards you for adopting it early with less work. We need more improvements in our tools along this line because it's the quickest way to get new standards to be "the" standard. 

when you couple changes like the above with speed improvements and implementation improvements (like becoming more compatible with CommonJS) and changes borne from your user bases expectations (Calling .data(Object) no longer completely replaces the data object instead it extends the existing object, leaving the unspecified values in place) you get a really great project to work with, even for minor releases. 

 

Filed under  //   jquery   programming   ruzz   updates  

on remembering disjointed and damaged light and weak knee'd promise.

Ruzz5421
(c) 2004-2010 i.m. ruzz
Model: Katie West 

finally getting a chance to look over some older pictures. I'm layed up sick with a bad chest cold and over the last three days I've managed to rescue all my photos from the last 2 years which were trapped on another machine. First time I've been able to look through or work on these shots in several months and now with some time passed, and my life completely changed since we shot in April, I see these shots differently. 

It was a harried shoot. I was on the tail end of a very busy and wearing week long trip out east for work. My life was overly complicated. I'd stepped into an emotional mire by following my curiosity and that combined with a lot of change in my work I think i was near complete collapse that night. I did end up coming apart, but not for another week or so. 

Being in a strange city, in an overpriced hotel room, needing food and sleep. Drinking wine and wandering around the hotel looking for places we might exploit (read: no cameras) I remember thinking how surreal everything about my life felt. let alone that I was in this ridiculous hotel with a bare minimum of light and Katie West. I felt adrift. completely detached from the mores that normally framed my life. exhausted, and mostly drained of passion. Surely deeply disconnected from beauty. 

we had the awkwardness of two people who barely know one another off the internet. the complexity and constraint of time and energy, and Katie mentioned she hadn't shot with another photographer in a long time and I remember thinking we should just go walk around and take pictures together and shoo all this other stuff away. she could show me this city I'd hated from a distance for years, and I could escape the weight of people expecting something transcendent from a situation completely mis-aligned. 

She was friendly, and welcoming. we got on okay but I never felt we really connected. I felt like we should, but never felt like we really did. I didn't hit that sweet spot during the shoot where you are able to fully let go and just follow the flow. I was overly aware of her. Overly aware of me. 

so now, many months later, and the pressure released, expectations burned through, my life upside down but more resembling what i think my life is actually like it's a strange thing to look at these shots. I see shots of katie, and the old stone of the financial district of Toronto. The weeping trees who lull their nourishment from the great lakes. In the inky black shadows i see expressed my own darkness at the time. I see now, having lost most of the edits I had in place from April, and seeing the raw files anew, and realize how an otherwise unremarkable shoot has come a symbol in my mind about who I am, who i was trying to be, and how far the two can get from one another. 

I'd love a second chance to shoot Katie. On my turf. She can come into the shithole I call my home (or studio if you're cute) and I can put lights around her and have a chance to express something besides my utter disorientation. I'd love the chance to actually see katie, and shoot her for who she is, rather than what happened which was me on autopilot trying to keep my shit together while running almost entirely on nothing but the malformed energy that comes from having no other way to be when you're in over your head in every realm of your life.  

Filed under  //   Katie West   beauty   black and white   neurotics are us   ruzz   thinking   woman  

Book Review: The Female Thing by Laura Kipnis

The Female Thing: Dirt, Envy, Sex, Vulnerability (Vintage)The Female Thing: Dirt, Envy, Sex, Vulnerability by Laura Kipnis
My rating: 4 of 5 stars

Kipnis is the sort of woman I'd enjoy watching dissect a crowd of intellectuals, then sitting back and discussing it with her. Her mind, and tongue are razor sharp and she has that mystical ability to see what's plain behind the show and pomp of a lot of modern thought. No small feat.

Against Love, her poorly named polemic against relationships, or more specifically against marriage--though titled so--was a rip roaring ride of research, biting wit, cleverness and general disregard for the common expectations of good behaviour when dealing with topics like love and marriage. If you haven't read it, do.

This short book never quite reached the fevered pitch of Against Love, and in some senses you could almsot feel her stepping gingerly lest she engage the entire feminist cadre against her. The closest she gets to her true form of freewheeling intellectual destruction is in the chapter about the elusive female orgasm. The farthest while discussing rape. An uneven pace despite the brevity of the book.

However, I think the book might be good primer to anyone interested in gender studies. Particularly as a jumping off point to other works that might expand more deeply.

she ends the book with a valid description of a couple paradoxes of the modern idea of women as viewed through the lens of feminism and declares from that point is where a true look at the issue must begin. An odd sort of way to end a book. A page taken from the fluff passing as a heavy-handed appeal for a trilogy ala Angelina Jolie's Salt perhaps? Whetting our appetites for her real next novel? or testing the grounds to see how much flame is roused from this?

a couple interesting threads of thought:

1. the idea that the preternatural mother instinct and mother bonding with child is actually a convenient construction of modern (or recent, historically at least) thought.

2. that until the 1920s a goodly part of a doctors work was to deal with feminine hysteria. The cure for which was often manual genital massage. http://en.wikipedia.org/wiki/Female_hyst...

there are many more interesting morsels layered throughout the book and while they all tend toward her case--if she was actually making a case--even combined they failed, for me, to raise a coherent thread of thought in any particular direction. this is more like a review of the state of things than a discorse, or argument put forth. which in some way is a shame as where kipnis shines brightest is when she's dismantling some unsuspecting hacks work with the sheer violence of her thought.

alas, perhaps the next book..

View all my reviews

Filed under  //   books   laura kipnis   review   ruzz   the female thing  

A walk through downtown

All Photos (c) 2004-2010 i.m ruzz

I had to drop off the car I had for the last week downtown so I brought my cameras. The K20D had a 12-24mm Wide Angle on it and I was fortunate to find good clouds when I got down there. I dropped the car and took about 80 pictures in the short walk to my bus stop. I dragged it out as this so far looks to be one of the few breaks I get this long weekend. I was pretty happy that wide angle never sold because i'm getting back into the distorted wide angle feel lately. 

As an interesting aside, there was a massive owl atop the McDougal Center (North Side) and I was pretty stoked to see one downtown, but less so when i realized i opted to save 600g im weight in my shoulder bag by leaving my 75-300 at home. oh well, I bet he hangs out there a lot. 

(download)

Filed under  //   Calgary   K20D   black and white   photography   ruzz   sky  

programming concepts: jQuery.delegate

i've long thought the real battle of becoming a great programmer comes in ingesting the right concepts. most programmers are pretty clever and once they grok something in a way that makes sense to them theres a moment of clarity and inspiration that comes from seeing all the interesting ways you they could apply this new idea. this process is the heart of programmer growth. Ignoring the cruft, those programmers who treat programming as a job, it's clear the real impediment to growth is getting the right conceptual explanation (through books, tutorials, play, experiments, blogs, et al). When we have the right conceptual model, complex ideas become simple and practical. your conceptual model is the expression of your understanding of the things you're working with and determines what calibre of programmer you're going to become. 

Interestingly, most top programmers rely on code to explain themselves because articulating their latent conceptual framework is either impossible, or the outline of it is so deeply stacked on other concepts it's like explaining the evolution of western philosophy. This conceptual stack problem is hard to get around. You can't accurately explain many sophisticated concepts without leaning on an underlying stack of other sophisticated concepts. Imagine giving Javascript: the good parts to a very junior programmer. They don't have a the basic concepts upon which much of the book relies and would get little from it. 

to that end, I've been thinking about a series of conceptual posts trying to boil an idea down to it's simplest conceptual explanation--which, im learning is often harder than the code itself to come up with. Lets give this a try with the oft misunderstood, but incredible helpful jQuery.delegate function. 

The existing concept:

from the api docs: http://api.jquery.com/delegate/

Delegate is an alternative to using the .live() method, allowing for each binding of event delegation to specific DOM elements. 

.delegate( selector, eventType, handler )

selectorA selector to filter the elements that trigger the event.

eventTypeA string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.

handlerA function to execute at the time the event is triggered.

$("table").delegate("td", "hover", function(){
        $(this).toggleClass("hover");
})

the above snippet will listen for hover events against "table" and fire the enclosed code when they happen. super clear right?

A new  concept:

jQuery.delegate is all about efficiency. I'm going to use the concept of a teacher and a classroom of students to lay this out in simple terms. Lets start by imagining a theres a teacher in a classroom that needs to know when each student is done their tests. Theres two ways to approach this:

  1. give each student individual instructions, one a time, to come tell the teacher when they're done.
  2. put instruction on the board for the everyone in the class telling them to come up and tell the teacher when they're done.

which is more efficient and flexible? in the first scenario what happens if another student comes into the room (perhaps by ajax :P) to take the test after the instructions have been given individually? and what happens if we change our minds about what the student needs to do when the test is done? do we have to go back and individually explain the new instructions?

lets try this as a bit of code:

 

$("classroom").delegate("student", "doneTheTest", function(){
        $(this).tellTheTeacher();  //$(this) == the student thats done right now
})

what we're saying is any student in the classroom thats done test should tell the teacher. If a new student comes in, they're covered by the same rules because they are in the "classroom". If we want to change our instructions, we change it once for all students, even the new ones because the instuctions aren't followed till they are done the test. 

thats all you need to know to apply this concept and get around a lot of unsightly code handling individual items. If you're curious why it works this way, you should follow up with some reading on event bubbling in javascript. but theres no reason you need to understand that to leverage the power of delegate. 

the one line concept:
anytime you have a group of things you want to watch for something, delegate it to the container they all belong to. 

I hope to roll out a few more of these as time permits. Right now i'm heavy into jQuery so I think the next one will be the oft misunderstood, but wow powered jQuery.data() which has the power to transform the very way you think about the dom and your data. 

 

Filed under  //   concepts   jquery   programming   programming concepts series   ruzz   series  

m. singer

Ruzz6805

(c) 2004-2010 i.m. ruzz 

model: Marla Singer

Filed under  //   beauty   marla   photography   ruzz   vintage  

John Resig's jQuery Ninja talk at Tec... | Zoopy | Share videos, photos and audio clips

the deeper you go down the javascript application hole, the closer i think you get to the idea that the dom and the data are the same. MVC patterns start to fall apart. if you watch this watch at least to the part where he explains the logic of the small game he wrote. it's a gamble he's taking by being a heretic, but one i think he'll win in the end.

as an aside, isn't in troubling or, interesting, that this was shot at the tech4africa confrence and almost everyone in the audience is white, middle aged men.

Filed under  //   development   jquery   resig   ruzz  

untitled

Ruzz8254

(c) 2004-2010 i.m. ruzz

model: Kara Yerex

not dead, just busy. 

why are smoking girls 3x sexier than non smoking girls?

Filed under  //   beauty   kara   photography   portrait   ruzz   smoking   vintage  

Mini-Review: The Big C, A new series from Showtime staring Laura Linney and Oliver Platt

Media_httpwwwshocomsi_zhiyn

caught the first ep of this on my break. Pretty good start. If you like Laura Linney, and you like Oliver Platt--and if you don't like Ollie, what do you like?--then you probably will dig this.

it's hard to do a show about Cancer without being a bit contrived and trite, but i think the actors keep it mostly out of cliche land.

i particularly enjoyed when she told the gir from precious (who i think needs to die) that she could either be fat and jolly or skinny and bitch, but fat and bitch was not an option.

"fat people are jolly for a reason.." she says.

despite the fat bashing (the last respectable form of bigotry and prejudice, and the obvious paradox that she's breaking up with her chubby husband because he's too jolly while playing video games and and acting like an over grown man-child aside, it was pretty good.

it's hard not to identify with seeing someone stuck, become unstuck and follow the ineluctable course that follows. Humans for whatever reason identify with the sentiment of "Screw it, i'm going hard" almost universally. my question is how can they keep that going over the length of a series.

if it were an hbo series, we'd know they only had 2 1/2 seasons before they were cancelled because studio chiefs got distracted by some other shiny thing, but this is showtime.. oh wait.. who remembers huff?

and there was a lot of boob hanging out. that helped.

Filed under  //   review   ruzz   showtime   the big c   tv  

waking up you

Ruzz8028
(c) 2004-2010 i.m. ruzz (All Rights Reserved)
model: eddie

I had wrote out a long post, then decided to delete it. 

 

Filed under  //   beauty   eddie   nude   photography   ruzz   woman