The best kittens, technology, and video games blog in the world.

Sunday, January 31, 2010

Best addons for Firefox 3.6

I love my tail! by play4smee from flickr (CC-NC)

Every now and then I reinstall operating system, and what I usually do is use such occasions to update my Firefox addons collection - remove the ones which don't work that well for me, find better
replacements, and try a few new things.

In case you're curious, here are links to my previous post for Firefox 1.5, 2.0, 3.0.

Web annoyances

The first thing we need to do is make web less annoying. Remember year 2000? There were popups, popunders, and big flash ads covering everything on every website. This made people very angry, angry people elected George Bush, and here we are with a global recession. Is it a coincidence that popularity of Firefox and popularity of GOP are inversely correlated? I don't think so. Obnoxious ads are responsible for the Great Recession! It's as good a theory as any other proposed, and has about as much evidence behind it.

So, first let's install AdBlock Plus, and the Easy List, or whatever is the most geographically appropriate block list for your area. That mostly solves the problem, but to make web even more pleasant, you can install extensions to skip forced registration, and wait screens. Much better now.

To keep everything clean, it's a good idea to move adblock plus control icon from toolbar to statusbar, or delete it altogether (it will still be available from menu and from keyboard shortcut on rare occasions that you need it).


Now something more technical. Firefox's awesomeness comes from extensions, and how easy they are to write compared to plugins for other browsers. But they're still relatively heavyweight, and you're unlikely to have more than 10-20 of them. Fortunately there's a Firefox extension for writing very lightweight Firefox mini-extensions, usually for fixing something just on one site.

You'll need to install two addons - Greasemonkey, and Greasefire on top of it. Now it gives you access to a huge library of tiny hacks for particular websites. Not entirely happy about something? Right click on the money icon on the status bar, and it will tell you what sort of mini-extensions are available for it. There seem to be 198 for blogspot, 313 for google, 868 for facebook (18 for Mafia Wars alone), and so on.

I won't give you any particular recommendations, as it depends on which websites you visit, but I'd be really shocked if you didn't find something for yourself. And it's really easy to write your own (would be even easier if Greasemonkey had integrated jQuery...).

Cuddling Snow Leopards by MJIphotos from flickr (CC-NC-ND)

UI enhancements

There are a few things about Firefox user interface which could be better. Moving downloads from a separate window to statusbar is one I find the most essential. Then you can make textareas resizable - were you ever annoyed trying to write a small essay explaining why author was wrong in 4-row comment box? Now it will be much easier.

Other useful UI tweaks are Safari-style progress bar in form of url bar shader, and a Greasemonkey-based addon which redirects all mail: links to your favourite webmail - by default Gmail. It wouldn't hurt to turn this one into a proper extension... Oh well.

One extension which I'm trying out right now - and while I like it now, I'm not really sure if I won't change my mind later - is tree-based view for tabs. I had to tweak its configuration a bit to make it usable, turning off opening new url in new tabs (if I wanted that, I'd press Cmd-T, not Cmd-L you silly extension!), and tree autocollapse (my monitor is big enough to display all tabs, thank you very much). Give it a try - you might love it, or you might hate it. In either case, UI experimentation is what move the web forward.

Website integration

We're all Web 2.0 now, and that means using many complex websites, some of which benefit greatly from an extension or two. Obviously you'll need a webmail notifier  - it also helps if you're not getting too much spam or otherwise useless messages - and fortunately Gmail filters can make sure this is true. If there are some low-value emails that you might want to keep anyway - like let's say build failure notifications, create a filter to label them with something and move straight to archive.

Next, the lovely Twitter - it's probably past its cool days already, and your mum might have started using it, or will do so soon, just as happened with Facebook and countless other social sites before that. Echofon seems like a fairly decent Twitter extension - except you really need to turn off popups, and reduce frequency with which it checks for new tweets, or you'll get ADHD from it, or maybe even Aspergers.

Another Web 2.0 website - actually it might have been the first "Web 2.0" site ever, it's that old - is delicious. They have an official extension, but it tries too many things - so install it, switch to "Classic mode", and remove all its icons from toolbar and statusbar. Much saner this way. Cmd-D will work just like it's supposed to, and everyone searches bookmarks by going to the website anyway.

If you have too much time, you might want to install StumbleUpon. Unlike Reddit, Digg and its likes, it provides decently personalized website recommendations. Even works quite well for porn. Or so I've heard.

Web development

Now a few of you don't develop any websites, in which case just skip this section. If you do, you know you need to install Firebug - and that's about it. I tried a few non-Firebug-based webdev addons like Venkman, but I never really liked them.

There are many extensions you can install on top of Firebug. Probably the most useful is FireQuery (thanks for the pointer @sroussey) - which lets you add jQuery to any website which lacks it. And you know what pain in the ass it is to develop or debug websites without it.

Depending on what you want, there are many many more extensions for Firebug - just pick and choose.


I found one extension of the kind I don't really like that much - one which tries to do way too many completely unrelated things at once - but which I installed anyway as it does some really awesome things. That's FastestFox.

There are two features it provides that I really love. One is AwesomeBar extension to do google search as you type, and add google results as suggestions, mixed with browsing history. It is the best thing since... well, since the AwesomeBar itself.

The second amazing feature is endless pages. You know how back in the days of Web 1.0 you had to click Next to get a few more search results, kitten pictures, or blog posts? Now a few websites like will load more results as you scroll to the bottom - which is absolutely awesome, but still very rarely done - probably because it lowers page view statistics, and results in fewer ads being served. FastestFox adds this functionality to every website. Now it's not as smooth as with sites which support this natively, but I already cannot imagine going back to browsing without it - it's that good.

As I said, FastestFox tries to do ten or so other unrelated things which I don't really care about, so I disabled most of them - but try them out, you might find some of them useful.

And a few final tweaks

I rarely use IRC, but I installed ChatZilla anyway, as it's one of the less-annoying IRC clients for casual use.

Probably more due to being freaked out by EFF Panopticlick - try it yourself too - I installed BetterPrivacy addon, even though I doubt it will do that much.

And finally, there's one Firefox setting which I simply had to change, as defaults were infuriating - I switched browser.tabs.closeWindowWithLastTab in about:config to false - so the Firefox window does not close just because I closed the last tab. Seriously, who had ever thought it would be a good idea?

That's it for today. I'll probably update the list when Firefox 4.0 gets out. Enjoy your Firefox.

Tuesday, January 26, 2010

Diversity of genetic code

I love you otter by splityarn from flickr (CC-NC-SA)
We've all seen the "standard" genetic code - a big table showing which of 64 combinations of 4 RNA bases results in which of 20 amino acids, or the stop codon - it's in every single biology textbook these days. What's rarely mentioned more than in passing is how diverse genetic code really is.

Here's the table I made based on data from NCBI (color-coding entirely random, in case you're wondering; first base left, second base top as usual):

For something supposedly universal, there's surprising amount of variety - a quarter of positions, or 12 of 48, vary. Wait, have I just said 48?

I'll explain. The genetic code is based more on 2.5 nucleotides than on 3. Depending on organism, in something between 7-9 of 16 cases the first two codons fully determine the result and the third codon doesn't matter at all.

No organism is able to tell U from C in the third position, even attempts to make them do so with genetic engineering failed so far. So at most there are three possibilities - UC vs A vs G.

Of these UC vs AG distinction is very common. Most organisms (not even all) can distinguish A from G in third positions occasionally, but they rarely really bother and these distinction are particularly unstable - not a single one of them is universally followed. When A is distinguished from G, usually it's as part of UCA vs G pattern, full three-way discrimination is rare, and UCG vs A even more so.

Some observations:
  • All codes move 3 nucleotides at a time, and output 1 amino acid. Except even that isn't universally true - it's not shown in this table, ribosomes have ability to take 4 nucleotides instead of 3 in some cases, and for some organisms this is used fairly often, in as many as 10% of all genes. A really good article on origins of life explains how 3-nucleotide code could have plausibly evolved from RNA world.
  • All codes have codons for each of 20 standard amino acids and stop codon. None seems to have given up on any amino acid, even mitochondria. Something that's not shown here is that a few organisms also code for extra two amino acids - selenocysteine (UGA) and pyrrolysine (UAG).
  • While all codes have one or more stop codons, none of the stop codons are universal, and they're frequently reused for other purposes.
  • Start codons are so messy and so context-dependent that I didn't even bother including them in the table. The official story that AUG=Start is not terribly accurate even in humans.
  • Most of the variety comes from mitochondria - they are in highly peculiar situation of having their own translation mechanism, but very small genomes. A change of code won't affect that many genes, so it's not as likely to cause instant death.
  • Other organisms with tiny genomes - small viruses - use translation system of their hosts, so they must obey hosts' codes. Some viruses like Mimivirus have some genes related to translation mechanism, but such viruses have also huge genomes, so they cannot easily change their code.
  • Some variety comes from normal free-living organisms - but these tend to be more minor, usually one of stop codons is reused to code for some amino acid - one of the 20, or as mentioned before selenocysteine or pyrrolysine.
  • In all likelihood the table will only become more messy as we research more organisms. And we can manipulate the code to make organisms incorporate some even weirder amino acids, so if we included both natural and engineered code, it would be messier than the source code of X11.

Saturday, January 09, 2010

A modest proposal for climate change treaty

Important Kitty Tip by fofurasfelinas from flickr (CC-NC-ND)
For a moment, let's forget questions like whether rapid reduction of greenhouse gas emissions would be sensible or even possible, and about alternative approaches. What can we do if we're serious about reducing emissions really fast? Let's use perfectly logical method of elimination to see what's left once we eliminate the impossible.

First, it should be obvious that no country has either interest or ability to do it on its own, or even together with a small group of other countries. Let's say even as much as half of the world, at enormous cost, overhauled its economy to be entirely emission-free by the next year. Suddenly the world would have immense amounts of oil, coal, and gas without anyone there wanting to buy them. The price would drop, demand from the still-emitting part of the world would increase, and new equilibrium would be established - not necessarily at emission levels so significantly lower. As an added bonus, a lot of manufacturing and other carbon-intense industries would simply move - yes there are tax solutions to reduce this part, but modern governments are incapable of dealing with even outright tax fraud by major corporations, so I'm highly skeptical about that; and in any case it's only one part of the problem.

Parfait by meantux from flickr (CC-NC)
Kittens in poor countries will emit more CO2 as they get basics like fresh water

What's worse - however small was the interest that the emitting countries had before, now their economies are much more dependent on cheap fossil fuels than before; they have new carbon-intense industries; and with emissions reduced by someone else they care even less about global warming than before. Just in case you think this scenario is purely hypothetical, stupid, and there's no chance of it happening - we had a mild version of it called Kyoto Protocol. Some developed countries agreed to barely stop increase in their emissions, and everyone else took advantage of the suckers. Total world emissions increased by 41.7% 1992-2008, with China's and India's more than doubling. America had a boom for SUVs and increased its emissions by 16.8% even though they could have cheaply avoided it all by just better fuel standards. Meanwhile a lot of manufacturing moved to countries without emission limits (Kyoto Protocol wasn't the main reason for it, but its clear which way its influence went on the margin).
cat car by Friar's Balsam from flickr (CC-BY)

Meanwhile kittens in rich countries emit CO2 by driving big cars

And don't even hope for voluntary drastic reductions in emissions - China promised to increase its emissions by only 40% by 2020... and that's considered major progress. India won't even promise constrained increase - anyone wants to bet how much time it will take till their emissions double? Obama is free promise whatever he wants, he won't be able to pass anything meaningful through lobbyist-dominated Senate, and whatever little he manages to get passed, Palin's administration will revert anyway.

Such piecemeal solutions just won't do. We need to have everybody on board - either voluntarily or by force. We can temporarily excuse very small or very poor countries, but there's simply no way to have a meaningful reduction treaty without developing countries like Indonesia and Pakistan on board. Unfortunately we cannot really force them to comply. If everyone else was cutting their emissions except for Sierra Leone, they could be beaten into submission with some economic sanctions or a few cluster bombs. Oh yes, I'm curious how willing are pro-emission-cutting folks to bomb countries which continue emitting? But even if we're willing to bomb, short of World War III there's no way to force China or India to do anything, and good luck with even mid-sized countries like Algeria and Brazil.

Unfortunately the set of countries hardest to force into agreeing to severe emission limits is almost exactly the set of countries which emit the most and whose agreement we most need. Now while it wouldn't be entirely impossible for such countries to agree to severe limits out of concern for planetary common good, it's about as likely as a bird baguette-bombing LHC. One such event per century and we already had ours. No, any realistic treaty must pander to biggest emitters. And here's my modest proposal:
Let's make the best estimate of what everyone's 2010-2020 emissions would be without a treaty. Subtract desired percentage. That's how much permits everyone gets, now go and trade.

Yes, it means rich countries get to emit a lot more than poor countries. And less efficient countries like Australia get to emit more than more efficient counties like Japan. And countries which were going to cut anyway like EU get to emit less than countries which weren't that committed like USA. It really sucks. But do you think you can have them agree to such limits otherwise? If poor countries want to increase their emissions - and they'd all love to do that, they will have to buy emission permits, with hard money. By the way targeting 2020's emissions or such is necessary as there's no way to get India to agree to 2010's emissions, let alone EU's favourite 1990's level - well we could bribe them, but then we can as well give them emission permits as a bribe.

It would have to be enforced hard - every country which tries to emit past their limits must be made to suffer. Because the treaty is advantageous to all powerful countries, as long as the poor countries are divided it wouldn't be too hard to enforce - definitely not anywhere as hard as enforcing it against China or USA. Threat of economy-crippling trade sanctions would absolutely necessary, they would most likely have to be actually applied a few times or the threat wouldn't work. It might very well require some bombing or even an outright invasion every now and then. But surely, there will be plenty of volunteers to fight for the planet, right?

Volunteers to invade countries emitting too much CO2, artist's conception

Now the Guardian/New York Times reading crowd will surely reply "what about social justice" and nonsense like that. But first - how likely is it that Chinese Politburo or American Senate or Indian voters wanting to finally get their Tata Nanos are going to care about your idea of social justice? You can probably guilt them into parting with some of their money or emission permits, but there are hard limits on how much you can get - they have all the power, and countries like Tuvalu have none. And second, I find social justice arguments unconvincing and annoying. Some arbitrary class of people - in this case those who happen to be born in developed countries now - are blamed for what their grandparents did. Somehow this is always selective liberal self-hatred - you'll never see the New York Times blaming modern Arabs for their ancestors running African slave trade, but affirmative action following the same logic against white people is somehow considered fine. And only negative externalities of Western economic growth are considered!

What are total externalities of Western economic growth, starting from Industrial Revolution and its coal? Yes, carbon dioxide levels in atmosphere increased, and so did sea levels; but standards of living of everyone are drastically better than they were in 1800, not only in rich countries. Back then an average Indians lived 25 years (it's 65 now), one baby in three didn't last until its first birthday, hereditary dictators ruled the world, nobody could read, people were forced to marry their cousins at age of 12, and wars were a constant fact of life. Now we're all healthier, richer, safer, longer-living, and more free than ever. We're even far smarter than our ancestors, all thanks to modern economy!

You think it would be better to be a Medieval serf in a low-carbon economy than live with some temperature increase? If so, there are still a few places where you can fulfill your serf dream. If not, stop the bullshit that industrial development had net negative externalities. They were highly positive, and in fact it would be more "socially just" for poor countries using technology developed by us to pay us - something they will actually do if my modest proposal passes.

Poverty begets corruption. Corruption begets poverty.
On the other hand giving poor countries huge emission permits is not only politically unrealistic, it would also have severe consequences. Poor countries have almost all highly corrupt governments. Giving Angola free money or valuable emission permits wouldn't do much good to an average Angolan, but would surely make their politicians rich. It might also start a few coups, as which general could let an opportunity to get a tens of billions of dollars pass just like that. We have long history of throwing money at the problem - and it doesn't matter if it's aid, loans, or payment for oil and other resources - the end result is authoritarian corrupt governments and frequent military coups.

There's one more issue here. With perfect knowledge carbon tax and carbon permits are equivalent. But our knowledge of the future is highly uncertain - carbon tax means unknown emissions but known price - and is in every way better for the economy, as predictable long term prices make investments in reducing emissions safer; while carbon permits make emission known but price highly unpredictable. Now's the good bit - if technology optimists like Krugman and the entire Guardian/New York Times crows are right, permits will get very cheap very quickly, so amount of money poor countries will have to pay will be fairly insignificant - they might be even better off on the net thanks to new technology developed thanks to incentives for emission cutting. It's not entirely implausible, as that's what happened with sulphur dioxide cap and trade. On the other hand if energy pessimist like me are right, and technological progress will be too slow, poor countries will have to pay a lot. But that shouldn't concern you because you don't believe it could possibly happen, right?