Is there really no simpler way to solve this problem?<p>"Moving a message needs to move all of the message's comments, and all of the comments' files, and all of the comments' files' versions."<p>Why can't you just change some top level reference in the database? I'm imagining a Projects table and a TodoLists table. Each TodoList has something like a projectID foreign key right? Why can't you just change that and automatically have all of the messages, etc, come along with the TodoList?<p>"But I hope you will see that sometimes even the simplest feature can be much more complicated than it looks from the outside."<p>I agree there, just wondering why the simple solution doesn't work in this case.
The comments here remind me of an old Irish joke where a hopelessly lost tourist asks an old man by the side of the road "Can you tell me how to get to Dublin?". After a few minutes thinking, the man replies "Well, you don't want to start from here".<p>I doubt 37signals wanted to be in a place where an apparently simple change would involve so much work, but that's where they found themselves. They did what they had to do. There's no point snarking about their starting place without knowing how and why they got there.
I frequently quote the way Joel phrased this:<p><i>If you've spent more than 20 minutes of your life writing code, you've probably discovered a good rule of thumb by now: nothing is as simple as it seems.</i><p><a href="http://www.joelonsoftware.com/articles/NothingIsSimple.html" rel="nofollow">http://www.joelonsoftware.com/articles/NothingIsSimple.html</a>
Sounds like they're in need of some hefty normalization. This is the sort of thing that <i>should</i> be handled by changing a single foreign key on each todo / on a single todo list entry; everything else should be pointing to each individual entity, and need no modification.<p>Unless they're denormalized for optimization purposes? Threaded comments can result in some massively deep queries.
Though not directly related to this post, the sentence 'well ... how hard can it be?' is a signature quote from the lead Top Gear presenter.<p>This almost invariably leads into a challenge that seems easy in theory but the practical execution is always plagued with unforeseen hurdles, crap, unexpected mishaps and other random elements.<p>It's not that hard to draw parallels between software development and the crazy Top Gear challenges, which is probably a reason that many coders who've never been behind a wheel enjoy watching them.
if I were to sum up the counter-reaction to a lot of folks here who think that the claimed difficulty is too high:<p>You're right, under the right conditions. Namely: small site, early in lifecycle, and a perfectly normalized and non-sharded/non-partitioned database.<p>But I suspect it's more complicated because:<p>1. they have a ton of traffic<p>2. they want to maintain a seamlessly perfect UX everywhere<p>3. their database is denormalized, sharded and/or partitioned<p>plus possibly:<p>4. it's gotten at least a little crufty with age (<i>shrug</i>, it happens)
Great post but note that the total complexity/LOE of adding that feature would be significantly reduced if (1) it was delivered earlier in the app's lifecycle (less users, simpler code, lower expectations, less/no customers, etc), and/or (2) quality/UX standards were relaxed somewhat.<p>I agree that even a seemingly simple feature can be hard to deliver, but on the flip side there are dials a developer can turn to adjust his LOE up or down as desired. Tradeoffs as always.
In the same vein, I highly recommend the article "How many Microsoft employees does it take to change a lightbulb?". This was features in Joel Spolsky's "The Best Software Writing 1" (<a href="http://www.amazon.com/gp/product/1590595009?ie=UTF8&tag=thtaofco0a-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1590595009" rel="nofollow">http://www.amazon.com/gp/product/1590595009?ie=UTF8&tag=...</a>).<p>Link to article: <a href="http://blogs.msdn.com/b/ericlippert/archive/2003/10/28/53298.aspx" rel="nofollow">http://blogs.msdn.com/b/ericlippert/archive/2003/10/28/53298...</a>