Git and directory renames
Dec. 13th, 2009 | 03:16 pm
posted by:
pozorvlak
We've been using git for version control at work for the last couple of months, and I'm really impressed with it. My favourite thing about git is what might be termed its unfuckability: no matter what you do to a repository to fuck it up, it seems, it's always possible to unfuck¹ it, usually simply by keeping calm and reading the error messages. I've managed to lose data with an ill-advised
The merge algorithm pretty much Just Works: we get the occasional merge conflict, sure, but (so far) never without good reason. So I was surprised to learn (from Mark Shuttleworth) of a really simple case where git's merge algorithm ( does the Wrong Thing ).
Bazaar obviously gets this right, otherwise Mark Shuttleworth wouldn't have written his post. Commenters there suggest that Darcs gets this right too, but after spending a while looking through the Darcs wiki I discover that I really, really can't be arsed to work out how to do the necessary branching to test it. Hopefully some helpful Darcs user (I know you're still out there...) will be able to post the relevant transcript in a comment. [Edit: I realised belatedly that you don't need branches for this. Transcript here.]
Overall, I don't think this is a show-stopper, or even a reason to seriously think about switching to another DVCS, but it's certainly worth remembering and watching out for.
¹ Why yes, I have been watching the excellent Generation Kill. How did you guess? :-)
² If you're not used to systems in which this is possible, it probably sounds really scary and difficult, and like the kind of thing you'd never need or use. It's not. It's actually really simple and incredibly useful. The article that made it click for me, Jonathan Rockway's Git Merging By Example, is no longer online, but I'm sure there are equally good ones out there. You'll probably find Aaron Crane's "branch name in your shell prompt" utility helpful.
³ Just to clarify: I'm not saying that Your Favourite VCS sucks, or that it's impossible to get these features using it: I'm just saying that git has them, and they're really, really helpful.
git reset --hard, but that was before I knew about the reflog, and I've always been able to recover "lost" work in every other case. And then there's the rest: cheap local branching², the index, the raw speed, git-bisect, git-gui and gitk (which has rapidly become an indispensable part of my development toolchain)³.The merge algorithm pretty much Just Works: we get the occasional merge conflict, sure, but (so far) never without good reason. So I was surprised to learn (from Mark Shuttleworth) of a really simple case where git's merge algorithm ( does the Wrong Thing ).
Bazaar obviously gets this right, otherwise Mark Shuttleworth wouldn't have written his post. Commenters there suggest that Darcs gets this right too, but after spending a while looking through the Darcs wiki I discover that I really, really can't be arsed to work out how to do the necessary branching to test it. Hopefully some helpful Darcs user (I know you're still out there...) will be able to post the relevant transcript in a comment. [Edit: I realised belatedly that you don't need branches for this. Transcript here.]
Overall, I don't think this is a show-stopper, or even a reason to seriously think about switching to another DVCS, but it's certainly worth remembering and watching out for.
¹ Why yes, I have been watching the excellent Generation Kill. How did you guess? :-)
² If you're not used to systems in which this is possible, it probably sounds really scary and difficult, and like the kind of thing you'd never need or use. It's not. It's actually really simple and incredibly useful. The article that made it click for me, Jonathan Rockway's Git Merging By Example, is no longer online, but I'm sure there are equally good ones out there. You'll probably find Aaron Crane's "branch name in your shell prompt" utility helpful.
³ Just to clarify: I'm not saying that Your Favourite VCS sucks, or that it's impossible to get these features using it: I'm just saying that git has them, and they're really, really helpful.
Link | Leave a comment {3} | Add to Memories | Tell a Friend
What crimes, if any, have been committed?
Dec. 12th, 2009 | 11:37 pm
posted by:
pozorvlak
Lawyers: what are the chances of this working over here?
tl;dr: Prior to 2005, secret press injunctions (as seen in the recent Trafigura/Guardian mess) were common in Norway. Then the Norwegian Broadcasting Corporation (NRK) decided to ignore one and publish anyway. Their counsel argued that the injunction was in violation of ECHR Article 10 (freedom of expression) and (and this is the point where I get a bit lost) that the requirement to not publish until the injunction had been reviewed violated Article 13 (the right to an effective remedy for arguable claims of ECHR violations). Somewhat to their lawyer's surprise, this worked; better yet, the Supreme Court ruled that such injunctions are as a main rule incompatible with freedom of expression, and should only be envisaged in exceptional cases where for instance an individual's lives would be put at immediate risk and the state has no other feasible means of securing them. Secret gagging orders are now (apparently...) vanishingly rare in Norway.
tl;dr: Prior to 2005, secret press injunctions (as seen in the recent Trafigura/Guardian mess) were common in Norway. Then the Norwegian Broadcasting Corporation (NRK) decided to ignore one and publish anyway. Their counsel argued that the injunction was in violation of ECHR Article 10 (freedom of expression) and (and this is the point where I get a bit lost) that the requirement to not publish until the injunction had been reviewed violated Article 13 (the right to an effective remedy for arguable claims of ECHR violations). Somewhat to their lawyer's surprise, this worked; better yet, the Supreme Court ruled that such injunctions are as a main rule incompatible with freedom of expression, and should only be envisaged in exceptional cases where for instance an individual's lives would be put at immediate risk and the state has no other feasible means of securing them. Secret gagging orders are now (apparently...) vanishingly rare in Norway.
Link | Leave a comment {1} | Add to Memories | Tell a Friend
In which I post blank verse
Dec. 11th, 2009 | 11:53 pm
posted by:
pozorvlak
As we know,
There are known knowns.
There are things we know we know.
We also know
There are known unknowns.
That is to say
We know there are some things
We do not know.
But there are also unknown unknowns,
The ones we don't know
We don't know.
-- Donald Rumsfeld
[Via Slate and Jeff Atwood.]
There are known knowns.
There are things we know we know.
We also know
There are known unknowns.
That is to say
We know there are some things
We do not know.
But there are also unknown unknowns,
The ones we don't know
We don't know.
-- Donald Rumsfeld
[Via Slate and Jeff Atwood.]
Link | Leave a comment {2} | Add to Memories | Tell a Friend
34 gb per day?!
Dec. 10th, 2009 | 07:49 pm
posted by:
easwaran
Average American consumes 34 gigabytes of data a day
This can't be right unless they're using some weird accounting tricks. I mean, I was barely using 10 gb a month last year on my internet connection, and I'm sure I use substantially less this year, given that my connection is slower and costs me about $10 or $20 per gigabyte.
They say they're counting all sorts of media and not just internet and computer and phone stuff, so I should add in the amount of radio and television and such they account for. But 30 gigabytes is more than you can fit on 6 DVDs, and there's no way that the average American watches 6 DVDs worth of television every day.
Beyond that, their study has some implausible numbers:
Most of that is fairly plausible (five hours of television in a day sounds a bit ridiculous to me, but I guess I can believe it), but who listens to radio for two hours a day?! I thought most people listen to radio when they're in the car and that's it. Although now that I think about it, since the radio is always on while I'm at the gym, I guess I do average close to 30 minutes per day of radio (if you ignore the fact that I'm normally listening to a podcast rather than the radio).
At the end of the article they say that the total consumption for all American households is 3.6 zettabytes, which does in fact work out to 36 gigabytes per person (using 300 million Americans and 333 days in a year).
Looking at the study, I see that they estimate that it's 1.3 zettabytes of television and 2 zettabytes of computer games. Given that they estimated 5 hours per person per day for television and 1 hour per person per day for computer games, this means that computer games must have about 8 times as much data per hour as television - could that possibly be plausible?
The report also says that when they did the calculation two years ago they got a value of .3 zettabytes worldwide for 2007. Some change in calculation somehow made them increase the figure tenfold in two years while restricting consideration to just the US.
Anyway, I don't believe this number.
This can't be right unless they're using some weird accounting tricks. I mean, I was barely using 10 gb a month last year on my internet connection, and I'm sure I use substantially less this year, given that my connection is slower and costs me about $10 or $20 per gigabyte.
They say they're counting all sorts of media and not just internet and computer and phone stuff, so I should add in the amount of radio and television and such they account for. But 30 gigabytes is more than you can fit on 6 DVDs, and there's no way that the average American watches 6 DVDs worth of television every day.
Beyond that, their study has some implausible numbers:
The researchers, who built their work on previous studies of information consumption, found that Americans take in data through various channels, including the television, radio, the Web, text messages and video games. Most of this time is spent in front of screens watching TV-related content, averaging nearly five hours of daily consumption.
Second is radio, which the average American listens to for about 2.2 hours a day. The computer comes in third, at just under two hours a day. Video games take up about an hour, and reading takes up 36 minutes.
Most of these experiences happen simultaneously, like talking on the phone while checking e-mail, or instant messaging while watching TV.
Most of that is fairly plausible (five hours of television in a day sounds a bit ridiculous to me, but I guess I can believe it), but who listens to radio for two hours a day?! I thought most people listen to radio when they're in the car and that's it. Although now that I think about it, since the radio is always on while I'm at the gym, I guess I do average close to 30 minutes per day of radio (if you ignore the fact that I'm normally listening to a podcast rather than the radio).
At the end of the article they say that the total consumption for all American households is 3.6 zettabytes, which does in fact work out to 36 gigabytes per person (using 300 million Americans and 333 days in a year).
Looking at the study, I see that they estimate that it's 1.3 zettabytes of television and 2 zettabytes of computer games. Given that they estimated 5 hours per person per day for television and 1 hour per person per day for computer games, this means that computer games must have about 8 times as much data per hour as television - could that possibly be plausible?
The report also says that when they did the calculation two years ago they got a value of .3 zettabytes worldwide for 2007. Some change in calculation somehow made them increase the figure tenfold in two years while restricting consideration to just the US.
Anyway, I don't believe this number.
Link | Leave a comment {16} | Add to Memories | Tell a Friend
Google privacy
Dec. 8th, 2009 | 11:27 pm
posted by:
easwaran
Apparently, Google has a page where you can opt out of their ad targeting, or change your preferences. I had no idea they had such a page until I read a newspaper article talking about a computer privacy conference where companies claimed that pages like this satisfied their obligation to look after the privacy of their users, and cited the fact that "tens of thousands of people per week" go to these pages to show that they're working. Of course, the fact that I'm particularly interested in this sort of stuff and hadn't heard of it, and that they only get a miniscule fraction of the traffic on this page that they do on everything else, shows that it really isn't working.
Anyway, Google thinks I'm interested in the following topics:
Animals - Pets
Animals - Wildlife
Computers & Electronics - Computer Security - Hacking & Cracking
Entertainment - TV
Food & Drink - Cooking & Recipes
Lifestyles - Activism & Social Issues
News & Current Events - Magazines
News & Current Events - Politics
News & Current Events - Politics - Elections & Campaigns
Society
Society - Government & Regulatory Bodies
Society - Social Science - Demographics
It's a relatively accurate list, but I'm not quite sure why it thinks I'm interested in TV, recipes, and pets. (I probably am to some extent, but I would have guessed that I was much less interested in that stuff than a major proportion of internet users.) Also, it doesn't seem to think I'm interested in anything academic, but maybe that's because there aren't really advertising categories related to that. (I guess demographics and wildlife are somewhat academic, but it totally misses math, philosophy, and linguistics, as well as general science.) (Hmm, it has several science categories that would have been relevant, and also a whole travel category that I'm not sure how it missed - maybe it's because I just go directly to sidestep.com and "sidestep" google entirely.)
Anyway, Google thinks I'm interested in the following topics:
Animals - Pets
Animals - Wildlife
Computers & Electronics - Computer Security - Hacking & Cracking
Entertainment - TV
Food & Drink - Cooking & Recipes
Lifestyles - Activism & Social Issues
News & Current Events - Magazines
News & Current Events - Politics
News & Current Events - Politics - Elections & Campaigns
Society
Society - Government & Regulatory Bodies
Society - Social Science - Demographics
It's a relatively accurate list, but I'm not quite sure why it thinks I'm interested in TV, recipes, and pets. (I probably am to some extent, but I would have guessed that I was much less interested in that stuff than a major proportion of internet users.) Also, it doesn't seem to think I'm interested in anything academic, but maybe that's because there aren't really advertising categories related to that. (I guess demographics and wildlife are somewhat academic, but it totally misses math, philosophy, and linguistics, as well as general science.) (Hmm, it has several science categories that would have been relevant, and also a whole travel category that I'm not sure how it missed - maybe it's because I just go directly to sidestep.com and "sidestep" google entirely.)
