<?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>Ryan Fitzer</title>
	<atom:link href="http://ryanfitzer.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanfitzer.org</link>
	<description></description>
	<lastBuildDate>Sun, 05 Feb 2012 21:10:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Easy Syncing of GitHub Pages</title>
		<link>http://ryanfitzer.org/2011/11/easy-syncing-of-github-pages/</link>
		<comments>http://ryanfitzer.org/2011/11/easy-syncing-of-github-pages/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 05:58:38 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[snippets]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitHub]]></category>

		<guid isPermaLink="false">http://ryanfitzer.org/?p=306</guid>
		<description><![CDATA[I&#8217;ve started using GitHub more and more recently as I&#8217;m finding Git&#8217;s steep learning curve, as compared to SVN, outweighed by GitHub&#8217;s usefulness and flexibility. One of those factors is GitHub&#8217;s &#8220;Pages&#8221; feature. From the docs: The GitHub Pages feature allows you to publish content to the web by simply pushing content to one of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started using <a href="http://github.com">GitHub</a> more and more recently as I&#8217;m finding Git&#8217;s steep learning curve, as compared to SVN, outweighed by GitHub&#8217;s usefulness and flexibility. One of those factors is GitHub&#8217;s &#8220;<a href="http://pages.github.com/">Pages</a>&#8221; feature. From the docs:</p>
<blockquote><p>The GitHub Pages feature allows you to publish content to the web by simply pushing content to one of your GitHub hosted repositories.</p></blockquote>
<p>For example, I&#8217;ve recently started a repo to begin adding the many miscellaneous tests, <abbr title="proof of concept">POC</abbr>s and demos I create during the course of development. Instead of requiring someone to download the repo just to see the examples, I use GitHub Pages to host the rendered version (when applicable). The &#8220;<a href="http://ryanfitzer.github.com/Demos/mimic-links/">Mimicking Links</a>&#8221; page is the first one I&#8217;ve published.</p>
<p>GitHub makes this automatic when you create a branch of your <code>master</code> named <code>gh-pages</code>. Any time you push to <code>gh-pages</code>, the results are published. Easy enough, but I quickly realized that I needed a way to mirror all changes on <code>master</code> in <code>gh-pages</code> without constantly having to type:</p>
<pre>git checkout gh-pages
git merge master
git push origin gh-pages
git checkout master
</pre>
<p>Some quick searching turned up Oli Studholme&#8217;s helpful post &#8220;<a href="http://oli.jp/2011/github-pages-workflow/">GitHub Pages and deleting git’s master branch</a>&#8221;. He outlines his own attempts (and suggestions from the comments) and what finally worked for him. Since he had more requirements (deleting the <code>master</code> branch), I wanted to post exactly what I&#8217;ve ended on.</p>
<p>First, create your local repo and add it to GitHub.</p>
<p>From the command line, navigate into the root of your repo and run following block of code as referenced in the &#8220;<a href="http://pages.github.com/#project_pages">Project Pages</a>&#8221; section of the GitHub Pages docs (make sure you have no changes waiting to be committed):</p>
<pre>git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
</pre>
<p>Now that your working directory is clean, merge in the <code>master</code> branch and push <code>gh-pages</code> to GitHub:</p>
<pre>git merge master
git push origin gh-pages
</pre>
<p>You can now visit the url <code>http:username.github.com/yourRepo/</code> to view the results (the first push may take a little time to show your changes).</p>
<p>Now that your pages are in place, you&#8217;ll want to automate the merging<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a> to <code>gh-pages</code> any changes you commit in <code>master</code>.</p>
<p>To do this, open the <code>post-commit.sample</code> file located in <code>yourRepo/.git/hooks</code> and replace its contents with the following, saving it as <code>post-commit</code>:</p>
<pre>#!/bin/sh
# Mirror master in gh-pages
git checkout gh-pages
git merge master
git checkout master
</pre>
<p>This block will run after every commit you make to the <code>master</code> branch (you&#8217;ll see the output on the command line).</p>
<p>All that&#8217;s left to do is push both branches to GitHub any time you&#8217;ve made a commit:</p>
<pre>git push --all
</pre>
<p>I&#8217;m still pretty new to Git/GitHub, so any suggestions or corrections are appreciated.</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">
<p>Oli&#8217;s post suggests <code>rebase</code>, but I&#8217;m sticking with <code>merge</code> as I understand it better. <a href="#fnref:1" title="return to article" class="reversefootnote">&#160;&#8617;</a></p>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/11/easy-syncing-of-github-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hyphen, CamelCase, or Underscore</title>
		<link>http://ryanfitzer.org/2011/09/hyphen-camelcase-or-underscore/</link>
		<comments>http://ryanfitzer.org/2011/09/hyphen-camelcase-or-underscore/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 22:54:52 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[informative]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://ryanfitzer.org/?p=276</guid>
		<description><![CDATA[My choice of word combination patterns depends on the language. I initially tried to use a one-size-fits-all approach, but as my projects became more complex with multiple languages, it got really annoying when the pattern did not match the language. The old standby argument of &#8220;readability&#8221; quickly loses its validity when you&#8217;re dealing with code. [...]]]></description>
			<content:encoded><![CDATA[<p>My choice of word combination patterns depends on the language. I initially tried to use a one-size-fits-all approach, but as my projects became more complex with multiple languages, it got really annoying when the pattern did not match the language. The old standby argument of &#8220;readability&#8221; quickly loses its validity when you&#8217;re dealing with code. For instance, PHP can contain javascript, html and css and uses underscores for functions. Depending on your text editor syntax hi-lighting, a javascript function (camelCase) could use the same coloring as a PHP function (underscore). Since you can&#8217;t depend on color alone, using each language&#8217;s pattern enables you to immediately know the difference.</p>
<p>There will always be edge cases (PHP uses <code>CamelCase</code> for classes), but I find that sticking with each language&#8217;s word combination patterns make for the least friction possible.</p>
<p>With that said, here are my current choices:</p>
<p><b>PHP</b><br />
Variable: <code>underscore</code><br />
Function: <code>underscore</code><br />
Class: <code>CamelCase</code></p>
<p><b>Javascript</b><br />
Variable: <code>camelCase</code><br />
Function: <code>camelCase</code><br />
Constructor: <code>CamelCase</code></p>
<p><b>CSS</b><br />
Class: <code>hyphen</code><br />
ID: <code>hyphen</code></p>
<p><b>HTML</b><br />
Custom Attributes: <code>hyphen</code></p>
<p>With html, the <code>data-</code> prefix is one defense, even though attributes like <code>tabindex</code> differ. Also, an underscore is technically meant to augment a letter or word, while a hyphen is used to separate words or syllables.</p>
<p>Regular Expression engines use the same characterizations.</p>
<p>For example, using the text:</p>
<pre>some-word some_word</pre>
<p>with the regex matching pattern:</p>
<pre>\b\w+\b</pre>
<p>the resulting array of matches is:</p>
<pre>
[0] =&gt; some
[1] =&gt; word
[2] =&gt; some_word
</pre>
<p>This may seem like I&#8217;m over-thinking things, but like I said, I want the least amount of friction when I work.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/09/hyphen-camelcase-or-underscore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To Be, or Not to Be, an Anchor</title>
		<link>http://ryanfitzer.org/2011/08/to-be-or-not-to-be-an-anchor/</link>
		<comments>http://ryanfitzer.org/2011/08/to-be-or-not-to-be-an-anchor/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 23:26:48 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[informative]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[accessibility]]></category>

		<guid isPermaLink="false">http://ryanfitzer.org/?p=253</guid>
		<description><![CDATA[In reading Chris Coyier&#8217;s response to a reader&#8217;s question on when to choose an anchor element over some other element when creating javascript-driven experiences, I realized that only recently did I form a concrete opinion on the matter. My response originally started as a comment on Coyier&#8217;s post, but quickly turned into a full post [...]]]></description>
			<content:encoded><![CDATA[<p>In reading <a href="http://css-tricks.com/13780-when-and-when-not-to-use-an-anchor-tag/" title="When (and when not to) use an anchor tag? | CSS-Tricks">Chris Coyier&#8217;s response</a> to a reader&#8217;s question on when to choose an anchor element over some other element when creating javascript-driven experiences, I realized that only recently did I form a concrete opinion on the matter. My response originally started as a comment on Coyier&#8217;s post, but quickly turned into a full post of its own.</p>
<p>Here&#8217;s the part of Chris&#8217;s response with which I identified most:</p>
<blockquote><p>If the app is totally JavaScript dependent all behavior is attached via JavaScript, I guess it doesn&#8217;t really matter what element you use.</p></blockquote>
<p>Until recently, I would have given the same answer. For the past year and a half I&#8217;ve been part of a large team working on the rewrite of a major ecommerce site that required full accessibility for blind, low-vision and cognitively disabled users. Being a javascript-heavy UI, it required a lot more effort in discerning the semantics of an HTML element.</p>
<p>I plan on writing a lot more about that experience, but right now I want to respond specifically to the question of when to use an anchor element.</p>
<p>The reader says that he <q>generally used the <code>a</code> tag liberally</q> to represent an element as <q>clickable</q>.</q></p>
<p>In brief, that&#8217;s the safest choice. But the natural inclination of a developer (ideally) is to dig as deep as possible and make the most informed choice. After all, their the ones who have to support it when things get wonky.</p>
<p>If you decide on something other than an anchor though, just make sure the element you choose is accessible to keyboards and screen readers. Easy. Done.</p>
<p>Of course, it can be a lot more complicated than that. Anchor elements are natively focusable and screen readers provide functionality for navigating a page by its anchors. This allows to users to quickly scan the page via their keyboard. Visual users often (and understandably) take for granted their ability to visually scan a page since it&#8217;s a natural response and not specific to viewing a webpage. But, substituting a different element can require a lot more effort in facilitating a equal experience to non-visual users.</p>
<p>Using <code>tabindex</code> with a value of <code>0</code> on a non-natively focusable element will allow for the element to be navigated via the tab key, and in the order of the natural document flow. But the catch is that a screen reader will not include the element in its anchor shortcut feature. This may not be necessary if the the element&#8217;s purpose would not make sense outside of its surrounding context, like a tooltip, for example. </p>
<p>More importantly though, the screen reader will not speak the element as a <i>link</i>. Visual users employ visual clues to interpret actionable elements in a page. Screen readers rely on semantics. While a visual user can instantly recognize a button by its design, a screen reader can do so only if a <code>button</code> element is used.</p>
<p>Also, it&#8217;s good to understand that <code>title</code> attributes are not necessarily spoken when a screen reader user is focused on an element that contains one. The popular screen reader <a href="http://www.freedomscientific.com/products/fs/jaws-product-page.asp" title="JAWS Screen Reading Software by Freedom Scientific">JAWS</a> provides this as an op-in preference. So using a <code>span</code> as an actionable element will need both a <code>title</code> attribute <em>and</em> screen-reader-only text (off-screen) to communicate to the user the purpose of the element.</p>
<p>Ultimately, an anchor element provides users an actionable element that&#8217;s accepted as a means to navigate information. Regardless of whether the navigation happens via a full page refresh, asynchronously, or with javascript turned off, the underlying meaning remains the same. Using it liberally is a good choice.</p>
<p><b>Update: 8.24.2011</b></p>
<p>Regarding <abbr title="Accessible Rich Internet Applications">ARIA</abbr>, support is getting better, but it&#8217;s still pretty spotty. In fact, I’ve had to remove ARIA attributes at times because of screen reader conflicts. It can also change how the user&#8217;s screen reader interacts with a page (Form and Application modes). This can be disorienting to a user who has yet to master the full feature set of their screen reader. But after reading Dave&#8217;s comment below, I figured I should give the <code>link</code> role a try. I use the <code>role</code> when it&#8217;s useful, but the <code>link</code> value is one I&#8217;ve never considered.</p>
<p>I used the following markup for my quick test:</p>
<pre>&lt;span id=&quot;link&quot; role=&quot;link&quot; tabindex=&quot;0&quot;&gt;Test Link&lt;/span&gt;</pre>
<p>Surprisingly, JAWS 12 with IE8 spoke the element as a <i>link</i>. I was also able to navigate to it using the <code>u</code> key shortcut (navigates unvisited links). The <code>v</code> key did not register it as a visited link even though it had been clicked. That makes sense since there&#8217;s no <code>href</code>. Good to know.</p>
<p><b>Update: 11.8.2011</b></p>
<p>I’ve put up a <a href="http://ryanfitzer.github.com/Demos/mimic-links/">page of various attempts to mimic links</a>. Not exhaustive, but should be helpful in drawing general conclusions. I’ll add to it as I get more examples and time.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/08/to-be-or-not-to-be-an-anchor/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>My Alfred Custom Searches</title>
		<link>http://ryanfitzer.org/2011/08/my-alfred-custom-searches/</link>
		<comments>http://ryanfitzer.org/2011/08/my-alfred-custom-searches/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 23:55:16 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[snippets]]></category>
		<category><![CDATA[Alfred]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://ryanfitzer.org/?p=249</guid>
		<description><![CDATA[I set up a page to share (and sync) some of the custom searches I use with Alfred. Hopefully they have a plan to create a network for contributing/browsing/filtering other users custom searches (do they?).]]></description>
			<content:encoded><![CDATA[<p>I set up a <a href="http://ryanfitzer.github.com/Alfred-Custom-Searches/">page to share</a> (and sync) some of the custom searches I use with <a href="http://www.alfredapp.com/" title="Alfred App">Alfred</a>. Hopefully they have a plan to create a network for contributing/browsing/filtering other users custom searches (do they?). </p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/08/my-alfred-custom-searches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command Line Aliases</title>
		<link>http://ryanfitzer.org/2011/05/command-line-aliases/</link>
		<comments>http://ryanfitzer.org/2011/05/command-line-aliases/#comments</comments>
		<pubDate>Sat, 28 May 2011 02:12:08 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[snippets]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[command line]]></category>

		<guid isPermaLink="false">http://ryanfitzer.org/?p=239</guid>
		<description><![CDATA[I&#8217;ve been trying to hone my command line skills as it&#8217;s sometimes the only way to do complex operations (searching remote svn log files). One of the actions I find most repeated is finding my way into the various directories to perform these operations. My typing skills are less than stellar, so it kind sucks [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to hone my command line skills as it&#8217;s sometimes the only way to do complex operations (<a href="https://twitter.com/rfitzer/status/25348899795369986">searching remote svn log files</a>). One of the actions I find most repeated is finding my way into the various directories to perform these operations. My typing skills are less than stellar, so it kind sucks to type (even with tab completion): </p>
<pre>cd /Applications/MAMP/htdocs</pre>
<p>In looking for a better way to navigate to my repo, I created an <code>alias</code>. This means that instead of typing:</p>
<pre>cd /Applications/MAMP/htdocs</pre>
<p>I can simply type:</p>
<pre>repo</pre>
<p>That variable will be &#8220;expanded&#8221; into the string <code>cd /Applications/MAMP/htdocs</code> and executed by the shell.</p>
<p>Here&#8217;s how make this black magic a reality:</p>
<p>OSX (UNIX)<br />
&#8212;&#8211;<br />
Open Finder and click on your home folder.<br />
Show the hidden files using the keystroke <code>shift + command + .</code> (or use a <a href="http://www.apple.com/downloads/dashboard/developer/hiddenfiles.html" title="Apple - Downloads - Dashboard Widgets - hiddenfiles">dashboard widget</a>)<br />
Open the hidden file named &#8220;.profile&#8221; (or create one with Textedit if it doesn&#8217;t exist)<br />
Add the following text (I use MAMP as my server, which is located at <code>/Applications/MAMP/</code>):</p>
<pre>alias repo='/Applications/MAMP/htdocs'</pre>
<p>Save the file.<br />
Open a new Terminal (/Applications/Utilities/Terminal.app)<br />
Type:</p>
<pre>repo</pre>
<p>You should now be in the <code>/htdocs</code> directory (or whatever path you set for repo)</p>
<p>Windows<br />
&#8212;&#8212;&#8211;<br />
Open Notepad and create a new text file.<br />
Add the following text (I use WAMP as my server, which is located at <code>C:\wamp</code>):</p>
<pre>cd C:\wamp\www</pre>
<p>Save the file as “repo.bat” in <code>C:\WINDOWS\system32</code>.<br />
Open a Command Prompt at Start->All Programs->Accessories->Command Prompt (or using the Start Menu shortcut <code>r</code> and <code>CMD</code>)<br />
Type:</p>
<pre>repo</pre>
<p>You should now be in the <code>\www</code> directory (or whatever path you set for repo)</p>
<p><a href="http://en.wikipedia.org/wiki/Alias_(command)" title="alias (command) - Wikipedia, the free encyclopedia">OSX (UNIX) reference</a></p>
<p><a href="http://allinthehead.com/retro/131/dir-vs-ls" title="Dir vs ls &mdash; All in the head">Windows reference</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/05/command-line-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This is What I Like to Read</title>
		<link>http://ryanfitzer.org/2011/03/this-is-what-i-like-to-read/</link>
		<comments>http://ryanfitzer.org/2011/03/this-is-what-i-like-to-read/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 00:57:19 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[links]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[server administration]]></category>

		<guid isPermaLink="false">http://ryanpatrickfitzer.com/?p=230</guid>
		<description><![CDATA[Great detail into dealing with a rush of new traffic to Pinboard after Yahoo! announced the Delicious &#8220;sunset&#8221; (ugh, corporate-speak never gets any easier to swallow). Server administration scares me. via marco.org]]></description>
			<content:encoded><![CDATA[<p><a href="http://pinboard.in/blog/173/">Great detail</a> into dealing with a rush of new traffic to <a href="http://pinboard.in/">Pinboard</a> after Yahoo! announced the Delicious &#8220;sunset&#8221; (ugh, corporate-speak never gets any easier to swallow).</p>
<p>Server administration scares me.</p>
<p>via <a href="http://www.marco.org/3727313563">marco.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/03/this-is-what-i-like-to-read/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toggle Class &#8211; The jQuery Way vs. The Native Way</title>
		<link>http://ryanfitzer.org/2011/02/toggle-class-the-jquery-way-vs-the-native-way/</link>
		<comments>http://ryanfitzer.org/2011/02/toggle-class-the-jquery-way-vs-the-native-way/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 19:18:35 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[snippets]]></category>

		<guid isPermaLink="false">http://ryanpatrickfitzer.com/2011/02/toggle-class-the-jquery-way-vs-the-native-way/</guid>
		<description><![CDATA[I work with a team of developers located in the US, Canada and Bangalore. On behalf of the North American team, I send daily status emails detailing what each dev worked on, as well as their svn commit log, so the offshore devs and project leadership can stay synced. For the past 2 or 3 [...]]]></description>
			<content:encoded><![CDATA[<p>I work with a team of developers located in the US, Canada and Bangalore. On behalf of the North American team, I send daily status emails detailing what each dev worked on, as well as their <a href="http://en.wikipedia.org/wiki/Apache_Subversion" title="Apache Subversion - Wikipedia, the free encyclopedia">svn</a> commit log, so the offshore devs and project leadership can stay synced.</p>
<p>For the past 2 or 3 weeks I&#8217;ve been including little quick tips on <abbr title="Cascading Style Sheets">CSS</abbr> and javascript. The team I&#8217;m on is composed of people with a variable level of skills and this is an attempt to affect those levels.</p>
<p>I thought I&#8217;d start posting some of these to archive ones I would have found helpful when I first started programming.</p>
<p>We use <a href="http://jquery.com/" title="jQuery: The Write Less, Do More, JavaScript Library">jQuery</a> in our project and the majority of the devs (including myself) learned javascript via jQuery. Below is what it takes to toggle a class using jQuery vs. native javascript. As you can see, we&#8217;ve had it easy.</p>
<p><strong>The jQuery Way</strong></p>
<pre>$( '.some-class' ).toggleClass( 'newClass' );</pre>
<p><strong>The Native Way</strong> (I&#8217;m sure there are better ways):</p>
<pre>
var i = 0,
    elements = document.getElementsByClassName('some-class'),
    len = elements.length,
    classToggle = function( element, tclass ) {

        var classes = elements[i].className,
            pattern = new RegExp( tclass );
            hasClass = pattern.test( classes );

        classes = hasClass ? classes.replace( pattern, '' ) : classes + ' ' + tclass;
        elements[i].className = classes.trim();
    };

for ( ; i < len; i++ ) {
    classToggle( elements[i], 'newClass' );
}
</pre>
<p>The native example could be wrapped up a bit tighter to make it easily reusable. One of the reasons the jQuery example is so concise is that it relies on it's own methods for making collections and performing loops. The <code>$</code> and <code>toggleClass</code> functions have quite a bit of code backing them up. If I were to add in all of the source code jQuery uses to preform these tasks, things would look a lot different.</p>
<p>But that's not the point. The thing that has enabled me to use jQuery as just one of the tools in my toolbox, instead of the <em>only</em> tool, is understanding the underlying functionality. </p>
<p>A couple of good references: the <a href="http://bit.ly/jqsource">jQuery source</a> (of course) and the <a href="https://developer.mozilla.org/en-US/">MDC</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/02/toggle-class-the-jquery-way-vs-the-native-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interesting Links</title>
		<link>http://ryanfitzer.org/2011/01/interesting-links/</link>
		<comments>http://ryanfitzer.org/2011/01/interesting-links/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 02:56:03 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[Open Source Projects]]></category>

		<guid isPermaLink="false">http://ryanpatrickfitzer.com/?p=209</guid>
		<description><![CDATA[Programmer Competency Matrix I was surprised to find that I placed in level 3 for most of the &#8220;Programming&#8221; rows (as I understand my skills anyway :). Art school has definitely made for some strange bedfellows. It was motivating to see where I placed in all of the topics, as my approach to learning programming [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.indiangeek.net/wp-content/uploads/Programmer%20competency%20matrix.htm">Programmer Competency Matrix</a></strong></p>
<p>I was surprised to find that I placed in level 3 for most of the &#8220;Programming&#8221; rows (as <em>I</em> understand my skills anyway :). Art school has definitely made for some strange bedfellows.</p>
<p>It was motivating to see where I placed in all of the topics, as my approach to learning programming has been to aquire as much understanding as possible about the the things I don&#8217;t know. Finding that I was at level 2, but knowing the existence of the concepts in level 3 validates that this approach is moving me in the right direction.</p>
<p>I likened this philosophy to Elizabeth the other day as analogous to how one understands their city. We live in LA, a big, sprawling metropolis, and while I&#8217;ve never been to Monrovia or Cerritos (far out there), I understand that both are cities in Los Angeles County. Not the best example, sure, but one that illustrates the differences in approach. I actively seek out and retain this type of understanding in the belief that it may be useful at some point. Others my see it as the inevitable result of living in the same place a long time.</p>
<p>A better example would be to relate it to one&#8217;s chosen carrer. Using this angle, it becomes quickly evident that the ones who take an active approach are usually more successful (the definition of the success is based on the specific domain, of course). Conversely, those taking a passive approach tend to exert more effort in defending how what they <em>do</em> know is more tried and true, and hence more reliable. More dangerously, as a superior, they tend to actively block their peers and subordinates. Anyone who has worked in a university or college setting will loudly attest.</p>
<p><strong><a href="http://open.blogs.nytimes.com/2011/01/11/emphasis-update-and-source/">Deep Linking with Javascript</a></strong></p>
<p>Open sourced javascript implementation for linking to paragraphs, and even sentences, in webpages. Uses a matching pattern based on the first letters of the first 3 words in the first and last sentence of the paragraph. That was a mouthful. For example, the key for this paragraph would be [OsjFet].</p>
<p><strong><a href="http://www.phoboslab.org/ztype/">A fun way to practice your Dvorak skills</a></strong></p>
<p>I still intend to pick up proper typing. And when that time comes, it will definitely be on a <a href="http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard">Dvorak</a> keyboard.</p>
<p>I started the typing tests last year and unfortunately, lasted only a week. It takes the same discipline as QWERTY (no surprise there), but I find the layout much easier to memorize. Now, if Apple could get on the ball with creating a beautifully designed split keyboard, I could get rid of this <a href="http://www.microsoft.com/hardware/mouseandkeyboard/ProductDetails.aspx?pid=043">clunker</a>. It&#8217;s hideous, poorly constructed and loud (key paddings wear out quickly), but it&#8217;s still the most comfortable I&#8217;ve found.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/01/interesting-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Language Constructs</title>
		<link>http://ryanfitzer.org/2011/01/language-constructs/</link>
		<comments>http://ryanfitzer.org/2011/01/language-constructs/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 02:17:59 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://ryanpatrickfitzer.com/2011/01/language-constructs/</guid>
		<description><![CDATA[I had a very difficult time in my English classes. In fact, there was a period where I simply refused to attempt any writing assignments due to the stress I caused myself. This was the primary reason for many failed classes in high school. Thankfully, I managed to graduate and go on to do much [...]]]></description>
			<content:encoded><![CDATA[<p>I had a very difficult time in my English classes. In fact, there was a period where I simply refused to attempt any writing assignments due to the stress I caused myself. This was the primary reason for many failed classes in high school. Thankfully, I managed to graduate and go on to do much better in college.</p>
<p>It was during 2005 I began programming and a surprising result has been a better appreciation in how the English language is defined and used. Like human languages, programming languages can be broken down into similar constructs of nouns, adjectives, verbs, etc. It&#8217;s not something I&#8217;ve looked into (someday I will), but I find that common devices in modern programming languages can be compared to simplified examples in human languages.</p>
<p>So yesterday, Elizabeth and I were discussing using the phrase &#8220;that that&#8221; in a sentence and how awkward it sounds in conversation, even though it&#8217;s grammatically valid. When writing, I normally try to substitute &#8220;which&#8221; for the latter &#8220;that&#8221; (I&#8217;m usually not deft enough to do the same in conversation). The unintended side effect though, is the substitution can end up making the sentence read a little too formal and out of character. Most people I know, including myself, rarely use the phrase &#8220;that which&#8221; in conversation. Not that I judge a good writer by how well their writing mimics conversation, but formalities can interrupt and/or ruin otherwise good prose.</p>
<p>Interested in how this phase functions in a sentence, I looked up the definition of &#8220;that&#8221;. I learned the first instance of &#8220;that&#8221; serves as a <abbr title="a word that can function by itself as a noun phrase and that refers either to the participants in the discourse (e.g., I, you) or to someone or something mentioned elsewhere in the discourse (e.g., she, it, this).">pronoun</abbr>, while the second as a <abbr title="a word used to connect clauses or sentences or to coordinate words in the same clause (e.g., and, but, if).">conjunction</abbr>.</p>
<p>Take for instance this conversation:</p>
<blockquote>
<p>Speaker One:</p>
<p><em>Why are you are always disrespectful towards me?</em></p>
<p>Speaker Two:</p>
<p><em>I&#8217;m not. You&#8217;re just not smart enough to know when I&#8217;m right.</em></p>
<p>Speaker One:</p>
<p><em>See? It is that, that I&#8217;m talking about.</em></p>
</blockquote>
<p>The first <q>that</q>, the noun, is referring to Speaker Two&#8217;s answer of <q>I&#8217;m not. You&#8217;re just not smart enough to know when I&#8217;m right.</q>.</p>
<p>The second <q>that</q>, the conjunction, acts as the clause connector, connecting <q>It is that</q> with <q>I&#8217;m talking about</q>.</p>
<p>To help me remember how these constructs work I like to try and relate them to something in the world of programing. It usually helps regardless of if I can find any similarities.</p>
<p>Here what the conversation would look like as a hypothetical javascript program:</p>
<pre>/*
================================
= Define our variables upfront =
================================
*/

var pronoun = null;

var conjunction = "that";

var speak = function( message ) {

	alert( message );

};

/* speakers */
var Ryan = {

	role: "Speaker One",

	speak: speak

};

var Chris = {

	role: "Speaker Two",

	speak: speak

};

/*
==========================
= Begin the conversation =
==========================
*/

/* Ryan defines and speaks his question */

Ryan.question = "Why are you are always disrespectful towards me?";

Ryan.speak( Ryan.question );

/* Chris defines and speaks his answer */

Chris.answer = "I'm not. You're just not smart enough to know when I'm right.";

Chris.speak( Chris.answer );

/* Redefine the pronoun to refer to Chris's answer */

pronoun = Chris.answer; 

/* Now Ryan defines and speaks his response */

Ryan.response = "It's" + pronoun + conjunction + "I'm talking about.";

Ryan.speak( Ryan.response );</pre>
<p>To take this comparison even farther, you could find parallels for nouns, adjectives and verbs in the above program.</p>
<p><strong>Nouns</strong></p>
<p>Each speaker is &#8220;typed&#8221; as an <code>Object</code>. Not as in &#8220;typed on a keyboard&#8221;, but as in the speaker&#8217;s value is of the <code>Object</code> type. In English, each speaker would be typed as a <em>noun</em>.</p>
<p><strong>Adjectives</strong></p>
<p>A word that describes or modifies a <em>noun</em> is considered an <em>adjective</em>. Similarly, the properties and methods (referred to as members) of an <code>Object</code> can describe and modify that <code>Object</code>. Our speakers each have a <code>role</code> property to describe the part they play in the conversation.</p>
<p><strong>Verbs</strong></p>
<p>A <em>verb</em> describes an action or occurrence and in the beginning of the above program, the function named <code>speak</code> does just that. Instead of running <code>speak</code> on as a standalone (via <code>speak()</code>), I decided to create a <code>speak</code> member in each speaker and use the standalone <code>speak</code> function as its value. This effectively creates a method (used as <code>Ryan.speak()</code>). Now, each speaker can have its own voice.</p>
<p>The <code>speak</code> function takes one argument, <code>message</code>, which is the value passed into the parenthesis used to execute the function. The function simply calls <code>alert</code>, which creates a little browser notification dialog.</p>
<p>While I didn&#8217;t set out to write a introductory to programming, It&#8217;s nice to finally write down the way I think about these things. At least I can point to it when my friends want some sort basic understanding of programming, which is never, of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2011/01/language-constructs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Application Shopping</title>
		<link>http://ryanfitzer.org/2010/12/application-shopping/</link>
		<comments>http://ryanfitzer.org/2010/12/application-shopping/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 23:06:34 +0000</pubDate>
		<dc:creator>Ryan Fitzer</dc:creator>
				<category><![CDATA[informative]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[Open Source Projects]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://ryanpatrickfitzer.com/?p=172</guid>
		<description><![CDATA[I tend to get stuck in my computing habits during the year. So each December vacation (since last year anyway) I&#8217;ve taken to trying out new applications. Here&#8217;s the list (so far) for this year: TotalFinder Adds tabbing, docking, folders-on-top, and more to OSX&#8217;s native Finder.app. So far I love it. The docking feature (named [...]]]></description>
			<content:encoded><![CDATA[<p>I tend to get stuck in my computing habits during the year. So each December vacation (since last year anyway) I&#8217;ve taken to trying out new applications. Here&#8217;s the list (so far) for this year:</p>
<ul>
<li><a href="http://totalfinder.binaryage.com/" title="TotalFinder brings tabs to your native Finder and more!">TotalFinder</a>
<p>Adds tabbing, docking, folders-on-top, and more to OSX&#8217;s native Finder.app.</p>
<p>So far I love it. The docking feature (named &#8220;Visor&#8221; and not to be confused with their other app of the same name) allows for a Finder window to animate in/out with a hotkey (<code>⌥`</code> by default), or whenever I switch to the Finder app. And with tabs, I don&#8217;t have to manage 50 different Finder windows any longer.</p>
<p>It&#8217;s priced reasonably at $15 and has a 14 day trial period. I&#8217;m sure I will be buying it.</p>
</li>
<li><a href="http://visor.binaryage.com/" title="Visor is a system-wide terminal accessible via a hot-key">Visor</a>
<p>I&#8217;ve been learning <a href="http://git-scm.com/" title="Git - Fast Version Control System">Git</a> lately (<a href="https://github.com/ryanfitzer">github.com/ryanfitzer</a>) which involves a lot of Terminal.app usage. Like TotalFinder, Visor allows you to dock Terminal to your screen and animate it in/out with a hotkey (<code>^`</code> by default).</p>
<p>Free and open sourced at <a href="https://github.com/darwin/visor">github.com/darwin/visor</a>.</p>
</li>
<li><a href="http://xrefresh.binaryage.com/" title="XRefresh provides browser refresh automation for web developers">XRefresh</a>
<p>Refresh your page Firefox whenever a file changes. So, I give a path to my working directory (I use MAMP so it&#8217;s &#8220;/Applcations/MAMP/htdocs&#8221;) and whenever a file changes, Firefox simply refreshes. No more toggling back and forth between Textmate and Firefox, constantly hitting <code>⌘r</code> to refresh the changes just made. Working with 2 monitors makes this even easier since I can have Textmate running on one and Firefox on another. I never have to toggle over to see my changes.</p>
<p>It is composed of an addon to Firebug and Ruby Cocoa (has a native OSX installer). Start the server via the command line with <code>xrefresh-server</code>, open a new Firefox window and watch with wonderment.</p>
<p>You can also set it to soft-refresh any css updates to avoid page reloads.</p>
<p>It&#8217;s awesome, free and open sourced at <a href="https://github.com/darwin/xrefresh">github.com/darwin/xrefresh</a>.</p>
</li>
<li><a href="http://www.git-tower.com/index.html" title="Tower - The most powerful Git client for Mac">Tower</a>
<p>Since my Terminal skills (mostly it&#8217;s my typing skills) are pretty rough I thought I&#8217;d also try a GUI for Git. I use <a href="http://versionsapp.com/" title="Versions - Mac Subversion Client (SVN)">Versions</a> for SVN and Tower has so far proven to be the equivalent for Git.</p>
<p>It&#8217;s currently free and in beta, but it will be priced once they have a solid release. I&#8217;m sure I&#8217;ll buy it.</p>
</li>
<li><a href="http://www.alfredapp.com/" title="Alfred App">Alfred</a>
<p>Billed as a &#8220;productivity application for Mac OS X, which aims to save you time in searching your local computer and the web&#8221;. And that&#8217;s exactly what it is. I&#8217;ve used <a href="http://en.wikipedia.org/wiki/Quicksilver_%28software%29" title="Quicksilver (software) - Wikipedia, the free encyclopedia">Quicksilver</a> for years, but the original developer ceased updates a log time ago and the community has kept it (mostly) alive (you find a good build at <a href="https://github.com/tiennou/blacktree-alchemy/downloads">github.com/tiennou/blacktree-alchemy</a>).</p>
<p>I new I&#8217;d eventually have to find a replacement and <a href="http://www.stuffandnonsense.co.uk/blog/about/from_air_to_eternity/" title="From Air To Eternity | Stuff and Nonsense">Andy Clarke</a> posted about Alfred this week.</p>
<p>It&#8217;s free and currently in beta. An intersting note on how they plan to make money giving it away for free their FAQ page states [emphasis mine]:</p>
<blockquote><p>&#8220;We can provide the Alfred core for free thanks to users who support it by purchasing the <a href="http://alfredapp.com/powerpack" title="Alfred App - Powerpack">Powerpack</a>. <strong>We also include affiliate codes in Amazon links</strong>&#8220;</p></blockquote>
<p>It&#8217;s a great model and I&#8217;m interested to see it how it scales. I might buy the Powerpack, but I want to get familiar with the Alfred core first.</p>
</li>
</ul>
<p>If anyone has any other recommendations I&#8217;d love to hear it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanfitzer.org/2010/12/application-shopping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

