
<?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>Club AJAX – Dallas Ft. Worth Area AJAX Users Group covering: AJAX, JavaScript, HTML, CSS, and Design</title>
	<atom:link href="http://clubajax.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://clubajax.org</link>
	<description>Dallas Ft. Worth Area AJAX Users Group covering: AJAX, JavaScript, HTML, CSS, and Design</description>
	<lastBuildDate>Wed, 17 Apr 2013 00:48:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>ECMAScript 5 &#8220;strict mode&#8221; Alternatives</title>
		<link>http://clubajax.org/ecmascript-5-strict-mode-alternatives/</link>
		<comments>http://clubajax.org/ecmascript-5-strict-mode-alternatives/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 02:02:26 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[humor]]></category>
		<category><![CDATA[ES5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[strict mode]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=2205</guid>
		<description><![CDATA[ES5 offers a way to opt in to a restricted variant of JavaScript by adding strict mode to the top of a page or function. It can be used to access all of the language&#8217;s latest features, and have them work with full performance in modern browsers. However, strict mode is what it sounds like [...]]]></description>
			<content:encoded><![CDATA[<p>ES5 offers a way to opt in to a restricted variant of JavaScript by adding <code>strict mode</code> to the top of a page or function. It can be used to access all of the language&#8217;s latest features, and have them work with full performance in modern browsers.</p>
<p>However, <code>strict mode</code> is what it sounds like &mdash; strict. It can be difficult to learn the new variants and rules. Fortunately ES5 offers other modes that can be used that are more accessible to average coder.</p>
<p><strong>stern mode</strong></p>
<p>Very similar to strict mode. It runs bad code, but tells you all the ways you screwed up and threatens that it won&#8217;t run the code next time.</p>
<p><strong>permissive mode</strong></p>
<p>Pretty much let&#8217;s you do whatever you want. It&#8217;s not happy when you use <code>`with`</code> or <code>`eval`</code>, but doesn&#8217;t do anything about it. It will occasionally throw errors, but they are unpredictable and passive aggressive. <code>`switch`</code> and <code>`break`</code> have been removed for being too confrontational and replaced with <code>`praise`</code> and <code>`accept`</code>.</p>
<p>A new exception is introduced for this mode: <code>Fit()</code>. When the feeling is the code is given too much lenience, it&#8217;s best to:</p>
<p><code>throw Fit();</code></p>
<p><strong>coddle mode</strong></p>
<p>Writes your code for you while you eat snacks.</p>
<p>This mode also includes new exceptions. <code>Up()</code> can be used if the code is taken to extreme. There is a special <code>Party()</code> exception which also returns a special promise. That way you can chain exceptions:</p>
<p><code>throw Party().then( throw Up(); )</code></p>
<p>While these new modes are helpful, the TC39 committee realizes they are still to restrictive to be useful is some cases. For ES6, the plan is to release subsections of each from which you can pick and choose. It will be called&#8230;</p>
<div style='height: 40px;'></div>
<p>Wait for it&#8230;</p>
<div style='height: 40px;'></div>
<p><strong>ala mode</strong> </p>
<div style='height: 40px;'></div>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/ecmascript-5-strict-mode-alternatives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Top 1,000,000 jQuery Plugins</title>
		<link>http://clubajax.org/the-top-1000000-jquery-plugins/</link>
		<comments>http://clubajax.org/the-top-1000000-jquery-plugins/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 23:48:08 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[humor]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=2211</guid>
		<description><![CDATA[You can now stop wasting your time with measly lists that brag on showing the top 10, 20, or 50 jQuery plugins. Club AJAX brings you the ultimate list to end all lists: The Top 1,000,000 jQuery Plugins. These are not your run of mill, average plugins. These are the best of the very best. [...]]]></description>
			<content:encoded><![CDATA[<p>You can now stop wasting your time with measly lists that brag on showing the top 10, 20, or 50 jQuery plugins. Club AJAX brings you <strong>the ultimate list to end all lists</strong>: <em>The Top 1,000,000 jQuery Plugins</em>.</p>
<p>These are not your run of mill, average plugins. These are the best of the very best. the cream of the crop, the cream of mushroom, the cream of tartar. We don&#8217;t have time for mediocrity so they are stricken. Dead to us.</p>
<ol>
<li><span style="font-size: 13px;"><strong>Image Carousel</strong> &#8211; Converts a series of pictures into a a 3D spinning carousel.</span></li>
<li><span style="font-size: 13px;"><strong>Carouselify</strong> &#8211; Carouselify your images!</span></li>
<li><span style="font-size: 13px;"><strong>Carouselifyer</strong> &#8211; A plugin that carouselifies your images</span></li>
<li><span style="font-size: 13px;"><strong>Carousel Carouselifyer</strong> - Carouselifies carousels, so that while images are spinning in carousels, the carousels are spinning around each other. A very eye catching effect!</span></li>
<li><span style="font-size: 13px;"><strong>makeAwesome</strong> - A plugin that adds awesome things to your page. Images will zoom in and out and open in modal dialog boxes, lists will animate into place, inputs will be<strong> really huge</strong>, and buttons will of course&#8230;. blink.</span></li>
<li><span style="font-size: 13px;"><strong>makeAwesomer</strong> - The successor to the weaker, much less awesome makeAwesome, is makeAwesomer, which includes features lacking from makeAwesome, like creating awesome carousels.</span></li>
<li><span style="font-size: 13px;"><strong>makeUsable</strong> - A plugin that adds usability to your website. It will automatically generate widgets that can handle your 10 megabytes of XML data. One of its key modifiers is removing power-sucking, eyeball-bleeding, user-confusing carousels from the page. It has the added benefit of removing zooming images and blinking buttons.</span></li>
<li><span style="font-size: 13px;"><strong>marginalizer</strong> &#8211; All developers are looking for ways they can be marginalized. This plugin makes it easy!</span></li>
<li><span style="font-size: 13px;"><strong>Poopin&#8217; Unicorns</strong> &#8211; Finally, a way to quickly and easily add unicorn Easter eggs to your webpage.<em> Note: Voted Best jQuery Plugin of 2004!</em></span></li>
<li><span style="font-size: 13px;"><strong>Make It Pretty for Me</strong> &#8211; Go ahead and write crappy code, do your layouts in nested tables within nested tables, position elements with non-breaking spaces, and generate code with dynamic IDs and no class names &#8211; no problem! Just install this plugin and it will style everything perfectly, just as you had it in your mind when you were generating your HTML in Eclipse. No need for a whiny designer.</span></li>
</ol>
<p><span style="font-size: 13px;">To see the remaining plugins, click the link below!</span></p>
<p><a href="https://www.google.com/search?q=programming+languages&amp;aq=f&amp;oq=programming+languages&amp;aqs=chrome.0.57j5j65j0l2j60.3937&amp;sourceid=chrome&amp;ie=UTF-8#hl=en&amp;gs_rn=7&amp;gs_ri=psy-ab&amp;tok=IzmtcbMPXTydwB-qp3HExA&amp;pq=programming%20languages&amp;cp=13&amp;gs_id=1d&amp;xhr=t&amp;q=april+fools+2013&amp;es_nrs=true&amp;pf=p&amp;newwindow=1&amp;safe=off&amp;sclient=psy-ab&amp;oq=april+fools+2&amp;gs_l=&amp;pbx=1&amp;bav=on.2,or.r_cp.r_qf.&amp;bvm=bv.44442042,d.eWU&amp;fp=ed026ff60bd20b9e&amp;biw=1375&amp;bih=647">Link to the remaining 999,999,990 plugins</a></p>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/the-top-1000000-jquery-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web App or Web Site?</title>
		<link>http://clubajax.org/web-app-or-web-site/</link>
		<comments>http://clubajax.org/web-app-or-web-site/#comments</comments>
		<pubDate>Mon, 04 Jun 2012 13:12:32 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[original content]]></category>
		<category><![CDATA[Web app]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=2031</guid>
		<description><![CDATA[When Twitter went to an all-AJAX UI, I cheered that, especially the first real use of AJAX SEO, but I also questioned it. As a front end developer it was great for me to point to as an example of what could be done now and in the future. But I honestly didn&#8217;t understand why [...]]]></description>
			<content:encoded><![CDATA[<p>When Twitter went to an all-AJAX UI, I cheered that, especially the first real use of <a href="http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html">AJAX SEO</a>, but I also questioned it. As a front end developer it was great for me to point to as an example of what could be done now and in the future. But I honestly didn&#8217;t understand why Twitter did that, since I don&#8217;t see Twitter as a web application — it&#8217;s content, like a newspaper, and really should be delivered by server.</p>
<p><a href="http://clubajax.org/wp-content/uploads/2012/05/Server-or-Client-Side.png"><img class="aligncenter size-full wp-image-2034" title="Server-or-Client-Side" src="http://clubajax.org/wp-content/uploads/2012/05/Server-or-Client-Side.png" alt="" width="691" height="219" /></a><br />
<span id="more-2031"></span><br />
Twitter has <a href="http://engineering.twitter.com/2012/05/improving-performance-on-twittercom.html">recently announced</a> they are killing their AJAX-heavy UI, and rolling back to a server-centric design. The reason they cite is &#8220;time to first Tweet&#8221;. With their AJAX UI, the page would need to load, the JavaScript would need to load, execute, examine the URL, request data and wait for it, then finally render the Tweet list. They estimate it took almsot 5 times longer to get to the first Tweet with AJAX as opposed to served HTML. Twitter built a web app, when they really should have built a web site.</p>
<p>In my perspective, there are two basic designs for web development:</p>
<h3>Web apps</h3>
<ul>
<li>Gmail or Google maps would be the prime examples. Google Search would now be considered an app as well.</li>
<li>They should be AJAX heavy, and a single page, because you don&#8217;t want to continually reload the JavaScript.</li>
<li>The server is used only for data and provides APIs. While that API may return JSON, it really should return anything that the client requests. If the client wants a comma delineated list, the server should be able to convert its output on demand.</li>
<li>Typically, web apps do not use SEO and do not have ads.</li>
<li>You can make ads work on an ajaxified page, but this may require some extra knowledge on how the ad network accepts requests, and then you may need to hack the embed code they provide. Google Search can do it because they control the ads. In other words, it&#8217;s something that really needs to be considered before you build it.</li>
</ul>
<h3>Web sites</h3>
<ul>
<li>A blog or a news site would be an example</li>
<li>Should be server heavy and serve pages for SEO and ads, and should be JS light, since that JS needs to load on every new page.</li>
<li>Don&#8217;t confuse an AJAX-heavy web app with a web site that has a lot of (or too much) JavaScript.</li>
<li>Needs to be read by both a browser and search engine crawler. Even though Google claims to be crawling JavaScript, the content needs to be available without it.</li>
</ul>
<p>There are variations of the two, like Facebook, which has a lot of pages and is AJAX-heavy.</p>
<h3>Considerations</h3>
<p>Sometimes the decision is not so easy though. You may have ideological developers to contend with. These developers could be over zealous JavaScript crazy freaks who want to build the entire site dynamically with JavaScript. But often the ideology originates from CS graduates who have been &#8220;doing it this way&#8221; for 15 years and see no reason to change &mdash; or don&#8217;t know why they should.</p>
<p>A web app should be a single page for a reason. The back end should focus on data, business logic, and workflow. If it&#8217;s a complex UI that can put a significant burden on their code. What if there are tabs within tabs? Don&#8217;t forget to maintain the browser history. That Back button needs to work.</p>
<p>Web apps can also get too large. I worked on an app with 3 megabytes of JavaScript, which probably should have been broken into a couple of pages. The code did lazy load, but when it was all loaded you were using a lot of memory.</p>
<p>When Club AJAX was first launched, it used AJAX to load the pages. This didn&#8217;t work very well for SEO, and there was no easy way to include ads <em>(not that I ever wanted ads&#8230; Bob!)</em>. The site also wasn&#8217;t easily expandable. For all its warts, WordPress, with discrete pages, was really the way to go.</p>
<p>Finally, it&#8217;s a very small segment of users, but some do turn their JavaScript off. This would pretty much eliminate any shopping site from being a web app, unless you can justify turning away a small percent of revenue. But JavaScript is always turned on by default, so those users know how to turn it back on. If it&#8217;s a very interactive site, like maybe with dynamic charts, it could cost you more to accomodate those users.</p>
<h3>Conclusion</h3>
<p>While there are two primary architecture styles, web app and web site, most projects are a hybrid of the two. Even the current version of Twitter pushes the initial set of Tweets to the page in the markup and provides the rest via AJAX. And it&#8217;s rare today to find a web site that does not have some degree of JavaScript, and often enough to consider it an &#8220;app&#8221;. Ad networks and SEO are both evolving too, so there are increasingly fewer reasons a web app can&#8217;t do it all.</p>
<p>Web development is evolving to be more client-side oriented. But even in cases of server-heavy sites, the front end developer needs to be more involved in the design and architecture. They tend to bring a more user-focused point of view to the project while back end devs tend to bring a more data-centric point of view.</p>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/web-app-or-web-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Douglas Crockford PayPal Interview Questions</title>
		<link>http://clubajax.org/douglas-crockford-paypal-interview-questions/</link>
		<comments>http://clubajax.org/douglas-crockford-paypal-interview-questions/#comments</comments>
		<pubDate>Wed, 30 May 2012 13:27:51 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=2007</guid>
		<description><![CDATA[JavaScript guru Douglas Crockford has left Yahoo, the company he is most associated with, and has joined eBay&#8217;s PayPal. However, PayPal&#8217;s decision to hire Mr. Crockford was not an easy one. He went through a grueling interview process. Club AJAX has managed to get ahold of the transcript of that interview, and we have posted [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://tctechcrunch2011.files.wordpress.com/2012/05/crawford-once-more.jpg?w=150" alt="Douglas Crockford" class="alignleft"/>JavaScript guru Douglas Crockford has <a href="http://techcrunch.com/2012/05/13/paypal-gets-its-own-share-of-the-yahoo-diaspora-hires-java-icon-douglas-crockford/">left Yahoo</a>, the company he is most associated with, and has joined eBay&#8217;s PayPal.</p>
<p>However, PayPal&#8217;s decision to hire Mr. Crockford was not an easy one. He went through a grueling interview process. Club AJAX has managed to get ahold of the transcript of that interview, and we have posted the top ten questions Mr. Crockford was asked.<br />
<span id="more-2007"></span></p>
<h3>Top Ten Douglas Crockford PayPal Interview Questions</h3>
<ol reversed class="topten" style="font-size:32px;">
<li>Would you be willing to learn JavaScript?</li>
<li>Have you ever used JSON? (Don&#8217;t worry, you just eval some text.)</li>
<li>Do you know JSLint? If not we have a Wiki to explain it to you. I hope you use semi-colons.</li>
<li>We do brown bag lunches with as many as ten people. Can you speak in front of such large crowds?</li>
<li>We see your PayPal rating is not above 95%. Could you explain?</li>
<li>If you were a fish, what kind of fish would you be?</li>
<li>We can&#8217;t pay market rates&#8230; would you be interested in stock options?</li>
<li>Did you come to us through a recruiter?</li>
<li>Do you see yourself, say in 5 years or so, using a <strong>real</strong> programming language?</li>
<li style="font-size:24px; line-height:1.5em;">The opening is for someone who knows JavaScript, CSS, HTML5, Node.js, Flash ActionScript, SEO, UI and UX design, mobile UI design, PHP, MySQL, Sharepoint, Microsoft Team Foundation Server, C# and SQL, C++, Java, Groovy, Spring, GWT, and Oracle DB with an expertise in database indexing &mdash; but currently we store all our data in Excel files&#8230; do you know Excel?</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/douglas-crockford-paypal-interview-questions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Dear John Letter to Firefox</title>
		<link>http://clubajax.org/a-dear-john-letter-to-firefox/</link>
		<comments>http://clubajax.org/a-dear-john-letter-to-firefox/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 13:58:47 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[original content]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[H264]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=1974</guid>
		<description><![CDATA[Dear Firefox, We met when you were 1.5, and started dating when you were 2.0. We enjoyed making fun of my clueless ex, Internet Explorer. IE seemed great at the time, but you showed me the error of my ways. IE was selfish and wanted to do everything its own way. You truly believed in [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://clubajax.org/wp-content/uploads/2012/04/FirefoxLetter.jpg" alt="Dear Firefox Letter" title="FirefoxLetter" width="690" height="173" class="aligncenter size-full wp-image-1975" /><br />
Dear Firefox, </p>
<p>We met when you were 1.5, and started dating when you were 2.0. We enjoyed making fun of my clueless ex, Internet Explorer. IE seemed great at the time, but you showed me the error of my ways. IE was selfish and wanted to do everything its own way. You truly believed in collaboration and gratefully accepted suggestions. When you brought Firebug to the party, I became deeply committed to our relationship. Before Firebug I had no idea how difficult my life was, or the abuse of &#8220;error on line 0 character 0&#8243;; or blank, failed, pages and the silent treatment. You were very up-front with my errors, and kept life spicy with tabs, smart bookmarks, and an Awesome Bar that was truly awesome. Sure you didn&#8217;t load pages as fast as the other browsers, but I&#8217;m not greedy and the most important thing in my life was never&#8230; &#8220;cache&#8221;. Life was never boring, and at the nearest hint that it was, you would whisper in my ear, &#8220;I have a new AddOn&#8230;&#8221; And boy oh boy, I&#8217;ll never forget the first night with that Greasemonkey.<br />
<span id="more-1974"></span><br />
<img src="http://clubajax.org/wp-content/uploads/2012/04/browsers.jpg" alt="browsers" title="browsers" width="150" height="167" class="alignright size-full wp-image-1981" style="margin-left:20px;" />Soon after, other browsers began vying for attention. Safari spawned Webkit, Opera was talking about an HTML5 thing, and Chrome had a hot V8 engine. I honor my commitments, and planned to spend the rest of my career with you. I know the grass is always greener, and it&#8217;s important to love the one you&#8217;re with, and many more cliches, songs and metaphors. </p>
<p>But relationships are a two way street. </p>
<p>At first, I thought the fact that you didn&#8217;t play well with Flash was funny. I mean, you and I are all about HTML5, right? You put Flash in a (sand) box, kneed it in the groin, and we <em>laaaaaa-ughed</em>!</p>
<p>However, I work with video a lot. I understood your attraction to Ogg Vorbis, I really did. But nobody else wanted to play with your hippy friend. Later, I was as excited as you when your rich Uncle Google introduced WebM to everybody. WebM was so charming and intelligent &mdash; all the developers were swooning. But WebM had skeletons in the closet and just didn&#8217;t make good on its promises. Then WebM was stood up by none other than&#8230; Flash. You know you&#8217;ve hit rock bottom when the town drunk stands you up.</p>
<p><img src="http://clubajax.org/wp-content/uploads/2012/04/KittenInMicrowave.jpg" alt="Kitten In Microwave" title="KittenInMicrowave" width="320" height="195" class="alignright size-full wp-image-1978" style="margin-left:20px;" />I&#8217;m glad to see you are opening up to the idea of H264. Your ideals were great, but we can&#8217;t live on a commune eating tofu forever. Don&#8217;t get me wrong, no love is lost on H264, or as I call it, H666, that patent troll who comes to every party claiming someone stole its idea for chip dip. Thanks to you and your rich uncle, H264 was afraid nobody would play, and so agreed to never charge admission. It&#8217;s time to help the web move on and think about other things. H264 may be evil, but it&#8217;s not kittens in the microwave. </p>
<p>Firefox, I can overlook all those things. You&#8217;ve been making it tough, but that&#8217;s okay &mdash; life is tough. But something serious has come up. I noticed you had memory problems since 3.0. I thought it might get better over time, but you&#8217;re 11 now. Your memory is starting to interfere with our relationship.</p>
<p>Which leads to a confession I have to make. A developer has needs. I&#8217;ve been seeing your cousin Chrome on the side.</p>
<p>My wandering eye started with video. Choppy, stuttering, almost unwatchable video. Yes, it was in large part due it playing through that mentally challenged plugin, but you didn&#8217;t leave much option, did you? Oh sure, you use HTML5 to play WebM and Ogg beautifully&#8230; but you know what pages use WebM and Ogg? NONE OF THEM! </p>
<p>Recently at a party when you were chatting with your highfalutin W3C friends about whether video should have a fullscreen API, or whether images should be allowed in canvas cross domain, Chrome cornered me in the bathroom. With trembling fingers, I began opening webpages that had videos. And guess what? </p>
<p>I liked it.</p>
<p>I never meant for it to happen. It was just one of those things. I became witness to a new world where a video would play from beginning to end without a stutter. Even more exciting, I discovered that I could actually smoothly scroll pages again. Don&#8217;t pretend to be shocked Firefox, you know what I&#8217;m talking about! How you give me the cold shoulder and freeze everything while you battle your memory-management Tourette&#8217;s Syndrome as I try and scroll a page that is still loading. Which as mentioned, you take your sweet time to do. </p>
<p>Sorry. I didn&#8217;t mean to get angry. I tried looking the other way. I tried reading email while you were busy being busy. But it&#8217;s gotten so bad that people are starting to blame my code for being slow. I hate to say this, but Firefox, it&#8217;s not me&#8230; it&#8217;s you.</p>
<p>We&#8217;ve had some good times. I never thought of myself as the type who needed a trophy wife, but Firefox, I deserve better. Chrome is hot, available, and every time I look, I see her heaving that ample bosom. </p>
<p>But don&#8217;t worry &mdash; we&#8217;ll continue to see each other since we share 20% custody of users.</p>
<p>By the way, there is someone named MP3 I&#8217;d like you to talk to&#8230;</p>
<p>Sincerely,<br />
Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/a-dear-john-letter-to-firefox/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>HCI Breakthrough: No More Keyboards!</title>
		<link>http://clubajax.org/hci-breakthrough-no-more-keyboards/</link>
		<comments>http://clubajax.org/hci-breakthrough-no-more-keyboards/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 01:34:35 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[humor]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[original content]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=1955</guid>
		<description><![CDATA[First we had keyboards, then we had a mouse, then we had a stylus, then we had touchscreens. Now&#8230; none of the above! Built by Rapiscan, thanks to help from from a six billion grant from the federal government, this new, simple device uses a completely unobtrusive set of electronic sensors that detects the slightest [...]]]></description>
			<content:encoded><![CDATA[<p>First we had keyboards, then we had a mouse, then we had a stylus, then we had touchscreens. Now&#8230; none of the above!</p>
<p>Built by <a href="http://www.rapiscansystems.com/">Rapiscan</a>, thanks to help from from a six billion grant from the federal government, this new, simple device uses a completely unobtrusive set of electronic sensors that detects the slightest shift in brain activity and translates it into alphanumeric data.</p>
<p>The futuristic technology is on display in the following image which depicts a high-end developer writing code by only thinking.<br />
<span id="more-1955"></span></p>
<div style="margin:70px 0">
<img src="http://clubajax.org/wp-content/uploads/2012/04/electroshock.jpg" alt="" title="electroshock" width="400" height="300" class="aligncenter size-full wp-image-1957" />
</div>
<p>Of course, this technology is brought to you by the same trusted company that builds the trusted and completely safe Backscatter X-Ray machines that are installed in every neighborhood airport. Continuing with that track record of complete safety, the new keyboard-less input device keeps you completely protected with state of the art grounding straps:</p>
<div style="margin:70px 0">
<img src="http://clubajax.org/wp-content/uploads/2012/04/electroshock-feet.jpg" alt="" title="electroshock-feet" width="500" height="316" class="aligncenter size-full wp-image-1958" />
</div>
<p>The next step for the Rapiscan keyboard-less input? To take your thoughts which may not even be thoughts and translate them into thoughts and then translate that into perfectly legible language.</p>
<div style="margin:70px 0">
<img src="http://clubajax.org/wp-content/uploads/2012/04/babycode.jpg" alt="" title="babycode" width="700" height="429" class="aligncenter size-full wp-image-1965" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/hci-breakthrough-no-more-keyboards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5: Undocumented IE6 Mode</title>
		<link>http://clubajax.org/html5-undocumented-ie6-mode/</link>
		<comments>http://clubajax.org/html5-undocumented-ie6-mode/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 00:28:01 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[original content]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=1944</guid>
		<description><![CDATA[EDIT: Due to the insistence and flurry of comment activity, links have been added throughout the post for reference. Thank you so much to all my fans! There is an undocumented feature in HTML5: &#8220;IE6 mode&#8221;. After all the pain and suffering all these years, all we had to do was: &#60;script&#62; "IE6 mode" &#60;/script&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>EDIT: Due to the insistence and flurry of comment activity, links have been added throughout the post for reference. Thank you so much to all my fans!</em></strong></p>
<p>There is an <a href="https://www.google.com/search?q=april+fools">undocumented feature</a> in HTML5: &#8220;IE6 mode&#8221;. After all the <a href="https://www.google.com/search?q=april+fools">pain</a> and <a href="https://www.google.com/search?q=april+fools">suffering</a> all these years, all <a href="https://www.google.com/search?q=april+fools">we</a> had to do was:</p>
<pre><code>
&lt;script&gt;
"IE6 mode"
&lt;/script&gt;
</code></pre>
<p><span id="more-1944"></span><br />
Here is how <a href="https://www.google.com/search?q=april+fools">Club AJAX</a> <a href="http://ie6ify.com/">looks in IE6</a> without the feature:</p>
<div style="text-align:left;">
<img src="http://clubajax.org/wp-content/uploads/2012/04/clubajax-ie6.jpg" alt="" title="clubajax-ie6" width="618" height="377" class="size-full wp-image-1945" />
</div>
<p>And here is <a href="https://www.google.com/search?q=april+fools">how it looks</a> when I add the <a href="https://www.google.com/search?q=april+fools">simple code</a> as shown above:</p>
<div style="text-align:left;">
<img src="http://clubajax.org/wp-content/uploads/2012/04/clubajax-normal.jpg" alt="" title="clubajax-normal" width="535" height="367" class="size-full wp-image-1946" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/html5-undocumented-ie6-mode/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Basic Photoshop Etiquette</title>
		<link>http://clubajax.org/basic-photoshop-etiquette/</link>
		<comments>http://clubajax.org/basic-photoshop-etiquette/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 22:20:27 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[Graphical Design]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[original content]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=1919</guid>
		<description><![CDATA[This happens to me constantly, but I only design a small part of my work week. I imagine this happens to full time designers enough to drive them mad. When you send a Photoshop document to another designer, pay some attention to how the layers and groups are named. It&#8217;s really hard managing the file [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://clubajax.org/wp-content/uploads/2012/02/PhotoshopLayers.png" alt="Photoshop Layers" title="Photoshop Layers" width="372" height="751" class="alignleft size-full wp-image-1920" />This happens to me constantly, but I only design a small part of my work week. I imagine this happens to full time designers enough to drive them mad.</p>
<p>When you send a Photoshop document to another designer, pay some attention to how the layers and groups are named. It&#8217;s really hard managing the file of someone else where everything in it is named Layer 2, Layer 2 copy, Layer 2 copy 8, etc., etc. The first thing I generally do is start toggling the visibility of each to figure out which is which and naming things accordingly. But ironically, this has even burned me in the past. The sender actually had the nerve to complain that I wasn&#8217;t able to send the file back with changes because it no longer matched his &#8220;layer structure&#8221;. </p>
<p>And you know, I guess I also disrupted the communication as now we can&#8217;t refer to Layers in the file: <em>&#8220;Look at Layer 13 copy 12. No, no, the <strong>other</strong> Layer 13 copy 12 in group 3 copy 6.&#8221;</em></p>
<p>I&#8217;m just saying, garbage in, garbage out. Show some professional courtesy before you send that PSD.</p>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/basic-photoshop-etiquette/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>February Meeting &#8211; SMACKDOWN</title>
		<link>http://clubajax.org/february-meeting-smackdown/</link>
		<comments>http://clubajax.org/february-meeting-smackdown/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 17:27:45 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[humor]]></category>
		<category><![CDATA[Meeting]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=1912</guid>
		<description><![CDATA[The SMACKDOWN is back! Bob and Mike will go back and forth showing JavaScript tips and tricks, continually escalating and outdoing each other with masterful one-upmanship! The winner gets the eternal mantel of JavaScript guru and the loser &#8211; gets put to DEATH! We will also do ajax news.]]></description>
			<content:encoded><![CDATA[<p>The SMACKDOWN is back! Bob and Mike will go back and forth showing JavaScript tips and tricks, continually escalating and outdoing each other with masterful one-upmanship! The winner gets the eternal mantel of JavaScript guru and the loser &#8211; gets put to DEATH!</p>
<p>We will also do ajax news.</p>
<p><img src="http://clubajax.org/wp-content/uploads/2012/02/Smackdown.jpg" alt="" title="Smackdown" width="600" height="471" class="aligncenter size-full wp-image-1910" /></p>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/february-meeting-smackdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Context, Call and Bind &#8211; Ninja Level</title>
		<link>http://clubajax.org/javascript-context-call-and-bind-ninja-level/</link>
		<comments>http://clubajax.org/javascript-context-call-and-bind-ninja-level/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 14:59:46 +0000</pubDate>
		<dc:creator>Mike Wilcox</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[original content]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[constructor]]></category>
		<category><![CDATA[context]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[Object Oriented]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[scope]]></category>

		<guid isPermaLink="false">http://clubajax.org/?p=1823</guid>
		<description><![CDATA[In my previous article I showed the differences between scope and context, basic problems that arise and how to fix them. If you are just using some JavaScript and maybe jQuery, an understanding of scope is all that is needed to get you by. Once you start using objects or namespaces however, you&#8217;ll start to [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a title="JavaScript Scope and Context – Not the Same Thing!" href="http://clubajax.org/javascript-scope-and-context-not-the-same-thing/">previous article</a> I showed the differences between scope and context, basic problems that arise and how to fix them. If you are just using some JavaScript and maybe jQuery, an understanding of scope is all that is needed to get you by. Once you start using objects or namespaces however, you&#8217;ll start to run into issues with context and will need to use the keyword <code>this</code>. But when you get into object oriented JavaScript, you&#8217;ll need an advanced understanding of context and how to make it work for you. To do this, we&#8217;ll use the <code>call()</code> and <code>apply()</code> methods, and then a backwards compatible version of the new feature Mozilla recently released in JavaScript 1.8.5 called <code><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind">bind()</a></code>.<br />
<img class="aligncenter size-full wp-image-1867" title="JavaScript Function Context Bind" src="http://clubajax.org/wp-content/uploads/2011/12/FunctionContextBind.jpg" alt="JavaScript Function Context Bind" width="730" height="142" /><br />
<span id="more-1823"></span></p>
<h3 title="wtf">Who the Hell Would Ever Use this F@#ing Language Anyway?</h3>
<p>The title of this section is dedicated to a one-time Club AJAX attendee who looked at the next example and was so frustrated at how little he understood it, he started blurting out obscenities. Needless to say, he is now sentenced to life, doing Java.</p>
<p>So, to paraphrase Jack Nicholson&#8230; wait until you get a load of this:</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=AdvancedBrokenContext.js"></script><br />
<figcaption> Example #1 &#8211; Advanced Broken Context<br />
 </figcaption>
</figure>
<p><em>&#8220;Waitaminute!&#8221;</em> I hear you say. <em>&#8220;I applied the context to the function, and <code>onTimeout</code> fired — why didn&#8217;t <code>this.x</code> resolve? And who the hell would ever use this language, anyway?&#8221;</em></p>
<p>I empathize, really. But remember, you don&#8217;t know how to paint without knowing about the color red, and you can&#8217;t really say you know JavaScript unless you know about context and all of its pitfalls. When you are able to understand this concept, it will elevate you from just a guy who writes some JavaScript to outright NINJA!</p>
<p>Before we can decipher why the previous example doesn&#8217;t work, let&#8217;s change it up so we can better break down the issues.</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=AdvancedBrokenContextVariation.js"></script><br />
<figcaption> Example #2 &#8211; Advanced Broken Context Variation<br />
</figcaption>
</figure>
<p>Example #2 basically substitutes <code>otherMethod</code> for <code>setTimeout</code>, so we can side step that particular nuance for now. This example shows a similar situation: we are passing a method to another method and trying to invoke it. However, <code>this.x</code> is still undefined. The reason for this is kind of tricky.</p>
<p>Yes, we used <code>this</code> with <code>onTimeout</code>. But we only used <code>this</code> in order to <em>find</em> <code>onTimeout</code>, we didn&#8217;t use it to <em>invoke</em> <code>onTimeout</code>. If we didn&#8217;t use <code>this</code>, we would get an error saying the function <code>onTimeout</code> is not found, which makes sense, because that would indicate we want a function (as in, <code>var onTimeout();</code>), but what we really want is a method. So we use <code>this</code>, to get the method, and pass it to <code>this.otherMethod</code>.</p>
<div class="example">Refresher: Methods are associated to objects like: <code>object.myMethod = function(){}</code>; while functions are not: <code>var myFunc = function(){}</code>.</div>
<h3 title="theReason">The Reason</h3>
<p>Ironically, if <code>m()</code> or <code>otherMethod()</code> invoked <code>this.onTimeout</code>, it would work. But when we retrieved the method we sort of &#8220;extracted it&#8221; from the object, and passed it as a <em><strong>variable</strong></em>, of a <em><strong>function</strong></em> if you will. It&#8217;s no longer a <em>method</em>, it&#8217;s just a function with no call object bound to it. So we need to re-bind <code>this</code>, which we can do with the <code>call()</code> method:</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=AdvancedBrokenContextVariationFixed.js"></script><br />
<figcaption> Example #3 &#8211; Advanced Broken Context Variation Fixed<br />
 </figcaption>
</figure>
<div class="example">NOTE: The ECMAScript documentation refers to a method&#8217;s bound object as its <em>activation</em> object. David Flanagan, author of <a href="http://www.davidflanagan.com/javascript5/">JavaScript: The Definitive Guide</a> refers to it as a <em>call</em> object, which I like, because you can assign context with a function&#8217;s <code>call</code> method.</div>
<h3 title="isBroken">Is &#8220;this&#8221; Broken?</h3>
<p>We fixed it, but I sense dissatisfaction in you, young Skywalker. <em>&#8220;Why should I jump through these hoops? This language is broken!&#8221;</em> I agree that this aspect is at the least confusing and seems just plain wrong. But there is a reason for this behavior, believe it or not. Remember, JavaScript functions are just data and can be passed around as such.</p>
<p>Okay, if you don&#8217;t believe me, perhaps you&#8217;ll believe Brendan Eich from <em><a href="http://www.aminutewithbrendan.com/pages/20110303">this Talk</a></em>:</p>
<blockquote><p>
[The reason for the keyword "this"] is I wanted functions, which are the main idea in JavaScript, to also be methods; and for them to be methods, they had to have a receiving object who&#8217;s property was the value of that function.
</p></blockquote>
<p>That explanation was a bit&#8230; recursive. Perhaps a simple exercise will help. In Example #4, one object copies a method from another. What should be logged, 10 or 20?</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=CopiedMethod.js"></script><br />
<figcaption> Example #4 &#8211; Copied Method<br />
</figcaption>
</figure>
<p>If you answered 20, you&#8217;d be correct. Even though <code>o.m</code> was copied as data, it was still invoked on the last line with the <code>o2</code> object, which set its context. But you may see what the issue would be if a copied method carried its context around. Then the answer would be 10, derived from the original object. That would make JavaScript look even more broken.</p>
<p>The following is another example of the use of <code>call()</code>. You can borrow a method from one object and apply it to another object temporarily:</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=BorrowedMethod.js"></script><br />
<figcaption> Example #5 &#8211; Borrowing a Method from another Object<br />
 </figcaption>
</figure>
<p>In Example #5, <code>o.changeProps(1);</code> invokes as normal, but the last line, <code>o.changeProps.call(<strong>o2</strong>, 1);</code> calls that same method, yet invokes it within a different object. Admittedly, this example is a bit contrived and is probably making you squirm from all the best practices it violates. But it does show the versatility of the language and exactly how <code>call</code> works.</p>
<div class="example">Note: The first argument of <code>call()</code> should be an activation object and all arguments after that will be passed to the method. <code>apply()</code> works just like <code>call()</code> except the second argument should be an array and is often used to pass the arguments object.</div>
<p>Now that we have a better understanding of context and how to fix it, we can readdress the problem in Example #1. However, we can&#8217;t use <code>call()</code> to fix the context, because that would have to happen within the <code>setTimeout</code> function and we can&#8217;t change native code. Well, we <em>could</em>, but that would be like trying to waterproof a screen with a toothpick. Because the same problem will arise again and again, in callbacks, connections, and myriad other places. We have a better way.</p>
<h3 title="bind">Bind</h3>
<p>The problem can be fixed with the new <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind">bind</a> method in JavaScript.1.8.5. And in spite of the complexity of the problem, the solution is really quite simple:</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=AdvancedBrokenContextFixed.js"></script><br />
<figcaption> Example #6 &#8211; Advanced Broken Context Fixed<br />
</figcaption>
</figure>
<p>Now that <code>this</code> is bound <code>this.setTimeout</code>, we can pass it around and it won&#8217;t lose its context. And that&#8217;s it! Fixed! Good night nurse!</p>
<p>What&#8217;s that? Does this work in <em><strong>what</strong></em> other browser? Hm, I promised some sort of ninja status, didn&#8217;t I? That would necessitate some sort of explanation.</p>
<h3 title="bindUnderHood">Bind Under the Hood</h3>
<p>First of all, no, this does not work in <em>that</em> browser, but we can home brew a utility method that does, which we will add it to the prototype object of the Function constructor. Ever added the <code>forEach</code> method to Arrays? We&#8217;re doing the same thing here except with the Function&#8217;s prototype.</p>
<p>What we need to do is take our existing function and the context passed, and create a newly bound function. We are not going to return the bound function directly because if we did, it would fire immediately, which we don&#8217;t want. We are passing the bound function as data to be invoked later. Therefore we need to return <em>another</em> function that has the bound function inside it.</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=SimpleBindPrototype.js"></script><br />
<figcaption> Example #7 &#8211; Simple Bind Prototype<br />
 </figcaption>
</figure>
<p>You&#8217;ll notice that the function is bound with <code>apply()</code> instead of <code>call()</code>. This is because our utility code has no idea how many arguments may be passed, and <code>apply()</code> handles a variable amount&#8230; of variables.</p>
<p>Include the <em>Simple Bind Prototype</em> early within your code, and Example #6 will work — in all browsers.</p>
<h3 title="nativeBad">But Extending Native Objects is Bad</h3>
<p>Oh, so you&#8217;re one of those purists who believes you shouldn&#8217;t mess with native objects eh? That&#8217;s okay, I&#8217;m concerned about that too. The tide is shifting a bit in the JavaScript library developers community that <a href="http://perfectionkills.com/page/2/">it&#8217;s okay to extend native objects</a> (not host objects) — as long as those extensions are to fix gaps in weaker browsers with standardized functionality. And of course if it&#8217;s your code, you can do whatever you want!</p>
<p>And&#8230; what you want is to <strong>not</strong> extend the native object? That&#8217;s actually a good thing here, because the wrapper-implementation is a little more clear in how it works as there isn&#8217;t the confusion of what &#8220;this&#8221; is, as in Example #7.</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=SimpleBind.js"></script><br />
<figcaption> Example #8 &#8211; Simple Bind<br />
</figcaption>
</figure>
<p>If using the wrapper implementation, you would change the code from <code>setTimeout(this.onTimeout.bind(this), 1);</code><br />
to:<br />
<code>setTimeout(bind(this.onTimeout, this), 1);</code></p>
<p>The bind method passes the argument object, which is quite handy on callbacks. The following example is a recreation of a callback mechanism, which demonstrates how variables are passed:</p>
<figure><script type="text/javascript" src="https://gist.github.com/1396395.js?file=PassVars.js"></script><br />
<figcaption> Example #9 &#8211; Passing Variables<br />
</figcaption>
</figure>
<h3 title="MozillaImplementation">The Mozilla Implementation</h3>
<p>You may have taken a peak at the <a title="Mozilla MDN - Bind" href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind">Mozilla bind page</a>, which would be only natural since I linked to it. I didn&#8217;t recreate their functionality because it&#8217;s a bit complex. Our solution handles 95% of what you would ever do with <code>bind()</code>, while theirs handles new concepts like binding to instance constructors and Arrays. But feel free to experiment!</p>
<h3 title="Conclusion">Conclusion</h3>
<p>Congratulations. If you made it this far into the blog and haven&#8217;t reached for a bottle of aspirin, bottle of alcohol, or a noose, that means you&#8217;ve managed to absorb one of the hardest concepts in JavaScript. Context is the key differentiator between JavaScript and all the other major languages.</p>
]]></content:encoded>
			<wfw:commentRss>http://clubajax.org/javascript-context-call-and-bind-ninja-level/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
