<?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>Bricks Without Clay</title>
	<atom:link href="http://www.brickswithoutclay.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brickswithoutclay.com</link>
	<description>Let my machine talk to you.</description>
	<pubDate>Wed, 21 May 2008 14:22:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Getting the raw images in Pages documents</title>
		<link>http://www.brickswithoutclay.com/archives/2008/05/getting-the-raw-images-in-pages-documents/</link>
		<comments>http://www.brickswithoutclay.com/archives/2008/05/getting-the-raw-images-in-pages-documents/#comments</comments>
		<pubDate>Wed, 21 May 2008 04:45:19 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Apple]]></category>

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

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

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

		<guid isPermaLink="false">http://www.brickswithoutclay.com/?p=53</guid>
		<description><![CDATA[When working with Pages (and Word), it&#8217;s hard to get the specifics of embedded images. If you want to know whether an image is a PNG or GIF or what, the interface doesn&#8217;t make it easy, as pointed out on Betalogue.
I couldn&#8217;t register to leave a comment (*cough*OpenID*cough*) so I&#8217;m writing this here post to [...]]]></description>
			<content:encoded><![CDATA[<p>When working with Pages (and Word), it&#8217;s hard to get the specifics of embedded images. If you want to know whether an image is a PNG or GIF or what, <a href="http://www.betalogue.com/2008/04/22/word-for-windows-documents-in-mac-os-x-apples-pages-more-compatible-than-word-2008/#respond">the interface doesn&#8217;t make it easy</a>, as pointed out on <a href="http://www.betalogue.com/">Betalogue</a>.</p>
<p>I couldn&#8217;t register to leave a comment (*cough*OpenID*cough*) so I&#8217;m writing this here post to say: right-click on the Pages file containing the images you want to get at, and click on &#8220;Show Package Contents&#8221;. All the images are available there as files for your perusal and eventual management. It&#8217;s quite handy. Now if only they&#8217;d <a href="http://www.brickswithoutclay.com/archives/2007/12/pages-08-documents-are-incompatible-with-pages-08/">fix the damn file format</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2008/05/getting-the-raw-images-in-pages-documents/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The State of Repeated-Word Domain Names</title>
		<link>http://www.brickswithoutclay.com/archives/2008/04/the-state-of-repeated-word-domain-names/</link>
		<comments>http://www.brickswithoutclay.com/archives/2008/04/the-state-of-repeated-word-domain-names/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 00:58:33 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Internet]]></category>

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

		<category><![CDATA[kind of really stupid]]></category>

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

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

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2008/04/the-state-of-repeated-word-domain-names/</guid>
		<description><![CDATA[I was looking at domain names using Instant Domain Search, and I tried some domains consisting of words (or noises) that are commonly repeated over and over. Or rather, if you hear a repeated word or noise, chances are good that the word or noise is one of these words. My findings are presented below. [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking at domain names using <a href="http://instantdomainsearch.com">Instant Domain Search</a>, and I tried some domains consisting of words (or noises) that are commonly repeated over and over. Or rather, if you hear a repeated word or noise, chances are good that the word or noise is one of these words. My findings are presented below. Each item in the list is a word followed by the smallest number of repetitions of that word that is still available as a domain name (.com). I call this number the word&#8217;s Available Domain Echo Number (AEDN). For instance, &#8220;me&#8221; has an AEDN of 8, meaning that the shortest available domain name consisting of repeated &#8220;me&#8221;s is &#8220;memememememememe.com&#8221;. Interestingly, the URLs consisting of 9 and 10 &#8220;me&#8221;s are taken. Here is the list:</p>
<ul>
<li>Me: 8</li>
<li>Now: 4</li>
<li>Shit: 5</li>
<li>Fuck: 7</li>
<li>Ha: 15</li>
<li>No: 9</li>
<li>Yes: 6</li>
<li>More: 6</li>
<li>Oh: 5</li>
<li>Badger: 6</li>
<li>Spam: 5</li>
<li>Echo: 4</li>
</ul>
<p>As a control group, here are some words that are not commonly repeated, and their associated AEDNs:</p>
<ul>
<li>With: 4</li>
<li>Spoon: 3</li>
<li>Grim: 2</li>
<li>Cheek: 3</li>
</ul>
<p>This proves conclusively that the items in the first list have longer AEDNs than the items in the second list, as of this writing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2008/04/the-state-of-repeated-word-domain-names/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pages &#8216;08 Documents are Incompatible with Pages &#8216;08</title>
		<link>http://www.brickswithoutclay.com/archives/2007/12/pages-08-documents-are-incompatible-with-pages-08/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/12/pages-08-documents-are-incompatible-with-pages-08/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 07:07:42 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Apple]]></category>

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

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/12/pages-08-documents-are-incompatible-with-pages-08/</guid>
		<description><![CDATA[My grad program puts a lot of emphasis on groupwork. Our group projects usually involve emailing Word docs around. It&#8217;s kind of annoying, since I use Pages, but I&#8217;ve gotten used to it. This past semester, though, I was in a group where everyone had Pages, and I was glad not to have to export [...]]]></description>
			<content:encoded><![CDATA[<p>My grad program puts a lot of emphasis on groupwork. Our group projects usually involve emailing Word docs around. It&#8217;s kind of annoying, since I use Pages, but I&#8217;ve gotten used to it. This past semester, though, I was in a group where everyone had Pages, and I was glad not to have to export everything to Word. Unfortunately, it&#8217;s basically impossible to use Pages documents for collaborative editing of any sort.</p>
<p>That&#8217;s because Pages documents aren&#8217;t files, they&#8217;re bundles. Bundles are a special type of directory that OS X knows to treat as a file. Unfortunately, as my group discovered, you can&#8217;t email a directory! If you use Mac Mail, your Pages bundle will get automatically zipped, but those zipfiles get flagged as viruses by the UToronto mail server, and I wouldn&#8217;t be surprised if that held true for other servers as well. Can&#8217;t upload them to an FTP server, either. They&#8217;re just completely unsendable, and when you try, you get no explanation telling you whhy. Apple&#8217;s only suggestion is to <a href="http://docs.info.apple.com/article.html?artnum=61823">zip the bundle</a> before you send it. Mysteriously, <a href="http://discussions.apple.com/thread.jspa?messageID=5461125">people seem content with this solution</a> even though, as bad solutions go, converting to Word is marginally easier.</p>
<p>This design decision is Microsoftian in its dumbness. Applications in OS X are bundles, which is fine because applications are not meant to be passed around casually. But documents &#8212; especially work documents, as in &#8220;iWork&#8221; &#8212; are meant to be opened by multiple people. OpenOffice documents are .tgz files, which have all the advantages of bundles with none of the drawbacks. Is that so hard? I can&#8217;t think of any reason why this would be difficult from an implementation perspective.</p>
<p>The problem is compounded by the fact that Pages doesn&#8217;t let me edit Word files directly. I have to import the Word file (as an untitled document), make my changes, and export it again. This turned our groupwork into a farcical dance of file conversion. I would write an assignment in Pages and export it to a .doc file so that I could email it to my group, who then had to import it into Pages to make changes, and export it again in order to email it back to me.</p>
<p>It&#8217;s a damn shame, because apart from this problem, Pages &#8216;08 is a masterpiece. It&#8217;s the best application Apple makes, as judged by its simplicity and ease of use relative to the complexity of the task it&#8217;s designed to perform. I think this bundle issue will keep it from getting the adoption it should. Microsoft gets tons of traction from network effects &#8212; if more people are using Word, you&#8217;ve got more incentive to use Word as well. But even if everyone in the world switched to Pages tomorrow, we&#8217;d still be tossing Word docs around.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/12/pages-08-documents-are-incompatible-with-pages-08/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Rising Caffeinated Tide That Lifts All Boats</title>
		<link>http://www.brickswithoutclay.com/archives/2007/12/the-rising-caffeinated-tide-that-lifts-all-boats/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/12/the-rising-caffeinated-tide-that-lifts-all-boats/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 03:32:05 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Civic America]]></category>

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

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/12/the-rising-caffeinated-tide-that-lifts-all-boats/</guid>
		<description><![CDATA[I was miserably unemployed for awhile after college, and took a drudge job at Starbucks to break the monotony. It turned out to be a really fulfilling experience, so I&#8217;ve got a soft spot for them. And now, Taylor Clark at Slate puts some data behind some arguments I&#8217;ve been using for years to defend [...]]]></description>
			<content:encoded><![CDATA[<p>I was miserably unemployed for awhile after college, and took a drudge job at Starbucks to break the monotony. It turned out to be a really fulfilling experience, so I&#8217;ve got a soft spot for them. And now, Taylor Clark at <a href="http://www.slate.com/">Slate</a> puts <a href="http://www.slate.com/id/2180301/pagenum/all/">some data</a> behind some arguments I&#8217;ve been using for years to defend my corporate BFF:</p>
<blockquote><p>Soon after declining Starbucks&#8217;s buyout offer, Hyman received the expected news that the company was opening up next to one of his stores. But instead of panicking, he decided to call his friend Jim Stewart, founder of the Seattle&#8217;s Best Coffee chain, to find out what really happens when a Starbucks opens nearby. &#8220;You&#8217;re going to love it,&#8221; Stewart reported. &#8220;They&#8217;ll do all of your marketing for you, and your sales will soar.&#8221; The prediction came true: Each new Starbucks store created a local buzz, drawing new converts to the latte-drinking fold. When the lines at Starbucks grew beyond the point of reason, these converts started venturing out—and, Look! There was another coffeehouse right next-door! Hyman&#8217;s new neighbor boosted his sales so much that he decided to turn the tactic around and start targeting Starbucks. &#8220;We bought a Chinese restaurant right next to one of their stores and converted it, and by God, it was doing $1 million a year right away,&#8221; he said.</p></blockquote>
<p>The article also mentions that, unlike Wal-Mart, they don&#8217;t compete on price, so they actually have to make people <em>like</em> their products, which is a depressingly rare corporate strategy. But I also think Starbucks was responsible for introducing the whole concept of &#8220;good coffee&#8221; to the American conscience, thereby expanding the market for indie cafes. Many people think Starbucks coffee is swill, but I bet the only reason it occurs to them to make that judgment is because Starbucks spent the last fifteen years saturating them with the idea that coffee is something they should be picky about. That&#8217;s the sort of meme you can only propagate if you&#8217;re a very big company, and indie cafes should be somewhat glad that Starbucks spent the billions of dollars needed to spread that message for them.</p>
<p>I always wondered if my San Francisco location gave me a false impression of a robust, diverse cafe economy in America. I mean, if there&#8217;s going to be a Starbucks backlash anywhere, it&#8217;s gonna be here. But it sounds like small cafes are doing well anywhere that there&#8217;s demand for them. I certainly don&#8217;t think Starbucks is perfect (I hang out in indies usually), and I sympathize with anyone who hates the coffee or the cloying ads, but overall it&#8217;s a good thing they&#8217;re in business.</p>
<p><em>(via <a href="http://daringfireball.net/linked/2007/december#sun-30-starbucks_indie">Daring Fireball</a>)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/12/the-rising-caffeinated-tide-that-lifts-all-boats/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fiction</title>
		<link>http://www.brickswithoutclay.com/archives/2007/07/fiction/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/07/fiction/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 06:49:52 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/07/fiction/</guid>
		<description><![CDATA[I was reminded tonight of something Jesse brought to my attention awhile ago: Newt Gingrich reviews lots of books on Amazon.
They&#8217;re mostly generic thrillers, mysteries and military novels. The sort of books where characters have strong-chinned names like &#8220;Clint Magnum&#8221;. A yen for potboilers doesn&#8217;t necessarily reflect badly on someone, even a powerful someone, but [...]]]></description>
			<content:encoded><![CDATA[<p>I was reminded tonight of something <a href="http://www.maximumfun.org/">Jesse</a> brought to my attention awhile ago: <a href="http://www.maximumfun.org/blog/2007/03/what-would-newt-gingrich-do.html">Newt Gingrich reviews lots of books on Amazon</a>.</p>
<p>They&#8217;re mostly generic thrillers, mysteries and military novels. The sort of books where characters have strong-chinned names like &#8220;Clint Magnum&#8221;. A yen for potboilers doesn&#8217;t necessarily reflect badly on someone, even a powerful someone, but lines like this are <a href="http://www.amazon.com/gp/customer-reviews/discussions/start-thread.html?ie=UTF8&amp;ASIN=0553581503&amp;authorID=A27WFYW9ZJ5DN1&amp;store=yourstore&amp;reviewID=R1CE9OEBNNB2K0&amp;displayType=ReviewDetail">kinda creepy</a>: </p>
<blockquote><p>&#8220;For those who think the world does not possess weapons of mass murder with terrorists poised and ready to use them, this work of fiction is a good introduction to the dark side of the twenty-first century.&#8221;</p></blockquote>
<p>He acknowledges that it&#8217;s fiction, but then says we should construct our non-fiction worldview around it. Unfortunately for him, I constructed my worldview around Douglas Adams books long ago. For those who think that mice are merely rodents, Adams&#8217; works of fiction are a good introduction to their hyperdimensional intelligence and power. Be nice to mice, and obey their orders.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/07/fiction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>No iPhone</title>
		<link>http://www.brickswithoutclay.com/archives/2007/07/no-iphone/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/07/no-iphone/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 22:51:25 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Apple]]></category>

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

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

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/07/no-iphone/</guid>
		<description><![CDATA[No, I&#8217;m not buying an iPhone. Apple won&#8217;t let any third-party applications onto the device. In other words, it&#8217;s not hackable, and I&#8217;m not gonna drop $600 on a computer I can&#8217;t mess around with. Apple&#8217;s current line on third-party applications is, &#8220;if you want the iPhone to do something that it doesn&#8217;t do, build [...]]]></description>
			<content:encoded><![CDATA[<p>No, I&#8217;m not buying an iPhone. Apple won&#8217;t let any third-party applications onto the device. In other words, it&#8217;s not hackable, and I&#8217;m not gonna drop $600 on a computer I can&#8217;t mess around with. Apple&#8217;s current line on third-party applications is, &#8220;if you want the iPhone to do something that it doesn&#8217;t do, build a website that does it.&#8221; I want to play Ogg Vorbis files, run an NES emulator, SSH into my web server, record lectures, act as a remote control for my PowerBook via bluetooth, and make VoIP calls. None of that can be implemented as a website (at least, not without flash).</p>
<p>I don&#8217;t care if the applications that do those things aren&#8217;t as shiny as native iPhone apps &#8212; I need to be able to decide for myself whether installing a program is worth it or not. Apple didn&#8217;t design the thing for people with my priorities, and that&#8217;s fine, because that&#8217;s what Nokia is for. I got a <a href="http://europe.nokia.com/A4142093">Nokia E70</a> a few days ago (the iPhone is driving down prices of other smartphones on the secondhand market), and since then I&#8217;ve been a gleeful little nerd.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/07/no-iphone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>BarCamp Toronto Tech Week: May 26th</title>
		<link>http://www.brickswithoutclay.com/archives/2007/05/barcamp-toronto-tech-week-may-26th/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/05/barcamp-toronto-tech-week-may-26th/#comments</comments>
		<pubDate>Sat, 26 May 2007 21:06:35 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Internet]]></category>

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

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/05/barcamp-toronto-tech-week-may-26th/</guid>
		<description><![CDATA[BarCamp Toronto Tech Week is happening right now. Yeah, I&#8217;m not the earliest out of the gate with the news, but I&#8217;m here, and you should too. There&#8217;s still time to think of a session.
Last year&#8217;s BarCamp San Francisco was a bit of a transformative experience for me. I had a great time, schmoozed with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://barcamp.org/BarCampTorontoTechWeek">BarCamp Toronto Tech Week</a> is happening right now. Yeah, I&#8217;m not the earliest out of the gate with the news, but I&#8217;m here, and you should too. There&#8217;s still time to think of a session.</p>
<p>Last year&#8217;s BarCamp San Francisco was a bit of a <a href="http://www.brickswithoutclay.com/archives/2006/06/summer-of-nerdy-love/">transformative experience</a> for me. I had a great time, schmoozed with great people, and became more confident about some ideas I had tossed around in my head for a long time. <a href="http://quaintance.brickswithoutclay.com">One of them</a> has since borne fruit, and I&#8217;ll be talking about in an hour or two. My work on Quaintance has slowed to the occasional coding binge on plane trips, and I find that getting discussing my projects in a group spurs me to work on it more frequently.</p>
<p>It never occurred to me that I&#8217;d help to organize a BarCamp a year after my first one, but I did, and I&#8217;m astonished at the number of people who showed up and how smoothly it seems to be going. We (<a href="http://willpate.org">Will Pate</a>, <a href="http://thechickentest.com">Bryce Johnson</a>, <a href="http://fitrans.blogspot.com/">Ryan Coleman</a>, <a href="http://www.remarkk.com/">Mark Kuznicki</a> and myself) threw this together in like three weeks, but in BarCamp terms, that&#8217;s plenty of time to do what needs to get done, apparently.<br />
<!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/barcamp" rel="tag">barcamp</a>, <a href="http://www.technorati.com/tag/barcampttw" rel="tag">barcampttw</a>, <a href="http://www.technorati.com/tag/torcamp" rel="tag">torcamp</a>, <a href="http://www.technorati.com/tag/web2.0" rel="tag">web2.0</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/05/barcamp-toronto-tech-week-may-26th/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DrupalCamp notes: CRM API</title>
		<link>http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-crm-api/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-crm-api/#comments</comments>
		<pubDate>Thu, 24 May 2007 22:25:22 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-crm-api/</guid>
		<description><![CDATA[Before it falls through the cracks, I&#8217;m posting my slides from the CRM API session I led at DrupalCampToronto: pdf ppt keynote.
The session was an introduction to the CRM API that some of the folks at Trellon have been working on. It&#8217;s basically an interface layer that allows module writers to add CRM functionality to [...]]]></description>
			<content:encoded><![CDATA[<p>Before it falls through the cracks, I&#8217;m posting my slides from the CRM API session I led at <a href="http://drupalcamptoronto.org">DrupalCampToronto</a>: <a href="http://brickswithoutclay.com/files/presentations/crmapi/drupalcamp_crmapi.pdf">pdf</a> <a href="http://brickswithoutclay.com/files/presentations/crmapi/drupalcamp_crmapi.ppt">ppt</a> <a href="http://brickswithoutclay.com/files/presentations/crmapi/drupalcamp_crmapi.key/">keynote</a>.</p>
<p>The session was an introduction to the CRM API that some of the folks at Trellon have been working on. It&#8217;s basically an interface layer that allows module writers to add CRM functionality to their work without having to know the ins and outs of the various CRMs that are compatible with Drupal. For instance, a web contact form module may want to insert mailing events into a CRM, so that it can keep track of who&#8217;s used the form. There shouldn&#8217;t need to be a separate version of the module for SalesForce and one for CiviCRM. That&#8217;s what the API is for.</p>
<p>My demo served mainly to tell folks that this was happening, and to get feedback. There isn&#8217;t much to show at this juncture, because we&#8217;ve just started and we&#8217;re looking for community involvement. Here are some other resources:</p>
<ul>
<li><a href="http://drupal.org/project/crmapi">The project page at drupal.org</a></li>
<li><a href="http://groups.drupal.org/crm-api">The Drupal group for the API</a></li>
<li><a href="http://www.trellon.com/behold_the_api">The announcement on the Trellon blog</a></li>
</ul>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/barcamp" rel="tag">barcamp</a>, <a href="http://www.technorati.com/tag/development" rel="tag">development</a>, <a href="http://www.technorati.com/tag/drupal" rel="tag">drupal</a>,<a href="http://www.technorati.com/tag/drupalcamptoronto" rel="tag">drupalcamptoronto</a> ,<a href="http://www.technorati.com/tag/interoperability" rel="tag">interoperability</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-crm-api/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DrupalCamp notes: Drupal Debugging Swap Meet</title>
		<link>http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-drupal-debugging-swap-meet/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-drupal-debugging-swap-meet/#comments</comments>
		<pubDate>Tue, 15 May 2007 04:23:54 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-drupal-debugging-swap-meet/</guid>
		<description><![CDATA[DrupalCampToronto finished up Saturday night, and if I&#8217;m not mistaken, it was a whopping success. It certainly went well in terms of raw numbers: 150+ registrations and 22 sessions (plus who-knows-how-many random chat sessions in unused rooms). And judging by the straw polls I took at my sessions, there was a lot of learning going [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://drupalcamptoronto.org/">DrupalCampToronto</a> finished up Saturday night, and if I&#8217;m not mistaken, it was a whopping success. It certainly went well in terms of raw numbers: 150+ registrations and 22 sessions (plus who-knows-how-many random chat sessions in unused rooms). And judging by the straw polls I took at my sessions, there was a lot of learning going on. I need to record notes on the two sessions I led, and lessons learned for next time, because <a href="http://barcamp.org/BarCampTorontoTechWeek">there will be a next time</a>. Also, hopefully, notes from the sessions that I attended, though there weren&#8217;t many because I put in a bunch of time at the registration desk.</p>
<p>First up is the <a href="http://drupalcamptoronto.org/node/193">Debugging Techniques Swap Meet</a> (slides: <a href="/files/presentations/DrupalCampTO07-debugging.pdf">pdf</a> <a href="/files/presentations/DrupalCampTO07-debugging.ppt">ppt</a> <a href="/files/presentations/DrupalCampTO07-debugging.key">keynote</a>). I wanted a session on debugging because there are precious few resources for debugging Drupal problems. Part of this is due to the structure of the Drupal documentation, but it&#8217;s also due to the many layers of technology involved in Drupal projects. I&#8217;m much more familiar with debugging techniques for HTML, CSS and Javascript than for the server side of things. Since I&#8217;m not a debugging guru, and it was a BarCamp, I decided to frame the session as a discussion rather than a listen-to-me-talk session.<a id="more-45"></a></p>
<p>I started with a discussion of hardware- and OS-level problems. I&#8217;m definitely less of a UNIX jockey than some of the other attendees &#8212; I don&#8217;t even use screen (yet), for chrissakes &#8212; but kbahey had led a terrific session on Friday about optimizing Drupal that included many useful tools. Optimizing isn&#8217;t quite the same as debugging, but when it comes to filesystem-level bugs, they tend to be permission problems that are not easily diagnosed with tools. I encourage people to look at Khalid&#8217;s slides and learn how to <code>tail -f</code> their various system logs.</p>
<p>Moving up to the Apache layer, there are still not many tools that can help with debugging here. Know your way around the conf file format, ensure that the critical modules (mod_rewrite, mod_php) are enabled, and that directories can overwrite permissions using a custom .htaccess file. Also, <code>tail -f /var/log/httpd/error_log</code> can help with problems. Someone mentioned a syntax highlighter for these error logs that make them easier to read, but I can&#8217;t remember what it&#8217;s called. It might be <a href="http://qbnz.com/highlighter/">this GeSHi thing</a>.</p>
<p>Further up, we&#8217;ve got PHP. Again, in general it&#8217;s good to know the conf file format, and to check that those php_ini directives can be modified from Drupal&#8217;s settings.php files. Check the Apache error log if you&#8217;re getting a blank screen &#8212; that means it&#8217;s a PHP error. The debugging tools I knew of were <code><a href="http://www.php.net/phpinfo">phpinfo()</a></code> and the <a href="http://www.zend.com/products/zend_studio">Zend</a> debugger. Many folks scoffed with great scoffing scoffs at my mention of Zend. They claim Komodo is better. Interested parties should investigate; I&#8217;m not an IDE person and have never used Komodo. Ashok pointed out that <a href="http://www.eclipse.org">Eclipse</a> has a <a href="http://www.phpeclipse.de/">PHP plugin</a>, and if I were an IDE person, that&#8217;s probably what I&#8217;d use, but it doesn&#8217;t come with its own debugger, only support for third parties.</p>
<p>Oy, I can&#8217;t talk about PHP bugs without talking about this one wacky problem some of us at Trellon ran into a few weeks ago. If you&#8217;re having trouble setting the maximum file upload size in the Drupal admin section, even after correctly setting max_post_size and upload_max_filesize, you should know that <a href="http://drupal.org/node/97193">Drupal automatically sets the maximum file upload size to half of post_max_size</a>. If you&#8217;ve got them set to equal amounts, it won&#8217;t solve the problem.</p>
<p>Then there&#8217;s Drupal itself. There are a few modules you should install on your staging site. Your first stop should be the <a href="http://drupal.org/project/devel">devel module</a>, which is a swiss army knife for aiding all sorts of development tasks. The <a href="http://drupal.org/project/trace">trace module</a> provides a customizable stack trace for errors &#8212; a huge improvement on the current error-reporting system. Finally, the <a href="http://drupal.org/project/drush">drush module</a> looks awesome. It provides a command-line shell interface for Drupal, making some admin stuff very easy.</p>
<p>In the non-module area, there are a million ways to log messages in various places. There&#8217;s watchdog(), but that&#8217;s not very immediate. There&#8217;s drupal_set_message(), of course. You can write to the various log files, or use the dprint_r() and db_queryd() functions that come with the devel module.</p>
<p>Now for the front-end stuff. This post is getting a bit long, so I&#8217;ll just say: FireBug, WebKit, Drosera, IE Developer Tools. Refer to the slides for more options.</p>
<p>And now, a bulleted list of miscellanea that people contributed:</p>
<ol>
<li>Use CSS or HTML validation tools if you&#8217;re having issues. They can tell you about unclosed DIVs, for instance. Various FireFox plugins can help with this. Total Validator was recommended.</li>
<li>If you&#8217;re stumped by a CSS or HTML problem, try <a href="http://alistapart.com/stories/doctype/">changing the DOCTYPE declaration</a> at the top of the page.</li>
<li>The JavaScript IDE <a href="http://www.radrails.org/">Aptana</a> sounds cool, but it also sounds Rails-centric.</li>
<li>Don&#8217;t forget to ask in IRC! Lots of Drupal developers hang out in #jquery, as well as #drupal obviously.</li>
<li>The <a href="http://drupal.org/project/coder">coder module</a> is a &#8220;Developer Module that assists with code review and version upgrade.&#8221; It was endorsed by many people at the session.</li>
<li>We&#8217;re getting out of debugging territory with this one (who had the gall to go off topic? Oh yeah, it was me.), but <a href="http://drupal.org/project/module_builder">module_builder</a> is good for quickly and easily building module skeletons with nicely documented hooks and skeleton code.</li>
<li>I frequently encounter a blank screen immediately after loading a custom module for the first time. This means there&#8217;s a PHP error in the code, but it also means the whole site is down until you can disable the module. In order to do this, you&#8217;ll have to go into MySQL and find the &#8220;system&#8221; table in your Drupal database. Find the entry that corresponds to your module and change the &#8220;status&#8221; field to 0. Follow a similar procedure for blocks, except use the &#8220;blocks&#8221; table. The aforementioned drush module can also take care of this.</li>
<li>Finally, empty the cache on the server and the browser to avoid being confounded by cache issues when debugging.</li>
</ol>
<p>I hope this list is useful, and Google-able. Feel free to add your own tips or resources in the comments.</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/barcamp" rel="tag">barcamp</a>, <a href="http://www.technorati.com/tag/debugging" rel="tag">debugging</a>, <a href="http://www.technorati.com/tag/drupal" rel="tag">drupal</a>, <a href="http://www.technorati.com/tag/drupalcamptoronto" rel="tag">drupalcamptoronto</a>,<a href="http://www.technorati.com/tag/development" rel="tag">development</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/05/drupalcamp-notes-drupal-debugging-swap-meet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quicktime Harsh</title>
		<link>http://www.brickswithoutclay.com/archives/2007/04/quicktime-harsh/</link>
		<comments>http://www.brickswithoutclay.com/archives/2007/04/quicktime-harsh/#comments</comments>
		<pubDate>Sat, 07 Apr 2007 15:31:51 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.brickswithoutclay.com/archives/2007/04/quicktime-harsh/</guid>
		<description><![CDATA[A few weeks ago, I spent a long long time building a feature in Drupal that allows users to drag and drop files from a &#8220;media bin&#8221; block into a TinyMCE rich-text editor. Users click on a thumbnail of an image, for example, drag and drop into the editor, and the full-sized image appears. In [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I spent a long long time building a feature in <a href="http://drupal.org">Drupal</a> that allows users to drag and drop files from a &#8220;media bin&#8221; block into a <a href="http://tinymce.moxiecode.com">TinyMCE</a> rich-text editor. Users click on a thumbnail of an image, for example, drag and drop into the editor, and the full-sized image appears. In order for this to work, a bunch of disparate software components (TinyMCE, Drupal, <a href="http://jquery.com">jQuery</a>, Quicktime), each with their own adorable quirks, had to talk to eachother. It was rather like assembling a working watch from the parts of 5 different watches. The bulk of my time was spent dealing with a parade of poorly-documented problems, which I describe below in the hopes that they may prove useful to someone who has to familiarize themselves with the details of these software packages on a tight deadline. I&#8217;m too lazy to tidy up the code for presentation, but there&#8217;re plenty of links.<br />
<a id="more-44"></a><br />
Making thumbnails draggable is <a href="http://interface.eyecon.ro/docs/drag">trivially easy</a> with the jQuery <a href="http://interface.eyecon.ro">Interface library</a>. I put the URL of the full-sized image (or video or mp3 or whatever) into the &#8220;title&#8221; attribute of the thumbnail, so that the browser has access to it without making a request to the server.</p>
<p><strong>PROBLEM:</strong> There is no easy way to tell the TinyMCE window to accept dropped thumbnails.<br />
<strong>CAUSE:</strong> The TinyMCE editor doesn&#8217;t exist when <a href="http://docs.jquery.com/Events#ready.28_fn_.29">document.ready()</a> is called, so there is no way to turn the editor into a <a href="http://interface.eyecon.ro/docs/drop">Droppable()</a> when the document finishes loading.<br />
<strong>SOLUTION:</strong> I <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Creating_Plugin">wrote a TinyMCE plugin</a> that makes the editor Droppable in the initInstance() hook. That way, the editor makes itself into a Droppable when it&#8217;s good and ready.</p>
<p>The onDrop code is pretty simple as well. You just have to construct a snippet of HTML based on the thing that&#8217;s being dropped, and insert that snippet into the editor using <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Functions#tinyMCE.execInstanceCommand">tinyMCE.execInstanceCommand()</a>. If the thumbnail that&#8217;s dropped is of an image (as determined by its class), build an <code>IMG</code> tag based on its attributes. If it&#8217;s audio or video, build an <code>EMBED</code> tag (except not. More on this later.).</p>
<p><strong>PROBLEM:</strong> TinyMCE appears to <a href="http://tinymce.moxiecode.com/punbb/viewtopic.php?id=6149">modify URLs</a> when it refreshes the canvas. If you&#8217;re on the page &#8220;/foo/bar/index.html&#8221;, and you create a link to something like &#8220;/image.jpg&#8221; in TinyMCE, you&#8217;ll find that when you move that image around, it disappears because its URL gets changed to &#8220;../../image.jpg&#8221;. This should resolve correctly, but on my Drupal system, it didn&#8217;t.<br />
<strong>CAUSE:</strong> TinyMCE marshals many lines of code to accomplish this munging, because it&#8217;s actually a counter-measure for the URL rewrites that are apparently part of the Gecko editable-canvas window. I guess Gecko does the rewriting, and TinyMCE tries to counteract that with its counter-munging. These new URLs didn&#8217;t work with the Drupal installation on our server, apparently because all our development sites are in subdirectories on our development server. The base URL included these subdirectories, but the munging wasn&#8217;t taking them into account somehow.<br />
<strong>SOLUTION:</strong> We set up a subdomain for this site, so that it could reside at top-level while we were working on it. I think the <a href="http://drupal.org/project/tinymce">Drupal TinyMCE plugin</a> needs to work on this.</p>
<p><strong>PROBLEM:</strong> Once I got images working, it seemed like getting audio and video working would be trivial, and I gleefully reported this to my co-workers. Unfortunately, getting any HTML more complicated than images (such as a Quicktime <code>EMBED</code> tag) to display in TinyMCE proved difficult. The HTML that I dragged into the editor just wouldn&#8217;t show up, even when I dragged a movie in and disabled the rich-text editor.<br />
<strong>CAUSE:</strong> At first, I tried to examine this by dragging the code into a plain textarea and then enabling rich text. Nothing happened, and nothing showed up in plaintext when I dragged a movie into TinyMCE and then clicked &#8220;disable rich-text&#8221;. Turns out, TinyMCE keeps a list of <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements">tags that you&#8217;re allowed to use</a>, and filters out exotic ones like <code>OBJECT</code> with extreme prejudice unless told otherwise.<br />
<strong>SOLUTION:</strong> To tell it otherwise, I enabled the <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media">media plugin</a>. Plugins can modify the list of allowed tags, and the media plugin opens the door for Quicktime embeds and other fun things.</p>
<p><strong>PROBLEM:</strong> Enabling the plugin still didn&#8217;t get me my QuickTime icon when I dragged and dropped.<br />
<strong>CAUSE:</strong> Aside from filtering, TinyMCE performs other operations on HTML that make it such that the code I saw in the textarea did not accurately reflect the code that TinyMCE was rendering. Specifically, the QuickTime icon I was hoping to see was not some quirky rendering of a Quicktime plugin <code>OBJECT</code>, but was actually just a div with an image. The media plugin converts this DIV to OBJECT code when the form is submitted or the rich editor is disabled.<br />
<strong>SOLUTION:</strong> Instead of attaching <code>OBJECT</code> code to QuickTime draggables, I attached <code>DIV</code> code that matched the code that TinyMCE generates from <code>OBJECT</code> tags. Worked like a charm: it gets displayed properly and is automatically converted to the right <code>OBJECT</code> html. At this point, the basic functionality was complete.</p>
<p><strong>PROBLEM:</strong> Usually when you drag and drop an image into text, the text caret moves around with the mouse pointer, so that the image shows up where you dropped it, not where the text caret was when the user left the editing box. This wasn&#8217;t happening in TinyMCE. It happens when you drag things from one spot in the editor to another, but there doesn&#8217;t seem to be a way to get that behavior when you&#8217;re dragging something in from outside the box.<br />
<strong>CAUSE:</strong> TinyMCE <a href="http://tinymce.moxiecode.com/punbb/viewtopic.php?id=1009">doesn&#8217;t have a good way</a> of moving the caret around based on mouse position, because browsers don&#8217;t have good semantics for this.<br />
<strong>SOLUTION:</strong> None. Wait for this kind of thing to become supported. I need to file a bug report.</p>
<p><strong>PROBLEM:</strong> In FireFox, images don&#8217;t do a good job of keeping up with the mouse cursor when they&#8217;re dragged. After about half a second, the image catches up, <em>unless</em> the mouse is over the TinyMCE window, in which case the image hangs out at the edge of the window. The only way to get the image to catch up with the pointer is to move the pointer back outside the TinyMCE window. Unfortunately, the TinyMCE window is exactly where users will want to drop images, so this bug is actually rather serious.<br />
<strong>CAUSE:</strong> The TinyMCE editor operates within an <code>IFRAME</code>, and IFRAMEs have their own separate DOM. When the mouse goes over the TinyMCE box, the mouseOver event goes to the IFRAME DOM, not the DOM of the larger document. The image that we&#8217;re dragging has no way of getting that mouseover event, because it&#8217;s part of the outside DOM and its mouse events are being intercepted. It&#8217;s Supposed To Be That Way, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=185919">according to Mozilla</a>.<br />
Crucially, when the pointer is over the image and the image is over TinyMCE, it&#8217;s still in the parent window DOM, because the image is in the parent window DOM.<br />
<strong>SOLUTION:</strong> If FireFox improved its dragging responsiveness, this would not be an issue. If FireFox changed its semantics to fire mouseover events in the parent window when drags were going on, that would solve the problem. I actually tried surrounding each of the draggable images a &#8220;trampoline&#8221; DIV that extends for 200px in each direction from the draggable image, so that there was always something between the mouse and the editor, but that was complicated (if you want to try that in certain Draggable modes, you have to access the copy of the image, not the image itself).<br />
In the end, I realized that TinyMCE has an addEvent() function for attaching hooks to the IFRAME. I attached hooks that passed the events to a callback in the parent window. The callback called the onDrag() function of the Draggable, which, according to the Interface docs, allows me to alter the resultant coordinates of the image. </p>
<p><strong>PROBLEM:</strong> That&#8217;s bullshit. The onDrag() function does no such thing.<br />
<strong>CAUSE:</strong> There&#8217;s a separate callback, <a href="http://dev.jquery.com/changeset/461">onDragModifier()</a>, that does what we want here, but the most recent docs don&#8217;t mention it. In fact, the most recent docs don&#8217;t mention a host of useful parameters that callbacks like onDrag() can take.<br />
<strong>SOLUTION:</strong> Submit new documentation, and use onDragModifier(). You basically adjust the position of the image to correspond with the coordinates you get from the IFRAME mousemove event.</p>
<p><strong>PROBLEM:</strong> When you tell the image to assume the coordinates of the cursor over an IFRAME, the image winds up in either the upper-left or bottom-right corner of the screen.<br />
<strong>CAUSE:</strong> The coordinates that get passed from the IFRAME are relative to the IFRAME, not the larger window. Also, the coordinate system in native DOM events is different than the one jQuery uses in its events (which seem to represent the location of an item relative to its original position, rather than the absolute screen position).<br />
<strong>SOLUTION:</strong> Do some math to adjust the coordinates. I had to take the starting point of the image into account, and add the position of the TinyMCE window, or something, but in the end it worked really well. Make sure that code only gets applied when the browser is FireFox.</p>
<p><strong>PROBLEM:</strong> Nothing works in Safari.<br />
<strong>CAUSE:</strong> the mceInsertContent command of TinyMCE is totally broken for Safari. In fact, its whole browser-checking mechanism needs a tune up.<br />
<strong>SOLUTION:</strong> Submitted a bug, working on a patch.</p>
<p>See, that wasn&#8217;t so hard now, was it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brickswithoutclay.com/archives/2007/04/quicktime-harsh/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
