<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No Mod Required &#187; javascript</title>
	<atom:link href="http://www.drunkenfist.com/304/category/web/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.drunkenfist.com/304</link>
	<description>Rob Larsen writes on entertainment, sports and culture.</description>
	<lastBuildDate>Tue, 07 Sep 2010 14:51:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>PSST! I&#039;ve Got a Presentation Next Week &#8211; JavaScript Library Comparisons</title>
		<link>http://www.drunkenfist.com/304/2009/04/22/psst-ive-got-a-presentation-next-week-javascript-library-comparisons/</link>
		<comments>http://www.drunkenfist.com/304/2009/04/22/psst-ive-got-a-presentation-next-week-javascript-library-comparisons/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 02:33:39 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Rob Larsen]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[boston]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=5808</guid>
		<description><![CDATA[I am cranking through some code examples and plenty of research for this thing. It should kick incredible amounts of JavaScript ass. Come to think of it, it's a ninety minute presentation, so it better kick ass I'm going to look at load times, execution times, ySlow scores, codebase and add pure editorial commentary for [...]]]></description>
			<content:encoded><![CDATA[<p>I am cranking through some code examples and plenty of research for this thing. It should kick incredible amounts of JavaScript ass. Come to think of it, it's a <strong>ninety minute</strong> presentation, so it better kick ass <img src='http://www.drunkenfist.com/304/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I'm going to look at load times, execution times, ySlow scores, codebase and add pure editorial commentary for several popular libraries (at minimum, jQuery, YUI, Prototype, and Dojo), as well as pure JavaScript and my own bare-bones library.</p>
<p>If you're a Boston JavaScript nerd, I hope to see you there.</p>
<p>Here's the description: </p>
<blockquote><p>Our next JavaScript Meetup will be held on Thursday, April 30th at Microsoft Research Center located at One Memorial Drive in Cambridge. You should come to the 11th floor to be let in. There is also parking available at a cheap evening rate in the building.</p>
<p>Rob Larsen , Principal Presentation Engineer at Cramer, will demonstrate comparisons between raw JavaScript and utilizing the more popular JavaScript libraries currently available.</p>
<p>After the presentation | demonstration, we will go around the room introducing ourselves and asking the group for advice | opinions on any JavaScript-related issues members are facing.</p>
<p>Microsoft will provide pizza again. What a nice company!</p>
<p>Please RSVP and bring guests. We always have lots of pizza left over.
</p></blockquote>
<p>And the meetup.com link:</p>
<p><a href="http://javascript.meetup.com/2/calendar/10153000/">April Boston JavaScript Meetup Meeting &#8211; JavaScript Library Comparisons &#8211; The Boston JavaScript Meetup Group Cambridge, MA &#8211; Meetup.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2009/04/22/psst-ive-got-a-presentation-next-week-javascript-library-comparisons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Looks Like I Might Be Doing a Presentation Next Month</title>
		<link>http://www.drunkenfist.com/304/2009/03/27/looks-like-i-might-be-doing-a-presentation-next-month/</link>
		<comments>http://www.drunkenfist.com/304/2009/03/27/looks-like-i-might-be-doing-a-presentation-next-month/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 04:22:18 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Rob Larsen]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=5719</guid>
		<description><![CDATA[The topic will be a hands on comparison JavaScript libraries. I'm going to write the same functionality (probably a Twitter search) in plain JavaScript and several popular libraries. I'll discuss the anecdotal findings of using all the different libraries for the task and I'll also offer up numerical analysis of the different pages- execution time, [...]]]></description>
			<content:encoded><![CDATA[<p>The topic will be a hands on comparison JavaScript libraries. I'm going to write the same functionality (probably a Twitter search) in plain JavaScript and several popular libraries. I'll discuss the anecdotal findings of using all the different libraries for the task and I'll also offer up numerical analysis of the different pages- execution time, page load time, etc.</p>
<p>More info as I get it. Should be fun if it happens. It'll be a little bit of work as I'll have to prep for it, the work itself looks like it will be a lot of fun. </p>
<p>Good times. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2009/03/27/looks-like-i-might-be-doing-a-presentation-next-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Couple of Links and Random Thoughts, Dropped on You Out of the Blue</title>
		<link>http://www.drunkenfist.com/304/2008/10/27/a-couple-of-links-and-random-thoughts-dropped-on-you-out-of-the-blue/</link>
		<comments>http://www.drunkenfist.com/304/2008/10/27/a-couple-of-links-and-random-thoughts-dropped-on-you-out-of-the-blue/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 20:39:42 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[baseball]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[cycling]]></category>
		<category><![CDATA[football]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[sport]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[dom]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=5044</guid>
		<description><![CDATA[I haven't shared random bits of Internet with you for months. That changes right now. Technology IEContentLoaded &#8211; An alternative for DOMContenloaded on Internet Explorer A better solution than the deferred &#60;script&#62; technique I was using. I've already wrapped it into our internal library. Digital Web Magazine &#8211; Everything You Know About CSS Is Wrong [...]]]></description>
			<content:encoded><![CDATA[<p>I haven't shared random bits of Internet with you for months. That changes right now.</p>
<p><span id="more-5044"></span></p>
<h3>Technology</h3>
<ul>
<li><a href="http://javascript.nwbox.com/IEContentLoaded/">IEContentLoaded &#8211; An alternative for DOMContenloaded on Internet Explorer</a>
<p>A better solution than the deferred &lt;script&gt; technique I was using. I've already wrapped it into our internal library.
</li>
<li><a href="http://www.digital-web.com/articles/everything_you_know_about_CSS_Is_wrong">Digital Web Magazine &#8211; Everything You Know About CSS Is Wrong</a>
<p>A great, if not ready for pime time, layout technique. Going back to the future by using the table-based display types for your grids. Party like it's (a standards compliant) 1999.</li>
<li><a href="http://northtemple.com/2008/10/07/javascript-and-screen-readers">JavaScript and screen readers</a>
<p>If you care about such things (and you really should you know.)</li>
<li><a href="http://analytics.blogspot.com/2008/10/more-enterprise-class-features-added-to.html">Google Analytics Blog: More Enterprise-Class Features Added To Google Analytics</a>
<p>I'm being driven a little nuts waiting for some of these to be rolled out. The AdSense integration  is especially interesting to me, but almost all of them will get used in one way or another (either here or at work.)
</li>
</ul>
<h3>Music</h3>
<ul>
<li>I am old, I remember when all of this was going on</p>
<p>Start here:<br />
<a href="http://fatlacemagazine.uproxx.com/?p=988">Obscure Roxanne battle records fortnight part 1:</a></p>
<p>and finish here:<br />
<a href="http://fatlacemagazine.uproxx.com/?cat=44">Roxanne Battle Records</a>
</li>
<li>Jeff Mangum has been spotted in the wild. Here he is playing "Engine" last week in Columbus, Ohio. If he'd show up at the Boston version of this show, I'd still be kicking myself <strong>right now</strong> for missing it. He sounds great.
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/PnsR2bMj_c8&#038;color1=0xe1600f&#038;color2=0xfebd01&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/PnsR2bMj_c8&#038;color1=0xe1600f&#038;color2=0xfebd01&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></li>
</ul>
<h3>Sports</h3>
<ul>
<li>Ivan Basso is back and wasted <strong>no</strong> time getting back into the swing of things. Just days after finishing his suspension the Italian finished third at the Japan Cup, behind the Little Prince.
<p><a href="http://velonews.com/article/84632/cunego-wins-japan-cup">Cunego wins Japan Cup</a>
</li>
<li>Speaking of Basso, the former Giro winner is focusing his whole return season on <em lang="it">La Corsa Rosa</em> this year. No surprise there.
<p>Know who else is eying the Giro? None other than American Lance Armstrong&#8230; </p>
<p>Which means the Giro will be nuts this year. The Italian press was going to be there in droves anyway, covering Basso's return with real intensity. <em>Now</em>, with Lance showing up with his sights on winning, the rest of the world will be there as well. </p>
<p>It will be a zoo. </p>
<p>Can't wait.</li>
<li>How must it feel to be one of those fans in Indianapolis or New York who cheered when Tom Brady went down in the first game of the season. So far both teams are looking up at the Patriots.  I'm wondering if that's the result they expected when Brady went down?
<p>It's been a very interesting  season so far.</li>
<li>With the Red Sox, the Yankees and the Rays all in the same division there's a chance that the three best teams in baseball could all be in the same division one year and only one of them would make the playoffs.
<p>Nutty, I know, but imagine the three teams cannibalize themselves going 10-9 in their respective season series and in a weaker division the second place team swoops in to steal the Wild Card.</li>
</ul>
<p>That'll do for now. More later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2008/10/27/a-couple-of-links-and-random-thoughts-dropped-on-you-out-of-the-blue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax, DHTML and a Glaring Void in My Vocabulary</title>
		<link>http://www.drunkenfist.com/304/2008/09/10/ajax-dhtml-and-a-glaring-void-in-my-vocabulary/</link>
		<comments>http://www.drunkenfist.com/304/2008/09/10/ajax-dhtml-and-a-glaring-void-in-my-vocabulary/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 03:54:46 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=4864</guid>
		<description><![CDATA[I've run into an issue of nomenclature over the past couple of years and it's finally turned into a "thing." What does one do with "things?" If you answered, "write about them," you got it in one. Anyway, this issue comes up pretty consistently when talking about my job (HTML/CSS/JavaScript) with designers, clients and/or project [...]]]></description>
			<content:encoded><![CDATA[<p>I've run into an issue of nomenclature over the past couple of years and it's finally turned into a "thing."</p>
<p>What does one do with "things?" </p>
<p>If you answered, "write about them," you got it in one.<br />
<span id="more-4864"></span><br />
Anyway, this issue comes up pretty consistently when talking about my job (HTML/CSS/JavaScript) with designers, clients and/or project managers that know just enough to be dangerous (and not much more.) They know that JavaScript can do some pretty slick animations and they know that the reborn trend of using JavaScript for effects and interactivity coincides with the rise of <a href="http://www.adaptivepath.com/ideas/essays/archives/000385.php">Ajax techniques</a> in application development over the past couple of years. Put two and two together and for a lot of people in the industry <em>anything</em> "fancy" you do with JavaScript is "Ajax."</p>
<p>Except it's not. </p>
<p>Ajax, for those of you unclear on the concept (and there are a lot of you) is a method of sending and receiving data that allows for smoother interactions in web based applications. While updating the page with those results, creating desktop style effects and animations in the browser are integral to heightening that smoother, more responsive interaction, Ajax, as defined, doesn't cover those techniques. </p>
<p>Which brings me to the other part of the "thing." Without resurrecting Dynamic HTML (DHTML) I don't have a better term for those effects and animations. I end up just letting people call it "Ajax." Which is  frustrating to me as I spend a lot of time trying to come up with better ways to articulate complex technical issues to nontechnical people. If I get lazy and let people perpetuate an imprecise use of the term it makes my job more difficult when I actually have to explain what happens when we really <strong>are</strong> using Ajax.</p>
<p>So the question is, what to call it? Personally I'd be <em>cool</em> with using DHTML as the catch-all for that stuff, but I feel like I'm in the minority on that point. A lot of people have a negative association with the term (for good reason, really- that much flashy, useless code leaves a mark), so the last thing I want to do is evoke that kind of feeling in a meeting*. </p>
<p>I just don't have an alternative.</p>
<p>Thoughts?</p>
<p>*While I avoid it, other folks will occasionally spring it on me, which is always fun**. If they toss in another piece of ancient jargon like "div layer" I realize I'm in the presence of another web greybeard and I am glad&#8230;</p>
<p>**C'mon, I'm talking about meetings here. It's not "fun" like a night at the opera. I mean "fun" as in "better than a meeting in which nothing interesting happens and I'm just drawing for 45 minutes"</p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2008/09/10/ajax-dhtml-and-a-glaring-void-in-my-vocabulary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code I Like: A JavaScript Object as an Argument for a Function</title>
		<link>http://www.drunkenfist.com/304/2008/09/01/code-i-like-a-javascript-object-as-an-argument-for-a-function/</link>
		<comments>http://www.drunkenfist.com/304/2008/09/01/code-i-like-a-javascript-object-as-an-argument-for-a-function/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 20:39:34 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Code I Like]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=4798</guid>
		<description><![CDATA[This will hopefully be the first of a continuing series of smaller code articles where I share techniques I (and my team) use on a daily basis. I take this stuff for granted so I think it might be beneficial to share since (a) I might be able to improve what I do by receiving [...]]]></description>
			<content:encoded><![CDATA[<p>This will hopefully be the first of a continuing series of smaller code articles where I share techniques I (and my team) use on a daily basis. I take this stuff for granted so I think it might be beneficial to share since (a) I might be able to improve what I do by receiving feedback on techniques I use and (b) some of the things I do, while old hat to me, might be new and useful to other people in the field. </p>
<p>We'll see how it goes.<br />
<span id="more-4798"></span><br />
With that short into out of the way I wanted to start off with a bit of JavaScript that I really appreciate, namely using a JavaScript Object as the argument for a function when multiple options are possible.</p>
<div class="code_sample"><code>
<pre>
<em>//Here's what a function call looks like</em>

document.getElementById("myObject").onclick = doSomething(
<em>//here's the object</em>
	{
		<em>//I'm using 3 options here</em>
		file: "/_assets/images/object.jpg",
		messageText: "Objects sure are swell",
		newUrl: "/object.php"
	}
);

<em>//and here's a snippet of the function definition</em>
function doSomething( options ) {
<em>//here we either use the arguments supplied in the call
//or  fall back to defaults.
//notice how the order is off and how callback
//was never supplied in the function call</em>
	options = {
		file: options.file || "",
		callback : options.callback || function(){},
		newUrl: options.newUrl || "http://www.google.com/",
		messageText: options.messageText || "You love Objects"
    };
//stuff happens
};
</pre>
<p></code></div>
<p>Why do I like this? Two things:</p>
<ol>
<li>I don't need to remember the order of arguments and I don't need to supply blank arguments if I'm not using one. I can't tell you the number of times I've messed up the order of arguments and cased an error which I then had to do a couple of minutes of research to fix. I still do it with the addClass, removeClass, hasClass, toggleClass suite I use pretty much every time I write JavaScript and that's only <strong>two</strong> arguments. If I converted those to a single Object it would be grand since I know I'd remember <code>obj</code> (my default Object argument name) and <code>className</code>.
<p>&#8230;and forget about remembering where to put unused arguments. That's the pits.
</li>
<li>It's conceptually much clearer. Organizationally it's much cleaner to me (especially the way the defaults are spelled out right at the top of the function) and the Object labels take any guesswork out of the arguments when the function is called. I know exactly what I'm doing when I call a function defined this way. Compare the Object pattern to this classic:
<p><code>"MM_swapImage('Image1','','/img/newImg.jpg',1)"</code></p>
<p>Quick, without referring to anything else, what's going on there?</p>
<p>Sure, the first is the image name and the third is the image name, but what are the other two?  Off-hand I'd have no idea and that's one of the most common blocks of code on the internet. Compare that to an object version:</p>
<p><code>
<pre>
swapImage( {
	target: 'Image1',
	swapFrame: "",
	fileName: '/img/newImg.jpg',
	preload : 1
});</pre>
<p></code></p>
<p>That brings clarity, right? Stunning clarity for me as I never knew what that always-blank second argument was.</li>
</ol>
<p>And there you have it, the first installment. There will be a lot of CSS and HTML in this series as well, so if they float your boat as well <a href="http://www.drunkenfist.com/304/category/web/code-i-like/">please keep your eyes peeled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2008/09/01/code-i-like-a-javascript-object-as-an-argument-for-a-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
