Ian Bicking leaves python

One of the big beasts of Python has left the building. Ian Bicking created pip (an installer), virtualenv (an environment manager) and WebOb (an HTTP library at the core of Pyramid and several other web frameworks). Besides that, he’s been a major community presence. I, like many others, have long looked to his code as an example of solid principles combined with a focus on getting stuff built.

But now he has announced something that has been coming for a while: he has moved away from python, and will be focusing on Javascript from now on.

The announcement is full of the kind of incidental insight you would expect from Ian. Some of it is about personal process — and this is a pattern I can certainly identify with:

Sometimes when I’m feeling particularly excited about an idea, like really excited, I have to take a break. I need to calm down. Try to wrap my head around the ideas, because I know if I push forward directly that I’ll just muddle things up and feel disappointed. No, I don’t know that is true: maybe I don’t want to have to confront, in that moment, that the idea is not as cool as I think it is, or as possible as I think it is. But often I do step back into the problem, with ideas that are more mature for having thought more deeply about them.

He also talks about the development of libraries, from avant-garde to mainstream. You start with a groundbreaking idea. Nobody quite understands it, even the creator, so the thing ends up not quite working. It is only when another developer builds a second generation that the idea can bloom and reach wide acceptance. So pip was the second generation for easy_install and eggs, which, and SQLObject laid the ground for SQLAlchemy:

SQLObject explored a lot of metaprogramming concepts that were quite novel in the Python world at that time. At the same time maintaining it felt like a terrible burden. It took me far too long to resolve that, and only once interest had died down (in no small part due to my lack of attention) did I hand it over to Oleg who has been a far more steady hand. This would be a pattern I would unfortunately repeat. But if SQLObject helped the next generation be better that’s good enough for me.

Bicking is now at Mozilla, working with Javascript. He’s building togetherjs, a real-time collaboration library that’s one of the most exciting things happening at Mozilla. I know I’m itching for a chance to try it out, and my faith in the library is doubled by the knowledge that Ian Bicking’s wisdom is going into it.

Book Review: Redshirts (John Scalzi)

Scalzi’s

Star Trek

spoof is a superficial romp, but a very enjoyable one. The crew of the starship

Intrepid

have come to realise that something is seriously wrong on their vessel. Crew assigned to expeditions alongside senior officers are liable to die in unexpected ways, while the Captain manages some risky and implausible escape. Officer Kerensky is hideously injured every other week, only to find himself fully recovered a few days later. On-ship technicians rely on a device called “The Box”, miraculously able to almost-solve a problem in the nick of time, but always requiring some obscure detail to be put right by the

Intrepid

‘s chief scientist. Officers have a tendency to speak rousing monologues while staring into the middle distance, and suffer strange compulsions to indulge in stupid — but dramatic — behaviour.

Rumours and wild theories abound on board, and everybody has some plan to make somebody else serve as the captain’s expendable sidekick. But a few raw recruits have the smarts to go further, and delve into the mystery of what is really happening on the

Intrepid

.

It’s a pitch-perfect take on the Space Opera. It’s entertaining enough even for a reader like me, who is far from steeped in the genre. The plot is fairly predictable, but that doesn’t stop the journey being great fun, and it’s short enough that you don’t mind.

60 million children left behind

A fifth of Chinese children — that’s 60 million kids — are living in villages, while their parents are in the city. According to the Washington Post:

the city workers are so squeezed by high costs and long hours that many send their children to live with elderly relatives in the countryside.

The BBC claims these children are disproportionately victims of sexual abuse:

School children in rural areas are particularly vulnerable if their parents happen to be migrant workers who spend a long time working away from home. They often don’t get to visit regularly and the children are left to be looked after by relatives, such as grandparents.

Release the Bats!

The US once tried to firebomb Japan

with bats

. The surreal plan was the brainchild of an American dentist, who had enough sway on Eleanor Roosevelt to get his plan trialled by the US.

The bat-bomb would explode mid-air. It would scatter dozens of bats, each individually packed, and tied to a small incendiary charge on a timer. The idea was that the bats would scatter to roost in the wooden rafters of Japanese buildings. After a while the charge would alight itself, and the building would burn down — bat and all.

The concept, which gloried in the name of Project X-Ray, was abandoned after some test bats got loose and burned down an Air Force hangar.

More: Wikipedia, The Atlantic, American Psychological Association

Pakistan and Kautilya

I’m currently reading Ahmed Rashid’s

Pakistan on the Brink

, a depressing political survey of the last few years of the country’s history. It’s grim how much of Pakistan government policy is determined by a very crude geopolitical version of “my enemy’s enemy is my friend”.

The Pakistan army’s main concern is India. A strong, independent Afghanistan would be a potential ally for India, allowing Pakistan to be attacked from two sides. So Afghanistan should be kept as a subservient hinterland, unthreatening and potentially even providing space (“strategic depth”) for the Pakistani army. And that weak government should be Pashtun, like the powers-that-be in Pakistan, even if it means preferring the Taliban over the Northern Alliance.

Everything is abstract, geographical, military, with a dash of ethnic favoritism. There’s absolutely no idea that people might be defined by more than tribe and location.

It all reminds me a bit of the Arthashastra, the book in which Kautilya (“India’s Machiavelli”) laid down the rules of statecraft around 300BC. Kautilya looks at international relations geographically; location is what matters:

The king who is situated anywhere immediately on the circumference of the conqueror’s territory is termed the enemy.

The king who is likewise situated close to the enemy, but separated from the conqueror only by the enemy, is termed the friend (of the conqueror).

That pretty much sums up Pakistan’s Afghanistan policy. Kautily then spins off into one of those overly systematic arrangements so common in Sanskrit texts:

In front of the conqueror and close to his enemy, there happen to be situated kings such as the conqueror’s friend, next to him, the enemy’s friend, and next to the last, the conqueror’s friend’s friend, and next, the enemy’s friend’s friend.

In the rear of the conqueror, there happen to be situated a rearward enemy (párshnigráha), a rearward friend (ákranda), an ally of the rearward enemy (párshnigráhásárá), and an ally of the rearward friend (ákrandására)

By the time he’s finished we have “four primary Circles of States, twelve kings, sixty elements of sovereignty, and seventy-two elements of states”. Phew! But sometimes it seems there is more nuance and insight in Kautilya than among his epigones in the Pakistan Army.

Building for the web checklist

Here is a good checklist of what to think about when designing for the web. Some highlights:

  • Assume that people won’t read the instructions.
  • Redundancy is a useful design technique. Labels+icons, color+width, etc.
  • Use loading indicators for XHR requests, even if they’re likely to be very fast. You never know how slow or broken it might be for a user. They should know if something is missing.
  • Don’t give someone 20 equally interesting things to do right off the bat. Give them a more focused presentation upfront before turning them loose.
  • Get live data into your visualization early. If you can’t, use historical data or something else a little bit representative. Visualizing random test data will lead you astray.
  • Clean and transform your raw data stepwise. Make it a repeatable process. Use Makefiles or shell scripts if you can.
  • Assume your page will be one of user’s dozen open tabs. Use short, descriptive page titles and a favicon.
  • Have a recovery plan,

    and test it

    .

France is distrustful, suspicious and xenophobic (IPSOS poll)

France, according to an IPSOS poll, is not in a good mood:

  • 73% lack confidence in the Senate, 72% in the National Assembly, 77% in the media
  • 63% think Islam is incompatible with the values of French society
  • 66% think there are too many foreigners in France

The only institutions which are trusted are the Army (79%) and the Police (73%)

[via Art Goldhammer]

The end of the 60s dream

Within the US counterculture, the comedown from the 60s high was debilitating. Sheila quotes the teenage Lester Bangs in 1968, coming to terms with the shootings of Warhol and Robert Kennedy:

America, which is essentially

our universe

, is having earthquake-sized convulsions, choking, spitting up blood, reeling dizzily into some crumpling limp falldown of terminal disease, weaving back and forth on its knees moaning and clutching itself tightly in one wounded area after another, raving like a wood-grain-alcoholic crashing in the Bowery on his Last Go-Round, and I don’t have any answers, or even very many

opinions

right now

It’s a beautiful speed-freak preview of the despair which would, over the next 4 years, overcome much of the counterculture.

I’ve mentioned it before in the context of


Hunter S Thompson


. His best writing is shot through with bewilderment and disappointed hope, all sublimated into rage and excess.

We are all wired into a survival trip now. No more of the speed that fueled the Sixties. Uppers are going out of style. This was the fatal flaw in Tim Leary’s trip. He crashed around America selling “con sciousness expansion” without ever giving a thought to the grim meathook realities that were lying in wait for all the people who took him too seriously

If Hunter and Lester’s intensity is unusual, the pattern of gloom is pretty evident.

Much of the world is in a similar position now. The difference is that we’re not coming down from a quick hippie high, but slogging through many years of featureless gloom. Here’s how Bruce Sterling opened his annual State of the World comment thread:

An extraordinary atmosphere of sullen, baffled evil, as the year opens. I don’t know what to compare 2014 to — except for many other glum post-revolutionary situations, when the zealots succeeded in toppling the status quo, then failed to install a just and decent form of civil order. The world in 2014 is like a globalized Twitter Egypt.

As Bruce suggests, the same gloom is present in the Middle East. Still, it was expected — every Arab activist I heard from in 2011 realised the “Arab Spring” was just the beginning of a long struggle with many setbacks. It was only the Europeans and North Americans who looked at the first wave of change and thought

Mission Accomplished

. Still, there’s plenty of gloom here: Europe, North America, the Middle East are all having a rough time, while the Balkans remains in its perennial stew of unhappiness.

Changing views on marijuana

Despite the growing push for legalization of marijuana in the US, I had never realised the speed at which public opinion had changed. This graphy from the Pew Center is striking:

In 1969, 12% of the population supported legalization. By 1991 it was only 17%. But from the early 90s attitudes softened massively, until by this year 52% of Americans wanted marijuana legal.

I have no idea what changed in the 90s, and Pew don’t give many hints. I’d be intrigued to find out, though, and also to see whether attitudes in Europe have changed along similar lines.

Tory Britain, you make me despair

Stories like this make it seem that the UK has flipped 150 years back through a time warp.

A pregnant woman isn’t paid the benefits she is entitled to. Desperate, she steals food worth £13.94. She is caught, and sentenced to 10 months in jail.

The jail she is sent to is privately-run. There she suffered a miscarriage, at which point

she says the foetus was left with her afterwards and that she had to clean up the blood

Her barrister, Philip Gibbs, told Leicester Crown Court: “There was blood everywhere and she was made to clean it up.

“The baby was not removed from the cell. It was quite appalling. It was very traumatic. She only received health care three days later, after the governor intervened.”