
Bram Cohen: I have a question for the version control experts - lispython
https://www.facebook.com/bram.cohen/posts/10152387480820183
======
kefs
His question on StackOverflow:

[http://stackoverflow.com/questions/14077470/is-simplified-
se...](http://stackoverflow.com/questions/14077470/is-simplified-semantics-
for-the-blame-command-a-good-thing)

~~~
mitchi
When I left for my friend's for a couple of beers I quickly glanced at his
StackOverflow question. It was a copy paste of his facebook post. I thought
"Mmm, this is probably getting closed". Turns out I was right :)

~~~
InclinedPlane
Through the magic of the voting system it has now been reopened.

~~~
mh-
and through the magic of StackExchange, it is now reclosed.

------
atesti
I wonder if I will be able to read this post in 3 years. I'm sure Facebook
will have deleted it by then and the link will get dead in 6 month already for
sure (first break it, maybe fix it later)

Is archive.org even allowed (by Facebook's robots.txt) to archive this?

It's sad if technical people post important information on Facebook

Edit: facebook's robots.txt has this: User-agent: *, Disallow: /. :-(

~~~
simonw
Now that Facebook use clearly designed URLs
(/bram.cohen/posts/10152387480820183 in this case) I have a lot more faith in
them keeping this kind of thing working. It's extremely valuable content for
them, especially with their recent emphasis on the timeline and capturing the
story of people's entire lives.

~~~
ersii
One possibility is that Facebook stops existing. Now, I won't speculate what
the probability is or isn't - but none the less, it's a possiblity.

On the other hand, there's also possiblities such as; Facebook losing or
deleting the content, Bram Cohen deleting the content or his account.

------
morphle
The version control in Squeak, based on Smalltalk-80, has been in use for over
16 years, probably even 32 years. The community of Squeak has been entirely
happy with it, it could perhaps be made even more convenient with more diff
analysis tools. For every snippet, even a single line in a method, all the
versions are kept around and the blame for the revisions to a previous
version, including deletions, is always clear. The last version is active
(there is no compiling fase in smalltalk, only auto compile for adaptive
compilation). So your question is never relevant unless one wants to merge
back after a fork. In that case diff tools should give a human the entire
history, diffs and all its dependancies that are affected to see what happend
when and how. It is indeed useful to see changes going back 40 years. In the
case auto-merge-back is possible, the S unit test runner must check if it
worked, but such a situation occurs only once in 10 years if at all. So to me
there is not much to be desired in a version control system than the current
method version control of Squeak.

------
quink
Beyond the question and reading entirely too much into it, what's the inventor
of BitTorrent, out of all things, doing writing version control? Between this
and BitTorrent Live, are we going to see something that will blow every model
of content distribution, including BitTorrent, out of the water?

If nothing else, torrents with version control would frankly be mind-blowing.
Think of a single TV show torrent, which could be updated again and again.
Then think of TV broadcasting and content distribution of the program being
shown through such an above torrent and an overlay, and ads, being played in
on the client-side?

Thinking away the rights issues and DRM, this might be the future of live TV
and content distribution.

~~~
dochtman
Bram Cohen did VCS before Linus and Matt Mackall did it:

<http://en.wikipedia.org/wiki/Codeville>

<http://freecode.com/projects/codeville>

------
fleitz
Blame is pointless, and needed only for pathological organizations. The point
of these tools is not to assign blame but to find the last working revision of
the code. If a commit inherits from multiple commits then there could be
multiple working last revisions.

Think of it like sailing when the mast breaks, you don't who last touched the
mast, you care how to get the mast back up.

In truth the totality of world events leading up to the moment the mast broke
is what lead it to break. This is not important, what is important is how to
right it.

If the question is viewed in terms of righting the ship then the point is to
identify the last revision that worked, conversely the 'broken' revision is
the next one.

Realistically, to solve the problem you'd want a genetic algorithm that could
turn on and off each change in each revision to find the combination that
yields the most fit iteration of the code.

~~~
pjscott
Wait, what? My most common use case for blame is finding out who to ask about
some code that I don't fully understand. Often a quick "git blame" and a short
conversation can save a lot of time.

~~~
Too
Try that on a code base that's 10 years old and the one who wrote the code,
including the rest of the core team, probably changed jobs several times
already.

~~~
megablast
Yes, it doesn't always work and is not always feasible.

But there are plenty of occasions where it is, because the changes broke the
system. A broken system is not going to sit around for 10 years.

------
bentoner
I like it! Doing it this way will mess up the blame for non-unique lines like

    
    
        else if {
    

but I don't think that matters because you are unlikely to care where such
lines come from. (You could fix this anyway by doing unique lines first, then
using the blame of those to make better choices for the non-unique lines.)

See also the more complicated variant at the end of this post from the git
mailing list:

[http://marc.info/?l=git&m=116070384211583&w=2](http://marc.info/?l=git&m=116070384211583&w=2)

~~~
DannyBee
Blame is always messed up anyway, because there is no right answer. You may as
well choose what is quick to compute and looks okay.

Version control systems are not storing what actually changed between files,
they are storing the smallest set of differences between them.

IE Given two versions of the same file, and the history graph A->B they store
how to reproduce the bits of B from the bits of A.

This is completely unrelated to how B _actually_ got that way. So in turn,
they use textual diff algorithms to approximate how B was formed from A.

Even moving back into the text world, there is still no right answer. It only
tells you one of the possible ways that A was transformed into B. It would be
perfectly valid for the text diff algorithm to say "every line in A was
removed, every line in B was added". This in turn would give you a blame that
pointed to that rev for everything.

Most textual diff algorithms "try" to do something sensible, but blame is
essentially trying to turn applesauce back into apples.

Even git's more "advanced" blame can be completely messed up by the internal
text diff doing dumb things.

All that said, one of the reasons you may like it is because it's basically
what everyone actually does.

~~~
bentoner
_All that said, one of the reasons you may like it is because it's basically
what everyone actually does._

Please correct me if I'm misunderstanding, but Bram is proposing to do blame
without using the diffs, a nice simplification and not something I'm aware of
other version control systems doing.

~~~
pjscott
The commits themselves will still, presumably, be generated by diffing. After
that, sure, it should be fairly easy to compute exactly what commit
contributed each character of a file, and when.

~~~
Someone
No. The simplest example I can think of is:

    
    
      Revision 1: x
    
      Revision 2: xx
    

Which x was added in revision 2?

In real life, you get things like replacements of a statement by an if-else
block with statements similar to, but not identical to, the original statement
in each branch. Are there still parts of the original statement there? If so,
in which branch(es)?

Also, suppose I add code in version 6, you remove it in version 14 and someone
else resurrects it in version 23. What commit contributed that code? How can
you know whether that someone else resurrected the code, rather than write a
new copy?

Finally, what is 'contribute'? Does a commit that 'only' moves lines around in
online help contribute to a file? What does it contribute? How do you show
that contribution in a diff? What if the move also necessitated some minor
changes like adding punctuation?

------
misleading_name
I like the Quora/cats comment.

~~~
saurik
I also liked the response: the claim that StackOverflow would be a better
forum than Quora for this kind of question; StackOverflow closed the question
as "non-constructive", as they specialize in "concrete questions with factual
answers"... honestly, Quora seems like the perfect place for this kind of
thing.

------
g2e
Off topic, but I'm glad seeing people use facebook as a sort of blogging
platform. If written in notes, I'm quite sure even photos could be embedded.

Your RSS reader would simply merge with your news feed.

~~~
drivebyacct2
Why? How is that better than using WordPress and RSS?

~~~
csense
If you use Facebook as your blogging platform, the dollars generated by
showing ads to your audience go to Zuckerberg.

If you host your own Wordpress install, the ad dollars go to you.

 _If you're Mark Zuckerberg_ , bloggers blogging on Facebook is better than
bloggers blogging elsewhere. That's the circumstance under which blogging on
Facebook is better.

~~~
jspthrowaway2
While I tend to agree with this exact comment (since it's Facebook
specifically), I don't agree in spirit because administering your own
Wordpress install takes time. That time might be valuable for some.

I'd certainly run my own Wordpress, but not everybody wants to.

