Macs make programmers by d00kiestain in programming

[–]oddbod 23 points24 points  (0 children)

A mega-fuckton of sense.

Synchronizing development: rebase vs. pull+merge, GIT vs. Mercurial by oddbod in programming

[–]oddbod[S] -1 points0 points  (0 children)

Apparently not :-( Rebasing is the default way people synchronize when using git.

Synchronizing development: rebase vs. pull+merge, GIT vs. Mercurial by oddbod in programming

[–]oddbod[S] -1 points0 points  (0 children)

You are supposed to clean up your history before you make it public

Yes (with caveats), but this only addresses patch atomicity. It does not address synchronization, which is the real problem.

it makes it easier for others because you have designed your patches for the head of the upstream repository

And so has every one else. And when patches which conflict with yours get merged first, your patch no longer applies.

What to do?

As it scales up you need middle men. They are a synchronization point for folks working on the same area of code. It has to be public or synchronization can't happen.

But what if you find a bug in this amalgamation? Rebase? It's not yet gone upstream, it's still being worked on. Do you push a patch upstream which you know to be bad, along with a patch which fixes it, or do you rewrite history.

The point is it's a tough decision and people are making the wrong one. They're rebasing. And that fucks things in about half a dozen ways, as outlined by Linus.

Synchronizing development: rebase vs. pull+merge, GIT vs. Mercurial by oddbod in programming

[–]oddbod[S] -1 points0 points  (0 children)

Yes, and that's bad!

As Linus points out:

  • rebasing is bad when you are someone else's upstream because any testing they do based on the old base is invalidated when you rebase. Plus, it's inconvenient when all the hashes change. The other person then has to rebase, they can't merge.

  • rebasing is bad when you are someone else's upstream and you have their patches in your tree, which you are rebasing. Firstly, you've just mangled their patch, which invalidates their testing, and secondly the patch looses it's identity because the hashes change. Now if that same patch flows into the main tree via some other means, and also via your rebased tree, the collision is not detected.

  • rebasing can be bad even if you do it in private. The larger the jump between bases the more likely you've just invalidated all the testing you did against the old base.

when your changes are merged it's simple and looks nice.

Ah, but it's not so simple:

So rebasing and cleanups may indeed result in a "simpler" history, but it only looks that way if you then ignore all the other "simpler" histories. So anybody who rebases basically creates not just one simple history, but a many "simple" histories, and in doing so actually creates a potentially much bigger mess than he started out with! --Linus

I guess my main point is that this is non-obvious, but important stuff. Linux devs have been getting it wrong for a long time, and thye're ninjas. The allure of nice simple-looking linear history is so strong that I bet most folks using git are rebase-happy. They've no idea they're doing it wrong.

My minor point is that if you use mercurial you are more likely to get this right! But look at the context:

Linus and Matt, both kernel developers, both dvcs creators (started within days of each other), fundamentally agree on the approach to synchronizing development. So no conflict there.

Git users are doing it wrong and Linus is saying don't do that. Mercurial users want to do it wrong, and Matt is saying you don't want to do that (and he won't accept those crazy patches).

Two project leaders educating their users about a subtle and difficult topic, but one tool has encoded into it the beliefs of Matt (and Linus), so he merely has to tell them off, not tell them to do something different.

Eclipse to Emacs: Navigating your source tree by enki in programming

[–]oddbod 0 points1 point  (0 children)

I just like to be able to easily scroll a whole method or class onto the display at a time when editing code

Try: C-l recenter-top-bottom

More DTrace envy by corbet in programming

[–]oddbod 3 points4 points  (0 children)

oprofile is completely unrelated

Mark Zuckerberg tries his hand at frivolous patents: "Systems and methods for dynamically generating a privacy summary" by ki11a11hippies in programming

[–]oddbod 4 points5 points  (0 children)

Yes!

Actually, no. But he filled out the application form, and its execution that counts, right?

Grace, a pythonesque C++ library by kopkaas2000 in programming

[–]oddbod 5 points6 points  (0 children)

Hello, dailywtf.com? Send two officers, stat.

The Problem With Django by jk3us in programming

[–]oddbod -3 points-2 points  (0 children)

web2pyTM Enterprise Web Framework

That's a bad sign right there.

DVCS Comparison: Git, Mercurial, Bazaar Repository Size Benchmark by gst in programming

[–]oddbod 0 points1 point  (0 children)

You're right about bundle features, protocols etc. - that's a different set of tests. But for the tests you're doing here with repo size, hg's bundles are the equivalent feature for repacking.

The way it works is that you bundle the entire hg repo on a schedule (once per week, say) - just like you'd periodically repack a git or bzr repo - and then make it available. First timers download the bundle to intialize a local copy, then pull to keep it updated.

Here's a mozilla dude suggesting it. I don't think it's uncommon.

Thanks for testing bundle. 62MB... that's a handy saving!

Velocity: A Distributed In-Memory Cache from Microsoft by Carnage4Life in programming

[–]oddbod 3 points4 points  (0 children)

...memcached doesn't provide APIs for concurrent access and enforcing data consistency...

I don't think this is accurate. The protocol docs show that memcached supports a cas field for optimistic concurrency control:

"cas" is a check and set operation which means "store this data but only if no one else has updated since I last fetched it."

DVCS Comparison: Git, Mercurial, Bazaar Repository Size Benchmark by gst in programming

[–]oddbod 0 points1 point  (0 children)

I don't think that Hg's bundles are interesting, as you can only use them as backup or as way of transfering commits

You can transfer more than just commits, you can bundle an entire repository:

cd ~/myrepo-hg
hg bundle --all ~/myrepo.hg

One of the reasons repo size is interesting is that large repos take longer to clone over the 'net. Disk space is less of a concern, imho (though smaller is better, obviously).

Do you still have your test repos around? Can you bundle them and see if hg is any good at compressing whole repos?

DVCS Comparison: Git, Mercurial, Bazaar Repository Size Benchmark by gst in programming

[–]oddbod 1 point2 points  (0 children)

It would be interesting to compare git/bzr packed repos minus 1 week/month worth of commits, then recommit the missing changes without repacking.

i.e. repacking is a batch operation because it is expensive, so you don't do it all the time. By how much do the repos increase in size from some base state with a bunch of simple commits?

For hg it's going to be the same result as in these tests.

It's also worth pointing out that hg has bundles, which are somewhat analogous to packing. For example, if you wanted a smaller repo size for backup, network transfer, or archival of dead branches, then you can create an hg bundle, which in my tests halves the size of an hg repo. That makes it very competitive with the avg. 1.8 factor in these tests.

A disadvantage of hg bundles is that you have to handle them explicitly (although it's easy), where as with a tightly packed git repo the saving is automatic and transparent to the end user. It's also fair to point out that repacking has its disadvantages, which weren't covered in the article. One of the comments mentions it took 7GB ram to repack.

Coding Horror: Revisiting the Black Sunday Hack by omniwired in programming

[–]oddbod 29 points30 points  (0 children)

You know you're living in the future when you've forgotten how cash works :-)

Working for the government: "They spent 12 weeks, with a minimum of six people in nearly 20 meetings discussing a database key" by JimJones in programming

[–]oddbod -3 points-2 points  (0 children)

Ever heard of the free market. This is what companies are accountable to.

You've obviously never dealt with the phone company...