Skip to content

Agile Story

I’m sure plenty of you have been wondering about the subtle hints I dropped recently on Facebook and Identi.ca / Twitter about something else in the works… actually I doubt anyone really noticed, but anyway…

Loosely based on some inspiration around the topic of resolutions for the new year, in conjunction with wanting to figure out a way to commit to releasing a lot of the side projects that pop up in my mind and occasionally make it to the point where I do some development work on, I decided that this year I will be working towards a goal of releasing one app / product / service / project every month.

That’s how Agile Story was born. At this stage it’s simply an experiment in making something useful out of some things I do in my spare time. I do think that some of these may have the potential to become something more in the future, but we’ll cross that bridge when we come to it.

The first release (and yes, it was released in January, even though I’m just getting around to writing about it now – you can ask Martha!) is 30/40/30 meals. You can read a bit more about it on the release announcement on the Agile Story site.

I haven’t decided how much technical detail I want to go into in terms of the description posts on that site yet, so for now I’ll just mention here that it’s a Rails app that makes a lot of use of AJAX for the meal editing. Anyway, feel free to check it out and ask any questions or provide any feedback (positive and negative both welcomed) here. I never claimed to have a great eye for design, so I’d appreciate any suggestions in that regard. I’d also be interested in hearing from anyone who gives the application a try, especially people who are familiar with the Zone diet and/or may be interested in using it for their meal planning.

PS – I recommend using a browser like Firefox or Chrome; it will still work fine in IE, but those other browsers are a bit faster with the javascript and it will look a tad nicer too.

Categories: Blog Posts.

Facebook Changes

Every time Facebook changes its look, I’m reminded of how the things people post online are not really an adequate (or at least not complete) reflection of who they are or what they care about.

There are always tons of posts about whatever FB change has just occurred, even from people who rarely post. I don’t want to call it whining, but a decent percentage of them are usually stating that the change has negatively impacted them in some significant way. If measured by these attributes (posting frequency / percentage and degree of emotion or conviction) their “relative” degree of interest in the FB UI would seem to be high.

Thankfully (hopefully), we can be sure that for most people it can’t really be that important to them relative to all the other stuff in their lives; it’s just that they just choose not to post much about those other things for various reasons.

Food for thought…

Categories: Blog Posts.

DRM Hates Linux

As tempting as the Kindle (and now the competing B&N reader) are as alternatives to paper books, it’s really frustrating how much they’re hindered by DRM issues.

They’ve both recently released reader applications for the PC (meaning – for them – Windows only, and soon for Mac), but no equivalent versions have been announced for Linux. I can only assume that this is because they are afraid that the Linux OS will allow for easier hacking / working around the DRM features of the app. While this is probably true, it’s a frustrating reminder that these guys haven’t learned the lessons that the music industry already spent a lot of time and effort trying (unsuccessfully) to ignore / avoid.

This case in particular is doubly frustrating, because the original devices themselves (Kindle and the B&N Nook) are both actually based on Linux themselves, so their software certainly would work in Linux, if they chose to allow it.

This leads one to believe that the hardware almost certainly employs a tactic that has become known as “Tivoization“, a practice that exploits a loophole in earlier versions of licenses like the GPL, which has been addressed in v3 of that license. The term was coined because of the Tivo hardware, which used Linux as a base and therefore was required to be released under the GPL, but the hardware itself imposed constraints designed to prevent the running of any modified software, even though the modifications had to be allowed under the license.

The same probably applies to the Roku Netflix player, which supports instant watch streaming and is also built on Linux, while at the same time Netflix does not support a player for general purpose Linux use.

While the Kindle reader app will work on Linux under WINE (just verified it now on my system), I’m really hoping these guys will eventually “see the light” and stop doing this kind of thing. I think the best hope on this front is currently Android. As it continues to gain ground, I hope that the pressure to release a reader app on that platform will allow them to overcome these hesitations.

Categories: Blog Posts.

Skewing the Meaning of “Want”

Summary

A quick lesson in the importance of consistency of meaning in terms you use on your site. Doing things like this skews the meaning of those gestures by the user and therefore makes them (and to some degree, the site itself) less valuable.

Details

I heard an announcement on the gdgt podcast today (an old podcast, but I just heard it now, so no grief about “old news” please) about a promo they are running where users can try to win a blackberry phone from a pool of phones (two models) they are giving away.

It’s a fine enough idea for a contest, but the problem is that the way you enter the contest is to log on to the site (gdgt) and add one (or both) of the devices to your “want” list. I see this as a mistake, since (as a user) your lists of devices on that site (“Have”, “Want”, etc.) form the core part of what the site is about.

Having people indicate that they “want” one or both of these phones (in order to enter the contest to win them) seems like a major mistake, because lots of people will indicate that they “want” the phones even though it isn’t actually a true measure of whether they really “want” it, relative to the criteria they’re using for marking other things on the site as “wanted”. By doing this, it is (IMHO) polluting the meaning of a term that seems like it should be very important within their system.

The counter argument is that if you don’t really want it then don’t enter the contest, but that is a bit silly as well. There are wide variations of what want could mean; the important thing is to keep that meaning consistent (for a given user) for their use of the site. As an illustration, I don’t “want” either of those phones. I definitely wouldn’t plan to buy them now or in the future (one possible interpretation of “want”), and I don’t even think I’d pick them up if I had enough cash to make the cost irrelevant (another possible definition), although I would gladly accept one for free (the only definition that applies in the case of the contest).

What do you think?

Categories: Blog Posts.

svn:externals with WordPress

I’ve mentioned this a few times in conversations, so I’ve been meaning to do a blog post on this for a while, but I really wanted to tidy up the theme before I got back into posting more, so now that I’ve done that, here goes…

This is an example of how to use the “externals” feature of Subversion in order to simplify the maintenance of your software project when it contains references to other libraries or projects that are hosted on their own repositories, and you want to keep them all updated from their respective sources without having to do any tedious copying / exporting, etc.

This particular long, rambling example will use a somewhat typical WordPress installation, with a couple minor organizational tweaks to keep things simple and clean.

Working Backwards

I’ll start by laying out what the end result will look like, and then walk through the steps of how to get there.

The goal in this case is to have a single SVN repo (under your control) which you can use to manage your complete package (in this case a WP install), but internally have it contain your own stuff but also pull from several different “external” SVN repositories (WP core + various separate plugin and theme repos) that you don’t need to manage or copy things from.

The obvious benefit here is that you end up with a single SVN source that you can put on your server(s) with a single svn co http://your.repo.url and keep updated with a simple svn up or svn switch http://your.repo.url/tags/1.2.3 if you use tags to manage your releases (which I recommend, but that’s a topic for another post).

Basic Directory Structure

This is the part that may be a bit different than you’re used to, but I find this structure to be much easier to work with when doing stuff like this, and recent versions of WordPress have supported this (moving wp-content and wp-config.php somewhere other than their standard locations) for quite a while.

So assuming we’re starting with a blank directory that is a local checked out copy of your trunk/ directory, here is what the end result will look like once we’re done (just so you’re ready). Assuming we’re under something like /var/www/yoursite/, you’d have three items in that directory:
*NOTE: See this comment below about making sure you start with an empty dir, and that the local target dirs you reference in externals do not exist before SVN creates them by loading the external.

core/
wp-content/
wp-config.php
Where

  • core will be a copy of the WordPress core files, linked via an svn:externals reference to the latest tagged release of WordPress, and fetched automatically from their servers. This is the dir that your apache vhost should map to as its root.
  • wp-content is where all your themes and plugins (among other things) will go. This will contain a mix of plugins and themes from other sources (via svn:externals) plus whatever themes and plugins we add to this repo itself.
  • wp-config.php This will be a copy of your WordPress config file. I usually keep it on it’s own out here, and exclude it from the subversion repository by adding it to svn:ignore. That’s perhaps another post for another time, but I just don’t add it to the repo since my local and server passwords are different, and I don’t want either sitting out in a repo that I may or may not want to make public at some point. Also it helps to stick to the rule that you don’t need to modify any files (other than .htaccess) under the core directory.

OK, so far so good. If you are not cool with that project layout, it’s possible to use other structures, but I wouldn’t recommend it, and won’t answer any questions supporting it. :-)

Step by Step – How To Get There

So, starting in a blank directory (checked out copy of your trunk, which should be empty at this point), first you want to set your SVN_EDITOR if you haven’t already.
export SVN_EDITOR=vi, substituting vi for your text editor of choice.

Step 1 – Core WP files

Within this directory, type the following command to add the first external reference to WordPress itself:
svn propedit svn:externals .and add the following (single) line of text:
core http://svn.automattic.com/wordpress/tags/2.8.2then save and close the file.

To get a preview of the magic now at work, go ahead and check in your changes and then update:
svn ci
svn up
You should notice that when your local copy goes to update from your SVN repo it now also knows to go pull down the contents from the Automattic WP repo you linked to and put them in a directory called “core”.

Step 2 – wp-content

Now that we have the core dir handled, we want to make a wp-content dir, under which we’ll put all of our custom content, in addtion to other external plugins and themes.

Again assuming you are in the same directory as above (which should now only contain the “core” directory, issue the following command to get a clean copy of the wp-content that was retrieved from WP:svn export core/wp-content wp-content* Do not just do a normal copy here, because that will copy the SVN info from the dir as well, which will screw you up.

Now we’ll add a couple themes from other external repos. svn propedit svn:externals .and append the following two lines of text (after the existing core line):
wp-content/themes/redoable-lite http://svn.automattic.com/wpcom-themes/redoable-lite

wp-content/themes/sandbox http://sandbox-theme.googlecode.com/svn/trunkthen save and close the file.

svn ci
svn up
and we will see that those two themes right where they belong inside of our wp-content directory.

I could make this post even longer by illustrating linking to additional external plugins, etc., but it would work the same way as what I just did for themes. I’m sure you’ve got the hang of that by now.

All your other changes within this wp-content directory (your own themes and plugins, etc.) will be handled just like you’re used to with SVN; it’s just that now you’ll also have other content in there that you don’t need to manage yourself.

Step 3 – wp-config

This step isn’t strictly related to the svn:externals thing, but you’ll need it in order to follow the structure I laid out above.

cp core/wp-config-sample.php wp-config.php This is now your official config file, and you’ll need to edit it as normal to point it at your database, etc.

WP is smart enough to find this file here (assuming you don’t have one under the core dir), but you’ll also just want to add an entry in that wp-config file to tell it to use the alternate wp-content directory we were working with in step 2, instead of the one under the core directory. In wp-config, add the line:
define( 'WP_CONTENT_DIR', '/var/www/yoursite/wp-content' );
Depending on your configuration, you may or may not also need to add an entry for ‘WP_CONTENT_URL’, but I wouldn’t bother with that unless you find you need it. You may also want to add Alias /wp-content /var/www/yoursite/wp-content to your Apache vhost config as well.

Upgrading – AKA The Payoff

I should start by clarifying that I do not use the built in WP updating mechanisms for core WP or plugins, because I prefer to manage everything from SVN this way.

I find it easier to work with anyway, and it also has the added benefits of supporting more restrictive file permissions on the server, as well as allowing you to work with and test a local copy that you know is exactly the same combination of core files, plugins, etc. as what you will eventually put on your server, because you are pulling it all from the same place: your SVN repo.

Let’s say WP releases 2.8.3. You will simply svn propedit svn:externals .and change the URL reference for the core dir to point to the 2.8.3 release:
core http://svn.automattic.com/wordpress/tags/2.8.3then save and close the file. You can also change any other externals refs (plugins & themes) to their latest versions.
svn up will then update your local copy with all the latest references from your external sources. Test everything out locally, and then once you are happy svn ci and your latest config is checked in, ready to be updated on your server, via svn up or svn switch.

Closing Remarks

If you’re more of a hands on learner and want to follow along but also explore a reference, here is the trac view of the trunk of the repo I was using as a demo for this article, and the corresponding SVN repo itself as well.

Thanks for taking the time to read this (assuming anyone got this far). Any questions?

Categories: Blog Posts.