The Globe says the Yankees are TEH SUX0R

slaniel | Uncategorized | Monday, April 30th, 2007

It’s that time of year: the Yankees have started off poorly, and the Boston Globe has to gloat about it.

I don’t actually believe Boston fans need this kind of nonsense. Yes, we’re happy that the Sox have beaten the Yankees in five out of six games so far this year. If we end up winning the Series, we’ll be happy and this earlier gloating won’t add anything to that happiness; if the Yankees come back and destroy us, won’t the gloating just make our fall that much more painful?

But Nick Cafardo has a deadline to meet. Alas.

Economics and psychology

slaniel | Passions Within Reason: The Strategic Role of the Emoti | Sunday, April 29th, 2007

I switched temporarily to reading Robert Frank’s Passions Within Reason: The Strategic Role of the Emotions, whose thesis seems to be that even if you accept the premise that all of our actions are utility maximizing, it does not follow that each individual action is selfish. That is, it might well serve your long-term interests — maximizing your lifetime utility, perhaps — to do something that harms you in the immediate future. So “narrow-sense” utility maximizing isn’t a very good strategy for selfish humans. Frank still wants to explain how real altruism — he mentions Larry Skutnik, for instance — is possible. How, as naturally-selected beings, can we do anything that might limit the greater spread of our genes? I’ve not read his answer yet. It’s a decent question. (By now I’ve read descriptions of Robert Axelrod’s iterated-tit-for-tat experiments so many times that I’m getting mildly annoyed with them, but they always come up in these contexts.)

Many of my readings over the past several years have questioned the psychological and evolutionary plausibility of mainstream economics (is it still mainstream, I wonder?). First they question the descriptive power of economics (”this is what actual people do”). Then they question the normative power of economics (”this is what rational beings should do”). (And of course a valuable strand — covered in Gigerenzer, Todd et al.’s Simple Heuristics That Make You Smart — is: if natural selection has finely tuned us to our environment, and we systematically don’t behave as game theory dictates we’ll behave, then isn’t that a strong hint that it’s not actually “rational” in any good sense of the word?)

Now of course that has to be tempered. We all realize that there are things we do which are in no way good for us, in the short-term or long-term sense. We start smoking cigarettes even when all the evidence suggests that it’s going to shorten our lives dramatically, cost us a great deal of money, lead us to wake up in the morning with nastiness in our chests, etc. In general, we develop habits that it would really be better for us to give up, but maybe the subjective costs of switching are higher than the subjective gains from doing so.

So then if you’re a mainstream economist, you have to posit that, for instance, we have made a rational calculation before getting addicted to cigarettes: we’ve computed the long-term costs of getting addicted, and the long-term joy we get from that hit of nicotine, and we’ve decided that the latter offsets the former. Of course this becomes radically non-falsifiable: if any bit of evidence could be cajoled into proof that we’re rational utility maximizers in everything we do, then it’s not a science.

It’s obvious to anyone with eyes that we are not entirely rational. We do things that even we know we shouldn’t do. We do things out of spite. We act stupidly, and in directly harmful ways, because of jealousy. We don’t save enough money for retirement, even when presented with abundant evidence of how long we’ll live and how much we’ll need. Etc., etc. The evidence goes on and on, and my fascination just mounts: even though we all know that the theory is very incorrect, we have to argue with it as though it made sense. It starts to feel like Republican talking points: just in order to get in the game, I have to spend time arguing that Hillary Clinton does not eat babies.

Bowles’s Microeconomics book starts to treat these emotions as valuable data on their own: he tries to model revenge (for instance, getting back at someone who slacks off at work), envy, greed and so forth, which marks the first time I’ve seen emotions rigorously treated in a work of economics. (Not that I’ve read much, granted.)

All of the above leads me to wonder: what does economics have to offer above psychology? Bowles defines one of the main purposes of economics as the construction of institutions that encourage people to behave in ways that help all the individuals within the institution. So that might be one good thread. But I’m wondering whether a lot of the ground has been yanked out from under economics if, as time goes on, it’s turning more and more into mathematical psychology.

The Babe has a blog

slaniel | Uncategorized | Saturday, April 28th, 2007

 . . . which is an awesome thing.

Checking for numeric arguments in Perl

slaniel | Uncategorized | Saturday, April 28th, 2007

In Perl, the best way to figure out whether your function arguments are integers is, apparently, to use POSIX::strtol(). This is extremely lame, and reminds me again that Perl’s conscious decision to forgo strong typing — to not even leave it as an option — was not great.

I believe Perl 6 will get around to fixing this. It’s about time.

Then again, probably this Perl design decision is a lot like the ones that Bjarne Stroustrup described in The Design and Evolution of C++: necessary compromises to achieve other important goals. I probably shouldn’t be too hard on Perl until I know what it’s like to design a language — specifically, in Perl’s case, a language aimed at shell programmers.

P.S.: There’s type-checking of a sort, via the ref() function. If you want to check whether the variable $foo is a reference (in the Perl/C++ sense of ‘reference’) to an array, you’d do

if( ref($foo) eq "ARRAY" ) { doSomething(); } 

But of course this is “switching on type,” which is a big bad ugliness. But it’s how you’d hack type checking into Perl. If $foo were a reference to an HTML::TreeBuilder object, you could check that via if( ref($foo) eq "HTML::TreeBuilder" ), so there’s really unlimited type checking for all Perl classes. Presumably, then, someone could write an integer class, and you could force yourself to use that class whenever you wanted a basic int. That would be somewhat more cumbersome than just using my $int = 5, and it seems that you can only type-check refs — you couldn’t check the type of @list. But if type-checking’s what you want, that’s actually not terrible. If you’re just checking the types of arguments, it adds a few lines per function:

sub myfunc($$$) { unless( (ref($[0]) eq "HTML::TreeBuilder") && (ref($[1]) eq "Integer::FakeClass) && (ref($[2]) eq "String::FakeClass") ) { my ($package, $filename, $line) = caller; die "signature of myfunc is myfunc(HTML::TreeBuilder, Integer, String); caller was at package $package, file $filename, line $line"; } doSomeStuffWith(@); return $whatever; } 

Here sub myfunc($$$), by the way, is a Perl prototype, new in (I believe) Perl 5.6. It says that the arguments to myfunc() are three scalars, which may or may not be references. This buys you a teensy bit of the type-checking in a real statically-typed language.

The Massachusetts economy is booming

slaniel | Uncategorized | Saturday, April 28th, 2007

 . . .  . . . says the University of Massachusetts. This backs up what I’ve noticed, which is that the Kendall Square area in particular is doing extremely well. My own company is aggressively hiring, as are lots of the other tech companies (specifically biotech and software) in Kendall.

Now why can’t Kendall develop a booming social scene? It has all the makings of a great neighborhood: a 20-minute walk to Boston, a 10-minute walk to Central, and thousands of workers. I’d guess the trouble, as Jane Jacobs noted, is that the neighborhood is only half used: when people leave for the day, Kendall becomes a ghost town. There are a few exceptions — Kendall has a theatre and a bar or two, but in general there’s no reason for people to stick around. What it needs is some housing. Then there’d be people in Kendall during the day for work, and at night when they return home. It’s hard to justify placing a business somewhere when it will only make any money between 8 a.m. and 5 p.m. Central Square, just down the street, is a perfect example of what Kendall isn’t: people live there and work there, so it’s a constantly-vibrant spot.

I hope Cambridge one day realizes what an opportunity it’s missing by not aggressively zoning Kendall for mixed-use development.

Gödel on the lengths of proofs

slaniel | Uncategorized | Saturday, April 28th, 2007

Mathematicians in the room: Gödel had a proof that you could shorten the lengths of proofs in nth-order arithmetic as much as desired by moving to (n+1)th-order arithmetic. At least this is my understanding; correct me if I’m wrong. Must be that Gödel never displayed the proof, but only hinted at it, because Samuel Buss proved it in 1994.

My question is: what does this say about the lengths of computer programs? Does it say that using a particular sort of abstraction will buy you a shorter program? In particular, the “unbounded” part of Buss’s claim intrigues me: does it somehow mean that we could get a proof of length zero, or a computer program of the same length, by using a higher-order type?

My understanding of this whole realm is, as you will have noted, extremely vague, so please do help me clarify.

P.S.: Would it be necessary to translate results for nth-order arithmetic into results from something like the λ-calculus before any kind of translation from proofs to computer programs would make sense?

Unchanging code in Perl

slaniel | Uncategorized | Saturday, April 28th, 2007

I have a block of Perl code here that looks like

sub myfunc { [some initial setup] while(<SOMEFILEHANDLE>) { my $staticvar = 31; dosomestuffwith($staticvar, @othervars); } } 

The $staticvar = 31 is inside the loop, rather than at the top of the function, because I’ve been trained to declare variables near where they’re used. For that matter, I’ve also been trained never to use magic numbers, which is why I don’t just use “dosomestuff(31, @othervars)”.

So I wonder: is the compiler smart enough to pull that my $static_var = 31 out? Seems like this is one of the first things that an optimizing compiler would do. If it does, then that’s the best of all possible worlds: static variables get put where they should, yet I can still declare them near their point of use.

Google Calendar is the greatest thing ever

slaniel | Uncategorized | Saturday, April 28th, 2007

I discovered Google Calendar the other day. It is the greatest thing ever. It is a life-changing application for me. I’ve not yet read Getting Things Done (though it’s checked out from the library), but my feelings for Google Calendar seem similar to how people describe theirs for GTD. It is amazing. I recommend it to everyone.

Google has a knack for designing web apps that reveal their greatness within 30 seconds of laying eyes on them. The Calendar is another such app.

Lederman on the redeployment bill

slaniel | Uncategorized | Thursday, April 26th, 2007

Sandy Lederman does what the media don’t, and explains what’s actually in the Democrats’ Iraqi-redeployment bill. In the process, he thoroughly guts the president’s reasons for wanting to veto it. You should go read it. It’s a modest bill, and Bush is vetoing it for no good reason. I’ve included Lederman’s post below.

(more…)

Dana Rohrabacher on torture

slaniel | Uncategorized | Thursday, April 26th, 2007

This is remarkable: Dana Rohrabacher basically arguing that one can’t make an omelet without breaking some eggs — specifically, that if we have to torture a few people to get the information we need to prevent mass killings, we should do so. The video isn’t terribly important, so I’ve cached an MP3 of it.

A few things jump out at me from this:

  1. It reflects the pernicious influence of the bomb-in-a-warehouse scenario (aka the television show 24) whereby if we can just torture a few people, we’ll certainly get the information we need to stop the bad deeds. And of course that torture will be limited in scope; it naturally won’t extend to anyone else. And naturally no cops will take the society’s loosened morals as a license to use torture on the people they meet every day. And of course that torture won’t be overwhelmingly meted out to poor black people. And of course, and of course.

  2. It’s a great experiment in practical morality: abstract away the details of someone else’s humanity — i.e., the Abstract Terrorist is not American and probably not white — and see how people respond toward that person. If you held up a slide with photo of Tim McVeigh and asked, “Can we torture this person?” you would get a much different answer than if the person on the slide were Muslim. (See “Romney, Mitt”.) But of course people don’t answer honestly when the question is put to them this way. Rohrabacher’s willingness to torture when necessary, but presumably not torture white people when necessary, is a great natural experiment. Three cheers for science.

  3. It’s certainly odd for an ostensibly conservative man to posit that government has a right to expand its powers of life and death for what seem like trivial reasons. Should we have been allowed to torture suspected Soviet agents if it meant that we’d keep our country from getting nuked? (Note that the threat with the Soviets was that life on earth would itself end. I don’t think anyone believes that the threat from terrorists extends beyond a few cities blowing up. Horrifying as the latter is, it does not compare with the end of humanity.)

  4. Rohrabacher’s views are probably highly politically palatable, which is again data for item 2. This fact is also bottomlessly sad.

P.S.: If you treat the law as instrumental, and you treat fundamental human rights (such as the right against torture) as things which must be balanced against other societal interests in ways that the Constitution itself is not competent to calculate, isn’t it almost inevitable that you’ll get someone like Rohrabacher? Richard Posner, for instance, is pretty clear in rejecting the idea of fundamental human rights. Say what you will about the intellectual merits or realism of such a stance, but unless I’m mistaken this kind of “balancing” feeds the Rohrabachers of the world.

It’s also worth noting that there’s a difference between what’s logically correct and what you should think. There is such a thing as a useful fiction. In particular, a nation of people who all believe that torture is inevitable will eventually make it so. It may be correct, in some unimpeachable system of logic, that torture is necessary to offset some greater evil. But by believing a claim like this, we may well bring on the great evil that we wanted to prevent. Beliefs are often self-creating. Whereas by believing that torture is just wrong, and democratic nations don’t engage in it, we make ourselves better people.

Atul Gawande makes the point more clearly in his book Better. One of his points is that doctors know they can’t be perfect, and that they will occasionally make mistakes, but that they must behave at all times as though perfection were possible. If they behave as though “mistakes will happen,” they’re likely to make more mistakes, and not critique themselves when they do make mistakes.

P.P.S.: I love it: Rohrabacher has a page entitled “Chairman’s Report: The Oklahoma City Bombing: Was There A Foreign Connection?”. The caveat is important: “Note: This report reflects the views of the Chairman of the Subcommittee on Oversight and Investigations and its investigators, and has not been approved by a vote of the subcommittee or the full International Relations Committee.” I.e., “not only does this not have the support of any impartial legal body; it’s really just the crackpot idea of one lone representative.”

My side of the torture debate has, from the beginning, noted the absurdity of treating Muslims far more cruelly than we ever would have treated Tim McVeigh. I wonder if that’s why Rohrabacher feels it necessary to invoke the spectre of foreign influence.

On deliberately remembering later

slaniel | Uncategorized | Thursday, April 26th, 2007

Maybe this is obvious, but it occurs to me that Attorney General Gonzales’s conspicuous lack of memory is probably very deliberate, but deliberate not just because he doesn’t want to say the bad things that he did. Even supposing that he “discovers” an embarrassing fact later on and sends it to the Senate, he has

  1. done so out of the spotlight
  2. taken all the force away from what the Democrats probably hoped for, namely to shame Gonzales in public after a big PR build-up
  3. forestalled the day of judgment by another day, which is one day closer to Bush’s departure from office — hence one day closer to a potential pardon.

Was this already obvious? You’d think that the Democrats would be ready for Gonzales to say, “I can’t give you the answer now, but I will later” and would know how to respond. Their response in the Leahy letter, linked above, was basically, “Make sure you provide us the documents.” Wouldn’t “We’ll haul your ass back in front of the Senate as many times as we need to, if that’s what it takes to get you to talk” be a better answer?

I have some more general questions, such as “Isn’t the Fifth Amendment supposed to protect people from the coercive power of the state, rather than protect outright obstruction of justice by the guilty?” Seems to me that there ought to be some way to guard more of the innocent while harming more of the guilty, but maybe I’m just not thinking right.

Bookmarking only to del.icio.us

slaniel | Uncategorized | Thursday, April 26th, 2007

The Firefox plugin for del.icio.us is great — so great, in fact, that I don’t want to use regular Firefox bookmarks anymore. When I go to Add Bookmark, I would like del.icio.us to completely take over that function and not even bother with local bookmarks. As it is, it looks like the only options are to bookmark in both places, or to only bookmark locally — “remote only” is not an option. Does anyone know if I’m misreading what’s available?

P.S.: One can hit Ctrl+D to post just to del.icio.us, which is a good stopgap, but I’m looking for something more: I want del.icio.us to completely replace the existing Firefox bookmarking functionality.

I could also use the regular local Firefox bookmarks along with Google Browser Sync. Then the bookmarks would be synced to every machine I use automatically.

David Halberstam is dead

slaniel | Uncategorized | Tuesday, April 24th, 2007

 . . . which is a great loss for the world. (He died in a car crash at age 73, apparently.) His book The Best and the Brightest asked how Kennedy’s men, the brilliant Harvard-trained captains of industry, got us into the terrible mess of Vietnam. His The Reckoning explained why the American auto industry died. His The Fifties is a great antidote to all the facile “People in the 1950’s were repressed, man” talk. His books in general are a joy to read, and I’ll miss his voice dearly.

The weather

slaniel | Uncategorized | Saturday, April 21st, 2007

Forgive me for talking about something as banal as the weather, but dang:

high of 76 today, high of 67 tomorrow, sunny both days

Spring is finally here. Which can mean only one thing: the emergence of the honeys.

Also there will be iced coffee soon. Too bad my erstwhile favorite iced-coffee drinkery, namely Torrefazione Italia on Newbury St. in Boston, is no more. Farewell, Torrefazione; we knew you well.

The MBTA is broke

slaniel | Uncategorized | Saturday, April 21st, 2007

 . . . says John Daley, who believes that fares will keep going up. (Via Universal Hub.)

Just a couple notes. First, the T does seem markedly more dysfunctional since I moved back here. Ridership seems to have gone down, and it wouldn’t surprise me if that were because of the fare hikes. (Quick link: “T ridership reaches low point of decade,” from August of 2005. 100,000 fewer people were riding the T every day than had done so in the peak period over the preceding five years. Fares have gone up since then, so one presumes it’s even lower now.)

Secondly, though, I wonder how far fares can rise, and how much more dysfunctional it can get, before the T’s competitors — namely bikes, walking, privately owned automobiles, Zipcar, and even taxis — eat into its ridership. I’m sure the T knows the answer to a question like this; they must have the ridership data on hand. An interesting little statistical nugget says:

at least in Boston, transit ridership is strongly affected by external factors beyond the transit agency’s control. He calculates, for example, that each percentage decrease in central city jobs reduced MBTA ridership by 1.24 to 1.75 percent, and each percentage increase in real per capita income reduced MBTA ridership by 0.7 percent. The effects of fare and service policies are, by contrast, relatively small. A 1 percent increase in service increased ridership by only 0.30 to 0.36 percent, and a 1 percent reduction in fares increased ridership by 0.22 to 0.23 percent.

I’d like to see the MBTA succeed. The capacity for thriving mass transit in some sense defines a city for me. That and the presence of good, cheap burritos are probably the two cheapest proxies for the goodness of a city. I want the MBTA to succeed because I want Boston to succeed.

Bowles’s Microeconomics is extraordinary

slaniel | Uncategorized | Saturday, April 21st, 2007

For some reason I’ve always had the damnedest time reading payoff matrices when I try to learn game theory; this has made learning the subject rather hard. My studies get to Nash equilibria (named after famous schizophrenic John Nash, of A Beautiful Mind fame), and something just locks up. I’m not sure what it is. The last time I tried to study game theory rather abstractly — namely Gintis’s Game Theory Evolving — this is exactly what happened. The study ended after a few pages.

(A brief explanation of my vague understanding of the terms follows.)

Samuel Bowles is doing something quite different here, and it works. The concepts are fairly straightforward: a Nash equilibrium in a game between two people is a set of choices of strategies such that neither person has any incentive to switch strategies unilaterally. (Maybe they’re allowed to talk about it — e.g., we agree that you’ll put your gun down and I’ll do the same with mine — but many of the elementary problems don’t allow coordination, and that example probably suggests why it’s valuable not to model the parties as though they trusted one another.) A party will switch if he can make his position better by doing so. If I know every strategy available to you, and a particular strategy available to me is a loser no matter which strategy you pick, then it’s reasonable to suppose that I won’t pick the loser; the loser here is called a “dominated” strategy. So one approach to figuring out what strategy to play is to work out the full tree of possible games that we could play, eliminate dominated strategies from the final move, and keep pruning the tree of possible games until we get back to decide which move we should play at the start of the game. I believe this is called “backward induction.”

That much is fairly interesting, but it’s always struck me as abstract and a bit of a yawn — particularly when I’ve read cases that seem far more interesting, like the iterated prisoner’s dilemma, and when much of my behavioral-economics reading suggests that fully rational game theory isn’t a very good model of how actual actors behave.

But of course I should just keep reading. They start with the less interesting stuff to build to the more interesting stuff, of course. I guess my attention just doesn’t stick around as long as it should.

Bowles has kept it, though, mostly because he’s trying as hard as he can to get to the interesting cases right away. First of all, he wants to return economics to a broader base of interest. Rather than defining economics rather narrowly as “the study of allocating scarce means amongst unlimited wants,” Bowles wants to understand how individual behaviors can produce an outcome that’s good for everyone; he calls this the “coordination problem.” The Prisoner’s Dilemma is the most famous small-scale coordination problem, where individually optimal behaviors lead to an outcome that everyone would have chosen to avoid had he been able to dictate the group’s outcome rather than just his own. The point is to build institutions in such a way that people are motivated to “do the right thing.” Taxation and the price system are probably the most obvious institutions that help in this direction: charge people enough for gas, and they will drive their cars less. The failure of the price system to charge people for the damage they cause is known as a “negative externality,” which Bowles is building towards. Rather than start with orthodox economics and eventually show where it breaks, Bowles realizes that the breakages are what we’re actually interested in.

The trick that Bowles uses to keep my interest here is to very quickly study the evolution of toy strategies in a given population, when there are two strategies available. He starts by modeling conformity: suppose some fraction of the population (call it p) believes a certain proposition (call it x), whereas I believe some other competing proposition y. Suppose in a given period of time (a day, say), that I am randomly paired with someone else from the population — someone who may believe x or y. Add some other assumptions about x and y, specifically about the benefits accruing to those who believe x and y, and the benefits that accrue to someone who “plays” the x “strategy” against the y strategy.

Without much complexity in the model, you can start looking at the time evolution of conformity in the population. You can ask about equilibria: assuming the probability that people believe x starts at p, where will p end up given sufficient time? If p = 0, in particular, then everyone believes y at the start of the game and no one will ever switch unless the system gets “pushed” somehow.

So then let’s talk about pushing the system. Suppose the system is suddenly “invaded” by someone playing a different strategy. In the case of modeling conformity, this means that a new idea comes to town. Intuitively, the new strategy will disappear if it doesn’t confer any benefits on people who adopt it — specifically, if I play the new strategy against you in this round of the game, and the payoff to my doing so is lower than the payoff to my switching (the normal verb here is “defecting”), then I will defect by the next round.

A strategy (again, think “idea” here if it helps) that is resistant to invaders is an Evolutionarily Stable Strategy. Bowles reaches these very quickly as well, and starts modeling with them right away.

The pedagogy is as smooth as I could ask for, with mathematical derivations that fall right out of his setup and are surrounded by enough explanatory text that you’ll never feel lost in a thicket of equations. He’s always grounded in the concrete. He never wants his fellow-economists to lose sight of what their discipline has to offer, and he’ll never let the reader lose sight either.

More reports as I dive in further. I was just so pleased with the coherent picture I’ve finally built of evolutionary game theory (vague and inaccurate as it probably is), that I felt it necessary to gush.

Salted Butter Caramel Ice Cream

slaniel | Uncategorized | Saturday, April 21st, 2007

Please say those words and tell me you’ve not just discovered the second recipe for edible orgasm after deep-fried Oreos.

(Via Meg Hourihan)

Addis

slaniel | Uncategorized | Friday, April 20th, 2007

The best Ethiopian food I’ve ever had is from Addis The Red Sea in the South End of Boston, a short walk from the Back Bay T station. This is surprising, because D.C. has an enormous Ethiopian community and many Ethiopian restaurants; I know of two such restaurants in Boston (the other is in Central Square, and is not nearly as good as Addis).

I was excited to discover yesterday that there’s now a second Addis near Porter. I’ll have to go. Any Bostonians/Cantabrigians/Somervillians reading should come with me.

Quote of the Day

slaniel | Uncategorized | Friday, April 20th, 2007

 . . . comes from the latest New Yorker, specifically from “Waiting for Manny”:

When I asked his teammate David Ortiz, himself a borderline folk hero, how he would describe Ramirez, he replied, “As a crazy motherfucker.” Then he pointed at my notebook and said, “You can write it down just like that: ‘David Ortiz says Manny is a crazy motherfucker.’ That guy, he’s in his own world, on his own planet. Totally different human being than everyone else.”

It’s especially funny if you’ve heard David Ortiz speak. Ortiz called me recently (with some help from Adam Gerard), so I have his voice fresh in my head to make this even funnier.

Upgrading to Feisty Fawn

slaniel | Uncategorized | Friday, April 20th, 2007

If you’re like a lot of people (apparently), you’re trying to upgrade your Ubuntu machine today to the latest version. As you will then have noticed, all the Ubuntu mirrors are extremely slow. Indeed, even connecting to the machine that lists Ubuntu mirrors takes forever, so that you can’t even find out where to go to speed things up.

I did a little googling and found the address of a New Zealand Ubuntu mirror. NZ is asleep at the moment, it seems, so bandwidth from there is pretty good. You can use my sources.list to make that work. Just make a backup copy of your current sources.list, copy mine over it, and upgrade:

sudo sh -c "cp /etc/apt/sources.list /etc/apt/sources.list.date +'%Y-%m-%d-%H%M%S'" sudo sh -c "wget -O - http://laniels.org/sources.list > /etc/apt/sources.list" sudo apt-get update sudo apt-get upgrade 

The first line is excessively cautious: it backs up sources.list to a backup file stamped with the date and time that you did the copy. That way if you have any pre-existing backups, you won’t overwrite them with this one.

The second line downloads my sources.list with wget, and writes it directly over your existing sources.list.

The third line pulls down the list of any upgradeable packages, and the fourth line does the upgrade.

P.S.: The NZ site has also slowed to a crawl, so I searched for a Canadian Ubuntu mirror. Ubuntu.mirror.rafal.ca does the trick, and its speed is impressive: I’m averaging over 200K/sec.

Naturally my next question is why Ubuntu/Debian don’t use BitTorrent for upgrades. They probably do. Barring that, the next natural step is to build a tool that iterates over HTTP Ubuntu mirrors, moving to a new one as soon as the download speed from an old one drops below a given threshold.

Next Page »

Bad Behavior has blocked 699 access attempts in the last 7 days.