<?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>sacha chua :: enterprise 2.0 consultant, storyteller, geek &#187; drupal</title>
	<atom:link href="http://sachachua.com/wp/category/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://sachachua.com/wp</link>
	<description>I help organizations and people learn how to connect and collaborate more effectively using Web 2.0 tools.</description>
	<lastBuildDate>Thu, 18 Mar 2010 12:00:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Free Drupal-IBM-Acquia webinar: Integrating Drupal with Enterprise Back-office Systems &#8211; Thu Jan 21 2010 1PM EST</title>
		<link>http://sachachua.com/wp/2010/01/free-drupal-ibm-acquia-webinar-integrating-drupal-with-enterprise-back-office-systems-thu-dec-21-2010-1pm-est/</link>
		<comments>http://sachachua.com/wp/2010/01/free-drupal-ibm-acquia-webinar-integrating-drupal-with-enterprise-back-office-systems-thu-dec-21-2010-1pm-est/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:03:37 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2010/01/free-drupal-ibm-acquia-webinar-integrating-drupal-with-enterprise-back-office-systems-thu-dec-21-2010-1pm-est/</guid>
		<description><![CDATA[I coached developers on this project. =) It was pretty darn cool, what they did with Drupal, Websphere, DB2, and web services. Check it out!

Integrating Drupal with Enterprise Back-Office Systems to Deliver a Best of Breed e-Commerce Sites Join Drupal experts from IBM Global Services as they detail the process of defining business requirements, selecting [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2010/01/free-drupal-ibm-acquia-webinar-integrating-drupal-with-enterprise-back-office-systems-thu-dec-21-2010-1pm-est/">Free Drupal-IBM-Acquia webinar: Integrating Drupal with Enterprise Back-office Systems &ndash; Thu Jan 21 2010 1PM EST</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I coached developers on this project. =) It was pretty darn cool, what they did with Drupal, Websphere, DB2, and web services. Check it out!<br />
<blockquote>
<p><strong>Integrating Drupal with Enterprise Back-Office Systems to Deliver a Best of Breed e-Commerce Sites <br /></strong><br />Join Drupal experts from IBM Global Services as they detail the process of defining business requirements, selecting the appropriate technologies, overcoming the technical enterprise integration challenges, and ultimately launching best of breed e-commerce sites with Drupal. <br /><strong><br />Key takeaways will include:<br /></strong>A review of the key business and technology decision criteria for selecting Drupal and Acquia<br />An example of a 3 tiered architecture designed to deliver end-end automation and a flexible platform for future innovation<br />Tips on how to integrate front-end and back-end systems including Drupal, Websphere, DB2, and ERP system for launching a best of breed e- commerce solution.<br />A discussion of which Drupal modules and Acquia services are recommended.<br />Best practices and technologies for building a development and test environment to optimize parallel development and ensure security</p>
<p>This Webinar is designed for those who want to learn more about best practices for designing an enterprise architecture with Drupal at the core and integrating Drupal with other enterprise systems.</p>
<p><b><a href="http://acquia.com/resources/webinars/integrating-drupal-enterprise-back-office-systems-deliver-best-breed-e-commerce-s">http://acquia.com/resources/webinars/integrating-drupal-enterprise-back-office-systems-deliver-best-breed-e-commerce-s</a></b></p>
</blockquote>
<p>Enjoy!</p>
<p>(Update: Thanks for catching that!)</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2010/01/free-drupal-ibm-acquia-webinar-integrating-drupal-with-enterprise-back-office-systems-thu-dec-21-2010-1pm-est/">Free Drupal-IBM-Acquia webinar: Integrating Drupal with Enterprise Back-office Systems &ndash; Thu Jan 21 2010 1PM EST</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2010/01/free-drupal-ibm-acquia-webinar-integrating-drupal-with-enterprise-back-office-systems-thu-dec-21-2010-1pm-est/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Drupal workflow for small projects</title>
		<link>http://sachachua.com/wp/2009/10/drupal-workflow-for-small-projects/</link>
		<comments>http://sachachua.com/wp/2009/10/drupal-workflow-for-small-projects/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 20:40:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/10/06/drupal-workflow-for-small-projects/</guid>
		<description><![CDATA[One of the recent hires dropped by with a few questions about Drupal development in small projects. She wanted to know if it was worth having another person do the HTML and CSS theming if that person didn&#8217;t know PHP or Drupal, and what the workflow might look like.
As a Drupal developer who really hates [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/10/drupal-workflow-for-small-projects/">Drupal workflow for small projects</a></p>
]]></description>
			<content:encoded><![CDATA[<p>One of the recent hires dropped by with a few questions about Drupal development in small projects. She wanted to know if it was worth having another person do the HTML and CSS theming if that person didn&#8217;t know PHP or Drupal, and what the workflow might look like.</p>
<p>As a Drupal developer who really hates working with cross-browser fiddliness, <b>I think it&#8217;s almost always a good idea to have someone else do the HTML and CSS theming. </b>In an ideal world, that person would also create the Drupal theme and whatever Javascript behaviors are desired, but it seems hard to find people who are comfortable with both front-end and back-end development. A reasonable compromise is to have someone else translate the visual design into cross-browser HTML and CSS for the splash page, an inside page (anything representative of the main layout), and other layouts. What takes me four hours of teeth-gnashing may take an experienced designer just one, and he or she might even be happier doing it. So go ahead and optimize for developer productivity and happiness.</p>
<p><b>Another benefit of splitting up the work is that you can work in parallel. </b>While you work on the technical bones of the application, the designer can get the theme just right. The earlier in the project that you know about complex parts that could be problematic, the better, and this is true for both theme and function. You&#8217;ll still need to integrate the theme at the end, so budget at least a few days for that.</p>
<p><b>So here&#8217;s what the workflow might look like:</b>
<ol>
<li>Developer installs modules and configures them to work together.<br />Designer prepares basic HTML and CSS.</li>
<li>Developer fleshes out site and adds custom functionality.<br />Designer fleshes out individual forms/pages requiring special treatment.</li>
<li>Developer ports HTML and CSS theme to Drupal.</li>
<li>Developer and designer collaborate on fixing any cross-browser problems that show up.</li>
</ol>
<p><b>Build the functional parts of the application before worrying about the theme. </b>Problems in the theme layer can mask problems in the functional layer. If you build the theme first, then build the features, tracking down bugs might take more time. </p>
<p><b>It&#8217;s usually a good idea to build the hard parts first, </b>so you can get a better sense of how much more effort is needed and whether you need to scale things down. If you&#8217;re new to Drupal, you may want to build a few easy parts first so that you can familiarize yourself with the system.</p>
<p>Hope that helps!</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/10/drupal-workflow-for-small-projects/">Drupal workflow for small projects</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/10/drupal-workflow-for-small-projects/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>IBM Drupal Drop-in Clinic</title>
		<link>http://sachachua.com/wp/2009/08/ibm-drupal-drop-in-clinic/</link>
		<comments>http://sachachua.com/wp/2009/08/ibm-drupal-drop-in-clinic/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 18:24:36 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/08/25/ibm-drupal-drop-in-clinic/</guid>
		<description><![CDATA[I love this! I&#8217;m practically running an IBM Drupal drop-in clinic at 120 Bloor E, helping five developers on two projects become that much more productive. They&#8217;re all working with Drupal 6, but my experience with developing and debugging on Drupal 5 is still helpful, and I can navigate through Internet posts pretty quickly too. [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/08/ibm-drupal-drop-in-clinic/">IBM Drupal Drop-in Clinic</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I love this! I&#8217;m practically running an IBM Drupal drop-in clinic at 120 Bloor E, helping five developers on two projects become that much more productive. They&#8217;re all working with Drupal 6, but my experience with developing and debugging on Drupal 5 is still helpful, and I can navigate through Internet posts pretty quickly too. I get to help with the tough and interesting bits without needing to set up my environment or work on the boring bits. <img src='http://sachachua.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>This is definitely worth the subway ride. I create more than CAD $4.50 of value and save people more than 60 minutes of time total. Besides, I usually get to sit down and write a blog post during the commute.</p>
<p>Some things from today:
<ul>
<li>Want to protect files from being downloaded? Set your Drupal file system handling to Private, manage your <b>view uploaded files</b> permission, and don&#8217;t forget to add an .htaccess in your files directory with the following:<br />SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006</p>
<p>Options None</p>
<p>Options +FollowSymLinks</li>
<li>Use hook_form_alter to print out the form_id if you want to change where a form redirects. After you figure out the form_id, set the appropriate form&#8217;s #redirect property.</li>
<li>var_dump may look different if you don&#8217;t have xdebug installed. Check the HTML source for your expected output.</li>
</ul>
<p>Lots of other HTML- and Drupal-related things, too.</p>
<p>Good leverage on time and experience. =D I wonder how to get even better at this&#8230;</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/08/ibm-drupal-drop-in-clinic/">IBM Drupal Drop-in Clinic</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/08/ibm-drupal-drop-in-clinic/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Lessons learned from this phase of our Drupal project</title>
		<link>http://sachachua.com/wp/2009/06/lessons-learned-from-this-phase-of-our-drupal-project-2/</link>
		<comments>http://sachachua.com/wp/2009/06/lessons-learned-from-this-phase-of-our-drupal-project-2/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 15:32:06 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/06/30/lessons-learned-from-this-phase-of-our-drupal-project-2/</guid>
		<description><![CDATA[I learned a lot from another three months doing Drupal. Here&#8217;s a summary:

I learned how to write low-level design documentation. I used to hate doing this because I was much happier prototyping things in order to figure things out, and writing in a word processor instead of a code editor seemed slow. Also, laying out [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/06/lessons-learned-from-this-phase-of-our-drupal-project-2/">Lessons learned from this phase of our Drupal project</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I learned a lot from another three months doing Drupal. Here&#8217;s a summary:
<ul>
<li><b>I learned how to write low-level design documentation. </b>I used to hate doing this because I was much happier prototyping things in order to figure things out, and writing in a word processor instead of a code editor seemed slow. Also, laying out images was a pain in both OpenOffice.org and Microsoft Word. The key breakthrough was that after a lot of iterations, I finally got to a document that had the level of detail my project manager wanted. Once I knew what he wanted, it was easy to write documents like that. In fact, I did one better&#8211;I filled in lots of details in the validation section of the design document, and I used that for test-driven development.</li>
<li><b>I smoothed out more of the kinks in our deployment process.</b> Always testing our update scripts with update.php&#8217;s access check set to false helped flush out assumptions about user ID. Our regression tests came in handy, too.</li>
<li><b>I practiced more test-driven development.</b> And I loved it! =) Yay yay yay yay.</li>
<li><b>I learned JQuery and the ins and outs of Views+Calendar.</b> We customized our calendar implementation extensively, and it doesn&#8217;t look half-bad. Working with timezones had given me a lot of pain, though, but I managed to address all of those issues (and I have the regression tests to prove it! <img src='http://sachachua.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</li>
<li><b>I learned that I should&#8217;ve gotten a second computer a long time ago.</b> Having a dedicated development computer and another computer I can leave on Microsoft Windows means less hassle and less stress when it comes to working with other Windows-centric people and tools.</li>
<li><b>I learned that I have a lot of things I can teach people about Drupal.</b> =) Mentoring is fun!</li>
</ul>
<p>I&#8217;m moving to strategy-focused projects next quarter, but if I were to continue on this project, I&#8217;d probably:
<ul>
<li>Learn more about optimization (started doing a little bit of this, speeding up a page by an order of magnitude)</li>
<li>Write more validation tests in my design documents</li>
<li>Figure out how to check that coding standards are consistently applied <img src='http://sachachua.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Find some way to convince folks to go for Drupal 6, or find another project that uses Drupal 6.</li>
</ul>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/06/lessons-learned-from-this-phase-of-our-drupal-project-2/">Lessons learned from this phase of our Drupal project</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/06/lessons-learned-from-this-phase-of-our-drupal-project-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drupal in the trenches: MySQL and DELETE joins; multiple tests</title>
		<link>http://sachachua.com/wp/2009/06/drupal-in-the-trenches-mysql-and-delete-joins-multiple-tests/</link>
		<comments>http://sachachua.com/wp/2009/06/drupal-in-the-trenches-mysql-and-delete-joins-multiple-tests/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 18:24:17 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/06/01/drupal-in-the-trenches-mysql-and-delete-joins-multiple-tests/</guid>
		<description><![CDATA[Today was the first time I used a DELETE statement that joined multiple tables. I didn&#8217;t even know you could do that. =)
I needed to look into this because my update function was just taking so much time and memory. We have a little over 3,000 nodes, most of which are usernodes automatically created by [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/06/drupal-in-the-trenches-mysql-and-delete-joins-multiple-tests/">Drupal in the trenches: MySQL and DELETE joins; multiple tests</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Today was the first time I used a DELETE statement that joined multiple tables. I didn&#8217;t even know you could do that. =)</p>
<p>I needed to look into this because my update function was just taking so much time and memory. We have a little over 3,000 nodes, most of which are usernodes automatically created by the usernode module. I needed to rebuild the node access entries for a few hundred content nodes to take into account the new partner access module I wrote, but node_access_rebuild took quite a while.</p>
<p>The first approach I thought of taking was to delete usernode because we didn&#8217;t seem to need it any more. In order to do that, though, I would still have to delete all the user nodes, though, and invoking all the hooks for each of the 2000+ user nodes took a while as well.</p>
<p>The second approach was to delete just the node access records related to the nodes I needed to update. I found a way to do it even faster &#8211; instead of querying the node IDs and then deleting individual rows, I could do something like this instead:</p>
<pre>
db_query("DELETE FROM na USING {node} n
          INNER JOIN {node_access} na ON (n.nid=na.nid) WHERE n.type='%s'", $type);
$rs = db_query("SELECT nid FROM {node} WHERE type='%s'", $type);
while ($row = db_fetch_array($rs)) {
  $node = node_load($row['nid'], NULL, TRUE);
  if (!empty($node)) {
    node_access_acquire_grants($node);
  }
}
</pre>
<p>(UPDATE: Fixed MySQL statement)</p>
<p>That was interesting. =)</p>
<p>I was also running into memory problems trying to run all the unit tests in one go. I broke it into individual tests with:</p>
<pre>
drush test list | grep KEYWORD | xargs -n 1 drush test run | tee out
</pre>
<p>where <i>KEYWORD</i> is the keyword I use to filter the list for just the tests I wanted to run, and <i>out</i> is the file that stores a copy of the results. It&#8217;s not neatly summarized, but oh well. =) It works.</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/06/drupal-in-the-trenches-mysql-and-delete-joins-multiple-tests/">Drupal in the trenches: MySQL and DELETE joins; multiple tests</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/06/drupal-in-the-trenches-mysql-and-delete-joins-multiple-tests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drupal from the trenches: This is my game</title>
		<link>http://sachachua.com/wp/2009/05/drupal-from-the-trenches-this-is-my-game/</link>
		<comments>http://sachachua.com/wp/2009/05/drupal-from-the-trenches-this-is-my-game/#comments</comments>
		<pubDate>Fri, 29 May 2009 01:08:14 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[goodkarma]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/05/28/drupal-from-the-trenches-this-is-my-game/</guid>
		<description><![CDATA[I&#8217;ve been coaching a senior architect on a Drupal site he&#8217;s developing on a tight schedule. With a little bit of help, he was able to build all the functionality needed and keep up with constantly changing requirements. Now it was time to theme the site. As I was walking through how to modify the [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-from-the-trenches-this-is-my-game/">Drupal from the trenches: This is my game</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been coaching a senior architect on a Drupal site he&#8217;s developing on a tight schedule. With a little bit of help, he was able to build all the functionality needed and keep up with constantly changing requirements. Now it was time to theme the site. As I was walking through how to modify the Zen theme to use the HTML, CSS, and images that he received from the designer, flipping between Vim editors in two Putty sessions connected to the web server, I saw his eyes start to glaze over. Hmm. He was definitely interested in learning how to do it, but I knew he&#8217;d enjoy learning it more if he had most of the framework already in place.</p>
<p>I offered to get things started. The senior architect asked me how much time I thought it would take. &#8220;Two hours,&#8221; I said, which was the first number that came to mind.</p>
<p>After lunch, I headed to the senior architect&#8217;s desk with my laptop and wireless mouse. I thought about asking him to change his password to something I could easily type, just in case I needed to start multiple sessions. Then I realized a much better way to do it would be to use my Emacs environment, which is already set up for doing really cool things with Drupal. So I switched my keyboard layout to QWERTY, used ssh-copy-id to copy my authentication ID to the server, and then opened the directory in Emacs using the location /ssh:user@host:/usr/share/drupal6. </p>
<p>Emacs worked like a charm. I edited files on the server as easily as those on my own computer, with all the syntax highlighting and keyboard shortcuts I&#8217;d gotten used to. I split windows, moved windows around, copied and pasted regions, and even did a little autocompleting.</p>
<p>I think I made the senior architect&#8217;s jaw drop.</p>
<p>I finished almost all the basic theming (minus a few quirky CSS things) in one hour and fifty minutes, ten minutes less than my thumb-in-the-air estimate. The senior architect said it would&#8217;ve probably taken him 16 hours over the weekend. </p>
<p>While we were chatting about the changes he&#8217;d need to make and the other things he could learn, the senior architect asked me if I played any games. I told him that I play one computer game&#8211;Nethack (an old text-based roleplaying game)&#8211;and I only play it in airports. I pointed to my laptop and said, &#8220;This is my game.&#8221; Programming has its own major challenges and minor opponents, it has progress, it has points, it has that adrenaline rush of trial and triumph. Programming is my game. Life is my game.</p>
<p>And it&#8217;s tons of fun. =)</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-from-the-trenches-this-is-my-game/">Drupal from the trenches: This is my game</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/05/drupal-from-the-trenches-this-is-my-game/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drupal in the trenches: AJAX history makes my brain hurt</title>
		<link>http://sachachua.com/wp/2009/05/drupal-in-the-trenches-ajax-history-makes-my-brain-hurt/</link>
		<comments>http://sachachua.com/wp/2009/05/drupal-in-the-trenches-ajax-history-makes-my-brain-hurt/#comments</comments>
		<pubDate>Mon, 25 May 2009 19:13:50 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/05/25/drupal-in-the-trenches-ajax-history-makes-my-brain-hurt/</guid>
		<description><![CDATA[Many websites use asynchronous Javascript and XML (AJAX) to provide all sorts of whizbang improvements, such as smooth interaction without page reloads. It took me a week to figure out how to do all the effects specified in our information architecture document: callouts, modal dialogs, in-page calendar navigation, and so on. I was pretty happy [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-in-the-trenches-ajax-history-makes-my-brain-hurt/">Drupal in the trenches: AJAX history makes my brain hurt</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Many websites use asynchronous Javascript and XML (AJAX) to provide all sorts of whizbang improvements, such as smooth interaction without page reloads. It took me a week to figure out how to do all the effects specified in our information architecture document: callouts, modal dialogs, in-page calendar navigation, and so on. I was pretty happy with what I did, considering it was my first serious work with JQuery.</p>
<p>Then my project manager said, &#8220;If I go to the event details page from the month view and hit back, it takes me to the day view instead.&#8221;</p>
<p>I said, &#8220;Welcome to the wonderful world of AJAX. This might be tough to fix.&#8221;  </p>
<p>Making the back button work in AJAX applications requires a lot of effort. It doesn&#8217;t look like people have a nice and clean solution for it yet, although there are a number of libraries that try to address the situation.</p>
<p>Following the principle of progressive enhancement, I had built all the plain HTML functionality first, then layered the Javascript on top of it using jQuery callbacks. In addition to ensuring that the site still works even if Javascript is disabled, this approach also helps make sure that I have proper URLs for almost all the webpages involved. (I didn&#8217;t bother with explicitly transient pages like the year navigator or the day pop-up.) </p>
<p>I started with this <a href="http://stilbuero.de/jquery/history/">Hijax-based approach</a>, because it had the most documentation. I had problems getting it to behave, though, because my AJAX pages have other AJAX links that fail with the history-remote plugin. The history_remote plugin works by replacing all the links with the current page and a code (#remote-1, for example). When the back button is pressed, the library looks for the appropriate link and triggers the click event. This breaks down when the link isn&#8217;t actually on the first page. For example, when a user switches from a week to a month view, then goes to the next month, the plugin can&#8217;t find the link to the next month on the week view&#8217;s page, which is where the user started.</p>
<p>What I really needed to do is encode more information in the URL. If I encode information in the anchor portion of the URL (#&#8230;), I can use that to request the page and put that into the appropriate div. For example, if I pass in #transitions_content?new_path=connect/calendar/2009/05 , I might be able to parse that and put the content of new_path into the transitions_content div.</p>
<p>I started going down that rabbit-hole, and then I got myself thoroughly confused, so I decided that the best way would be to just rip out the major AJAX navigation and go back to the simple stuff (which fortunately still works).</p>
<p>Gah. Brain hurts!</p>
<p>Does anyone have a clean way to do this?</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-in-the-trenches-ajax-history-makes-my-brain-hurt/">Drupal in the trenches: AJAX history makes my brain hurt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/05/drupal-in-the-trenches-ajax-history-makes-my-brain-hurt/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Drupal: Timezones and places</title>
		<link>http://sachachua.com/wp/2009/05/drupal-timezones-and-places/</link>
		<comments>http://sachachua.com/wp/2009/05/drupal-timezones-and-places/#comments</comments>
		<pubDate>Fri, 22 May 2009 16:14:24 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/05/22/drupal-timezones-and-places/</guid>
		<description><![CDATA[The Drupal date_timezone module (part of Date) lets you use city names instead of timezone offsets in order to select a timezone, and that picks up Daylight Savings Time rules in a reasonably good manner, too.
A long list of cities can be hard to work with, though. This list is equally long, but it&#8217;s organized [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-timezones-and-places/">Drupal: Timezones and places</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The Drupal date_timezone module (part of <a href="http://drupal.org/project/date">Date</a>) lets you use city names instead of timezone offsets in order to select a timezone, and that picks up Daylight Savings Time rules in a reasonably good manner, too.</p>
<p>A long list of cities can be hard to work with, though. This list is equally long, but it&#8217;s organized by GMT offset, which people are also likely to know.</p>
<pre>
Index: date_api.module
===================================================================
--- date_api.module	(revision 2404)
+++ date_api.module	(working copy)
@@ -490,6 +490,14 @@
           }
         }
       }
+
+      // Now reformat the zonenames so that they're of the form (GMT+0800) Asia/Manila
+      foreach ($zonenames as $name =&gt; $zone) {
+        $x = date_make_date('now', $name);
+        $list[$name] = '(GMT' . date_format($x, 'P') . ') ' . str_replace(' ', '_', $zone);
+      }
+      asort($list);
+      $zonenames = $list;
       if (!empty($zonenames)) {
         cache_set('date_timezone_identifiers_list', 'cache', serialize($zonenames));
       }
</pre>
<p>There&#8217;s probably a much more efficient way to do this, but hey, it works.</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-timezones-and-places/">Drupal: Timezones and places</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/05/drupal-timezones-and-places/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal from the trenches: Database glitches</title>
		<link>http://sachachua.com/wp/2009/05/drupal-from-the-trenches-database-glitches/</link>
		<comments>http://sachachua.com/wp/2009/05/drupal-from-the-trenches-database-glitches/#comments</comments>
		<pubDate>Thu, 21 May 2009 13:20:44 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/05/21/drupal-from-the-trenches-database-glitches/</guid>
		<description><![CDATA[The problem: Our Drupal site stopped displaying nodes on our fuzzysearch-based pages.
I started breaking down the SQL query to find out which joined table didn&#8217;t have the data that was supposed to be there. At first, I thought it might be that the publication dates or expiration dates were incorrect, but that wasn&#8217;t it. All [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-from-the-trenches-database-glitches/">Drupal from the trenches: Database glitches</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The problem: Our Drupal site stopped displaying nodes on our fuzzysearch-based pages.</p>
<p>I started breaking down the SQL query to find out which joined table didn&#8217;t have the data that was supposed to be there. At first, I thought it might be that the publication dates or expiration dates were incorrect, but that wasn&#8217;t it. All of the nodes were set to &#8216;published&#8217; (status = 1), and all remained correctly associated with the domain through the Domain module.</p>
<p>I checked the search_fuzzy_index table. Hmm. The table was smaller than it should be. When I queried it for a node that should&#8217;ve been there, I got zero rows.</p>
<p>I tried forcing the system to reindex the node. Still nothing.</p>
<p>I printed out the SQL statements and ran them myself. <tt>ERROR 1062 (23000): Duplicate entry '2147483647' for key 1</tt>.</p>
<p>Wha?</p>
<p>That looked like a suspiciously large number. I popped it into Google and found a lot of people with the same problem. Turns out that the autoincrement sequence fuzzysearch was using had jumped all the way to the end, for some reason or another (we couldn&#8217;t have been reindexing _that_ much!). I changed the column to a BIGINT, reindexed all the nodes using Drush commands like:</p>
<pre>
drush eval "\$rs=db_query(\"select nid from node where type='transitions_job'\");while(\$nid=db_fetch_array(\$rs)){fuzzysearch_reindex(\$nid['nid'], 'fuzzysearch');} fuzzysearch_cron();"
</pre>
<p>(using my custom eval command),</p>
<p>That worked. I reported the results to my team members in our group chat.</p>
<p>The IT architect said we were still having disk space issues. We&#8217;d removed all the unnecessary files and stale backups already, and I didn&#8217;t think there was much more that we could trim. I used <kbd>du --max-depth=2 /var | sort -n</kbd> to look at the disk usage in the /var tree, which was where we were having those problems. The three biggest directories were /var/www, /var/lib/mysql, and /var/spool/mail, and we&#8217;d already scrubbed as much as we could.</p>
<p>I used ls -lSr to look at the contents of /var/lib/mysql, and noticed that our watchdog table was 2.3 GBs. Gah! Turned out that Drupal had logged each of the PHP errors raised when we were trying to fix the previous problem. We didn&#8217;t want to delete all the logs, so we just deleted the logs of type &#8216;php&#8217;. After the IT architect ran <kbd>DELETE FROM watchdog WHERE type='php'" in the MySQL client, though, we still didn't have free space. </p>
<p>I guessed that the lack of free space could be solved by compacting the MySQL database, which I did with </kbd><kbd>OPTIMIZE TABLE watchdog</kbd>. That solved it!</p>
<p>That was an interesting day. =)</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-from-the-trenches-database-glitches/">Drupal from the trenches: Database glitches</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/05/drupal-from-the-trenches-database-glitches/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal: I&#8217;m learning how to be a JQuery/Date+Calendar ninja! =)</title>
		<link>http://sachachua.com/wp/2009/05/drupal-im-learning-how-to-be-a-jquerydatecalendar-ninja/</link>
		<comments>http://sachachua.com/wp/2009/05/drupal-im-learning-how-to-be-a-jquerydatecalendar-ninja/#comments</comments>
		<pubDate>Thu, 14 May 2009 12:36:40 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/05/14/drupal-im-learning-how-to-be-a-jquerydatecalendar-ninja/</guid>
		<description><![CDATA[Our customized Date+Calendar-based Drupal event calendar is coming along quite nicely. The information architect&#8217;s design called for extensive customizations, such as:

hiding the year view
creating a context-sensitive year navigator that displays the entire year, and linking that to the title of the image
adding AJAX effects
adding a pop-up callout with three of the day&#8217;s events
displaying times in [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-im-learning-how-to-be-a-jquerydatecalendar-ninja/">Drupal: I&#8217;m learning how to be a JQuery/Date+Calendar ninja! =)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Our customized Date+Calendar-based Drupal event calendar is coming along quite nicely. The information architect&#8217;s design called for extensive customizations, such as:
<ul>
<li>hiding the year view</li>
<li>creating a context-sensitive year navigator that displays the entire year, and linking that to the title of the image</li>
<li>adding AJAX effects</li>
<li>adding a pop-up callout with three of the day&#8217;s events</li>
<li>displaying times in the user&#8217;s timezone generally, and in the user&#8217;s timezone and the event&#8217;s timezone on the actual event page</li>
<li>including dates for the previous month in the month view</li>
<li>allowing people to subscribe for notifications for new events in their interest group</li>
<li>allowing people to get iCal feeds for their events, all the events, or a group&#8217;s events, and these feeds should work without login</li>
<li>allowing people to sign up for e-mail reminders</li>
</ul>
<p>We went with Date+Calendar instead of Event because Date+Calendar seemed more up to date, and its integration with Views meant that it was easy to add in domain access and other constraints. I learned quite a lot of new things in the process of implementing these features, such as:
<ul>
<li>writing a lot of Javascript using jQuery in order to bind events and do AJAX calls</li>
<li>writing test cases to check event subscription, event notification, timezone handling, and so on</li>
<li>programmatically creating a CCK node type with a date field</li>
<li>overriding calendar.inc to modify the way Drupal prepares the calendar</li>
<li>overriding calendar.theme to modify the way Drupal presents the calendar</li>
<li>making my own set of functions to generate the year navigator, based on the year view in calendar.inc</li>
</ul>
<p>It took me a bit of time to figure out how this <a href="http://drupal.org/node/154479">Date+Calendar AJAX patch</a> worked, and I ended up modifying it extensively. I had been getting confused by mini= and view=ajax and all the other parameters floating around. I tried different approaches, including creating a callback function that generated just the HTML for the block, but then I found myself passing in too many parameters to control the URLs for the links. </p>
<p>My aha! moment was when I realized that the way the patch was handling the AJAX was to generate the entire page. When it got to processing the calendar block in the sidebar, the code checked for the $_GET['view'] parameter, and if an AJAX view was requested, it would print out the block and exit without printing the rest of the page. While that worked for the general case, we needed to modify our code so that the calendar blocks don&#8217;t appear on the calendar detail pages, so I wrote some Javascript code that requested a page within the right context.</p>
<p>This approach of generating the whole page didn&#8217;t quite work when it came to the subscription form that we embedded in event node page templates, though, because it printed out the node content before it generated the form. I used jQuery to retrieve the entire page, and then I extracted just the DIV I wanted to keep.</p>
<p>I still don&#8217;t like fussing with CSS (particularly when it comes to collapsing borders or dealing with browser issues), so I&#8217;ll leave that in the capable hands of our information architect. But now I&#8217;m the jQuery ninja on our team, too, and I know I can rock CCK+Views and calendars for future projects. =D</p>
<p>(p.s. Left out details, but if you&#8217;re curious about any of the bullet points, comment and I might flesh it out into its own blog post!)</p>
<p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=89e50dd6-bd5f-80be-a37a-6587187637a5" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/05/drupal-im-learning-how-to-be-a-jquerydatecalendar-ninja/">Drupal: I&#8217;m learning how to be a JQuery/Date+Calendar ninja! =)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/05/drupal-im-learning-how-to-be-a-jquerydatecalendar-ninja/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drupal staging and deployment tips: It&#8217;s all code</title>
		<link>http://sachachua.com/wp/2009/04/drupal-staging-and-deployment-tips-its-all-code/</link>
		<comments>http://sachachua.com/wp/2009/04/drupal-staging-and-deployment-tips-its-all-code/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 12:54:30 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[highlight]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/04/23/drupal-staging-and-deployment-tips-its-all-code/</guid>
		<description><![CDATA[As I talk to more and more developers about practices for working with Drupal, I get the idea that the staging and deployment process adopted by my team isn&#8217;t widespread. 
Many developers make their changes directly through the web-based interface of a testing server, or even on the production site itself. I think that&#8217;s both [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/drupal-staging-and-deployment-tips-its-all-code/">Drupal staging and deployment tips: It&#8217;s all code</a></p>
]]></description>
			<content:encoded><![CDATA[<p>As I talk to more and more developers about practices for working with Drupal, I get the idea that the staging and deployment process adopted by my team isn&#8217;t widespread. </p>
<p>Many developers make their changes directly through the web-based interface of a testing server, or even on the production site itself. I think that&#8217;s both tedious and scary. =)</p>
<p>Putting all of our behavior-related changes in update function in the install file makes it easier to merge changes and repeatedly test upgrades. Editorial changes (fixing typos, etc.) can happen on the site, but if it&#8217;s behavior-related code, it should be in the code repository. In moments of weakness, we&#8217;ve made web-based changes to our site, and we almost always regret those&#8211;either right away because things broke, or when we try to reconstruct our changes.</p>
<p>The Module Developer&#8217;s Guide documents how to write .install files for <a href="http://drupal.org/node/51220">Drupal 5</a> and <a href="http://drupal.org/node/323314">Drupal 6</a>, but doesn&#8217;t go into much detail about what else you can put in the update functions. Maybe that&#8217;s why many developers use install files only for database-related changes. But you can do so much more: creating nodes, adding permissions, enabling other modules, and so on.&nbsp; </p>
<p>Watch out for these potential pitfalls:</p>
<ul>
<li>$user is set to the superuser (uid = 1) if you run update.php after logging in as the superuser, but <b>if $access_check is set to FALSE in update.php, then $user will be null. </b>That means that if you&#8217;re creating nodes or doing other things that check user_access or node_access, you should <a href="http://sachachua.com/wp/2009/03/19/drupal-gotcha-watch-out-for-user-during-updatephp/">temporarily switch to the superuser</a>.</li>
</ul>
<li>If your update works if you apply them one at a time, but not if you apply all of them in one go, <b>look for functions that cache information in static variables. </b>You may need to modify the source code to add an argument that allows you to reset the cache or find another way to deal with the static variables. <a href="http://sachachua.com/wp/2009/03/25/drupal-in-the-trenches-fighting-with-views/">Static variables are a pain</a>.
</li>
<li>Another reason why batch updates may fail while incremental updates work has to do with the order that the update functions are called in. Modules are processed according to weight and alphabetical order, and<b> all applicable update functions within one module are run before moving onto the next.</b> If you have a set of related modules, put update functions that affect the related modules into the module with the heaviest weight.
</li>
<li>.install files may get really long if you create _update_N functions for every change and you frequently deploy to a test server. <b>You can refactor your update functions</b> if other developers know that they should test the updates from a fresh copy of the production database instead of from incremental updates to their current system. Make sure you don&#8217;t add code below the update level on the production server.
</li>
<li>Don&#8217;t forget to return an array containing results, or even just array().</li>
<p>Here are some general tips on how to find out the programmatic equivalent of a web-based action:</p>
<ul>
<li>Find the form or form_submit function that processes the action and see if there are any API functions you can call to produce the same effect. If you can&#8217;t find an API function, consider writing one.</li>
<li>If you can&#8217;t write an API function, use the Macro module (part of the Devel module for Drupal 5) to record the form submission, and then use drupal_execute to run the recorded macro, OR</li>
<li>Directly manipulate the database, making sure to call any hooks necessary.</li>
</ul>
<p>And here are some examples of programmatically doing things:</p>
<p><b>Setting a variable</b><br />variable_set(&#8216;yourvariable&#8217;, &#8216;yourvalue&#8217;);<b></b></p>
<p><b>Enabling modules</b><br />include_once(&#8216;includes/install.inc&#8217;);<br />module_rebuild_cache();<br />drupal_install_modules(array(&#8216;module1&#8242;, &#8216;module2&#8242;));</p>
<p><b>Disabling modules<br /></b>db_query(&#8220;UPDATE {system} SET status=0 WHERE type=&#8217;module&#8217; AND name=&#8217;%s&#8217;&#8221;, &#8216;modulename&#8217;);<br /><b><br /></b><b>Creating nodes&nbsp; <br /></b>global $user;<br />$old_user = $user;<br />$user = user_load(array(&#8216;uid&#8217; =&gt; 1));<br />$session = session_save_session();<br />$session_save_session(FALSE);<br />// Do the work<br />$node = new stdClass();<br />$node-&gt;type = &#8216;page&#8217;;<br />$node-&gt;title = &#8216;Title&#8217;;<br />$node-&gt;body = &#8216;Body&#8217;; <br />node_save($node);<br />// Restore the user<br />$user = $old_user;<br />session_save_session($session);<br /><b><br />Deleting nodes<br /></b>global $user;<br />$old_user = $user;<br />$user = user_load(array(&#8216;uid&#8217; =&gt; 1));<br />$session = session_save_session();<br />session_save_session(FALSE);<br />// Do the work<br />node_delete($nid);<br />// Restore the user<br />$user = $old_user;<br />session_save_session($session);<b><br /></b><br /><b>Updating the list of blocks</b><br />global $theme_key;<br />$theme_key = &#8216;yourtheme&#8217;;<br />_block_rehash();</p>
<p><strong>Convenience functions for working with permissions</strong></p>
<pre>
function _add_permissions($roles, $permissions) {
  $ret = array();
  foreach ($roles as $rid) {
    if (is_numeric($rid)) {
      $role = db_fetch_array(db_query("SELECT rid, name FROM {role} WHERE rid=%d",
				      $rid));
    }
    else {
      $role = db_fetch_array(db_query("SELECT rid, name FROM {role} WHERE name='%s'",
				      $rid));
    }
    $role_permissions =
      explode(', ',
	      db_result(db_query('SELECT perm FROM {permission} WHERE rid=%d',
				 $role['rid'])));
    $role_permissions = array_unique(array_merge($role_permissions, $permissions));
    db_query('DELETE FROM {permission} WHERE rid = %d', $role['rid']);
    db_query("INSERT INTO {permission} (rid, perm) VALUES (%d, '%s')",
	     $role['rid'],
	     implode(', ', $role_permissions));
    $ret[] = array('success' =&gt; true,
		   'query' =&gt; "Added " . implode(', ', $permissions)
		   . ' permissions for ' . $role['name']);
  }
  return $ret;
}

function _remove_permissions($roles, $permissions) {
  $ret = array();
  foreach ($roles as $rid) {
    if (is_numeric($rid)) {
      $role = db_fetch_array(db_query("SELECT rid, name FROM {role} WHERE rid=%d",
				      $rid));
    }
    else {
      $role = db_fetch_array(db_query("SELECT rid, name FROM {role} WHERE name='%s'",
				      $rid));
    }
    $role_permissions =
      explode(', ',
	      db_result(db_query('SELECT perm FROM {permission} WHERE rid=%d',
				 $role['rid'])));
    $role_permissions = array_diff($role_permissions, $permissions);
    db_query('DELETE FROM {permission} WHERE rid = %d', $role['rid']);
    db_query("INSERT INTO {permission} (rid, perm) VALUES (%d, '%s')",
	     $role['rid'],
	     implode(', ', $role_permissions));
    $ret[] = array('success' =&gt; true,
		   'query' =&gt; "Removed " . implode(', ', $permissions)
		   . ' permissions for ' . $role['name']);
  }
  return $ret;
}
</pre>
<p>Use update functions for all of your behavioral changes. Use source code control. Write regression tests. These practices won&#8217;t take all the challenges out of Drupal development, but they certainly make it less stressful&#8211;and more fun. =)</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=aac87a1a-7fa2-83ba-97ce-7a59ed9e6792" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/drupal-staging-and-deployment-tips-its-all-code/">Drupal staging and deployment tips: It&#8217;s all code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/04/drupal-staging-and-deployment-tips-its-all-code/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Software reconstruction</title>
		<link>http://sachachua.com/wp/2009/04/software-reconstruction/</link>
		<comments>http://sachachua.com/wp/2009/04/software-reconstruction/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 19:44:24 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/04/21/software-reconstruction/</guid>
		<description><![CDATA[Our partners really like the Drupal-based content management system I&#8217;ve been working on, so we might roll it out to a number of other countries. To minimize headaches, we&#8217;ll probably run them as separate Drupal databases using the same code. Over the next quarter, my team needs to clean up and genericize our current US-centric [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/software-reconstruction/">Software reconstruction</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Our partners really like the Drupal-based content management system I&#8217;ve been working on, so we might roll it out to a number of other countries. To minimize headaches, we&#8217;ll probably run them as separate Drupal databases using the same code. Over the next quarter, my team needs to clean up and genericize our current US-centric site so that it can be used in lots of other geographies.</p>
<p>This would be a nightmare to do if we had made all of our changes on the Web. Fortunately, most of our changes are in .install files. The changes had gotten out of sync with the installation profile we created near the beginning of the project, but it was relatively easy to work through the updates and incorporate them in the profile. The regression tests I wrote are proving to be really useful, too.</p>
<p>There are still a number of variables that we set through the web-based interface (blame moments of weakness!), so after we clean up the profile, we&#8217;ll compare some of production tables against the tables produced by our from-scratch installation.</p>
<p>I applied the lots-of-little-inc-files-that-automatically-get-included-an-run pattern from our last project, so now everything is neatly compartmentalized. I improved that pattern to add weights, so now I can make sure that some inc files are run after others.</p>
<p>Which brings me to thinking about the proper way to backport changes from update functions back into the install functions or to the installation profile. _install functions should reflect the latest versions of the database schema, but some code (node creation, etc.) logically feels more like a part of the installation profile&#8217;s final steps. My current approach is to use the _install function for code that doesn&#8217;t require other modules to be correctly configured, and to use my custom _install_final method for the finishing touches. I&#8217;ve also broken site-specific code out into separate .inc files so that I can include any of them as needed, and I&#8217;m using regression tests to check that things are okay. Command-line drush and my Makefile make it easy to switch between the two virtual hosts. </p>
<p>Most of my tests are still fail, but some of them pass with from-scratch installs. Hooray! =D</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=25d13fbb-5b9f-8422-907a-027e1852d9fb" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/software-reconstruction/">Software reconstruction</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/04/software-reconstruction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Drupal Makefile</title>
		<link>http://sachachua.com/wp/2009/04/my-drupal-makefile/</link>
		<comments>http://sachachua.com/wp/2009/04/my-drupal-makefile/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 11:14:16 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/04/10/my-drupal-makefile/</guid>
		<description><![CDATA[As promised, a scrubbed version of my Drupal Makefile.
I customize it for different testing or production environments with .mk files (ex: qa.mk) that contain the variables from the top part of the Makefile. These files are automatically included in this Makefile. Benefits: I don&#8217;t have to commit my database password to the source code tree, [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/my-drupal-makefile/">My Drupal Makefile</a></p>
]]></description>
			<content:encoded><![CDATA[<p>As promised, a scrubbed version of my <a href="http://sachachua.com/notebook/files/Makefile">Drupal Makefile</a>.</p>
<p>I customize it for different testing or production environments with .mk files (ex: qa.mk) that contain the variables from the top part of the Makefile. These files are automatically included in this Makefile. Benefits: I don&#8217;t have to commit my database password to the source code tree, and I don&#8217;t have to think about which environment I&#8217;m in.</p>
<p>I use &#8220;make cycle&#8221; and &#8220;make mysql&#8221; a lot. &#8220;make cycle&#8221; depends on Drush being set up properly, and patched to allow you to update all the modules from the command-line.</p>
<p>I <i>think</i> this works for the Drush update command:</p>
<pre>
function drush_tools_update($command = '') {
  global $user;
  ob_start();
  require_once 'includes/install.inc';
  include_once('update.php');
  $ret = ob_get_contents();
  drupal_load_updates();
  ob_end_clean();
  $user = user_load(array('uid' =&gt; 1));
  $list = module_list();
  $update_list = array();
  foreach ($list as $module) {
    $updates = drupal_get_schema_versions($module);
    if ($updates !== FALSE) {
      $latest = 0;
      $base = drupal_get_installed_schema_version($module);
      foreach ($updates as $update) {
        if ($update &gt; $base) {
          if ($update &gt; $latest) { $latest = $update; }
          $update_list[$module][] = $update;
        }
      }
      if ($latest) {
        sort($update_list[$module]);
        printf("%-30s %5d -&gt; %5d (%s)\n", $module, $base, $latest, join(', ', $update_list[$module]));
      } else {
        printf("%-30s %5d\n", $module, $base);
      }
    }
  }
  if (count($update_list) == 0) return;
  if ($command != 'force' &#038;&#038; !drush_confirm(t('Do you really want to continue?'))) {
    drush_die('Aborting.');
  }
  ob_start();
  foreach ($update_list as $module =&gt; $versions) {
    foreach ($versions as $v) {
      print "Running " . $module . "_update_" . $v . "\n";
      update_data($module, $v);
    }
  }
  $updates = ob_get_contents();
  cache_clear_all('*', 'cache', TRUE);
  cache_clear_all('*', 'cache_page', TRUE);
  cache_clear_all('*', 'cache_menu', TRUE);
  cache_clear_all('*', 'cache_filter', TRUE);
  drupal_clear_css_cache();
  ob_end_clean();
  print $updates;
  $output = '';

  print $updates;
  if (!empty($_SESSION['update_results'])) {
    $output .= "The following queries were executed:\n";
    foreach ($_SESSION['update_results'] as $module =&gt; $updates) {
      $output .= "\n" . $module . "\n--------------------------\n";
      foreach ($updates as $number =&gt; $queries) {
        $output .= 'Update #'. $number . ":\n";
        foreach ($queries as $query) {
          if ($query['success']) {
            $output .= "SUCCESS: " . $query['query'] . "\n";
          }
          else {
            $output .= "FAILURE: " . $query['query'] . "\n";
          }
        }
        if (!count($queries)) {
          $output .= "No queries\n";
        }
      }
    }
    $output .= "\n";
    print $output;
    unset($_SESSION['update_results']);
  }
}
</pre>
<p>(and you&#8217;ll need to define it in drush_tools_drush_command also).</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=efc22646-6c1e-8d32-af6e-f0dc126c6526" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/my-drupal-makefile/">My Drupal Makefile</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/04/my-drupal-makefile/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Lessons learned from this phase of our Drupal project</title>
		<link>http://sachachua.com/wp/2009/04/lessons-learned-from-this-phase-of-our-drupal-project/</link>
		<comments>http://sachachua.com/wp/2009/04/lessons-learned-from-this-phase-of-our-drupal-project/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 12:25:06 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[kaizen]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/04/02/lessons-learned-from-this-phase-of-our-drupal-project/</guid>
		<description><![CDATA[Not only has my sleep cycle been thrown out of whack, but I&#8217;ve also broken out in pimples.
Clearly, we can get better at managing the crunch time around deployment.
The last time we deployed, there were a few tense moments, but our rigorous test-everything-from-a-production-install process helped us do it smoothly. This time, not so much. Here [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/lessons-learned-from-this-phase-of-our-drupal-project/">Lessons learned from this phase of our Drupal project</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Not only has my sleep cycle been thrown out of whack, but I&#8217;ve also broken out in pimples.</p>
<p>Clearly, we can get better at managing the crunch time around deployment.</p>
<p>The last time we deployed, there were a few tense moments, but our rigorous test-everything-from-a-production-install process helped us do it smoothly. This time, not so much. Here are a few reasons why, and here&#8217;s what I can do to make things better.
<ul>
<li>I had set $access_check to FALSE because I wasn&#8217;t sure if we could get in to update the system. The IT architect logged in as a super administrator and ran upgrade.php. However, since $access_check was FALSE, it apparently didn&#8217;t check at <i>all</i> if the user was logged in as a super administrator, and so we ran into <a href="http://sachachua.com/wp/2009/03/19/drupal-gotcha-watch-out-for-user-during-updatephp/">bugs that assumed account 1 was running the update</a> (related to node saving). Symptom: The updates ran, but some updates didn&#8217;t get fully applied. We only detected this the day after (the perils of doing an evening deployment when you&#8217;re tired). I thought that just reloading the database backup and reapplying the changes (properly, this time!) would&#8217;ve been a cleaner way to do it, but my other team members voted for manually fixing things. So that was stressful.</p>
<p>The problem occurred a couple of times during QA testing, which is how I realized that update.php was misbehaving. I wrote about it, but I didn&#8217;t review the other developers&#8217; code for potential issues, and I didn&#8217;t emphasize the potential pitfalls during our meeting. </p>
<p>To do this better next time, we can come up with a more formal and regular code review process, and I can communicate more explicitly. We <i>could</i> try to always run update.php with $access_check = TRUE, but it may need to be false in some case in the future, and it&#8217;s better to be aware of potential problems.</p>
</li>
<li>After we deployed, we found out that a subdomain we were using hadn&#8217;t been set up in DNS. We were no longer in control of the domain record because we had turned that over to the nonprofit partner who was supposed to be managing the site.
<p>To do this better next time, we should make sure our QA and production setups are as close as possible (we had been using wildcards for QA), and we should test new domains.</p>
</li>
<li>I had been in crunch mode for 10 days (since the weekend before). It&#8217;s difficult to maintain sprint-like energy and focus for that long, and I was feeling physically fatigued after I stayed up relatively late to finish the deployment.
<p>To do this better next time, I need to insist on taking breaks, even if it doesn&#8217;t seem to be being much like a team player. Also, I need to reset my sleep cycle as quickly as possible.</li>
</ul>
<p>During deployment, I also learned to:
<ul>
<li><b>Give people feedback and send them patches instead of just fixing the code for them.</b> I don&#8217;t get fazed when code changes underneath me. I&#8217;ve worked with too much open source, I guess. <laugh> I just try to figure out what changed, why, and how to work with the new structure. Other people can feel alienated from their code, though, and they lose that feeling of ownership. Better to hand things over to other people, perhaps with a few tips, even if it means it won&#8217;t be finished as quickly.</laugh></li>
<li><b>Communicate changes more often and more explicitly. </b>I liked having a Sametime group chat running. I don&#8217;t like sending lots of e-mail, and having the chat made it easier for me to keep others in the loop.</li>
<li><b>Make sure tests are up to date, and run them regularly.</b> There were a few bugs I missed because I hadn&#8217;t run the test suite, and I hadn&#8217;t run it because it takes a lot of time on my system. I should make the time to do that (using it as break time if necessary), and I can also set up a testing environment so that other people can run the tests easily. Speaking of that &#8211; I spent nearly a day tracking down failures due to other people&#8217;s changes because they didn&#8217;t verify their work against our test suite. I need to figure out how to build more common ownership of our test suite, and how to get them to run the tests themselves. The SimpleTest web interface is okay, but it&#8217;s still not as convenient as Drush. Maybe a line item in our administration interface&#8230; Hmm&#8230; Next time, I could also set up regular tests that e-mail us the results.</li>
<li><b>Build little tools to help.</b> Instead of analyzing the source code by hand in order to come up with the number of lines we changed (needed this for IBM Legal), I wrote a tool that analyzed our source code based on the Subversion history. It was pretty cool. It took me about 30 minutes to write, and we ended up running it twice. I expect it would&#8217;ve taken us three hours to do that all by hand. Yay! =)</li>
</ul>
<p>So my key things for next time are:
<ul>
<li>Make sure developers know about the gotchas we encountered.</li>
<li>Set up an automated test environment and make sure other developers take ownership of the results.</li>
<li>Keep a group chat running. I participate in that quite a lot. E-mail, not so much.</li>
<li>Take more breaks.</li>
</ul>
<p>Becoming a better developer, one step at a time&#8230;</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=205421a8-c884-883b-9069-05b77ee23c0f" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/04/lessons-learned-from-this-phase-of-our-drupal-project/">Lessons learned from this phase of our Drupal project</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/04/lessons-learned-from-this-phase-of-our-drupal-project/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Haciendo que tu entorno de desarrollo de Drupal rocks</title>
		<link>http://sachachua.com/wp/2009/03/haciendo-que-tu-entorno-de-desarrollo-de-drupal-rocks/</link>
		<comments>http://sachachua.com/wp/2009/03/haciendo-que-tu-entorno-de-desarrollo-de-drupal-rocks/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 13:10:00 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/03/27/haciendo-que-tu-entorno-de-desarrollo-de-drupal-rocks/</guid>
		<description><![CDATA[Marco Antonio Villegas Vega of the Drupal Peru community translated my &#8220;Totally Rocking Your Drupal Development Environment&#8221; slides. Hooray! Full blog post to follow. In the meantime, check out the original at http://bit.ly/drupal25. =)
Haciendo que tu entorno de desarrollo de Drupal rocks

View more presentations from Sacha Chua.


Post from: sacha chua :: enterprise 2.0 consultant, storyteller, [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/haciendo-que-tu-entorno-de-desarrollo-de-drupal-rocks/">Haciendo que tu entorno de desarrollo de Drupal rocks</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Marco Antonio Villegas Vega of the Drupal Peru community translated my &#8220;Totally Rocking Your Drupal Development Environment&#8221; slides. Hooray! Full blog post to follow. In the meantime, check out the original at <a href="http://bit.ly/drupal25">http://bit.ly/drupal25</a>. =)</p>
<div style="width:425px;text-align:left" id="__ss_1192472"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/sachac/totally-rocking-your-drupal-development-environment-spanish?type=presentation" title="Haciendo que tu entorno de desarrollo de Drupal rocks">Haciendo que tu entorno de desarrollo de Drupal rocks</a>
<div class="youtube-video"><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=20090321-totally-rocking-your-drupal-development-environment-es-090324155301-phpapp02&#038;stripped_title=totally-rocking-your-drupal-development-environment-spanish" ></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=20090321-totally-rocking-your-drupal-development-environment-es-090324155301-phpapp02&#038;stripped_title=totally-rocking-your-drupal-development-environment-spanish" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></div>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/sachac">Sacha Chua</a>.</div>
</div>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=c4783093-6202-4377-9930-0fa7856aca42" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/haciendo-que-tu-entorno-de-desarrollo-de-drupal-rocks/">Haciendo que tu entorno de desarrollo de Drupal rocks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/03/haciendo-que-tu-entorno-de-desarrollo-de-drupal-rocks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal in the Trenches: Fighting with Views</title>
		<link>http://sachachua.com/wp/2009/03/drupal-in-the-trenches-fighting-with-views/</link>
		<comments>http://sachachua.com/wp/2009/03/drupal-in-the-trenches-fighting-with-views/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 21:37:19 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[war-story]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/03/25/drupal-in-the-trenches-fighting-with-views/</guid>
		<description><![CDATA[The other developers have bought into the idea that all behavior-related changes should be in the source code. It&#8217;s the only thing keeping us sane with four developers and three environments: local, testing, and production. It has its own challenges, though, like this one:
Problem: Blocks based on views with dependencies on custom tables sometimes don&#8217;t [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-in-the-trenches-fighting-with-views/">Drupal in the Trenches: Fighting with Views</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The other developers have bought into the idea that all behavior-related changes should be in the source code. It&#8217;s the only thing keeping us sane with four developers and three environments: local, testing, and production. It has its own challenges, though, like this one:</p>
<p><b>Problem: Blocks based on views with dependencies on custom tables sometimes don&#8217;t show up when we refreshed from the database dump, although things work if we update the database one revision at a time.<br /></b><br />After <i>far too much </i>pain and suffering, I figured out that _views_get_default_views was caching the results. When it checked our newly-enabled modules for default views, it found some views whose dependencies hadn&#8217;t gotten enabled yet, so it didn&#8217;t cache those. The next time _views_get_default_views was called, it used the values it had stored in a static variable available only in that function. </p>
<p>_views_get_default_views did not provide a way to reset that static variable, so once it was called, the data was practically written in stone.</p>
<p>_views_get_tables is similarly evil. (ARGH!)</p>
<p>This might&#8217;ve been fixed in a Views update (and we&#8217;re still using Drupal 5, in any case), but I&#8217;m not going to suggest updating the module this close to external acceptance testing.</p>
<p>So our options were:
<ul>
<li><b>Make sure _block_rehash and similar functions never get called</b> before the update function that enables the module. Problems: Not only do we need to untangle the order of update functions that get called and be hyper-aware of what other modules do, but we&#8217;ll also need to change old update functions if we ever need to do this for another view in the future.</li>
<li><b>Hack _views_get_default_views</b> <b>and _views_get_tables </b>to accept an optional parameter that resets the static variable.</li>
</ul>
<p>When there are no clean alternatives, you just gotta get your fingers dirty and hack code.</p>
<p>Was that really only one hour of my life? It felt so much longer.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=aec508c9-d28f-46cb-bcac-b9eb7cc09357" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-in-the-trenches-fighting-with-views/">Drupal in the Trenches: Fighting with Views</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/03/drupal-in-the-trenches-fighting-with-views/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Drupal gotchas: Never ever ever use anything less than module AND delta to specify blocks</title>
		<link>http://sachachua.com/wp/2009/03/drupal-gotchas-never-ever-ever-use-anything-less-than-module-and-delta-to-specify-blocks/</link>
		<comments>http://sachachua.com/wp/2009/03/drupal-gotchas-never-ever-ever-use-anything-less-than-module-and-delta-to-specify-blocks/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 17:19:36 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/03/25/drupal-gotchas-never-ever-ever-use-anything-less-than-module-and-delta-to-specify-blocks/</guid>
		<description><![CDATA[One of the common mistakes I run into is people not specifying enough information when deleting or updating entries in the {blocks} table. You should always use module AND delta to identify the block you&#8217;re working with. Delta by itself is not enough, and title is right out.
I learned this the hard way when my [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-gotchas-never-ever-ever-use-anything-less-than-module-and-delta-to-specify-blocks/">Drupal gotchas: Never ever ever use anything less than module AND delta to specify blocks</a></p>
]]></description>
			<content:encoded><![CDATA[<p>One of the common mistakes I run into is people not specifying enough information when deleting or updating entries in the {blocks} table. You should <strong>always</strong> use module AND delta to identify the block you&#8217;re working with. Delta by itself is not enough, and title is right out.</p>
<p>I learned this the hard way when my blocks suddenly started failing. I jumped back to the last known-good revision, and then stepped forward. All the update functions ran okay, one after the other. When I ran all the update functions after a database refresh, though, things failed. It turned out that another developer had changed the title of a block to a blank string, but left a db_query(&#8220;DELETE FROM {blocks} WHERE title=&#8217;%s&#8217;, $title&#8221;); in the function. And since it was called fairly early in our update cycle, it didn&#8217;t turn up during the incremental updates from my known-good database.</p>
<p>That took me about 45 minutes to find and fix. Thank goodness for tests and version control!</p>
<p><strong>LESSON: Never ever ever use anything less than module AND delta to specify blocks.</strong></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=a613db21-fa56-4845-a69a-44ebee060d31" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-gotchas-never-ever-ever-use-anything-less-than-module-and-delta-to-specify-blocks/">Drupal gotchas: Never ever ever use anything less than module AND delta to specify blocks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/03/drupal-gotchas-never-ever-ever-use-anything-less-than-module-and-delta-to-specify-blocks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Drupal tip: Test mail sending with Devel</title>
		<link>http://sachachua.com/wp/2009/03/drupal-tip-test-mail-sending-with-devel/</link>
		<comments>http://sachachua.com/wp/2009/03/drupal-tip-test-mail-sending-with-devel/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 21:52:41 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/03/23/drupal-tip-test-mail-sending-with-devel/</guid>
		<description><![CDATA[If you don&#8217;t want to send lots of mail to your users when you&#8217;re testing your site, change the Devel module&#8217;s SMTP Library setting to &#8220;Log Only&#8221;. Then you can check your log to see all the mail that would&#8217;ve been sent. Handy!
To enable this only on your testing server, add the following to that [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-tip-test-mail-sending-with-devel/">Drupal tip: Test mail sending with Devel</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t want to send lots of mail to your users when you&#8217;re testing your site, change the Devel module&#8217;s SMTP Library setting to &#8220;Log Only&#8221;. Then you can check your log to see all the mail that would&#8217;ve been sent. Handy!</p>
<p>To enable this only on your testing server, add the following to that domain&#8217;s settings.php:</p>
<pre>$conf['smtp_library'] = drupal_get_filename('module', 'devel');</pre>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=e651ac51-1ef8-4f28-bb32-028f675a6db5" /></div>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-tip-test-mail-sending-with-devel/">Drupal tip: Test mail sending with Devel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/03/drupal-tip-test-mail-sending-with-devel/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Drupal Gotcha: Watch out for $user during update.php</title>
		<link>http://sachachua.com/wp/2009/03/drupal-gotcha-watch-out-for-user-during-updatephp/</link>
		<comments>http://sachachua.com/wp/2009/03/drupal-gotcha-watch-out-for-user-during-updatephp/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 15:42:09 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/?p=5928</guid>
		<description><![CDATA[If you disable access-checking on your update.php, there&#8217;s no guarantee that the update script will be run with the superuser as the active user. This could mess up your update functions that delete nodes or use other access permissions.
To fix this, temporarily assume the identity of the superuser in the update functions that need it:

global [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-gotcha-watch-out-for-user-during-updatephp/">Drupal Gotcha: Watch out for $user during update.php</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you disable access-checking on your update.php, there&#8217;s no guarantee that the update script will be run with the superuser as the active user. This could mess up your update functions that delete nodes or use other access permissions.</p>
<p>To fix this, temporarily assume the identity of the superuser in the update functions that need it:</p>
<pre>
global $user;
$old_user = $user;
$user = user_load(array('uid' => 1));
$session = session_save_session();
session_save_session(FALSE);
</pre>
<p>and then restore the old user afterwards:</p>
<pre>
$user = $old_user;
session_save_session($session);
</pre>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupal-gotcha-watch-out-for-user-during-updatephp/">Drupal Gotcha: Watch out for $user during update.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/03/drupal-gotcha-watch-out-for-user-during-updatephp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>DrupalCon 2009 Recap</title>
		<link>http://sachachua.com/wp/2009/03/drupalcon-2009-recap/</link>
		<comments>http://sachachua.com/wp/2009/03/drupalcon-2009-recap/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 23:49:28 +0000</pubDate>
		<dc:creator>Sacha Chua</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[drupalcon]]></category>
		<category><![CDATA[drupalcon09]]></category>

		<guid isPermaLink="false">http://sachachua.com/wp/2009/03/15/drupalcon-2009-recap/</guid>
		<description><![CDATA[Quick notes on sessions I attended
Building APIs that RockBy: Jeff Eaton Links: Slides, Video Talked about the importance of making it easier for other modules to use your code (not just users through the Web interface); showed an example of using hooks for ultimate flexibility. Key takeaway: Try building your module as an API, then [...]<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupalcon-2009-recap/">DrupalCon 2009 Recap</a></p>
]]></description>
			<content:encoded><![CDATA[<p><b><font size="3">Quick notes on sessions I attended</font></b></p>
<p><b><a title="Building APIs that Rock" href="http://dc2009.drupalcon.org/session/building-apis-rock" id="txpb">Building APIs that Rock</a><br /></b>By: <a title="Jeff Eaton" href="http://dc2009.drupalcon.org/user/eaton" id="q9nc">Jeff Eaton</a> <br />Links: <a title="Slides" href="http://www.slideshare.net/eaton/building-apis-that-rock" id="q53g">Slides</a>, <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-BuildingApisThatRock" id="t_k0">Video</a> <br />Talked about the importance of making it easier for other modules to use your code (not just users through the Web interface); showed an example of using hooks for ultimate flexibility. Key takeaway: Try building your module as an API, then layer a user interface on top of it (ex: Views). Also, puppets!</p>
<p><b><a title="Keynote: The State of Drupal" href="http://dc2009.drupalcon.org/node/51" id="ldrf">Keynote: The State of Drupal</a><br /></b> By: <a title="Dries Buytaert" href="http://dc2009.drupalcon.org/user/dries" id="hdb7">Dries Buytaert</a> <br />Links:&nbsp; <a title="Video" href="http://www.archive.org/details/DrupalconDC2009-DriesKeynote" id="wd0_">Video</a> , <a title="Text Outline" href="http://interdependentweb.com/DrupalCon/2009/TheStateOfDrupal" id="wh:5">Text Outline</a> <br />Drupal community, code growing exponentially. Next steps: Connecting data</p>
<p><u><b><a title="Totally Rocking Your Development Environment" href="http://dc2009.drupalcon.org/session/totally-rocking-your-development-environment" id="sagw">Totally Rocking Your Development Environment</a> </b></u><br />By:&nbsp; <a title="Sacha Chua" href="http://dc2009.drupalcon.org/user/sachac" id="n00a">Sacha Chua</a> <br />Links:&nbsp; <a title="Download Movie File" href="http://www.archive.org/details/DrupalconDc2009-TotallyRockingYourDevelopmentEnvironment" id="zunx">Video</a>, <a title="Installation Profile" href="http://drupal.org/project/installation+profiles" id="viu5">Installation Profile</a> <br />I had a lot of fun learning from people&#8217;s tips, too!</p>
<p><u><b><a title="Handling Asynchronous Data with Drupal" href="http://dc2009.drupalcon.org/session/handling-aysnchronous-data-drupal-techniques-secure-scalable-and-stable-ajaxahah" id="rucn">Handling Asynchronous Data with Drupal</a> </b></u><br />By: <a title="Josh Koenig" href="http://dc2009.drupalcon.org/user/joshk" id="cole">Josh Koenig</a> <br />Links:&nbsp; <a title="Video" href="http://www.archive.org/details/HandlingAysnchronousDataWithDrupal" id="vok1">Video</a>, <a title="PDF Presentation" href="http://www.chapterthree.com/blog/josh_koenig/handling_aysnchronous_data_drupal_session_materials" id="tk03">PDF Presentation</a> <br />Key takeaway: Use Drupal.behaviors to attach contextualized Javascript code. Also, you can write data to files in order to make polling more efficient.</p>
<p><b><a title="Advanced Theming Techniques" href="http://dc2009.drupalcon.org/session/advanced-theming-techniques" id="z:cp">Advanced Theming Techniques</a></b> <br />By: <a title="Trevor Twining" href="http://dc2009.drupalcon.org/user/trevortwining" id="zof4">Trevor Twining</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-AdvancedThemingTechniques" id="p.hu">Video</a>, <a title="Slideshow" href="http://docs.google.com/Present?docid=dcst4gnn_44g9pv9jgr" id="esxt">Slideshow</a><br />Most of the presentation was about how to define subthemes and extend something like Zen.</p>
<p><u><b><a title="Business Analytics with Views" href="http://dc2009.drupalcon.org/session/business-analytics-drupal-views" id="yr:r">Business Analytics with Views</a> </b></u><br />By: <a title="Irakli Nadareishvili" href="http://dc2009.drupalcon.org/user/inadarei" id="op9l">Irakli Nadareishvili</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-BusinessAnalyticsWithViews" id="uv.o">Video</a>, <a title="Slideshow" href="http://www.slideshare.net/irakli/drupalcon-dc-busines-analytics-with-views" id="kt5l">Slideshow</a><br />Ooh, pretty charts. Key takeaway: look into charts and views_charts modules for integration with Google Charts and other charting engines</p>
<p><u><b><a title="Boosting Our Raw Capacity to Provide Drupal Training" href="http://dc2009.drupalcon.org/session/training-boosting-our-raw-capacity-provide-drupal-training" id="c_w-">Boosting Our Raw Capacity to Provide Drupal Training</a> </b></u><br />By: <a title="Sean Effel" href="http://dc2009.drupalcon.org/user/seaneffel" id="ihf1">Sean Effel</a> <br />Links: <a title="Training Models" href="http://www.advantagelabs.com/node/947" id="x49z">Training Models</a>, <a title="Notes from Audience" href="http://interdependentweb.com/DrupalCon/2009/ProvidingDrupalTraining" id="w062">Notes from Audience</a><br />See my notes at <a title="http://sachachua.com/wp/2009/03/05/drupalcon-day-1-notes-and-links-from-march-4-2009/" href="http://sachachua.com/wp/2009/03/05/drupalcon-day-1-notes-and-links-from-march-4-2009/" id="yr1-">http://sachachua.com/wp/2009/03/05/drupalcon-day-1-notes-and-links-from-march-4-2009/</a> . Key takeaway: Core training has lots of common ground, but then need to customize training for skill level / needs; group clinics/workshops handy</p>
<p><b><a title="Building Infrastructure You Can Scale, Monitor and Maintain" href="http://dc2009.drupalcon.org/session/building-infrastructure-you-can-scale-monitor-and-maintain" id="xmh-">Building Infrastructure You Can Scale, Monitor and Maintain</a></b> <br />By: <a title="David Strauss" href="http://dc2009.drupalcon.org/user/david-strauss" id="eoa-">David Strauss</a><br />Links: <a title="Video" href="http://www.archive.org/details/BuildingInfrastructureYouCanScaleMonitorAndMaintain" id="i3go">Video</a> <br />Great slide breaking down flow of traffic to rough percentages. Key point: adding more components is easy (content delivery network, reverse proxy, etc.), but adding more than one component (ex: multiple database servers) is harder. Coherency issues, replication issues, etc. Try to minimize dynamic pages.</p>
<p><b><a title="When Efficiency and Manageability Matter, Drupal at Scale," href="http://dc2009.drupalcon.org/session/when-efficiency-matters-drupal-scale" id="c1gm">When Efficiency and Manageability Matter, Drupal at Scale,</a></b> <br />By: <a title="Scott Mattoon" href="http://dc2009.drupalcon.org/user/smattoon" id="w9y.">Scott Mattoon</a> <br />Links: <a title="Slideshow" href="http://www.slideshare.net/smattoon/drupal-efficiency" id="pb64">Slideshow</a>, <a title="Video" href="http://www.archive.org/details/WhenEfficiencyAndManageabilityMatterDrupalAtScale" id="vw9c">Video</a> <br />Left this session after a short while, as it seemed to be mostly about Sun tools.<br /><b><br /><a title="Powering Collaboration in a Distributed Enterprise" href="http://dc2009.drupalcon.org/session/powering-collaboration-distributed-enterprise" id="ppjq">Powering Collaboration in a Distributed Enterprise</a></b> <br />By: <a title="Dan Karran" href="http://dc2009.drupalcon.org/user/dankarran" id="f9oc">Dan Karran</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-PoweringCollaborationInADistributedEnterprise" id="q3un">Video</a> </p>
<p>Interesting demo of a featureful Drupal site used on the intranet. Check out their auto-saved drafts.</p>
<p><b><a title="Drupal Patterns: Managing and Automating Site Configurations" href="http://dc2009.drupalcon.org/session/drupal-patterns-managing-and-automating-site-configurations" id="s:0v">Drupal Patterns: Managing and Automating Site Configurations</a></b> <br />By: <a title="Chris Bryant" href="http://dc2009.drupalcon.org/user/chrisbryant" id="heai">Chris Bryant</a> <br />Links: <a title="Slideshow" href="http://www.slideshare.net/chrisbryant/drupal-patterms-module-v3" id="r6vq">Slideshow</a>, <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-DrupalPatternsManagingAndAutomatingSiteConfigurations" id="g3er">Video</a><br />Patterns allow you to bring in groups of functionality. Interesting: can publish and share patterns. No support for change management yet.</p>
<p><b><a title="Staging and Deployment – A Panel Discussion" href="http://dc2009.drupalcon.org/session/staging-and-deployment-panel-discussion" id="mai3">Staging and Deployment – A Panel Discussion</a></b> <br />By: <a title="Greg Dunlap" href="http://dc2009.drupalcon.org/user/heyrocker" id="siz_">Greg Dunlap</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-StagingAndDeployment" id="dm0f">Video</a> <br />Deploy and db_scripts look interesting. Also, I promised to upload my .install file snippets&#8230;</p>
<p><b><a title="Why I Hate Drupal" href="http://dc2009.drupalcon.org/session/why-i-hate-drupal" id="d63o">Why I Hate Drupal</a></b> <br />By: <a title="James Walker" href="http://dc2009.drupalcon.org/user/walkah" id="hy57">James Walker</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-WhyIHateDrupal" id="k_s0">Video</a> <br />Good stuff. Interesting contrast to kumbaya keynote: contrast of Drupal&#8217;s growth with Sharepoint, Wordpress, and Joomla.</p>
<p><b><a title="Advanced Drupal Security" href="http://dc2009.drupalcon.org/session/hacker-proof-your-code-advanced-drupal-security" id="mgld">Advanced Drupal Security</a></b> <br />By: <a title="Neil Drumm" href="http://dc2009.drupalcon.org/user/neil-drumm" id="l4ih">Neil Drumm</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-AdvancedDrupalSecurity" id="n2.7">Video</a> <br />Went through key parts of Drupal security handbook. My takeaway: use session_save_session(FALSE); when changing global $user;</p>
<p><b><a title="Selling Drupal Services" href="http://dc2009.drupalcon.org/session/selling-you-and-your-drupal-services" id="fr9x">Selling Drupal Services</a></b> <br />By: <a title="Neil Giarratana" href="http://dc2009.drupalcon.org/user/ngiarratana" id="yyqx">Neil Giarratana</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDC2009-SellingDrupalServices" id="r78j">Video</a>, <a title="Slideshow" href="http://www.slideshare.net/lucidus_neil/selling-you-your-services-drupalcon-2009#" id="aq_1">Slideshow</a> <br />Lots of tips about the business side of it. Key takeaway: RFP process is inefficient; try partnering up with agencies instead, so you can build on relationships</p>
<p><b><a title="Project Management For Fun and Profit" href="http://dc2009.drupalcon.org/session/project-management-fun-and-profit" id="z7_:">Project Management For Fun and Profit</a></b> <br />By: <a title="Crystal Williams" href="http://dc2009.drupalcon.org/user/crystalwilliams" id="fjps">Crystal Williams</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDC_2009-ProjectManagementForFunAndProfit" id="d3q8">Video</a> <br />Not much new here if you&#8217;ve managed or worked on projects before</p>
<p><b><a title="How do Drupal, Joomla! and WordPress Stack Up?" href="http://dc2009.drupalcon.org/session/drupal-joomla-and-wordpress-presented-hagen-graf-christine-graf-and-amy-stephen" id="but0">How do Drupal, Joomla! and WordPress Stack Up?</a></b> <br />By: <a title="Amy Stephen" href="http://dc2009.drupalcon.org/user/amystephen" id="p9yt">Amy Stephen</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDC_2009-HowDoDrupalJoomlaWordPressStackUp" id="v1_3">Video</a> <br />Didn&#8217;t go into an in-depth technical comparison / benchmarking</p>
<p><b><a title="Token: The Little API That Could" href="http://dc2009.drupalcon.org/session/token-little-api-could" id="s94v">Token: The Little API That Could</a></b> <br />By: <a title="Greg Knaddison" href="http://dc2009.drupalcon.org/user/greggles" id="zj9q">Greg Knaddison</a> <br />Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-TokenTheLittleApiThatCould" id="p_xp">Video</a> <br />Walked through how Token module works, how to implement your own tokens</p>
<p><font size="3"><b>Sessions I wish I also attended</b></font></p>
<p><b><a title="JQuery" href="http://dc2009.drupalcon.org/session/jquery" id="ihq3">JQuery</a></b>, <a title="Dmitri Gaskin" href="http://dc2009.drupalcon.org/user/dmitrig01" id="bghp">Dmitri Gaskin</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-Jquery" id="snka">Video</a><br /><b><a title="Drupal and the Geospatial Web" href="http://dc2009.drupalcon.org/session/drupal-and-geospatial-web" id="il43">Drupal and the Geospatial Web</a></b>, <a title="Jeff Miccolis" href="http://dc2009.drupalcon.org/user/jmiccolis" id="ll10">Jeff Miccolis</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-DrupalAndTheGeospatialWeb" id="em_p">Video</a>, <a title="Notes from Audience" href="http://interdependentweb.com/DrupalCon/2009/DrupalAndTheGeospacialWeb" id="irkw">Notes from Audience</a><br /><b><a title="Optimizing your LAMP stack for Drupal" href="http://dc2009.drupalcon.org/session/optimizing-your-lamp-stack-drupal" id="nn:s">Optimizing your LAMP stack for Drupal</a></b>, <a title="Eric Mandel" href="http://dc2009.drupalcon.org/user/emandel" id="x5_i">Eric Mandel</a> Links: None<br /><u><b><a title="Learning jQuary UI" href="http://dc2009.drupalcon.org/session/learning-jquery-ui" id="xdql">Learning jQuery UI</a></b></u>, <a title="Richard Worth" href="http://dc2009.drupalcon.org/user/rdworth" id="o_v9">Richard Worth</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-LearningJqueryUi" id="p7sw">Video</a> <br /><u><b><a title="SEO &amp; Drupal: Search Engine Optimization Tips, Tricks and Best Practices" href="http://dc2009.drupalcon.org/session/seo-drupal-search-engine-optimization-tips-tricks-and-best-practices" id="h0qy">SEO &amp; Drupal: Search Engine Optimization Tips, Tricks and Best Practices</a></b></u>, <a title="Gregory Heller" href="http://dc2009.drupalcon.org/user/gregory-heller" id="hfl3">Gregory Heller</a> Links: <a title="PDF Slideshow" href="http://civicactions.com/sites/civicactions.com/files/seo_slidedeck.pdf" id="vqjn">PDF Slideshow</a>, <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-SeoAndDrupal" id="d3te">Video</a> <br /><b><a title="Building advanced social networks at a large US University" href="http://dc2009.drupalcon.org/session/building-advanced-social-networks-large-us-university" id="nh2v">Building advanced social networks at a large US University</a></b>, <a title="Kyle Mathews" href="http://dc2009.drupalcon.org/user/kylemathews" id="xm.g">Kyle Mathews</a> Links: <a title="Slideshow" href="http://www.slideshare.net/kylemathews/drupalcon-dc-presentation" id="vo.b">Slideshow</a>, <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-BuildingAdvancedSocialNetworksAtALargeU.s.University" id="u03j">Video</a> <br /><b><a title="Building a Frankenstein monster and how to maintain it" href="http://dc2009.drupalcon.org/session/building-frankenstein-monster-how-maintain-it" id="k3m2">Building a Frankenstein monster and how to maintain it</a></b>, <a title="mortendk" href="http://dc2009.drupalcon.org/user/mortendk" id="b4is">mortendk</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDC2009-BuildingAFrankensteinMonster" id="bsd0">Video</a> <br /><b><a title="Front End Performance - Make Your Website Lightning Fast" href="http://dc2009.drupalcon.org/session/front-end-performance-%E2%80%93-make-your-website-lightning-fast" id="v56-">Front End Performance &#8211; Make Your Website Lightning Fast</a></b>, <a title="Konstantin Käfer" href="http://dc2009.drupalcon.org/user/kkaefer" id="auok">Konstantin Käfer</a> Links: <a title="Video" href="http://www.archive.org/details/FrontEndPerformanceMakeYourWebsiteLightningFast" id="saoh">Video</a><br /><b><a title="Communicating Data Online: Data Visualizations and Open Data" href="http://dc2009.drupalcon.org/session/communicating-data-online-data-visualizations-and-open-data" id="o381">Communicating Data Online: Data Visualizations and Open Data</a></b>, <a title="Eric Gundersen" href="http://dc2009.drupalcon.org/user/ericg" id="g35_">Eric Gundersen</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-CommunicatingDataOnline" id="w5oa">Video</a><br /><b><a title="Project Flow and Tracker: From business objects and user stories to test-driven Drupal based website application" href="http://dc2009.drupalcon.org/session/project-flow-and-tracker-business-objects-and-user-stories-test-driven-drupal-based-website-" id="m_ln">Project Flow and Tracker: From business objects and user stories to test-driven Drupal based website application</a></b>, <a title="Victor Kane" href="http://dc2009.drupalcon.org/user/victorkanedrupalorg" id="hlu6">Victor Kane</a> Links: <a title="PDF within page" href="http://dc2009.drupalcon.org/session/project-flow-and-tracker-business-objects-and-user-stories-test-driven-drupal-based-website-" id="x9qy">PDF within page</a> <br /><b><a title="Scaling Drupal using Amazon Web Services (AWS)" href="http://dc2009.drupalcon.org/session/scaling-drupal-using-amazon-web-services-aws" id="jqeq">Scaling Drupal using Amazon Web Services (AWS)</a></b>, <a title="Frank Febrarro" href="http://dc2009.drupalcon.org/user/febbraro" id="rgqt">Frank Febrarro</a> Links: <a title="Video" href="http://www.archive.org/details/ScalingDrupalUsingAmazonWebServices" id="mifs">Video</a> , <a title="Slideshow" href="http://el-studio.com/article/scaling-drupal-amazon-cloud-drupalcon-presentation" id="p3bv">Slideshow</a> <br /><b><a title="Drupal Process Management" href="http://dc2009.drupalcon.org/session/drupal-process-management" id="k1_8">Drupal Process Management</a></b>, <a title="Drew Gorton" href="http://dc2009.drupalcon.org/user/drew-gorton" id="w7-n">Drew Gorton</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDC_2009-DrupalProcessManagement" id="ilgz">Video</a><br /><b><a title="The Business of Open Source" href="http://dc2009.drupalcon.org/session/business-open-source" id="e-sj">The Business of Open Source</a></b>, <a title="Liza Kindred" href="http://dc2009.drupalcon.org/user/lizak" id="z.8n">Liza Kindred</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDC_2009-TheBusinessOfOpenSource" id="bgg1">Video</a> <br /><b><a title="Quality Assurance and the Drupal Development Process" href="http://dc2009.drupalcon.org/session/quality-assurance-and-drupal-development-process" id="hgd4">Quality Assurance and the Drupal Development Process</a></b>, <a title="Fen Labalme" href="http://dc2009.drupalcon.org/user/fen" id="vd7t">Fen Labalme</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-QualityAssuranceAndTheDrupalDevelopmentProcess" id="mpqz">Video</a>, <a title="Slideshow" href="http://docs.google.com/EmbedSlideshow?docid=d23k2gh_0fqn2qjgj" id="e4nv">Slideshow</a> <br /> <b><a title="Inside Drupal Caching: From Static Variables to Memcache" href="http://dc2009.drupalcon.org/session/inside-drupal-caching-static-variables-memcache" id="i_12">Inside Drupal Caching: From Static Variables to Memcache</a></b>, <a title="Jan VanDyk" href="http://dc2009.drupalcon.org/user/jvandyk" id="tjoa">John VanDyk</a> Links: <a title="Video" href="http://www.archive.org/details/DrupalconDc2009-InsideDrupalCachingFromStaticVariablesToMemcache" id="si-v">Video</a> </p>
<p><iframe style="position: absolute; display: block; opacity: 0.7; z-index: 500; width: 18px; height: 22px; top: 1942px; right: 1163px;" src="http://www.google.com/notebook/static_files/blank.html" id="gnotes-notemagic" frameborder="0"></iframe></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=35aeb01f-3d5e-48fb-bc42-4a7aba36c200" /></div>
<p>Note: Thanks to Ana Macatiag for all these handy links! =)</p>
<p>Post from: <a href="http://sachachua.com/wp">sacha chua :: enterprise 2.0 consultant, storyteller, geek</a>.
Check out my blog for tips on <a href="http://sachachua.com/wp/category/va">managing virtual assistants</a>, <a href="http://sachachua.com/wp/category/drupal">Drupal</a>, and other topics!<br/><br/><a href="http://sachachua.com/wp/2009/03/drupalcon-2009-recap/">DrupalCon 2009 Recap</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sachachua.com/wp/2009/03/drupalcon-2009-recap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>


