directed acyclic graphs suck for a vcs
DVCS systems like git work on a directed acyclic graph (DAG) model where branching happens automatically with just about any commit. Traditional vcs (e.g. CVS) works generally as a tree where branching must be explicitly done.
Now the argument for DVCS is that you can commit without merging differences done by someone else. The axiom seems to be
Axiom of DVCS: Merging should be done as late as possible.
What’s wrong with that? Well nothing if you are happy for the computer to just blindly merge two very divergent code bases without worrying about interactions of those changes (you kept hacking on feature A which required that function foo works in a certain way, while person working on feature B changed how foo works because he didn’t see anybody use it yet because your use of it was in a branch that the second person of course didn’t look at because he was busy working on feature B). No that never ever happens because all developers always talk to each other about every little change and because every internal function/method/object is completely documented. Yeah.
With traditional VCS, merging is required when checking in. The axiom changes to:
Axiom of traditional VCS: merging should happen as early as possible when divergence is as small as possible.
When everyone continually has to keep up with all the other changes that other people are working on, possibility of screwing up is smaller. Merging other people’s changes into your tree can be far simpler if it was just someone’s morning worth of work with say 100 lines of code. You can actually look at that quickly to review what happened. Not to mention you will have to look at it if there are direct conflicts with your work. Furthermore, if the other person changed how function foo works, you will notice sooner rather than later so you can resolve the conflict before both of you go too far assuming function foo works in a certain way.
I know exactly why DVCS is more popular nowadays. Firstly it is new and new things are always better even if they are worse. Second, it is more complicated, and complicated things must always be better. But most importantly of all: DVCS has a lot more buzzwords. It is distributed, it uses directed acyclic graphs (finally you have a use for some of your CS classes). Lots of things that work are replaced continuously by complicated things that don’t.
Example: I would say the level of the desktop software (Windows, Linux, and Mac) has not improved substantially. It has changed yes. It does lots of graphical voodoo. It allows you to do things that nobody ever wants to do. But if you took a basic desktop from the year 2000 and you simply fixed it to work right, you’d have a much faster, much more productive environment. But fixing things is not as much fun as rewriting a desktop on OpenGL, making windows wiggle, and making a different funky widget set for each application.
Syndicated 2010-08-31 19:28:10 from The Spectre of Math