<?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"
	>

<channel>
	<title>Surgical Words</title>
	<atom:link href="http://phillip.toasterlogic.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://phillip.toasterlogic.com</link>
	<description>my mind is filled with radio cures</description>
	<pubDate>Fri, 01 Aug 2008 13:06:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>A List Apart Survey</title>
		<link>http://phillip.toasterlogic.com/a-list-apart-survey/</link>
		<comments>http://phillip.toasterlogic.com/a-list-apart-survey/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 13:06:15 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[internet]]></category>

		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=317</guid>
		<description><![CDATA[Definitely a well-done survey. Not too long, and had an option for almost all of my answers. I can&#8217;t wait to see the results.

]]></description>
			<content:encoded><![CDATA[<p>Definitely a well-done survey. Not too long, and had an option for almost all of my answers. I can&#8217;t wait to see the results.</p>
<p><a href="http://alistapart.com/articles/survey2008"><img src="/images/alasurvey.gif" alt="A List Apart: Survey for people who make websites 2008" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/a-list-apart-survey/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OpenDNS vs. Earthlink</title>
		<link>http://phillip.toasterlogic.com/opendns-vs-earthlink/</link>
		<comments>http://phillip.toasterlogic.com/opendns-vs-earthlink/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 12:49:58 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[computing]]></category>

		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=316</guid>
		<description><![CDATA[I&#8217;d heard about OpenDNS being significantly faster than stock DNS servers, mostly because of more aggressive caching. I followed their instructions for configuring the service and ran a few queries with dig to see how it performed against my stock Earthlink DNS servers, the venerable itchy and scratchy.
Results after the cut.

Results
Here are two queries using [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d heard about <a href="https://www.opendns.com">OpenDNS</a> being <a href="http://www.j2eegeek.com/blog/2006/10/18/opendns-rocks/">significantly faster</a> than stock DNS servers, mostly because of more aggressive caching. I followed <a href="https://www.opendns.com/start?device=apple-osx-tiger">their instructions</a> for configuring the service and ran a few queries with <code>dig</code> to see how it performed against my stock Earthlink DNS servers, the venerable <code>itchy</code> and <code>scratchy</code>.</p>
<p>Results after the cut.<br />
<span id="more-316"></span></p>
<h3>Results</h3>
<p>Here are two queries using Earthlink servers:</p>
<pre>
elli:~ phil$ time dig facebook.com &#038;&#038; time dig apple.com

; &lt;&lt;&gt;&gt; DiG 9.3.4 &lt;&lt;&gt;&gt; facebook.com
;; global options:  printcmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 50925
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;facebook.com.                  IN      A

;; ANSWER SECTION:
facebook.com.           1700    IN      A       69.63.176.140
facebook.com.           1700    IN      A       69.63.178.11

;; AUTHORITY SECTION:
facebook.com.           12269   IN      NS      dns05.sf2p.tfbnw.net.
facebook.com.           12269   IN      NS      dns04.sf2p.tfbnw.net.
facebook.com.           12269   IN      NS      ns1.facebook.com.
facebook.com.           12269   IN      NS      ns2.facebook.com.

;; ADDITIONAL SECTION:
ns2.facebook.com.       3207    IN      A       204.74.67.132
dns05.sf2p.tfbnw.net.   131959  IN      A       69.63.176.9
dns04.sf2p.tfbnw.net.   131577  IN      A       69.63.176.8
ns1.facebook.com.       3207    IN      A       204.74.66.132

<strong>;; Query time: 32 msec</strong>
;; SERVER: 207.69.188.185#53(207.69.188.185)
;; WHEN: Wed Jul 23 11:23:35 2008
;; MSG SIZE  rcvd: 216

; &lt;&lt;&gt;&gt; DiG 9.3.4 &lt;&lt;&gt;&gt; apple.com
;; global options:  printcmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 48776
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 6, ADDITIONAL: 5

;; QUESTION SECTION:
;apple.com.                     IN      A

;; ANSWER SECTION:
apple.com.              124     IN      A       17.112.152.57
apple.com.              124     IN      A       17.149.160.49

;; AUTHORITY SECTION:
apple.com.              92770   IN      NS      nserver2.apple.com.
apple.com.              92770   IN      NS      nserver.asia.apple.com.
apple.com.              92770   IN      NS      nserver.apple.com.
apple.com.              92770   IN      NS      nserver4.apple.com.
apple.com.              92770   IN      NS      nserver.euro.apple.com.
apple.com.              92770   IN      NS      nserver3.apple.com.

;; ADDITIONAL SECTION:
nserver.asia.apple.com. 85265   IN      A       17.82.254.3
nserver.euro.apple.com. 85934   IN      A       17.72.133.64
nserver2.apple.com.     172562  IN      A       17.254.0.59
nserver3.apple.com.     431998  IN      A       17.112.144.50
nserver4.apple.com.     172562  IN      A       17.112.144.59

<strong>;;; Query time: 32 msec</strong>
;; SERVER: 207.69.188.185#53(207.69.188.185)
;; WHEN: Wed Jul 23 11:23:35 2008
;; MSG SIZE  rcvd: 284
</pre>
<p>And with OpenDNS:</p>
<pre>
elli:~ phil$ time dig facebook.com &#038;&#038; time dig apple.com    

; &lt;&lt;&gt;&gt; DiG 9.3.4 &lt;&lt;&gt;&gt; facebook.com
;; global options:  printcmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 3356
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;facebook.com.                  IN      A

;; ANSWER SECTION:
facebook.com.           2606    IN      A       69.63.176.140
facebook.com.           2606    IN      A       69.63.178.11

<strong>;; Query time: 48 msec</strong>
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Wed Jul 23 11:22:12 2008
;; MSG SIZE  rcvd: 62

; &lt;&lt;&gt;&gt; DiG 9.3.4 &lt;&lt;&gt;&gt; apple.com
;; global options:  printcmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 36024
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;apple.com.                     IN      A

;; ANSWER SECTION:
apple.com.              2738    IN      A       17.149.160.49
apple.com.              2738    IN      A       17.112.152.57

<strong>;; Query time: 46 msec</strong>
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Wed Jul 23 11:22:13 2008
;; MSG SIZE  rcvd: 59
</pre>
<h3>Analysis</h3>
<p>It may be that OpenDNS provides the faster response on subsequent requests, which would make sense if caching is their primary means of a boost. <code>lookupd</code> caches aggressively locally anyway, though, so that&#8217;s a moot point.</p>
<p>After learning about <a href="http://kb.earthlink.net/case.asp?article=187117">Earthlink&#8217;s search and ad-free DNS servers</a>, I&#8217;m sold on what I already have.</p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/opendns-vs-earthlink/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reinstall Windows</title>
		<link>http://phillip.toasterlogic.com/reinstall-windows/</link>
		<comments>http://phillip.toasterlogic.com/reinstall-windows/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 20:48:10 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[computing]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=313</guid>
		<description><![CDATA[Three days ago, I finally finished reinstalling Windows 2000 on our family machine. What a task. Things that went wrong:

STOP: INACCESSIBLE_BOOT_DEVICE  error after installing Service Pack 4
Continued error after &#8220;repair installation&#8221; from CD
STOP: KERNEL_STACK_INPAGE_ERROR error during a full reinstall from CD

I finally ended up making an illegal copy of my Windows 2000 disc (ironically, [...]]]></description>
			<content:encoded><![CDATA[<p>Three days ago, I finally finished reinstalling Windows 2000 on our family machine. What a task. Things that went wrong:</p>
<ul>
<li>STOP: <a href="http://support.microsoft.com/kb/822052">INACCESSIBLE_BOOT_DEVICE</a>  error after installing Service Pack 4</li>
<li>Continued error after &#8220;repair installation&#8221; from CD</li>
<li>STOP: <a href="http://support.microsoft.com/kb/228753">KERNEL_STACK_INPAGE_ERROR</a> error <em>during</em> a full reinstall from CD</li>
</ul>
<p>I finally ended up making an <del>illegal</del> copy of my Windows 2000 disc (ironically, using a Mac), which sorted out whatever read errors were occurring and worked much better. I also made my father perform the installation from the fresh CD. He seems to have magic <acronym title="Information Technology">IT</acronym> fingers. I am not sure which was more effective: a new CD or my father.</p>
<p>More problems:</p>
<ul>
<li>Service Pack 4 installer&#8217;s &#8220;update.exe&#8221; crashed, because it had &#8220;generated errors&#8221;</li>
</ul>
<p>I fixed this by running the following excellent recovery command with the Windows 2000 CD in the drive:</p>
<p><code>sfc /scannow</code></p>
<p>This took about half an hour and solved the Service Pack 4 upgrade issue.</p>
<p>Another failure while installing Flight Simulator 2004: Century of Flight:</p>
<ul>
<li>Installer caused a system freeze and silent reboot, with no error message</li>
</ul>
<p>I solved this by running ScanDisk on the destination drive. It&#8217;s scary that a bad block can bring Windows down…</p>
<p>My notes and task list appear after the jump.<br />
<span id="more-313"></span><br />
<a href='http://phillip.toasterlogic.com/wp-content/uploads/2008/06/reinstall_1.jpg'><img src="http://phillip.toasterlogic.com/wp-content/uploads/2008/06/reinstall_1-231x300.jpg" alt="" title="Windows Reinstall Task List - 1" width="231" height="300" class="alignnone size-medium wp-image-315" /></a><a href='http://phillip.toasterlogic.com/wp-content/uploads/2008/06/reinstall_2.jpg'><img src="http://phillip.toasterlogic.com/wp-content/uploads/2008/06/reinstall_2-231x300.jpg" alt="" title="Windows Reinstall Task List - 2" width="231" height="300" class="alignnone size-medium wp-image-314" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/reinstall-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>No, Linksys&#8230;</title>
		<link>http://phillip.toasterlogic.com/no-linksys/</link>
		<comments>http://phillip.toasterlogic.com/no-linksys/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 16:46:25 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=311</guid>
		<description><![CDATA[I&#8217;m sorry, that&#8217;s not how we write drivers. Drivers are not services.

It&#8217;s bad enough that Linksys foists control away from Windows to their own wireless manager, but even worse that it&#8217;s not in the places most people look: Start&#8594;Programs&#8594;Startup and HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Run. Fail.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sorry, that&#8217;s not how we write drivers. Drivers are not services.</p>
<p><a href='http://phillip.toasterlogic.com/wp-content/uploads/2008/06/linksys_driver.png'><img src="http://phillip.toasterlogic.com/wp-content/uploads/2008/06/linksys_driver-300x67.png" alt="Linksys doesn\&#039;t understand the difference between a driver and a service." title="Linksys Driver Service" width="300" height="67" class="aligncenter size-medium wp-image-312" /></a></p>
<p>It&#8217;s bad enough that Linksys foists control away from Windows to their own wireless manager, but even worse that it&#8217;s not in the places most people look: Start&rarr;Programs&rarr;Startup and <code>HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Run</code>. Fail.</p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/no-linksys/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tubes are Clogged</title>
		<link>http://phillip.toasterlogic.com/tubes-are-clogged/</link>
		<comments>http://phillip.toasterlogic.com/tubes-are-clogged/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 17:33:50 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[computing]]></category>

		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=308</guid>
		<description><![CDATA[Firefox 3 was released about 30 minutes ago. 
Here&#8217;s what Internet Health Report has to say:

Isn&#8217;t Mozilla located in the Valley?
Update (Tuesday at 7:01pm EST): Also, California legalized same-sex marriage today. Perhaps it had more to do with that.
]]></description>
			<content:encoded><![CDATA[<p>Firefox 3 was released about 30 minutes ago. </p>
<p>Here&#8217;s what <a href="http://internetpulse.net/">Internet Health Report</a> has to say:</p>
<p><img src="http://phillip.toasterlogic.com/wp-content/uploads/2008/06/picture-5.png" alt="The Internets are broken!" title="Clogged Tubes" width="407" height="194" class="aligncenter size-full wp-image-309" /></p>
<p>Isn&#8217;t Mozilla located in the Valley?</p>
<p><em>Update (Tuesday at 7:01pm EST): Also, <a href="http://cnn.com/2008/US/06/17/samesex.marriage.ap/index.html?iref=newssearch">California legalized same-sex marriage</a> today. Perhaps it had more to do with that.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/tubes-are-clogged/feed/</wfw:commentRss>
		</item>
		<item>
		<title>YouTube SEO Problem</title>
		<link>http://phillip.toasterlogic.com/youtube-seo-problem/</link>
		<comments>http://phillip.toasterlogic.com/youtube-seo-problem/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 21:42:27 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[computing]]></category>

		<category><![CDATA[internet]]></category>

		<category><![CDATA[observations]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=305</guid>
		<description><![CDATA[YouTube is a mostly fantastic site, but they&#8217;re still in a transition stage to tight integration with search engines. This is still a common result to see for a video search on Google:

Usually &#60;noscript&#62; tags aren&#8217;t the best search description. I wonder how they&#8217;re addressing this, if they are.
]]></description>
			<content:encoded><![CDATA[<p>YouTube is a mostly fantastic site, but they&#8217;re still in a transition stage to tight integration with search engines. This is still a common result to see for a video search on Google:</p>
<p><a href='http://phillip.toasterlogic.com/wp-content/uploads/2008/06/youtube_result.png'><img src="http://phillip.toasterlogic.com/wp-content/uploads/2008/06/youtube_result-300x49.png" alt="YouTube result from a Google search" title="YouTube Result" width="300" height="49" class="aligncenter size-medium wp-image-307" /></a></p>
<p>Usually <code>&lt;noscript&gt;</code> tags aren&#8217;t the best search description. I wonder how they&#8217;re addressing this, if they are.</p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/youtube-seo-problem/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hot Asphalt</title>
		<link>http://phillip.toasterlogic.com/hot-asphalt/</link>
		<comments>http://phillip.toasterlogic.com/hot-asphalt/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 15:55:47 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=304</guid>
		<description><![CDATA[Walking through the door, I felt almost too air-conditioned, as though the restaurant was prepared too soon for the inevitable summer heat. Maybe the sensation was partially from the upset of routine, from eating lunch at eleven, or maybe from the empty booths and chairs.
I walked to the counter and stood with my arms crossed, [...]]]></description>
			<content:encoded><![CDATA[<p>Walking through the door, I felt almost too air-conditioned, as though the restaurant was prepared too soon for the inevitable summer heat. Maybe the sensation was partially from the upset of routine, from eating lunch at eleven, or maybe from the empty booths and chairs.</p>
<p>I walked to the counter and stood with my arms crossed, as I always do, pretending to decide but already knowing what I’m going to order. I stepped forward and asked for a #1, with a milkshake substituted for the drink. I paid and moved to the side, leaning against the scuffed gray tile on the wall.</p>
<p>As I waited, two people my age—a boy and a girl—walked in. I felt like I knew the girl from somewhere, but couldn’t place her. They ordered and sat down in a booth, talking to each other in bursts. I took my food and sat on the other side of the room. </p>
<p>It occurred to me, suddenly, that the person might be a friend-of-a-friend named Mary, but with a different hair color from the last time I’d seen her. I watched her as I ate, trying to spot some identifying detail that would resolve the issue in my mind. I knew she lived in the same part of town as me, but I could not remember any details. I considered saying hello. I also considered the result of saying hello if she was someone else, something that seemed incredibly embarrassing and grounds for having to leave the restaurant. I debated this in my mind as I started drinking my milkshake.</p>
<p>Finally, they got up to leave and started walking towards me. I could see her face, now, and felt more sure.</p>
<p>“Mary?” I said to nobody in particular.</p>
<p>She answered, “yeah?” I had guessed correctly.</p>
<p>“I knew you lived on my side of town, but didn’t know you were this close,” I said. “I’m Celeste’s boyfriend.”</p>
<p>“Oh yeah! Hey.” She paused. “I do live out here. I thought you lived in Greenville or something.”</p>
<p>Her boyfriend wandered out the door, disinterested. She stayed. It closed behind him with a rush of warm air.</p>
<p>We talked about her summer plans, about how she was going to volunteer at Bonnaroo, and about who was headlining. We only spoke for a minute or two before saying goodbye. She began to walk off.</p>
<p>She opened the door, eyeing the parking lot for her boyfriend.</p>
<p>&#8220;Glad to be done?&#8221; I asked, turning in my chair. She looked back at me, holding the door open.</p>
<p>&#8220;Sad,&#8221; she said. &#8220;Sad—and glad.&#8221;</p>
<p>I sat in the cold building and watched her walk off through the drive-through lane. Part of me wanted to run after her, to tell her anything else—to try something, to write something, to get a new boyfriend over the summer. Maybe the feeling in my stomach was just the remnants of my previous anxiety, but it felt different now. I sat in front of the window until the two, now rejoined, were out of my sight and shouting distance.</p>
<p>And so we all wait, as we watch each other cut across the hot asphalt, growing steadily smaller. We have, perhaps, just this summer—two months or so—to push our chair back, run into the sunlight, and shout.</p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/hot-asphalt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Amazon URL Rewrite</title>
		<link>http://phillip.toasterlogic.com/amazon-url-rewrite/</link>
		<comments>http://phillip.toasterlogic.com/amazon-url-rewrite/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 03:53:45 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[internet]]></category>

		<category><![CDATA[observations]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=303</guid>
		<description><![CDATA[Amazon creates huge URLs with lots of search engine keywords. Take, for instance:
http://www.amazon.com/Nikon-Digital-18-55mm-3-5-5-6G-Zoom-Nikkor/dp/B000KJQ1DG
Oddly, the only part that matters is the /dp/B000KJQ1DG product code.
So you can create URLs that link to products, but insult your friends. Or are a bit more tame:
http://www.amazon.com/dp/this part is irrelevant/B000KJQ1DG
]]></description>
			<content:encoded><![CDATA[<p>Amazon creates huge URLs with lots of search engine keywords. Take, for instance:</p>
<p><code>http://www.amazon.com/Nikon-Digital-18-55mm-3-5-5-6G-Zoom-Nikkor/dp/B000KJQ1DG</code></p>
<p>Oddly, the only part that matters is the <code>/dp/B000KJQ1DG</code> product code.</p>
<p>So you can create URLs that link to products, but insult your friends. Or are a bit more tame:</p>
<p><code><a href="http://www.amazon.com/dp/this%20part%20is%20irrelevant/B000KJQ1DG">http://www.amazon.com/dp/this part is irrelevant/B000KJQ1DG</a></code></p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/amazon-url-rewrite/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Heat Sink</title>
		<link>http://phillip.toasterlogic.com/heat-sink/</link>
		<comments>http://phillip.toasterlogic.com/heat-sink/#comments</comments>
		<pubDate>Tue, 13 May 2008 14:30:45 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[computing]]></category>

		<category><![CDATA[toast]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=302</guid>
		<description><![CDATA[It concerns me deeply that one can pretty effectively crisp a sandwich by placing it near the fan of a Dell.
]]></description>
			<content:encoded><![CDATA[<p>It concerns me deeply that one can pretty effectively crisp a sandwich by placing it near the fan of a Dell.</p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/heat-sink/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XML Plurality</title>
		<link>http://phillip.toasterlogic.com/xml-plurality/</link>
		<comments>http://phillip.toasterlogic.com/xml-plurality/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 14:28:00 +0000</pubDate>
		<dc:creator>phil</dc:creator>
		
		<category><![CDATA[computing]]></category>

		<category><![CDATA[observations]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://phillip.toasterlogic.com/?p=293</guid>
		<description><![CDATA[A few years ago when I was learning XML, I struggled to understand the distinction between tags and attributes. I knew what they were, but couldn&#8217;t figure out when to use which one. In some instances, both seem appropriate. For example, take a customer record:

&#60;customer&#62;
  &#60;id&#62;4222&#60;/id&#62;
  &#60;name&#62;John A. Doe&#60;/name&#62;
  &#60;address&#62;123 Beech St., [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago when I was learning XML, I struggled to understand the distinction between tags and attributes. I knew what they were, but couldn&#8217;t figure out when to use which one. In some instances, both seem appropriate. For example, take a customer record:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;customer<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;id<span style="font-weight: bold; color: black;">&gt;</span></span></span>4222<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/id<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name<span style="font-weight: bold; color: black;">&gt;</span></span></span>John A. Doe<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address<span style="font-weight: bold; color: black;">&gt;</span></span></span>123 Beech St., Anytown, USA<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/address<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/customer<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>This is the type and structure of examples given in XML tutorials. However, one could also mark up the data like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;customer</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;4222&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;John A. Doe&quot;</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">&quot;123 Anytown, USA&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span></pre></div></div>

<p>So what, exactly, is the distinction? I realized the obvious after a day of thinking:</p>
<p style="font-size:large">Can you have more than one of the item?</p>
<p>This means the first example is wrong. A <code>customer</code> can&#8217;t have more than one <code>id</code>, and this is the fatal flaw of the tutorials.</p>
<p>Depending on the complexity of our application, a <code>customer</code> could possibly have more than one <code>name</code> or <code>address</code>, but for the majority of basic database-structured applications, the all-attribute example above is more appropriate.</p>
<p>Regardless of how you go and write XML, be sure not to commit the mistake of differentiating between tags and attributes <em>purely by how deep, or nested,</em> the tag is.</p>
<p>In an application with multiple <code>name</code>s and <code>address</code>s, here&#8217;s how I would structure the XML:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;customer</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;4442&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name</span> <span style="color: #000066;">first</span>=<span style="color: #ff0000;">&quot;John&quot;</span> <span style="color: #000066;">middle</span>=<span style="color: #ff0000;">&quot;A&quot;</span> <span style="color: #000066;">last</span>=<span style="color: #ff0000;">&quot;Calvin&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Home&quot;</span> <span style="color: #000066;">street</span>=<span style="color: #ff0000;">&quot;123 Beech St.&quot;</span> <span style="color: #000066;">city</span>=<span style="color: #ff0000;">&quot;Anytown&quot;</span> <span style="color: #000066;">country</span>=<span style="color: #ff0000;">&quot;USA&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;customer<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div></div>

<p>Even while writing this example, I automatically started to break the <code>address</code> into tags for <code>street</code> and <code>city</code>. After a second, I realized: an <code>address</code> can only have one street and city.</p>
<p>It&#8217;s a hard habit to break.</p>
]]></content:encoded>
			<wfw:commentRss>http://phillip.toasterlogic.com/xml-plurality/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
