Live data from Hacker News

"How hard can it be to implement?"

answers.37signals.com

31–40 of 102 posts

Re: "How hard can it be to implement?"

#31

Is there really no simpler way to solve this problem? "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." 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 automat…

You're falling into the same trap all programmers do when they perpetually underestimate the time to accomplish any task. The main difficulty in estimating time is that you don't know what you don't know, so you have to actually get into the nitty gritty of implementing it, and if you're smart enough you'll hopefully catch all the requirements before you actually launch it.

I'm going to take Sam's word on this that there is not a simpler way, because he's the one working on it, and I trust the competence of the 37s dev team. That's not to say that some armchair analysis here on HN might not have valuable insight, but without actually seeing the code, and in light of the full list of points Sam mentioned, I doubt very much that there is a much simpler solution of any form.

Re: "How hard can it be to implement?"

#32
post #24

Earlier quoted context omitted.

Might be trickier to do this if the foreign key is across a shard or if the db record for the comment wasn't structured like this. One situation could be because they store the threaded comments with the thread key in each record and also the parent comment key. This would be useful to pull down all the comments associated with a thread in one db query but also allow you to have the nested comments.

37signals don't use sharding. They use one database server with enough RAM to load the db into memory

They do that for everything but Basecamp[1]. I wonder what they use for Basecamp.

[1] Second paragraph: http://37signals.com/svn/posts/2479-nuts-bolts-database-serv...

Re: "How hard can it be to implement?"

#33

Is there really no simpler way to solve this problem? "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." 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 automat…

You're falling into the same trap all programmers do when they perpetually underestimate the time to accomplish any task. The main difficulty in estimating time is that you don't know what you don't know, so you have to actually get into the nitty gritty of implementing it, and if you're smart enough you'll hopefully catch all the requirements before you actually launch it. I'm going to take Sam's word on this that t…

> I trust the competence of the 37s dev team.

I don't, in large part because this shouldn't be a complicated problem to solve.

Re: "How hard can it be to implement?"

#34

Earlier quoted context omitted.

You're falling into the same trap all programmers do when they perpetually underestimate the time to accomplish any task. The main difficulty in estimating time is that you don't know what you don't know, so you have to actually get into the nitty gritty of implementing it, and if you're smart enough you'll hopefully catch all the requirements before you actually launch it. I'm going to take Sam's word on this that t…

> I trust the competence of the 37s dev team. I don't, in large part because this shouldn't be a complicated problem to solve.

Yes, in your armchair analysis that takes into account none of the issues that they've dealt with in getting where they are today, any past architectural decisions that make this particular feature difficult to implement indicate incompetence.

Your confidence probably serves you well (let me guess, early 20s?), but in this case you literally don't know what you're talking about.

Re: "How hard can it be to implement?"

#35
post #5
post #3

Earlier quoted context omitted.

From the response; "We can't use database transactions because performing a big move would slow Basecamp down for everyone. So we have to log the process of each step of the move, and make it so any failure in the move can be rolled back gracefully. That means a move is actually a series of copies and deletions instead of just changing a field for each moved item"

Why is a transaction necessary? Just change the one field project_id in the table todolists to point to the new project. Because the messages point at the todolist_id instead of at the project_id you don't need to modify anything else.

You're imagining files belong to comments, comments belong to items, items belong to lists, lists belong to projects, and changing the list's foreign key re-parents the whole hierarchy.

Now consider that Basecamp allows comments on messages, todo items, and milestones. What does your schema look like now? Add a feature to show a user all recent comments across all of his projects. What does your query look like? How does it perform? Get all of this (not to mention the other features) working at scale.

Maybe you can build something like Basecamp that works at Basecamp's scale without resorting to denormalization, sharding, and/or partitioning. But I doubt it.

Re: "How hard can it be to implement?"

#36
post #19
post #18

Earlier quoted context omitted.

Is this an old Irish joke? I thought I knew for a fact that it was French! - "Pouvez-vous me dire comment aller à Paris"? - "Ben si j'étais vous je ne partirais pas d'ici!" Very French in its non-helpful but matter-of-fact way... but maybe the Irish are the same!

Your French version feels authentic to me, but then so does the Irish one. I doubt one can say where jokes like these originate. All cultures and languages probably have versions of them.

The way I heard the joke in Vermont always involved a tourist asking an old farmer for directions and getting the answer "Well, you can't get there from here."

Re: "How hard can it be to implement?"

#37

Is there really no simpler way to solve this problem? "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." 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 automat…

You're falling into the same trap all programmers do when they perpetually underestimate the time to accomplish any task. The main difficulty in estimating time is that you don't know what you don't know, so you have to actually get into the nitty gritty of implementing it, and if you're smart enough you'll hopefully catch all the requirements before you actually launch it. I'm going to take Sam's word on this that t…

Yes, to paraphrase Mr. Rumsfeld, when estimating large system changes you can see the known knowns and have an idea of the known unknowns but the unknown knowns and unknown unknowns are hiding like the underwater part of an iceberg. Bad estimates are usually caused by not taking into account the unknowns.

How is that for a mixed metaphor?

Re: "How hard can it be to implement?"

#38

Earlier quoted context omitted.

> I trust the competence of the 37s dev team. I don't, in large part because this shouldn't be a complicated problem to solve.

Yes, in your armchair analysis that takes into account none of the issues that they've dealt with in getting where they are today, any past architectural decisions that make this particular feature difficult to implement indicate incompetence. Your confidence probably serves you well (let me guess, early 20s?), but in this case you literally don't know what you're talking about.

Are we really taking cheap shots about age now? This is not how an argument is won and not how we do things around here. Your point stands on its own without ageism.

Re: "How hard can it be to implement?"

#39
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.

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.

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.

Re: "How hard can it be to implement?"

#40

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. 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 adju…

> quality/UX standards were relaxed somewhat Yow.

why "yow"?
Post reply on HN