<?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>cjsharp</title>
	<atom:link href="http://cjsharp.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cjsharp.com</link>
	<description></description>
	<lastBuildDate>Sun, 24 Jan 2010 04:06:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Radius-based Zip Code Finder</title>
		<link>http://cjsharp.com/2009/03/radius-based-zip-code-finder/</link>
		<comments>http://cjsharp.com/2009/03/radius-based-zip-code-finder/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 18:07:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Applications]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=24</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/web-stuff/applications/" title="Applications">Applications</a></p>A year or so ago, I had the task to build a &#8220;zip code finder&#8221;; a tool that allows a user to enter a zip code and a radius, and return all zip codes in that radius.  All of the references I found online were pretty much the exact application I was trying to build, [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/web-stuff/applications/" title="Applications">Applications</a></p><p>A year or so ago, I had the task to build a &#8220;zip code finder&#8221;; a tool that allows a user to enter a zip code and a radius, and return all zip codes in that radius.  All of the references I found online were pretty much the exact application I was trying to build, so they didn&#8217;t help me that much. I did eventually run across the math that allows you to build the application. Unfortunately, I didn&#8217;t save the link to the page. If I ever find it, I&#8217;ll be sure to post it. While I initially built this application for US zip codes, I&#8217;m sure it&#8217;ll work for zip codes outside of the US, since we are mostly concerned with the longitude and latitudes of the zip codes. This is how to build a radius-based zip code finder:</p>
<p>First, you need a zip code database. The database should contain the following fields at minimum: zip code, longitude, and latitude. Let me say that this task alone can be difficult, if you are searching for a free database. Most of the databases available will cost money, mainly because the database data changes every-so often (since US zip codes change every so often). Free databases (mostly in the form of a .CSV file) are out there, but if you want a highly accurate database, it might be worth to pay the money for one.</p>
<p><strong>Update</strong> &#8211; After looking around for a little bit, I found <a href="http://www.census.gov/tiger/tms/gazetteer/zips.txt">this file</a> that will work as a nice zip code database. The file comes directly from the US Census, so it should be pretty accurate. You can also check <a href="http://zips.sourceforge.net/">this SourceForge project</a> for a nice zip code database.</p>
<p>Now comes the math and the process of determining the longitudes and latitudes in the radius. Since I&#8217;m not a math expert, I&#8217;ll do my best to explain what each number or formula is. For the formulas, I&#8217;ll show the PHP code (I actually created the PHP code by converting the original .NET code I wrote.)</p>
<p><strong>Step 1</strong><br />
Find the longitude and latitude for the zip code using the database. This is your center point for your radius. If you can&#8217;t find the zip code in the database, then the zip code is incorrect or you have an outdated database.</p>
<p><strong>Step 2</strong><br />
Convert the longitude, latitude, and radius distance (in miles) to <a href="http://en.wikipedia.org/wiki/Radian">radians</a> using these formulas:</p>

<div class="wp_codebox"><table><tr id="p247"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p24code7"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Convert the coordinates and distance to radians</span>
<span style="color: #000088;">$dLatInRads</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$latitude</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">180</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dLongInRads</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$longitude</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">180</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dDistInRad</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$distanceRadius</span> <span style="color: #339933;">/</span> EARTH_RADIUS_IN_MILES<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>EARTH_RADIUS_IN_MILES is a constant set to 3956. M_PI is a PHP constant.</p>
<p><strong>Step 3</strong><br />
Honestly, I don&#8217;t remember what this number is for. In my code, it&#8217;s called &#8220;lat&#8221;. It uses this formula:</p>

<div class="wp_codebox"><table><tr id="p248"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p24code8"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$lat</span> <span style="color: #339933;">=</span> <span style="color: #990000;">asin</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLatInRads</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">cos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dDistInRad</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>Step 4</strong><br />
Find the top and bottom lines of the bounding box using this formula:</p>

<div class="wp_codebox"><table><tr id="p249"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p24code9"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Find the top line</span>
<span style="color: #000088;">$topLine</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dLatInRads</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$dDistInRad</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$topLine</span> <span style="color: #339933;">*=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">180</span> <span style="color: #339933;">/</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Find the bottom line</span>
<span style="color: #000088;">$bottomLine</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dLatInRads</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$dDistInRad</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$bottomLine</span> <span style="color: #339933;">*=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">180</span> <span style="color: #339933;">/</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>Step 5</strong><br />
Find the right and left lines of the bounding box. For each line, you need to calculate a number called &#8220;dlon&#8221;. Once again, I don&#8217;t remember what this is. Here is the formula:</p>

<div class="wp_codebox"><table><tr id="p2410"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p24code10"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Find the right line</span>
<span style="color: #000088;">$dlon</span> <span style="color: #339933;">=</span> <span style="color: #990000;">atan2</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span>M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dDistInRad</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">cos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLatInRads</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">cos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dDistInRad</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLatInRads</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lat</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$rightLine</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">fmod</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLongInRads</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$dlon</span> <span style="color: #339933;">+</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span> <span style="color: #339933;">*</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> M_PI<span style="color: #339933;">;</span>
<span style="color: #000088;">$rightLine</span> <span style="color: #339933;">*=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">180</span> <span style="color: #339933;">/</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Find the left line</span>
<span style="color: #000088;">$dlon</span> <span style="color: #339933;">=</span> <span style="color: #990000;">atan2</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span> <span style="color: #339933;">*</span> M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dDistInRad</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">cos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLatInRads</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">cos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dDistInRad</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLatInRads</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lat</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$leftLine</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">fmod</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLongInRads</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$dlon</span> <span style="color: #339933;">+</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span> <span style="color: #339933;">*</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> M_PI<span style="color: #339933;">;</span>
<span style="color: #000088;">$leftLine</span> <span style="color: #339933;">*=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">180</span> <span style="color: #339933;">/</span> M_PI<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You now have the full bounding box of the zip code radius.</p>
<p><strong>Step 6</strong><br />
Using the database, find all longitudes and latitudes in the bounding box. I use this SQL statement:</p>

<div class="wp_codebox"><table><tr id="p2411"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p24code11"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> ZipCode<span style="color: #66cc66;">,</span> Latitude<span style="color: #66cc66;">,</span> Longitude
<span style="color: #993333; font-weight: bold;">FROM</span> ZipCodes
<span style="color: #993333; font-weight: bold;">WHERE</span> Latitude <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'$bottomLine'</span>
<span style="color: #993333; font-weight: bold;">AND</span> Latitude <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'$topLine'</span>
<span style="color: #993333; font-weight: bold;">AND</span> Longitude <span style="color: #66cc66;">&lt;=</span> <span style="color: #ff0000;">'$leftLine'</span>
<span style="color: #993333; font-weight: bold;">AND</span> Longitude <span style="color: #66cc66;">&gt;=</span> <span style="color: #ff0000;">'$rightLine'</span><span style="color: #ff0000;">&quot;;</span></pre></td></tr></table></div>

<p>This will return all the zip codes in the bounding box. Note that the bounding box is exactly that&#8230; a box. Some of the zip codes you return will be outside of the initial radius. If you want, you can filter out those zip codes in Step 7.</p>
<p><strong>Step 7 (optional)</strong><br />
Filter out the zip codes outside of the radius by simply checking the distance between the center longitude/latitude and the returned zip code longitude/latitude. Use this formula:</p>

<div class="wp_codebox"><table><tr id="p2412"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code" id="p24code12"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Convert all the coordinates to radians</span>
<span style="color: #000088;">$dStartLatInRad</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$startLatitude</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">180</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dStartLongInRad</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$startLongitude</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">180</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dEndLatInRad</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$endLatitude</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">180</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dEndLongInRad</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$endLongitude</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>M_PI <span style="color: #339933;">/</span> <span style="color: #cc66cc;">180</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Find the distance between the starting and ending coordinates</span>
<span style="color: #000088;">$dLatitude</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dEndLatInRad</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$dStartLatInRad</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dLongitude</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dEndLongInRad</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$dStartLongInRad</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Intermediate result a</span>
<span style="color: #000088;">$a</span> <span style="color: #339933;">=</span> <span style="color: #990000;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLatitude</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #990000;">cos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dStartLatInRad</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">cos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dEndLatInRad</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #990000;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sin</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dLongitude</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Intermediate result c (great circle distance in radians)</span>
<span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">*</span> <span style="color: #990000;">atan2</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">sqrt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Distance</span>
<span style="color: #000088;">$dDistance</span> <span style="color: #339933;">=</span> EARTH_RADIUS_IN_MILES <span style="color: #339933;">*</span> <span style="color: #000088;">$c</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>After you filter out the zip codes, you can return your result set. That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2009/03/radius-based-zip-code-finder/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web Accessibility for the Visually Impaired</title>
		<link>http://cjsharp.com/2008/12/web-accessibility-for-the-visually-impaired/</link>
		<comments>http://cjsharp.com/2008/12/web-accessibility-for-the-visually-impaired/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 20:11:02 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=19</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/development/" title="Development">Development</a></p>I originally wrote this article back in October 2006 for my blog. Some of the information is a little old, but it still generally applies to web development. Earlier this week, the National Federation of the Blind (NFB) filed a lawsuit against Target stating that their website is not accessible to the blind; that Target [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/development/" title="Development">Development</a></p><p><em>I originally wrote this article back in October 2006 for my blog. Some of the information is a little old, but it still generally applies to web development.</em></p>
<p>Earlier this week, the <a title="National Federation of the Blind website" href="http://www.nfb.org/" target="_blank">National Federation of the Blind</a> (NFB) filed a lawsuit against <a title="Target online website" href="http://www.target.com/" target="_blank">Target</a> stating that their <a title="News link about NFB suing Target" href="http://www.usatoday.com/news/nation/2006-10-25-blind_x.htm" target="_blank">website is not accessible to the blind</a>; that Target ‘discriminates against the visually impaired.’ In 2002, a lawsuit was also filed against Southwest Airlines stating that their online reservation system didn’t allow visually impaired customers to easy purchase tickets. Since then, Southwest Airlines has updated their system to make it easier for the blind to navigate their website.</p>
<p>On Wednesday, in my Human-Computer Interaction class, I got to see first hand how the visually impaired interact with websites such as Southwest.com and Target.com. Using a program called <a title="JAWS website" href="http://www.freedomscientific.com/fs_products/software_jaws.asp" target="_blank">JAWS</a>, a popular screen reading program developed by Freedom Scientific, a blind classmate demonstrated how he interacts with these websites. He first demonstrated how easily he navigates through Southwest Airlines’ reservation system, explaining what the JAWS program does and says along the way. Then he demonstrated Target’s online store, and explained why it is hard for him to navigate. You could really tell a difference between the two. But more on that later…</p>
<p>This brings up a good point… that all web developers need to start focusing more on making their websites accessible for the visually impaired. The good thing about this is that it is very easy to make a website accessible. All it takes is some proper planning during the design of the website, adding some attributes within the HTML tags during the development process, and a little more usability testing that focuses on accessibility.</p>
<p>The important thing to remember during development is that most of the time, to create an accessible website, all you need to do is add the <a title="Information about the image tag" href="http://w3schools.com/tags/tag_img.asp" target="_blank">‘alt’ attribute to your ‘img’ tags</a>, which should include a short description about what the image is. The ‘alt’ attribute is also important for people who have images turned off, which decreases page load time; instead of the image, they will see the text that is set in the ‘alt’ attribute.</p>
<p>Now back to the demonstration… If you take a look at the source code for Southwest.com, you can notice some things that allow screen readers to function as they should. First off, there is a very small 1 pixel by 1 pixel link at the top left of the web page. You can actually click on this link (the mouse pointer will change when you hover over it). This link that is an anchor to an area below the top navigation bar called ‘content’. This is called a ’skip navigation’ link, and is very useful if you want to, well, skip the top navigation. Next, all the links in the top navigation bar are images, and all the images have an ‘alt’ attribute. One thing that I noticed is that the ‘alt’ attribute for the ‘Special Offers’ link does not say ‘Special Offers’, but rather ‘Click ‘n Save’.</p>
<p>For the Target website, things change dramatically. Looking at the source code, they’ve done a good job at putting the ‘alt’ attribute in for the image links, but they are all empty! So what does this do to the screen reader? Not a whole lot. If the ‘alt’ attribute is blank/empty, it instead reads where the webpage is linked to. So, for example, instead of saying ‘My Account’, it says:</p>

<div class="wp_codebox"><table><tr id="p1914"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p19code14"><pre class="html" style="font-family:monospace;">/gp/myaccount/homepage.html/ref=nav2_ma/601-2006065-3512918</pre></td></tr></table></div>

<p>And it does this one-after-another for each link. When you listen to it, all you hear is a bunch of letters and numbers in a non-stop stream of useless information.</p>
<p>In an effort to keep websites accessible to the visually impaired, the <a title="World Wide Web Consortium website" href="http://www.w3.org/" target="_blank">W3C</a> has <a title="Web Content Accessibility Guidelines" href="http://www.w3.org/TR/WAI-WEBCONTENT/" target="_blank">Web Content Accessibility Guidelines</a>, which describe what designers and developers should incorporate into their websites.  Also, the government has a <a title="Section 508 checklist" href="http://webaim.org/standards/508/checklist.php" target="_blank">set of standards</a> called the <a title="Section 508 website" href="http://www.section508.gov/index.cfm?&amp;FuseAction=Content&amp;ID=12" target="_blank">Section 508</a>. There are also tools for checking to see if your web pages are accessible.  These include <a title="WebXACT website" href="http://webxact.watchfire.com/" target="_blank">WebXACT</a> and the <a title="WAVE 3.5 Accessibility Tool" href="http://dev.wave.webaim.org/index.jsp" target="_blank">WAVE 3.5 Accessibility Tool</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2008/12/web-accessibility-for-the-visually-impaired/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USATT Ratings Tools</title>
		<link>http://cjsharp.com/2008/06/usatt-ratings-tools/</link>
		<comments>http://cjsharp.com/2008/06/usatt-ratings-tools/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 03:47:24 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=9</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/projects/" title="Projects">Projects</a></p>Update: It looks like the data layout for the source pages have changed, and some data in the applications are missing because of this. Instead of updating the tools listed below, I am instead working on a new website for the Ratings Tools. Please be patient while I work on the new site. Thanks! The [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/projects/" title="Projects">Projects</a></p><p><em><strong>Update:</strong> It looks like the data layout for the source pages have changed, and some data in the applications are missing because of this. Instead of updating the tools listed below, I am instead working on a new website for the Ratings Tools. Please be patient while I work on the new site. Thanks! </em></p>
<p>The USATT Ratings Tools are now back online. I didn&#8217;t bother with rewriting all the tools yet because I am still thinking of a better way to gather/present the data. So here are the version one&#8217;s of the Ratings Tools:</p>
<p><strong><a href="http://cjsharp.com/projects/ratings_tools/ph_analysis.php">ph Analysis</a></strong><br />
This tool provides a breakdown of matches for a player. The analysis was created by Paul Holliger, who was originally compiling the information by hand in a spreadsheet. Players can use the analysis for multiple reasons: scouting opponents, finding opponent/personal weaknesses, tracking player progression, and so on. The tool allows you to specify the start date, end date, highest rating, or lowest rating of the matches to analyze. The analysis will report matches based on ratings group (100 point increments). At the bottom of the report, a full analysis is presented, along with the overall win/loss percentage.</p>
<p><strong><a href="http://cjsharp.com/projects/ratings_tools/matchups.php">Matchups</a></strong><br />
This tool displays all matches between two players. This tool is what start the whole Ratings Tools idea. Simply specify two people, a player and an opponent, and view all the matches that they have played against each other, along with the tournament, score, and match result.</p>
<p><strong><a href="http://cjsharp.com/projects/ratings_tools/most_matches.php">Most Matches</a></strong><br />
This tool displays  the opponents that a player has played the most. This tool takes the same idea as Matchups, but shows a list of opponents a player has played, along with the number of wins and losses against the opponent. The list is ordered by opponents the player has played the most.</p>
<p><strong><a href="http://cjsharp.com/projects/ratings_tools/all_matches.php">All Matches</a></strong><br />
This tool simply lists all the matches a player has played. There is not much more to it than this. The list is order by the most recent tournament.</p>
<p><strong><a href="http://cjsharp.com/projects/ratings_tools/top_players.php">Top Players</a></strong><br />
This tool returns the top player in each state. The tool displays the top player in each state that is a current USATT member and the top player in each state overall. It also displays the top U.S. player and top foreign player.</p>
]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2008/06/usatt-ratings-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Top Firefox Extensions</title>
		<link>http://cjsharp.com/2008/05/my-top-firefox-extensions/</link>
		<comments>http://cjsharp.com/2008/05/my-top-firefox-extensions/#comments</comments>
		<pubDate>Fri, 30 May 2008 21:38:15 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=8</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/web-stuff/firefox/" title="Firefox">Firefox</a></p>A lot of people ask me &#8220;What are your favorite Firefox extensions?&#8221; Ok. Actually, they don&#8217;t. But if they did, here is what I would say: Firebug Firebug is arguably the best extension out for web developers. I use it mainly for inspecting the HTML of pages, viewing CSS styles that are applied to HTML [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/web-stuff/firefox/" title="Firefox">Firefox</a></p><p>A lot of people ask me &#8220;What are your favorite Firefox extensions?&#8221; Ok. Actually, they don&#8217;t. But if they did, here is what I would say:</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1843"><strong>Firebug</strong></a><br />
Firebug is arguably the best extension out for web developers. I use it mainly for inspecting the HTML of pages, viewing CSS styles that are applied to HTML elements, and editing CSS styles and HTML text in real-time. It&#8217;s also really helpful for debugging JavaScript, viewing Ajax calls, and inspecting a web page&#8217;s DOM.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/60"><strong>Web Developer</strong></a><br />
If Firebug is the not best extension out for web developers, then the Web Developer extension is the best. It has so many useful tools: disable styles, view cookies and session information, the ruler, and so on.</p>
<p><strong><a href="https://addons.mozilla.org/en-US/firefox/addon/271">Colorzilla</a></strong><br />
I have this extension mainly because it allows me to find out colors on a web page without opening Photoshop. Though, I wish it would work with embedded Flash files.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/684"><strong>FireFTP</strong></a><br />
I love the convenience of having an fully-functional FTP client in your browser.</p>
<p><strong><a href="https://addons.mozilla.org/en-US/firefox/addon/3829">Live HTTP Headers</a> </strong>&amp; <a href="https://addons.mozilla.org/en-US/firefox/addon/966"><strong>Tamper Data</strong></a><br />
Pretty self explanatory. View and modify the HTTP headers of your web pages. Great tool.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/3615"><strong>del.icio.us Bookmarks</strong></a><br />
This is a must-have extension for anyone who uses del.icio.us. View your bookmarks in your sidebar. Bookmark a page directly to del.icio.us. Hide your browser&#8217;s bookmarks menu. It&#8217;s a great complement to del.icio.us.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/2410"><strong>Foxmarks Bookmark Synchronizer</strong></a><br />
I started using Foxmarks before I opened my del.icio.us account. Eventhough I removed all my bookmarks saved in my browser since, I still use it to keep my bookmarks toolbar synced up.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/39"><strong>Mouse Gestures</strong></a><br />
I probably use mouse gestures too much. It&#8217;s now a habit for me to use a mouse gesture in any browser I work in, only to find out it doesn&#8217;t work. Mouse gestures just make things easier.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/26"><strong>Download Statusbar</strong></a><br />
Another convenience extension. All current downloads in the statusbar. Pretty simple.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/636"><strong>PDF Download</strong></a><br />
Once again, another convenience extension, mainly because for a while, I only had the trial version of Adobe CS3, and it wouldn&#8217;t let me open PDFs. Plus, a PDF auto-opening in your browser is just annoying.</p>
]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2008/05/my-top-firefox-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP and WAMP: Configuring CakePHP to Handle Multiple Apps Around One Core Cake Library</title>
		<link>http://cjsharp.com/2008/05/cakephp-and-wamp-configuring-cakephp-to-handle-multiple-apps-around-one-core-cake-library/</link>
		<comments>http://cjsharp.com/2008/05/cakephp-and-wamp-configuring-cakephp-to-handle-multiple-apps-around-one-core-cake-library/#comments</comments>
		<pubDate>Thu, 29 May 2008 00:47:10 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=6</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/development/cakephp-programming/" title="CakePHP">CakePHP</a></p>I recently decided to start developing some applications based on the CakePHP MVC framework on my local machine using WAMP. The CakePHP default installation allows you to create one application for one set of core Cake library files. I wanted to separate my application files from the core Cake library files, so if there are [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/development/cakephp-programming/" title="CakePHP">CakePHP</a></p><p>I recently decided to start developing some applications based on the CakePHP MVC framework on my local machine using WAMP. The CakePHP default installation allows you to create one application for one set of core Cake library files. I wanted to separate my application files from the core Cake library files, so if there are any library updates, I wouldn&#8217;t need to mess with the application files. After some quick research, I found that this was pretty easy.</p>
<p>First, the CakePHP documentation provides <a href="http://book.cakephp.org/view/32/installation#advanced-installation-35">instructions on an advanced installation</a> of the framework. For my installation within my WAMP stack, I refered to <a href="http://groups.google.com/group/cake-php/browse_thread/thread/b8fcd502435ac643/fd73d17ed3bfde35?lnk=gst&amp;q=wamp#fd73d17ed3bfde35">this post over at the CakePHP Google Groups</a> site.</p>
<p>The main file to modify is the &#8216;[app root]/webroot/index.php&#8217; file. Here is a snippet of how one of my apps is configured:</p>

<div class="wp_codebox"><table><tr id="p616"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p6code16"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ROOT'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ROOT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'C:'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'wamp'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'www'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'concepts'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'APP_DIR'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'APP_DIR'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cake_app1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CAKE_CORE_INCLUDE_PATH'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CAKE_CORE_INCLUDE_PATH'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'C:'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'wamp'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'www'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'concepts'</span><span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #0000ff;">'cake_core'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2008/05/cakephp-and-wamp-configuring-cakephp-to-handle-multiple-apps-around-one-core-cake-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching del.icio.us Account Names</title>
		<link>http://cjsharp.com/2008/05/switching-delicious-account-names/</link>
		<comments>http://cjsharp.com/2008/05/switching-delicious-account-names/#comments</comments>
		<pubDate>Wed, 28 May 2008 23:42:56 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Applications]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=5</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/web-stuff/applications/" title="Applications">Applications</a></p>A couple of days ago I realized that I have inconsistency between all my social networking website account names (the OCD kicked in). I decided to switch all my &#8216;cjsharp1&#8242; accounts over to a &#8216;cjsharp&#8217; account name (pitiful, huh). Funny thing is that between all the social networks sites I am involved in, the only [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/web-stuff/applications/" title="Applications">Applications</a></p><p>A couple of days ago I realized that I have inconsistency between all my social networking website account names (the OCD kicked in). I decided to switch all my &#8216;cjsharp1&#8242; accounts over to a &#8216;cjsharp&#8217; account name (pitiful, huh). Funny thing is that between all the social networks sites I am involved in, the only one I wanted to switch was my del.icio.us account, which is also the most complicated to switch.</p>
<p>Here is what you have to do to switch del.icio.us accounts. Unfortunately, this will not transfer your network along with it, so if you have a large network, be prepared to handle that accordingly. This also will not transfer your profile settings or your tag bundles.</p>
<ol>
<li>Create your new account through del.icio.us.</li>
<li>Log into your old account. Export your old account&#8217;s bookmarks (Settings &gt; Bookmarks &gt; Export/Backup). Be sure to include the tags and notes. It will export it to an HTML file.</li>
<li>Log out of your old account, then log into your new account.</li>
<li>Import the HTML file into your new account (Settings &gt; Bookmarks &gt; Import/Upload). By default, the &#8216;imported&#8217; tag will be appended to each bookmark. If you don&#8217;t want this tag appended, just remove it. (Or you can leave this as it is and delete the tag later). It may take some time for the bookmarks to import. It took about 5-10 minutes for my bookmarks to import. It all depends on the incoming traffic to del.icio.us and the number of bookmarks you are importing.</li>
<li>When the import is complete, view your new account&#8217;s bookmarks. You will see that all of the imported bookmarks are not shared by default. To make things more complicated, del.icio.us does not offer a &#8216;share all&#8217; function, due to <a href="http://del.icio.us/help/faq#How_do_I_share_all_my_imported_b">a couple reason listed in their FAQ</a>. To work around this, I found <a href="http://blogfresh.blogspot.com/2006/08/blogger-migration-for-delicious-and.html">this option</a> which involves pasting some JavaScript in the address bar of your browser. The quickest way to do this is to view your del.icio.us page showing as many bookmarks at one time (100), paste the JavaScript in the address bar, confirm how many bookmarks will be shared (via a JavaScript pop-up), sit back and relax. A delay is set between the requests in order to prevent del.icio.us from blocking your requests. I set my delay to 4 seconds (delay=4000) with no problems.</li>
<li>Finally, once all of your bookmarks are imported and shared, you&#8217;ll want to delete your old account. Log out of your new account and log back into your old account, and delete your account (Settings &gt; Account &gt; Delete Account).</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2008/05/switching-delicious-account-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JS table_to_array and Scroller Lightbox</title>
		<link>http://cjsharp.com/2008/05/back-online-js-table_to_array-and-scroller-lightbox/</link>
		<comments>http://cjsharp.com/2008/05/back-online-js-table_to_array-and-scroller-lightbox/#comments</comments>
		<pubDate>Wed, 28 May 2008 21:55:13 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=7</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/development/javascript/" title="JavaScript">JavaScript</a><a href="http://cjsharp.com/category/projects/" title="Projects">Projects</a></p>I just uploaded the two previous JavaScript-related projects: JS table_to_array and Scroller Lightbox. Nothing has changed from the previous site. JS table_to_array A script that takes a well-formed table and converts the data into a multi-dimensional array. The script will maintain all HTML tags within the table&#8217;s &#60;td&#62; tags. Scroller Lightbox A quick mashup of [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/development/javascript/" title="JavaScript">JavaScript</a><a href="http://cjsharp.com/category/projects/" title="Projects">Projects</a></p><p>I just uploaded the two previous JavaScript-related projects: JS table_to_array and Scroller Lightbox. Nothing has changed from the previous site.</p>
<p><a href="http://cjsharp.com/projects/js_table_to_array/"><strong>JS table_to_array</strong></a><br />
A script that takes a well-formed table and converts the data into a multi-dimensional array. The script will maintain all HTML tags within the table&#8217;s &lt;td&gt; tags.</p>
<p><a href="http://cjsharp.com/projects/scroller_lightbox/"><strong>Scroller Lightbox</strong></a><br />
A quick mashup of <a href="http://www.thumbnailscroller.com/">Thumbnail Scroller</a> and <a href="http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm">Lightbox JS v2.03</a>.<br />
<em><strong>Update:</strong> It appears this is no longer working in some IE browsers. Since this is a mashup of two scripts, both of which are not created by me, I cannot provide support for any cross-browser issues.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2008/05/back-online-js-table_to_array-and-scroller-lightbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time for Something New</title>
		<link>http://cjsharp.com/2008/05/time-for-something-new/</link>
		<comments>http://cjsharp.com/2008/05/time-for-something-new/#comments</comments>
		<pubDate>Sat, 24 May 2008 21:59:05 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://cjsharp.com/blog/?p=3</guid>
		<description><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/news/" title="News">News</a></p>Ya. So&#8230; every once in a while, I get tired of my old [micro] blogging tool, and decide to switch to another one. Well&#8230; that just happened. Gelato CMS was fun for a little while, but it wore off quickly. So I&#8217;m back to WordPress. Where is the rest of the stuff? It&#8217;s all still [...]]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://cjsharp.com/category/news/" title="News">News</a></p><p>Ya. So&#8230; every once in a while, I get tired of my old [micro] blogging tool, and decide to switch to another one. Well&#8230; that just happened. Gelato CMS was fun for a little while, but it wore off quickly. So I&#8217;m back to WordPress.</p>
<p><strong>Where is the rest of the stuff?</strong><br />
It&#8217;s all still around. <em>Ratings Tools</em> is going to get overhauled so it is easier to maintain. I might also look into storing data, but we&#8217;ll see what comes of that. The various <em>JS Hacks</em> are also still available, and will be posted sometime in the future.</p>
<p>In the meantime, check out <a href="http://del.icio.us/cjsharp">my del.icio.us</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://cjsharp.com/2008/05/time-for-something-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

