sacha chua :: living an awesome life

2069 blog subscribers
2748 on Twitter
Subscribe!
E-mail Feed reader

Software reconstruction

Our partners really like the Drupal-based content management system I’ve been working on, so we might roll it out to a number of other countries. To minimize headaches, we’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.

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.

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’ll compare some of production tables against the tables produced by our from-scratch installation.

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.

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’s final steps. My current approach is to use the _install function for code that doesn’t require other modules to be correctly configured, and to use my custom _install_final method for the finishing touches. I’ve also broken site-specific code out into separate .inc files so that I can include any of them as needed, and I’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.

Most of my tests are still fail, but some of them pass with from-scratch installs. Hooray! =D

So-soHmmGoodGreatAwesome! (No Ratings Yet)
Loading ... Loading ...
Save to - del.icio.us - Digg it - reddit - StumbleUpon -

One Response to “Software reconstruction”

  1. I did a screencast of my the new aegir release you might want to look at.

    it provides a clean user interface on top of all this stuff :
    http://www.developmentseed.org/blog/2009/apr/20/aegir-in-action-first-alpha-02-release-watch-screenast

Discussion Area - Leave a Comment

Please comment as you, not your organization.





On This Day...

  • 2009: Learning to play the piano — I’ve been teaching myself how to play the piano, and I really enjoy it. My parents arranged piano lessons for [...]
  • 2007: More food for thought — http://ittybittyjots.blogspot.com/2005/10/to-stay-or-not.html Random Emacs symbol: gnus-debug – Command: Attempts to go through the Gnus source file and report what variables have been [...]
  • 2007: More food for thought — http://ittybittyjots.blogspot.com/2005/10/to-stay-or-not.html Random Emacs symbol: gnus-debug – Command: Attempts to go through the Gnus source file and report what variables have been [...]
  • 2007: Knowing people — Carlos Perez wrote: How do you do it? I noticed that you had over 400 linked in contacts. That’s [...]
  • 2007: Knowing people — Carlos Perez wrote: How do you do it? I noticed that you had over 400 linked in contacts. That’s [...]
  • 2007: The Reading Solution, and thoughts on education — If you’ve read my blog posts from the past few weeks, you know that I’m entirely in favor of convincing impressionable [...]
  • 2007: The Reading Solution, and thoughts on education — If you’ve read my blog posts from the past few weeks, you know that I’m entirely in favor of convincing impressionable [...]
  • 2007: Quiet time — I keep telling myself that I can’t just batch all my writing for my quiet days, but that I have to [...]
  • 2007: Quiet time — I keep telling myself that I can’t just batch all my writing for my quiet days, but that I have to [...]
  • 2006: I’m toast — Or, well, rather, I’ve finished almost all the toast, and all the cream cheese in the lab fridge. Which is half-okay [...]
  • 2006: All kitted out with U of T logowear — It’s a good thing that the campus bookstore had a sale on clothing and other school items, as I needed to [...]
  • 2006: Reading paper — Just finished the first part of my reading course paper: Personal Knowledge Management for Web Bookmarks. 33 references, 4 pages [...]
  • 2006: Tacsiyapo — I love it when I have an idea, and then stumble across its implementation! I blogged (2005.03.23#3) about an anger [...]
  • 2005: planner.el goodness — <comfrey_> i spent most of this past weekend reading the elisp manual because planner.el is sucking me in Awwwwwwwwwwwwwwwwwwwwwwwwwwww… =) On Technorati: [...]
  • 2005: Gamasutra article on game dev in Singapore, Malaysia, Thailand, and the Philippines — A recent Gamasutra article (free registration required) discusses the state of game development in Singapore, Malaysia, Thailand, and the Philippines. It mentions UGotGame [...]
  • 2005: planner-el-3.29 — Announcing planner-el-3.29, available at http://sacha.free.net.ph/notebook/emacs/sacha-stable.tar.gz and deb http://sacha.free.net.ph/notebook/emacs/planner/ . =) Summary Synchronize with sacha AT free.net.ph—main/planner—dev—1.0—patch-380 Revision planner—stable—1.0—patch-116 New dev/369: planner-annotation-symbol-string dev/369: planner-create-task-from-note dev/370: planner-timewarp dev/371: planner-annotation-from-dired dev/372: planner-psvn for version control Updates dryice/33-38, [...]
  • 2004: C2 wiki: Patterns for teaching — http://c2.com/cgi/wiki?PatternsForTeaching - Goals: Have them and explain them! - Structure courses top-down! - Weave a tight net of understanding! - Concrete before abstract! - Beware [...]
  • 2004: Choosing and Using Open Source Software: A primer for nonprofits — Link from Ignatius Hsu on open-source-now-list@redhat.com: Here’s a good resource. Choosing and Using Open Source Software: A primer for nonprofits, published by [...]
  • 2003: 7th IEEE International Symposium on Wearable Computers — In-cooperation with ACM SIGMOBILE (pending) OCTOBER 21-23, 2003 Crowne Plaza Hotel, White Plains, NY 10601 http://iswc.net I really wish I could go, but it’s [...]
  • 2003: Assistive technology and wearable computing — Vito Miliano is also into assistive technology. Vito presented the “Dasher Communicator” recently, and has stuff up at http://www.perilith.com/~vito/dashcomm/
  • 2003: Computer accessibility and wearable computing — Panthera Altaica is into wearable computing because of computer accessibility. Hmmm. Interesting. From e-mail: I’m working on a interface that’s is basicaly [...]
  • 2003: Computer science books — Another must-read, according to Brian Baquiran, is Structure and Interpretation of Computer Programs. Full text can be found at http://mitpress.mit.edu/sicp/ .
  • 2003: Online CS books — Radam on PLUG linked to http://www.aduni.org/courses/ as a good source of online books for computer science.