<?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>@chrismjones</title>
	<atom:link href="http://christopherj.us/feed/" rel="self" type="application/rss+xml" />
	<link>http://christopherj.us</link>
	<description>Rants on UI, UX, and Javascript</description>
	<lastBuildDate>Mon, 30 Aug 2010 03:23:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Piwik 1.0, First Impressions</title>
		<link>http://christopherj.us/piwik-1-0-first-impressions/</link>
		<comments>http://christopherj.us/piwik-1-0-first-impressions/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 03:08:10 +0000</pubDate>
		<dc:creator>Christopher Jones</dc:creator>
				<category><![CDATA[Stuff and Junk]]></category>

		<guid isPermaLink="false">http://christopherj.us/?p=541</guid>
		<description><![CDATA[Piwik, the self-proclaimed alternative to the widely used Google Analytics, released version 1.0 on the sly sometime yesterday. I&#8217;ve been keeping an eye on Piwik for the past month or so, watching its trac list for v1.0 slowly being whittled down, and generally have been impatient. So as I surfed my usually gamut of sites [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://piwik.org/">Piwik</a>, the self-proclaimed alternative to the widely used Google Analytics, released version 1.0 on the sly sometime yesterday. I&#8217;ve been keeping an eye on Piwik for the past month or so, watching its trac list for v1.0 slowly being whittled down, and generally have been impatient. So as I surfed my usually gamut of sites this warm Sunday evening, I remembered that Piwik has a habit of getting a lot done on weekend (devs must have day jobs), and so here we are, with Piwik v1.0 discovered and installed. So, first impressions...</p>
<p>The install is very WordPress-like, if you have ever installed that. FTP the piwik files to your server and run their installer in your browser. They do some server checks to make sure everything uploaded correctly (I had to go back and explicitly upload 3 files in binary mode) and to verify that you have php, mysql, etc. They then ask for the database they are going to be creating tables in, and the site you want tracked first. They then spit out a bit of javascript for you to put on the pages you want tracked (I chose this blog as my experiment), and you&#8217;re done with the installer. Copy that bit of javascript over to the footer of the site you want tracked and you are completely done. For analytics software, it doesn&#8217;t get much easier to install.</p>
<figure>
<a href="http://christopherj.us/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-10.00.13-PM.png"><img src="http://christopherj.us/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-10.00.13-PM.png" alt="" title="Piwik - Dashboard" width="880" height="405" class="aligncenter size-full wp-image-550" /></a></p>
<figcaption>My Rearranged Dashboard</figcaption>
</figure>
<p>On to the dashboard. What can I say? It&#8217;s analytics. The first thing you see is a line chart of the visitors for the past months. Also easily visible are charts/tables for the length of visits, browsers used, and keywords. The live stats are my personal favorite. As a test, I clicked on a page on this site, and by the time I tabbed back over to piwik, it had recorded the click (complete with browser, OS, screen res, etc). More importantly, there are a ton of widgets, and you can build your own, to add to the dashboard. Oh, and you can drag them around the page to be wherever you want. Still deciding if it is gimmicky. I think that you can add your own widgets means that it is not. Often, these sort of interfaces mean the design team refused to make hard decisions and opted to pass it off to the user. But since the person is allowed to add their own whatevertheywant to the page, it works. Some of the charts have a feature that allows you to view the data in multiple forms, meaning I never have to see a pie chart again, and isn&#8217;t that worth whatever downsides Piwik might have? Of course, it also stinks of the common open source problem of &#8216;too much choice&#8217;. But it is open source, so that is to be expected. And as this is an analytics package with, I suspect, power users as the primary audience, it can even be forgiven. The geek in me certainly doesn&#8217;t mind all the buttons.</p>
<p>Since I just installed Piwik in the past hour, I haven&#8217;t gotten to all of the other features you might want to try out. But they track all sorts of actions, and you can set goals and whatnot, as you would expect. What I did do was add another website to see how much of a hassle that was. It was actually very simple. A click over to Settings->Websites->Add a Website, and there you type in the site&#8217;s info and you&#8217;re done. Again, they give you some tracking javascript, which you can get back to at any time, and voilà. What I thought was especially nice is that in the same place you can list excluded ip address and excluded parameters (by default they ignore some common ones, like phpsessid).</p>
<figure><a href="http://christopherj.us/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-9.48.22-PM.png"><img src="http://christopherj.us/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-9.48.22-PM.png" alt="" title="Piwik Admin - Add a Website Screen" width="993" height="452" class="size-full wp-image-546" /></a></p>
<figcaption>Oooo... lots of help text, including your ip. You don&#8217;t want to inflate your numbers, do you?</figcaption>
</figure>
<p>I obviously don&#8217;t know how any of this scales yet, but there are some things in Piwik that show they have thought about how to scale to large websites. Under general settings, there are options about generating archives and how often you should allow Piwik to do so, complete with recommended settings. For large sites, they recommend setting up a cron job for archiving, which is good, as it shows they understand the limits of the what the software can handle.</p>
<p>There are other advanced options that I have not looked into yet. If you don&#8217;t want to use javascript to tracking your site, there is a pixel you can use instead. Note that you can&#8217;t track everything with a pixel that you can with javascript. There is also an API in case you need to give your server the ability to trigger conversions. I haven&#8217;t looked into how complicated or robust it is, but that it exists at all is hopeful for those of us doing more complex transactions. </p>
<p>And that&#8217;s really as far as I have gotten in my looking around Piwik v1.0. If something explodes, I&#8217;ll let you all know. At first glance, I&#8217;m happy with it. Piwik has an <a href="http://demo.piwik.org/index.php?module=CoreHome&#038;action=index&#038;idSite=1&#038;period=week&#038;date=today#module=Dashboard&#038;action=embeddedIndex&#038;idSite=1&#038;period=week&#038;date=today">online demo</a>, which uses their site for data, that you can check out. At the end of the day, Piwik is still something you have to install, which will probably keep it behind Google Analytics for the majority of people. But, if you are like me, and have good business reasons to not agree to Google&#8217;s awful terms of service, Piwik may just be your open source solution.</p>
<p>Ugh... &#8216;open source solution&#8217; sounds like some marketing bs, doesn&#8217;t it? Next thing you know, I&#8217;ll be spouting off about &#8216;Web 3.0&#8242; or some other gag inducing nonsense. I&#8217;m sorry. Go try <a href="http://piwik.org/">Piwik</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://christopherj.us/piwik-1-0-first-impressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Speed Tip of the Day</title>
		<link>http://christopherj.us/jquery-speed-tip-of-the-day/</link>
		<comments>http://christopherj.us/jquery-speed-tip-of-the-day/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 01:04:41 +0000</pubDate>
		<dc:creator>Christopher Jones</dc:creator>
				<category><![CDATA[Stuff and Junk]]></category>

		<guid isPermaLink="false">http://christopherj.us/?p=526</guid>
		<description><![CDATA[Lately I&#8217;ve become a huge fan of performance tweaks in my javascript. So this morning I decided to time some code I was writing. Quite frankly, it was just too slow. This is what I started with... $(&#039;#someDiv&#039;).find( &#039;dl.list:visible input[checkbox]&#039; ); which I then converted into the following after a minute... $(&#039;#someDiv&#039;).find( &#039;dl.list&#039; ) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve become a huge fan of performance tweaks in my javascript. So this morning I decided to time some code I was writing. Quite frankly, it was just too slow.</p>
<p>This is what I started with...<br />
<pre><code>
$(&#039;#someDiv&#039;).find( &#039;dl.list:visible input[checkbox]&#039; );
</code></pre><br />
which I then converted into the following after a minute...<br />
<pre><code>
$(&#039;#someDiv&#039;).find( &#039;dl.list&#039; )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .filter( &#039;:visible&#039; )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .find( &#039;input[checkbox]&#039; );
</code></pre><br />
I honestly was expecting a little, but not a ton. But!!! I got a performance gain from an average of 215ms to an average of 85ms. Over twice the speed on this selector from just adding a filter and another find.</p>
]]></content:encoded>
			<wfw:commentRss>http://christopherj.us/jquery-speed-tip-of-the-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading List</title>
		<link>http://christopherj.us/reading-list/</link>
		<comments>http://christopherj.us/reading-list/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 17:07:25 +0000</pubDate>
		<dc:creator>Christopher Jones</dc:creator>
				<category><![CDATA[Stuff and Junk]]></category>

		<guid isPermaLink="false">http://christopherj.us/?p=516</guid>
		<description><![CDATA[Just a list of the what has caught my eye on the web this past week. Javascript stuff at the top, but it&#8217;s a free for all after that. RequireJS Simple Modules Feedback Patterns for Dry-er Javascript by @rmurphey. Why You Should Pay Attention to Node.js Plugin Enhancements with .queue and .trigger. All of this [...]]]></description>
			<content:encoded><![CDATA[<p>Just a list of the what has caught my eye on the web this past week. Javascript stuff at the top, but it&#8217;s a free for all after that.</p>
<p><a href="http://requirejs.org/docs/why.html">RequireJS</a><br />
<a href="http://tagneto.blogspot.com/2010/07/simple-modules-feedback.html">Simple Modules Feedback</a><br />
<a href="http://blog.rebeccamurphey.com/2010/07/12/patterns-for-dry-er-javascript">Patterns for Dry-er Javascript</a> by @rmurphey.<br />
<a href="http://redmonk.com/sogrady/2010/05/13/node-js/">Why You Should Pay Attention to Node.js</a><br />
<a href="http://enterprisejquery.com/2010/07/create-your-first-jquery-plugin-part-2-revising-your-plugin/">Plugin Enhancements with .queue and .trigger</a>. All of this site is good, really; The queue stuff especially caught my eye.</p>
<p><a href="http://www.uxmatters.com/mt/archives/2010/08/avoid-being-embarrassed-by-your-error-messages.php">Avoid Being Embarrassed by Your Error Messages</a> by Caroline Jarrett<br />
<a href="http://www.nytimes.com/2010/08/15/business/15unboxed.html?_r=1">Innovate, Yes, but Make It Practical</a> &#8211; New York Times<br />
<a href="http://www.huffingtonpost.com/2010/08/08/positive-graffiti-the-mos_n_674761.html#s124254">The Most Uplifting Vandalism Ever (PHOTOS)</a><br />
<a href="http://www.stubbornella.org/content/2010/07/26/woman-in-technology/">Women in Technology</a> by @stubbornella<br />
<a href="http://www.alistapart.com/articles/no-one-nos-learning-to-say-no-to-bad-ideas/">Learning to Say No to Bad Ideas</a> by @whitneyhess</p>
<p>And really, just got read all of Whitney Hess&#8217; blog, <a href="http://whitneyhess.com/blog/">Pleasure &#038; Pain</a>. It kept me up until about 2am earlier this week, which is a rare feat, I assure you.</p>
]]></content:encoded>
			<wfw:commentRss>http://christopherj.us/reading-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checkbox Dropdown... aka WTF, Google?</title>
		<link>http://christopherj.us/checkbox-dropdown-aka-wtf-google/</link>
		<comments>http://christopherj.us/checkbox-dropdown-aka-wtf-google/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 15:53:28 +0000</pubDate>
		<dc:creator>Christopher Jones</dc:creator>
				<category><![CDATA[Stuff and Junk]]></category>

		<guid isPermaLink="false">http://christopherj.us/?p=501</guid>
		<description><![CDATA[A few days ago Google revealed a slightly updated look for Gmail. It has several issues (and some good points), but the one this post is concerned with with the new element they are pushing... the checkbox drop down. If you haven&#8217;t seen it, take a gander below at the pic from Flickr. The poster [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago Google revealed a slightly updated look for Gmail. It has several issues (and some good points), but the one this post is concerned with with the new element they are pushing... the checkbox drop down. If you haven&#8217;t seen it, take a gander below at the pic from Flickr. The poster has been kind enough to even put my thoughts in text on the image itself.</p>
<figure>
<img src="http://farm5.static.flickr.com/4076/4886664008_296beb0fd6_o.png" alt="Gmail new drop down checkbox" title="Gmail's new drop down checkbox" width="218" height="212" class="alignnone" /></p>
<figcaption>Source: <a href="http://www.flickr.com/photos/azaraskin/4886664008/in/photostream/">Flickr</a></figcaption>
</figure>
<p>What is this, indeed, Gmail? What are this elements affordances? Well.. clicking. It inherits the affordances of the elements it combines (checkboxes and select boxes). The trouble is not in this general term of affordance (all of the screen affords clicking), but in perceived affordance. What is the user to expect from clicking that element? The standard labels (or perhaps first item in the case of a select) are not present. The user has only to guess. </p>
<figure>
<img src="http://christopherj.us/wp-content/uploads/2010/08/Screen-shot-2010-08-15-at-10.26.59-AM.png" alt="Gmail&#039;s checkbox drop down" title="Gmail&#039;s checkbox drop down" width="234" height="182" class="aligncenter size-full wp-image-508" /><br />
</figure>
<p>From this more complete view, one might guess from the context, especially if you are a long time Gmail user, that checking that box does a &#8216;select all&#8217; on all those other checkboxes. I even cropped the image to help your guess. And you would be correct. Good job! You won Google&#8217;s version of mystery meat navigation! </p>
<p>Of course, you still don&#8217;t know what type of items are in that drop down.</p>
<p>You only have to look to the Google support forum to find people who thought Gmail has removed all filtering from the site. Now I imagine that Google tested this with users and got a result that said people still used the filters found in that drop down (it has &#8216;select all&#8217;, &#8216;select none&#8217;, &#8216;select read&#8217;, etc, if you hadn&#8217;t guessed). I also imagine that they didn&#8217;t bring anyone into their testing labs and actually look at them while doing this test. Sure, when I first saw the new design, I was still able to use the filters. Much like mystery meat navigation, it is just a matter of trial and error. But if they had just watched the people using it instead of using some software to track usage, I am sure they would have seen the same confused reactions I did in my friends (and that I had myself); One of &#8216;what the heck is that? Let&#8217;s click it and see what happens.&#8217;</p>
<p>This is not the way to design an interface. &#8220;Well, they will figure it out,&#8221; is not good enough. Even if it does save 16px in page height.</p>
]]></content:encoded>
			<wfw:commentRss>http://christopherj.us/checkbox-dropdown-aka-wtf-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript : Click and Double Click on Same Element</title>
		<link>http://christopherj.us/javascript-click-and-double-click-on-same-element/</link>
		<comments>http://christopherj.us/javascript-click-and-double-click-on-same-element/#comments</comments>
		<pubDate>Sun, 23 May 2010 21:22:20 +0000</pubDate>
		<dc:creator>Christopher Jones</dc:creator>
				<category><![CDATA[Stuff and Junk]]></category>

		<guid isPermaLink="false">http://christopherj.us/?p=483</guid>
		<description><![CDATA[As we begin to emulate desktop applications more and more with our web apps, one thing you may come across the need for is a way to get both click and double click to work on the same element without screwing each other up. I spent part of Friday trying to get this exact functionality [...]]]></description>
			<content:encoded><![CDATA[<p>As we begin to emulate desktop applications more and more with our web apps, one thing you may come across the need for is a way to get both click and double click to work on the same element without screwing each other up. I spent part of Friday trying to get this exact functionality to work correctly, so I thought I would make a quick post on what I did.</p>
<p>I&#8217;ll be using a table row as the target of clicks, and jQuery throughout because that is what I use. </p>
<p>So, simple table structure with nothing special except an id on the table for a hook.</p>
<blockquote><p>
<pre><code>
&lt;table id=&quot;myTable&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Row Header&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;tbody&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;&lt;td&gt;Click Me!!!&lt;/td&gt;&lt;/tr&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;&lt;td&gt;Click Me!!!&lt;/td&gt;&lt;/tr&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
</p></blockquote>
<p>See? Nothing special. For whatever reason, we need one action to happen when a user clicks one of those rows, and a different action to happen when the user double clicks. To do that, we will use the dreaded &#8216;setTimeout()&#8217;. You hate it, I know. We are going to use it anyway.</p>
<p>First up, we need two variables.<br />
<pre><code>
/* Variables */
01. var clickTimeout = null,
02.&nbsp;&nbsp;&nbsp;&nbsp; clickDelay = 100; //milliseconds
</code></pre></p>
<p>These, of course, are inside of the closure all your code is in, right? No screwing with the global namespace for us.</p>
<p>Now, I&#8217;m just going to throw all the rest of code at you at once and break some bits down after. Here it is.</p>
<p><pre><code>
03. $(&#039;#myTable tbody tr&#039;).live(&#039;click&#039;, function(){
04.&nbsp;&nbsp;&nbsp;&nbsp; if(clickTimeout){ return; }
05.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
06.&nbsp;&nbsp;&nbsp;&nbsp; clickTimeout = window.setTimeout(function(){
07.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //do whatever you want to do right here
08.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clickTimeout = null;&nbsp;&nbsp;
09.&nbsp;&nbsp;&nbsp;&nbsp; }, clickDelay);
10. })
11. .live(&#039;dblclick&#039;,function(){
12.&nbsp;&nbsp;&nbsp;&nbsp; if(clickTimeout){
13.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clearTimeout(clickTimeout);
14.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clickTimeout = null;
15.&nbsp;&nbsp;&nbsp;&nbsp; }
16.&nbsp;&nbsp;&nbsp;&nbsp; //do whatever you want to do right here
17. });
</code></pre></p>
<p>Lines 3 and 11 just add the click and double click lines, respectively, with jQuery goodness. Line 6 sets up a time out whenever the user clicks a row, with a delay of 100 milliseconds (see lines 9 and 2). So after 100ms, this timeout will fire and do whatever you wanted to do on click. If they only click once, then all is well and this works just fine. </p>
<p>But we need a double click in there and don&#8217;t want the click action to fire if the user double clicks. So see line 12. If &#8216;clickTimeout&#8217; exists (and it will since a click always precedes a double click), then remove it with clearTimeout, thus stopping the click event from ever happening. Then just do whatever you want to do with the double click (line 16).</p>
<p>That is it except for one thing, line 4. Because setTimeout() returns a unique id every time it is called, each click in a double click will get it&#8217;s own timeout event. So without that line, the second click would call setTimeout() again, and that id would replace the one our &#8216;clickTimeout&#8217; variable is storing. But the actual timeout itself is not replaced, just the variable that holds the id! This means that the action from the first click fires even though the double click function clears the timeout from the second click. To prevent this, we simply check to see if clickTimeout is set (meaning they clicked less than 100ms ago and are going to trigger the double click), and if so, return. </p>
<p>I was working in FF, so IE&#8217;s odd handling of the order of click events may require extra tuning or checks in the script. But that&#8217;s another day.</p>
]]></content:encoded>
			<wfw:commentRss>http://christopherj.us/javascript-click-and-double-click-on-same-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
