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

Wednesday, April 28, 2010

Boobquake experiment is bad science

Mimi Catblue Dynamite by evilfenn from flickr (CC-NC-SA)


In spite of my best attempts I couldn't find any relevant cats, so as a next best thing I included some catgirls possibly participating in the Boobquake experiment


I'm as appalled by low standards of modern science as cleris Hojatoleslam Kazem Sedighi is about skimpy female outfits. And yesterday, we both had a chance to be outraged at the same thing - boobquake experiment makes travesty of science!

Background

The conflict comes from a long accepted paradigm of natural disasters, which explained them as God's punishment for human sins. Research supporting this theory goes as far back as the famous Lot's experiment [Gen 19], and countless other papers of similar antiquity. It has been very widely believed until even as recently as mid-18th century, when it was the most commonly believed explanation for the 1755 Lisbon earthquake - according to sources of the time supposedly due to slutiness of Portuguese women, and other human sins.

This paradigm has been largely replaced by current naturalistic paradigm which claims such events are mostly "random" and have no particular reason - replacement motivated more by wish to remove God from the picture than by any hard scientific data, and by crude analogy with cases like creationism vs evolution in which similar removal of God was actually supported by large volume of evidence.

So it should be no surprise that if even a well researched case of evolution still has many doubters, it should be even more true for less researched case of causes of earthquakes and other natural disasters, where the main argument is compatibility with Western secularism.

Given all this, we should be grateful that someone finally tried running an experiment to check the sin theory of natural disasters. Unfortunately the experiment was so far from standards of good science as to render it totally unconvincing.


What went wrong with Boobquake experiment

The boobquake experiment was an attempt to test the sin theory of natural disasters by having a large number of women wear sluttier outfits than usual, make God angry, and cause increased number of earthquakes.

Before even looking at its scientific value we should notice that such experiment grossly violates modern ethical standards by risking lives of countless people who didn't volunteer for it. In the future it would be prudent to at least limit such experiments to a singre geographic location, where all sinners would group before commencing the sinning - and which non-sinners would be able to evacuate in advance.

Now, for the experiment. No attempt was made to establish baseline sin level, or even baseline outfit skimpiness level - and unfortunately we have no way of knowing how large was the change due to boobquake relative to the daily fluctuation of sin. Even the most basic estimates suggest the effect to be minor - supposedly about 200,000 women tried to wear sluttier than normally on that day - such number is far below changes in a single country known for sinning like Sweden due to daily weather variations. Experiment also takes place in the aftermath of Eyjafjallajökull eruption (believed by some to be caused by the deadly sin of greed of Icelanders) - which caused major disruption of tourism, and it is universally accepted that people sin a lot more during holidays.


Moreover, this sample was not random. Experiment participants have been self-selected, and we have reasons to believe that people particularly unconcerned with God's wrath, and therefore with higher than baseline sinfulness level - probably constituted vast majority.

While data on most participant is missing, comparison between be the supposedly "most scandalous" outfit of the main researcher she wore during the experiment with her profile photo causes serious doubts, as they're about equally revealing.




In addition to lack of statistical soundness, and sample randomness, no attempt was made to blind the experiment. This difficulty is inherent, as God's omniscience makes proper double-blinding impossible, but participants knew well in advance that they're assigned to treatment group, so they may have consciously or subconsciously reduced their other kinds of sinning, a blatant violation of basic rules of scientific testing that would pass no peer review. What's worse, no attempt was even made to establish a control group!

Now it could be argued that blinding participants would be difficult - or that sinning requires conscious action, so both treatment and control groups would be equally in state of sin by even risking wearing revealing clothing - but this difficulty is present in many experiments, and at least serious attempt should be made to reduce placebo effect when it cannot be fully eliminated. Numerous examples of women wearing clothing far more revealing that they thought easily found on the Web suggest this kind of blinding is not fully impossible.

Not only experiment was of dubious quality, the hypothesis tested is far from the standard theory of sin causing natural disasters. Now the theory has many variations but even the basic Sodom and Gommorah version clearly disagrees with research assumptions:
  • Assumption was made of no delay between sin and punishment, while the theory says punishment only comes after sinning.
  • Assumption was made of near-linearity between sin and punishment, while the theory says God was willing to spare Sodom and Gomorrah if even as few as ten righteous people were found.
Given all these problems, the Boobquake experiment brings essentially no new knowledge to the discipline of causes of natural disasters, and we can only hope that future experiments are better planned, with better design, better experimental controls, and detailed publicly available photographic documentation of sinning.

Catgirls, CascadiaCon, Seattle, WA by djwudi from flickr (CC-NC-SA)


With baseline like this, it is dubious Boobquake really changes average sinning level much

Related research


While Boobquake is clearly bad science, a much more relevant research was done by IPCC reports, which claim that we can expect high correlation between global warming and extreme weather effects.

This strongly confirms sin theory of natural disasters, as warmer weather causes many women to wear more revealing outfits, the results being among others "increased droughts, tropical cyclone activity, and tsunamis" (but curiously no mention of earthquakes).


Now correlation doesn't equal causation, and IPCC research doesn't directly test the sin theory, but it arguably provides stronger evidence than Boobquake experiment.

In the future, one would hope solid systematic research is done on variations of female outfit skimpiness - an area that has long been ignored by mainstream science.

Tuesday, April 27, 2010

Weekly review checklist

Bohu & Tohu  (3 months old) by Gattou/Lucie from flickr (CC-SA)


Here's a quick list of steps to get my GTD system up to date. It differs somewhat from vanilla GTD, but so does everyone else's.

Preprocessing:
  • Go to mailbox, read all unread mails.
  • Go to mailbox, preprocess all blue-starred items. I use two kinds of stars: blue star means it's inbox item, yellow star is just to find an email quickly, and all activity related to it is tracked.
  • Preprocess every single item in paper inbox.
  • Go to both software repository (private and work), and commit or trash everything. If it cannot be completed right away it deserves an inbox item. 
  • Preprocess every single item in inbox directory. On Linux I used ~/inbox, on OSX I normall just put stuff on desktop (and omg, I get my desktop to totally clean and empty regularly, I really do)
  • As result of this preprocessing everything is in the GTD system - currectly OmniFocus, but most is still crap.
  • A bit more preprocessing - quickly scan everything and mark completed items as done, do less-than-2-minute actions (the only reason such actions are even on the list is because they have been blocked before), mark completed waiting-fors as such - each such completion might trigger addition of extra stuff to inbox. The reason I do this is to save some sanity.
  • Now the big decision - look at my projects and other lists and decide if they are reasonably clean or a hopeless mess. If they're reasonably clean, leave them for now. If they're a total mess, move absolutely everything to inbox.
Processing - every item in inbox is processed. As everything is in one place and obvious trash, loudest items etc. has been mostly dealt with, there shouldn't be that many distractions - but they do happen.
  • What the fuck is it about?
  • Is it already done? If so, mark as completed.
  • Do I still even care? If not, delete.
  • Is it waiting for? Tag as @Waiting and move to appropriate project.
  • Should I push it to someone else? Write email right away and @Waiting
  • Is it a shopping item? @Shopping and move to appropriate project or generic "Area of Focus : Shopping" list. There are no specific subcontexts for shopping - I buy everything online including groceries - 90% of my shopping is Tesco online + Amazon online - and the main challenge is minimizing number of separate deliveries to reduce cost and annoyance. If I'm out for some reason anyway, I'll take a look at the list to see if there's anything I can buy on my way.
  • Is it calendar item? Move to calendar. I have very few of those so I'm using OmniFocus for calendar - it won't work well for most people.
  • Is it a random URL I might want to read someday? Move to "Someday/Maybe : Reading" list.
  • Is it a random idea I might want to follow through someday but not now? Move to appropriate sublist of Someday/Maybe.
  • Is it a well-defined action already? Is it simple enough to get it done in a few minutes? If so, do it (that might trigger another inbox item).
  • Is it a well-defined action that will take longer or I cannot do it right now because of wrong context? Move to appropriate project.
  • So it's something complex...
  • What am I trying to see accomplished anyway? If I'm very unclear about it, I might convert it to a new project + some @Mindmap / @Research actions.
  • If I'm clear about outcomes, do I want to move forward with it? If not, clarify description and move to one of the sublists of Someday/Maybe.
  • Am I clear about the next action? If so, turn this into a project, and put such action there.
  • If I'm not clear about next action, turn it into a project + some @Mindmap / @Research actions.
At this point inbox should be empty.
  • Go through project lists, make sure all projects have adequate actions. Some projects might already be completed, in which case mark them as complete.
  • Quickly go through contexts lists and make sure everything is sensibly contexted. Current list of contexts is: @Blocked @Calendar @Computer @Home @Linux @Mindmap @Outside @Research @Shopping @Waiting @Windows - but I change it if I need to.
  • Take a quick look at Someday/Maybe if there's anything I want to move forward soon. Usually there isn't, or at least not much.
After all this is done, I should be able to stay sane for a few more days.

Monday, April 26, 2010

What should South Korea do now?

Nothing. Now the highly relevant Starcraft playing cat and kthxbye.

IMG_0093 by UnstoppableDrew from flickr (CC-NC)

OK, you might be wondering why I think anyone would want to do nothing when another country sinks your ships and otherwise behaves provocatively for decades.

The first part of the answer is economy - entire economy of North Korea is worth PPP $40billion. That's about as much as Alaska or Luxembourg.

Other countries which might take part in conflict - some on South Korean side, some neutral, none on North Korean - are worth:
  • South Korea - 34x as much
  • Russia - 54x as much
  • Japan - 110x as much
  • China - 200x as much
  • USA - 350x as much

If everyone had similar levels of military spending as part of GDP, North Korea would be one big pile of rubble before I even had my second coffee. Now this isn't true, North Korea is the most militarized country in the world. It's hard to get good estimates, but according to some figures ratios of military budgets are:
  • South Korea - 4x
  • Japan - 8x
  • Russia - 10x
  • China - 13x
  • USA - 125x
It shows how insane North Korea is by even trying to catch up with its neighbours - some of which are low military spenders like China, and Japan; others are high military spenders like Russia and USA (and that "high" is still lower than countries like Greece), South Korea is surprisingly sane 2.7% considering environment it is in.

So there's absolutely no way North Korea can hope to actually "win" the war, if it actually started.

War is bad for economy

These ratios don't tell the whole story. Not only is North Korea ridiculously poor - it is about as poor as it was in 1953 and not improving at all.

South Korean economy is growing rapidly. Chinese economy is growing explosively. Japanese and American economies are growing - maybe not as quickly as those, but they reliably grow. Russian grows and shrinks as commodity prices change, that's a story for another post. And what about North Korea? It was doing fine until 1973 - at which point is was still better than the South - when it hit a wall, and stopped growing for tho decades, and then collapsed hard when the entire Communist world crashed in 1991, getting worse every single year ever since.

North Koreans are desperate. With each year, their chance of not winning but even putting up a good fight is diminishing.

This, paradoxically, means that everyone else would really really want to avoid a war. If you're getting richer and richer, while your enemy is getting more and more fucked up - why speed things up? Sure, militaristic dick waving looks good on TV and can get you some extra votes - but if you're anything resembling rational you'd prefer to postpone the conflict - assuming you want one in the first place.

How empires are built



This grow-economy-and-wait approach is how empires get created. Did Brits try to engage in European Continental Wars? They mostly let the Continentals bleed each others, while they kept themselves safe with the Royal Navy, picked only easy fights, and let the stability led to explosive economic growth which eventually led to their global domination.

That's how American Empire started as well - other than the infamous 1812-1815 war with Canada Americans mostly stayed isolationist, picking up Indians and growing their population and economy - after all other empires bled themselves to death twice USA became the world superpower by default.

A quick aside - it is commonly incorrectly believed that America has seen significant fighting in two world wars, or like ever. In the First World war it was rather laughable - Americans joined when the war was nearing the end, and by the time Americans reached Europe, it was over. Even countries like Bulgaria and Romania had seen far more fighting.
That of course without civilian deaths, Spanish flu deaths, countless wars following WW1, and such. WW1 was essentially Germany+Austria vs France+Russia+Britain.

WW2 was even simpler - being basically Germany vs Soviet Union, with a second unrelated front of Japan vs China - Americans and for that matter British had very little active role in either.
And the entire Western Front? For German soldiers fighting Soviets getting sent to the Western Front was like getting sent for holidays. The only reason Western Allies even managed to land in Europe was because Nazis were forced to move everyone they could to fight the Ruskis, and there was barely anyone left to defend anything.

America didn't get its empire by winning wars - it got it by not getting involved in wars too much. Lend-Lease , the Marshall Plan, and a few successful CIA operations here and there did far more for the empire than the actual military, which is only good at bombing whoever cannot defend themselves.

And this is precisely what all East Asian powers do. Why even bother spending buckets of money on armies? Japan and China have ridiculously small armies by international standards. Taiwan and South Korea are closer to world average - but considering what kind of danger they're facing close-to-world-average shows incredible levels of restraint. No, they just sit there quietly, making shoes, building iPhones, drawing tentacle porn, steadily growing their industries to catch up with the West - time is on their side.

And starting a war now? Not only your odds are worse than in foreseeable future, you risk messing up with your economic growth. There's nothing particularly Black-Swanish about it - wars take much more time and much more money than anyone predicts more often than not. Ask Americans about Afghanistan. Or Soviets about Afghanistan. Or Brits about Afghanistan. I'd like to see a list of wars which were actually won on budget - it would be a really short one I believe.

A small distraction - nukes

Every discussion of North Korea invariably gets sidetracked into an entirely irrelevant issue of nukes. Here's the only funny Subnormality strip ever:
Strip from Subnormality. Fair use.
This is highly accurate. Nuclear weapons never had any use. Manhattan Projects was a highly misguided idea of getting nukes to get long term strategic advantage over the Soviet Union - Japan never being a serious threat - and it lasted only 4 years before Soviets managed to catch up.

And as far as everyone knows, North Korea does not have nuclear weapons. Yes, they've probably managed to setup a nuclear explosion, but amount of damage a few tiny nukes without proper ICBMs can do is fairly low compared to the power of conventional artillery aimed at Seoul right now. This is the same mistake Nazis did with V2 - sure, they were cool, but they cost so ridiculously much compared to spending the same amount on conventional hardware Alies were very probably very happy about them.

Projects like North Korean nukes and V-2 are not military projects. They are half propaganda, and half massive cases of optimism bias in planning.

And even if North Koreans had large number of good nukes on good missiles, it's not at all certain they'd use them. Everyone during the Second World War - and you don't get more total war than that - had massive stocks of chemical weapons. And yet, they weren't used at all. At least against people who could retaliate in kind - Japanese had no qualms about mustard-gasing Chinese, just like Brits had no qualms about mustard-gasing Iraqis, and so on.

Demographic transition


And now we're getting to my main point - why South Korea is extremely unwilling to take part in any war. Unlike Americans, who can sit at home, eating supersized burgers, and drinking gallons of HFCS-laced soda while their missiles drop on Pyongyang, or even Japanese, Chinese, and Russians, who might get a few missiles here and there but will be mostly fine - the largest population center of South Korea is just 40km from the border. It doesn't require fancy guided ICBM to kill someone - a totally straightforward dumb howitzer can reach it just fine, and good luck evacuating a 25M people big metropolitan area in a hurry.

If war starts, there will be blood. Now you might be wondering - what happened to the world that it's so unwilling to have people die? Countries used to be totally blasé about a few thousand of their citizens here and a few thousand there dying. In some places like Afghanistan and most of Africa this is still the case. Yet - most of the world is highly unwilling to risk that. Even when wars take place - ridiculous amount of money is spent on protecting their soldiers' lives.

And the simple answer is demographic transition. In countries with high birth rates life is cheap. So what if someone dies? If your son dies, you make another - it's not terribly hard. Yes, you'd rather he didn't, but on the scale of most important things in life a small chance of child's death is not that high.

On the other hand once demographic transition happens, people have fewer children and have children later - it's all different. People spend ridiculous amount of money and effort on their children, are highly overprotective (limiting children's liberties in process, but that's another stories), and under no circumstances would they be willing to risk death or injury due to politics. And if your child dies? Not only you lose all investment you put into them, you are probably too old to have any more children, and your grandchildren aren't coming. There is probably some deep Darwinian reason why it works like that, I won't be getting into this - but the correlation between demographic transition and unwillingness to risk your lives in war is huge.

Notice this doesn't apply about lives of others - Americans don't give a shit if a few hundred thousand Iraqis here and there die; Israelis don't give a shit about bombing a Palestinian school here or a hospital there - seriously, who cares about "them" as long as "we" are fine?

Here's the best test case - WW1 and WW2. In 1913 total fertility was 6.3 in Russian, 3.52 in Germany 2.93 in UK, and 2.47 in France - they were at different stages of demographic transition, but still long before the point at which lives become scarce. So who cares if a million young men die meaninglessly in trenches?

In 1938 it was very different. Russia (I wonder how gapminder draws boundaries from these times, anyway...) was at 4.74 - still in the "so who cares if a ten million of our citizens die?". Germany was in "we should put serious effort into blitzkrieg - a few deaths due to quick war are acceptable, but painful" territory with 2.25. But France and UK were already well into "surrender if you can see tanks from Paris/London" territory with 2.13 and 1.84 - the only reason UK didn't surrender was its ability to wage war remotely, protected by the Royal Navy. And just look how ridiculous was their overreaction to small amount of bombing. So 43 thousand civilians died? These numbers are a rounding error compared to what was happening on the Eastern Front or in Asia.

Likewise Japan was very Kamikaze-happy with its 3.88 fertility rate - something Americans with their 2.22 would never try.

Once fertility drops, anyone's willingness to fight does too. And that's why we have so few wars in post-demographic-transition world. You still think I'm making this up? Look at fertility rates top 10:
  1.  Niger - somehow managed to get away with just a few coups, and some minor Tuareg rebellions.
  2.  Guinea-Bissau - had civil war 1998-1999
  3.  Afghanistan - had a war or another every year since 19th century.
  4.  Burundi - had civil war 1993 to 2005
  5.  Liberia - one civil war 1989–1996, another 1999–2003.
  6.  Democratic Republic of the Congo - managed to pull one of the top 10 bloodiest wars of all times, just a few years ago; not counting minor ones.
  7.  East Timor - decades of fighting against Indonesia.
  8.  Mali - doing surprisingly well for the list, just some spillover conflicts from neighbouring countries and minor fights between government and Tuaregs.
  9.  Sierra Leone - civil war 1991-2002.
  10.  Uganda - one war, another civil war, plus participation in the Congo bloodbath on top of that.
And this is what the entire world looked like most almost all of human history. So who's on the other end? This is actually pretty good.
  1.  Macau (PRC)
  2.  Hong Kong (PRC)
  3.  Singapore
  4.  Republic of China (Taiwan)
  5.  South Korea
  6.  Japan
  7.  Montserrat (UK)
  8.  Lithuania
  9.  Czech Republic
  10.  Belarus
So other than some tiny territories - the lowest fertility and therefore least belligerent counties are exactly the most interested ones - South Korea and Japan.

By the way Czechs and Lithuanians are somewhat overstated here - they have fairly large migration to Western Europe, and many of their babies are born abroad. Their fertility is low, but not as drastically low as implied by the rank.

And no, North Korea isn't likely to be terribly trigger-happy either. Their fertility rate is 1.85 - soldiers will be difficult to replace. Not to mention they'll lose the war in a week.


Conclusions

South Korea should go to UN and get some sternly worded letter from Security Council and let it pass. Far more people could be saved by replacing a busy crossing with a roundabout than by stopping North Koreans from sinking your ships (or for that matter, stopping bin Laden from flying planes into your buildings).

Every argument shows that South Koreans win nothing by going into the war, and they will find loses unacceptable.

Now that I made Greeks and Koreans hate me, it's only 190 or so nationalities to go.

Saturday, April 24, 2010

Notes on personal experience points system

Gimme gimme by fofurasfelinas from flickr (CC-NC-ND)

Here's a very quick post. I tried to run a personal experience points system, with software described in this article. I tried something like this before, it was described here on lesswrong.

So, the notes:
  • As I'm writing this, I have level 6 IRL avatar (251 XP)
  • In general, it didn't work terribly well. This isn't in itself a bad thing. As Edison said after failing and failing repeatedly "I have not failed. I've just found 10,000 ways that won't work", and then proceeded to steal Tesla's work.
Urgent vs important:
  • So one thing I learned doesn't work are big rewards for things I know I'm going to do at some point anyway. If I can get 25 points today - or play some video games today and I will get these 25 points in a few days anyway - this provides zero marginal benefit. It's just like people who always want to quit smoking next week.
  • With small recurring items like exercise - motivations due to these points sometimes managed to be just enough to push me in the right direction when I was undecided between doing that and doing something else.
  • I thought the system just doesn't work that well - but there was one exception. The "keep leechblock on whole day" item was a resounding success - at least at making me search new sites to waste time on but never mind that - somehow this urgency really works.
  • It seems faux urgency drives me more than actual importance. Unfortunately most important things in life are long term and not terribly urgent.
  • This is all because I am a one-marshmallower. I have no doubt that in the marshmallow experiment I would just eat that damn marshmallow right away - while children who waited would get another one, be more successful in life, and then get type 2 diabetes due to eating so many fucking marshmallows.
  • By the way, standard economics with its silly exponential discounting of time cannot explain this urgency - but it all makes a lot more sense if you use hyperbolic discounting. And life is definitely hyperbolicly discounted - if you doubt it ask the Egyptian pharaohs who prudently granted land to their temples so that it would maintain priests who would pray to the gods for them until end of time how is compound interest working for them. Exponential function is merely a mathematical artifact, nothing more.
User interface:
  • Scripts to record XP-able actions are not terribly annoying. This makes the most awesome keyboard in the world even more awesome. I'm wondering if it would be better to get it integrated with OmniFocus inbox, but annoyance is low enough for it to not be worth the effort.
  • XP bar is nowhere near flashy enough, and slowly filling up bar doesn't provide much motivation at all.
Economics and video games:
  • Video games solve this by giving level-dependent bonuses - unfortunately life is not like that, and I cannot think of any meaningful ways of granting myself a level bonus (also see the point about one-marshmallowing).
  • One way to think about would be compound xp interest - increase my XP level by some % every day to restore exponential discounting behaviour.
  • Another idea would be extra XP points for streaks of positive actions - like "3rd day with leechblock on" / "exercised 3 times in the week already" etc.
  • I would really like to find something less blunt than leechblock - the problem is that I actually need to access those websites every now and then for legitimate reasons - and I just want to make sure I don't fall into tvtropes trap (I accidentally clicked on this link and tvtroped myself dammit).
So I think I'll try another iteration based with far more urgency in it. Let's see how it works out.

Friday, April 23, 2010

How to configure OSX for software development

Grimlock vs Munkzilla by Fanboy30 from flickr (CC-NC-SA)

In my previous post about OSX and Linux I mentioned that I maintain a very long document explaining how to turn a fresh OSX into something usable for software development and general use. Well, here it is - but be warned I only mildly cleaned it up.

This is all based on OSX 10.5 Leopard. For some reason OSX 10.6 Snow Leopard crashes like Windows 98 - at least once a day - and I cannot work like that, so I downgraded back after the upgrade. This seems to affect quite a few people, and 10.6 enhancements are nowhere near good enough to deal with such crashes.

Install all necessary applications

First of course - upgrade the system, as installation DVD is always rather outdated. Then install applications - this is more difficult than apt-get line, so here's list of links, sorted by category. All is open source or at least free download unless noted.

Browsers:

Drivers:
  • MacFUSE - drivers required by NTFS drivers
  • NTFS-3G drivers - NTFS is essentially the only reasonably portable filesystem for external drives as FAT doesn't support files larger than 4GB.
  • Arduino drivers - ok, you most likely won't need these.
  • Microsoft Keyboard drivers (I like binding those extra keys to something useful - Mac doesn't even see them by default). You won't need it unless you have Microsoft Keyboard or care about such extras.
  • Perian - a pack of media codecs.
Software development:
  • Xcode - this is a bundle of gcc and other development essentials - but instead of giving it a straight download Apple hides it under registrationwall on some horribly failful page.
  • TextMate - the only reason I even use Mac. Only trial version is free.
  • Xulrunner - Firefox-based environment in which you can make your own XUL-based applications
Basic system functionality:
  • Witch - it fixes alt-tab to work. Alt-tab is broken by default in OSX, has always been, and they don't plan to fix it ever - so this is absolutely essential. It's supposedly a trial version
  • Unarchiver - Mac supports most common archive formats, but you will need this sooner or later.
  • mysql - I don't remember exactly what was wrong with MacPorts' version (it was long time ago), but due to some brokenness I use this DMG version.
  • MacPorts - however much it sucks, it's absolutely necessary. Fink might seem like a nicer (apt-get based) alternative, but it just lacks most packages, and mixing them is a recipe for fail.

Internet communication:
  • Adium - multi-protocol IM program
  • Skype - another IM program (Adium doesn't support Skype) - these two should cover all your IM needs
  • Transmission - all bittorrent clients for OSX suck, but this seems to suck relatively less.
Desktop applications:
  • OpenOffice.org - there's native version these days, or at least decently native-ish
  • Stepmania - if you're into DDR
  • VLC - music player (OSX version of mplayer isn't as good as Linux's, so it's nice to have a backup)
  • Xee - image browser (OSX has none)
Others:
  • Growl - notifier system
  • Isolator - a really nice gadget which lets you blur all but active window, if you need to concentrate.
Pamuk & Pebbles by Sil & Hasenbande from flickr (CC-NC-SA)


System settings

After basic applications are installed it's useful to create some symlinks that make OSX more Linux-compatible (sudo ln -s /Volumes /mnt; sudo ln -s /Volumes /media; sudo mv /home /home-old; sudo ln -s /Users /home) in case your scripts or you want to switch seamlessly between the two.

Then clean up the dock - it's filled with every stupid Apple program ever made (Garage Band ...), except for the most useful one (Terminal). So remove everything you won't be using, add all you will be (start application; right click; "Keep in Dock"), and mark applications you want to start when you login as such - typically Adium/Skype/Terminal/Firefox (start application; right click; "Open at login")

Now here's a long list of configuration tweaks:

  • Settings > Mouse > faster - I wish installer asked me if I have Parkinson's disease or not, or default to assumption that I don't. Protip for OS designers: Most people have reasonable control over they hand movement.
  • Settings > Keyboard > faster - likewise
  • Settings > Keyboard > Use all F1, F2, etc. keys as standard function keys - you use them about 50x more often than laptop controls, and the only common control - volume up/down/zero - has dedicated keys on my external keyboard anyway
  • Settings > Keyboard & Mouse > Ignore trackpad when mouse is present - it was extremely useful, except the most recent update of OSX 10.5 broke it - it's no longer there, even messing with registry file won't give it back
  • Settings > Universal Access > enable - needed by witch driver
  • Settings > Energy Saver > Power Adapter > Performance + no brightness reduction - it's just annoying
  • Settings > Displays > Automatically adjust brightness as ambient light changes > off - equally annoying
  • Settings > Displays > Make external display the main one
  • Settings > Displays > Show displays in menu bar (so you can quickly fix resolution if Mac autodetects it wrong as it does every 10 or so times)
  • Settings > Time Machine > Show Time Machine status in menu bar > off - unless you use Time Machine
  • Settings > System > Play user interface sound effects > off - now to stay sane you absolute need to turn off system bell - this setting needs to be repeated in multiple places
  • Settings > Sound > Alert volume 0%
  • Terminal > Advanced > Audible Bell off
  • Terminal > Shell > Close if exited cleanly - no idea why it's not a default, get rid of useless dead windows
  • Terminal > Window > Dimensions - disable - less clutter
  • Terminal > Text > Antialias text - without antialiasing Terminal.app looks like shit. Not antialiasing in terminal is just like making "look like shit" option and turning it on by default. WTF Apple?
  • Terminal > Monaco 14pt font, line and character spacing 0.90/0.90 - somewhat nicer than defaults.
Because I want access to development console in Safari, I need to mess in registry: defaults write com.apple.Safari IncludeDebugMenu 1.

It's also a good idea to get rid of crash reporter - especially if you develop XUL applications wink wink - defaults write com.apple.CrashReporter DialogType none.

Russian Dwarf Hamster by cdrussorusso from flickr (CC-BY)

Configuring applications and shell

Now let's go to shell and copy my .bash_profile and such.

It's a good time to find that TextMate license and install it.


Then get the most recent bundles:


mkdir -p /Library/Application\ Support/TextMate 
cd /Library/Application\ Support/TextMate/svn co http://svn.textmate.org/trunk .


I have some TextMate hacks which I install at this point - I'll write about them in another post.

Now start Adium / Skype and enter your logins and passwords.

Start Transmission, make sure incomplete downloads are in ~/Downloads/Incomplete/ and are not mixed up with completes. You may also change your share ratio settings at this point if you're an asshole ;-)

StepMania needs a link to songs located on external drive:

rm -rfv /Applications/StepMania/Songs/
ln -s ~/e/Dancing/Songs /Applications/StepMania/

And now install some packages from MacPorts/rubygems/CPAN. This set is related to what I'm working on right now and will probably differ for you - but everyone needs git, wget, unrar, pstree etc.:

sudo port -v selfupdate
sudo port install mplayer unrar ruby19 mc git-core pstree rb-rubygems wget mp3infosudo port install octave ImageMagick id3v2 p5-libwww-perl p5-dbi p5-heap p5-yaml
sudo gem install rak hpricot objectiveflickr url_escape mongrel s3sync mechanize RMagick
sudo cpan Sys::Mmap DBD::mysql Socket::GetAddrInfo

Have fun

At this point it's almost usable. There are some extra steps related to building stuff in my repository, configuring mysql for my applications etc. - all totally me-specific and of little use to anyone else.

Not that the rest of the advice is in any way universal - but it should be a good starting point for you.

Wednesday, April 21, 2010

OSX vs Linux

The Ipad2 is finally revealed :-) by RolfSteinar from flickr (CC-NC-ND)

I hate OSX and yet I use OSX because alternatives (by which I mean Linux, obviously) seem even worse. Here's a very short list of pros and cons as I see them.

Most important things:
  • OSX pro: TextMate. I really cannot use any other editor without feeling physically ill, they just do everything wrong. There are some attempts at getting semi-decent editors for Linux like redcar, but I have no idea how good they are.
  • OSX con: MacPorts - source based distribution systems are just failful, and MacPorts is far more failful than most. It is completely routine that upgrade will leave you with broken packages - neither upgradable nor downgradable.
  • Linux pro: apt-get. I wouldn't even seriously consider any Linux without apt-get for anything.
Extra points:
  • Linux pro: same software on desktop and servers. It saves me a lot of complications, 32bit vs 64bit is annoying enough without OSX vs Linux.
  • Linux pro: better development tools. strace, ltrace, and LD_PRELOAD for example. It is system made for developers by developers and it shows.
  • Linux pro: virtual desktops. Spaces on OSX doesn't work and it will never work as long as OSX stays Application-centric instead of document-centric like Windows and Linux GUIs.
  • Linux pro: better internationalization. Especially if I want to type in multiple languages. There's proper Polish Dvorak keyboard for example. (I remember I once haxored such for Windows 95 by editing binary drivers... these were good times).
  • Linux pro: Amarok. It's vastly more awesome than any OSX music playing program, especially shit like iTunes. Even old Winamp is far better than iTunes.
  • Linux pro: shell. Ubuntu bash has smart tab-completion, command not found suggests what to install, and everything else in shell got as much attention to detail as GUI got for OSX.
  • Linux con: Support for laptop hardware. Last time I tried it, even something as simple as getting external monitor in and out was a massive pain.
  • Linux con: GUI usability: Now that Windows 7 finally catched up, KDE is in general the second least polished GUI, the absolute worst being GNOME of course. It's not just looks, it's all the minor things that make it work seamlessly.
  • Linux con: GUI programming. C++ based Qt, and fake-OO-C based Gtk are both massive pain in the ass compared to even less than amazing Cocoa. There are Ruby etc. bindings for all, but it's just like putting lipstick on a pig. Everyone develops GUI for web these days - that even dealing with MSIE6 and all ridiculous web limitations is still far less pain than desktop GUI programming shows how bad it is.
  • OSX pro: It's prettier. Font rendering is a particularly good example
  • OSX pro: Omnifocus. Every other GTD software I tried was so bad I simply stayed with paper, but Omnifocus suckiness is fairly moderate.
  • OSX pro: Development for mobiles. Right now the only categories of mobiles are iPhones and turdbricks - one needs OSX, the other nobody wants to develop for. It might change in 2-5 years, but right now I need OSX if I wanted to develop for OSX.
  • OSX con: Support for laptop hardware. It's ridiculously bad, even though it's Apple's own hardware. The only way to turn off laptop monitor is by sacrificing a chicken (put computer to sleep; wake it up without fully opening the laptop screen; then maybe it will work, maybe not) - and routine software upgrade broke the "turn off trackpad when mouse is in" option.
iPad stand by Veronica Belmont from flickr (CC-BY)

I see no chance of OSX ever catching up with Linux before I get old.

Linux would need at least a decent editor - and if redcar won't work, I'm out of hope - Emacs and vim are stuck in 80s and haven't improved the slightest since I started using Linux. All KDE/GNOME-based editors are made without any clue.


Laptop hardware support gets better each year, while Mac seems be to getting worse somehow, so that problem doesn't bother me that much. And I can live with ugly fonts and less GUI polish.

I might miss Omnifocus a bit, but that's definitely something I can live without, especially since Omnifocus is OK but not that awesome, and fairly moderate amount of GUI programming should make it possible to make something more or less as good, if only GUI programming wasn't such pain.

So I'm quite tempted to switch to Linux. Am I missing some big pro or con of either system?

Monday, April 19, 2010

How much democracy in your democracy?

Dewey by angela n. from flickr (CC-BY)

As elections in both UK and Poland get closer, I want to write a bit about some severe flaws in modern Western-style representative democracy. Unfortunately it's very difficult to hold a meaningful discussion about such subjects, as far too many things get collectively labelled "democracy".

This is not at all unreasonable, as they tend to cluster together. So rule of law, constitutional limits on government powers, freedom of speech and press, ability to run business independent of government connections, high standards of living, low corruption, regular elections, existence of multiple political parties, and even bicameral Parliaments tend to be present all at once in the same set of countries, or to be absent all at once in others.

Yet, there's nothing causal about this, and this is largely a historical accident. Many people are under impression that the kind of governments we have are a result of long careful thinking, or many experimentations with different government design - and nothing could be further from truth - it's all one big historical accident.

History lesson


Between death of Julius Caesar and establishment of United States, there was only one large country which could be even vaguely described as "democratic" - the Polish–Lithuanian Commonwealth. And like most things in history, it all happened by accident - after the main line of Piast kings went extinct in Poland in 1370, Polish lords figured out that instead of electing a new dynasty, they will be approving every new king one by one.

Normally it would bother the king a lot, as most kings had been obsessed with making sure their children inherit their realm, but Jagiellons weren't that terribly bothered as they had still been guaranteed succession in Lithuania, and Polish lords could be relied on to elect someone from the Jagiellon family if they wanted to keep the Polish-Lithuanian union going. The only thing they had to agree to were fairly modest limitations on their powers - limitations that would get larger and larger with each next generation, and power was shifted further downwards from big lords to wider nobility.

By the time of death of the last Jagiellon in 1572, the system was something like this:
  • There was a bicameral Parliament - upper house Senate (Senat) consisting of major lords and bishops
  • Lower house House of Representatives (Izba Poselska) consisting of representatives of various districts elected freely by all noblemen living in a given district.
  • King was elected for life by all noblemen.
  • All legislation had to be approved by both houses of parliament and the king.
  • No war could be waged without approval of the Parliament.
  • All taxes and tariffs required approval of the Parliament.
  • Before the coronation, the king had to take an oath to uphold basic constitutional right.
  • Polish "nobility" (szlachta) was a very wide social class - comprising of about 10% of population, and in some parts of the Commonwealth as much as 30% (of that only males could vote, not surprisingly) - this is far more than even in most of 19th century republics, the main different being that in Poland this status was hereditary while in most 19th century republics it was based on wealth.
  • There was no slavery as such, but there was very harsh serfdom system in some regions.
  • While Catholic Church still had semi-official status, unprecedented levels of freedom of religion was guaranteed.

This is essentially identical to American system of government as founding fathers made it, and very very close to American system of government as it exists today. Modern American system of government, and also those of other democratic countries - is based on such accidents from a half millennium ago, similar accidents from British history, more accidents from 19th century conflicts between demising landed aristocracy and growing bourgeoisie, and on top of that those due to 20th century's rise of social democratic welfare state.

Is this the only way to organize a democratic state? Not at all! Even a very quick look at Athenian democracy, Roman Republic, and Medieval Republic of Venice - three particularly notable historical example - show how ridiculously vast is the range of possible democratic models. According to some ranks there are 80 or so countries which are reasonably "democratic", but nearly every single one of them a tiny variant of essentially a single political system, with neither theory nor experimentation to show that it's any better than the alternatives, and even outliers like Switzerland are not that terribly far off.

How democratic are Western democracies?

Sarah Palin Political Effigy & Kissy by Laiane from flickr (CC-NC-SA)


It's not terribly difficult to make up some ad hoc stories explaining why this particular historical accidents just "happen" to be the best system possible - every political system, every feature of social organization, essentially everything anyone has ever done had plenty of apologists of this kind.

But can we actually measure it? Yes we can. Let's start with one very simple metric - what percentage of votes did the ruling coalition get. Surely we should expect at least 50%, right? And we would prefer if policies set had support of reasonably solid majority, let's say 55%-60%, instead of the country being governed by what is essentially a rounding error?

Not so! Even without considering tactical voting, electoral systems tend to be ridiculously flawed, and in many countries it is actually completely common for well placed minority to be able to hold control over the government.

Going down the list according to Democracy Index score, ruling coalitions in the top democracies had such shares of popular vote:

So skipping the Swiss, of 20 supposedly "most democratic" countries in the world - governments of only 7 got majority of votes - and this doesn't even account for tactical voting - as I'm sure plenty of Americans would rather vote Green or Teabag, but the system essentially forced them to choose between the two leading parties or staying at home, so all these numbers seriously overestimate actual support for governments.


And even in spite of this overestimation, three governments are so far from majority of votes - UK, Denmark, and Canada - that their inclusion among "democracies" is highly dubious. OK, current situation in Denmark seems to be unusual, but no government in United Kingdom received majority of votes since 1931. And it isn't terribly likely to change - unless a miracle happens in the next elections and in the hung Parliament Liberal Democrats push a Parliamentary reform through.

Three more governments - Spain, New Zealand, and Australia - are still in highly dubious low 40s, and like with UK and Canada this seems to be the norm. So in one third of top 20 "democracies" governments rule thanks to quirks of electoral systems, not thanks to actual popular support - before tactical voting is even accounted for!

I haven't studied all 20 systems in detail, so this might be a serious oversimplification, but it seems to me that we could divide them into 3 groups:
  • Most of continental Europe has proportional representation with mild distortions due to electoral system and low levels of tactical voting - typically government support in high 40s / low 50s
  • UK and its former dominions tend to have first-past-the-post or otherwise highly distorting systems, but moderate level of tactical voting - typical government support in high 30s / low 40s - but once you account for tactical voting often even less
  • USA - first-past-the-post with very high distortions (including routine active manipulation of voting system via gerrymandering etc.) and very high level of tactical voting - typical government support in high 40s / low 50s - but this is mostly illusion thanks to very successful exclusion of third parties, and real support is much lower (not that parliamentary majority in USA matters that much, but presidential elections are about equally distorted)

In other words top democracies are either borderline democratic "rule of the rounding error" of continental Europe, or simply not democratic at all in the British and American world. And in case you think I'm exaggerating about United States - polls show only 23% or so of voters approve of what Congress is doing. I wouldn't be surprised if even Chinese Communist Party and Hugo Chávez had far more support than that.

So if voters have so little influence, what good is Western-style representative democracy? Yes, it correlates with many good things like civil liberties, and general welfare, but which way does the causation go if there is any at all? And shouldn't countries with less voter control like UK and US be far worse off than those with more voter control like Iceland or the Netherlands? Or maybe they actually are... I'll leave that for another post.

Thursday, April 15, 2010

Dating Potential PageRank

2010-04-02-18 by RobynAnderson from flickr (CC-NC-ND)

Some people, when confronted with a problem, think “I know, I’ll use regular expressions”.
Some people, when confronted with a graph problem, think "I know, I'll use PageRank".

Being a member of both groups, I was wondering about all the data analyses okcupid was running - and how can we actually measure dating potential correctly? Using chance of getting a reply to your messages like okcupid's analyses is strongly biased towards Internet trolls who are really good at getting replies - but that's not concern of this post. Let's say we actually have a good measure of how attracted one person is to another (and for simplicity assume it's between 0 and 1, values in between being interpreted as either levels or probabilities).

The problem is that even such simple kind of attractiveness requires a graph analysis - counting how many people are attracted to someone is not terribly useful as it ignores some distinctions that proper graph analysis would catch:
  • how attractive are people being attracted to you? (by recursive graph analysis)
  • to how many other people are they attracted in addition to you (or do they simply have low standards?)
  • is it mutual or are you attracted to wrong kind of people?

What I'm going to do is to turn every person into a website, attractiveness into linking, and compute PageRank on the entire dating market. Scenarios presented here are hypothetical, as right now I'm more interested in figuring out proper analysis tools than in running any real analysis before I know if I'm measuring a sensible thing or not.

By the way, these graph measures works surprisingly well in presence of an arbitrary mix of hetero-, homo-, and bisexuals in the network, and it's fine if some people are homophobes or ... let's call them "biphiles" - guys who are really into lesbians (think threesomes) and girls who are really into gays - and in either case typically preferring a bisexual opposite gender partner to a heterosexual one - we can just note that in their attractiveness links.

AttractiveRank


The most naive thing to measure would be PageRank of "link to someone if you're attracted to them".

Scenario 1. Let's populate the world with 10 ensembles of girls and 10 ensembles of guys separated by which decile of physical attractiveness they fall into. People are only attracted to those at least as attractive as they are.

The results are quite drastic. Because the 10s are desired by everyone, yet extremely picky, they get really high scores - AttractiveRank by decile is 0.110 0.122 0.138 0.158 0.186 0.227 0.292 0.418 0.759 7.591 - and that's only because the model includes a 10% leak - traditionally meant to represent "user getting bored and typing a new URL" - here maybe "someone getting really really drunk at some party".

Let's modify it a bit and create Scenario 2 - with people attracted to those of just one decile less too. So 7s are attracted to everyone from 6 to 10 and so on.

This is great news for 9s, and pretty good news for everyone except 10s - now the ranks are 0.124 0.140 0.162 0.194 0.253 0.394 0.780 1.715 3.119 3.119. All that thanks to just slight lowering of everyone's standards.

ReciprocityRank


There's a serious problem with this anyway. In scenario 1, 10s could have any 3s or 8s if they wanted - but they very much don't. So everybody is actually is a very similar situation - 3s have as many other 3s to date, as 10s have 10s.

Let's introduce ReciprocityRank - which is just like regular AttractiveRank except non-mutual links are dropped. So it's you're a 7 and you wouldn't actually mind that 9 over there if you thought you had any chances, but as a good graph analyst you know you don't - you forget about that 9 in no time.

For scenario 1 ReciprocityRank correctly identifies that everyone has the same rank 1. Scenario 2 is more interesting - with ranks of 0.781 1.098 1.058 1.036 1.027 1.027 1.036 1.058 1.098 0.781. First, it is strangely symmetrical - it sucks as much to be a 10s as it does to be a 1s - in one case because your standards are too high, in other because everyone else's standards aren't low enough - but the effect is the same. What might be more surprising is how 2s and 9s are in the best position - not only can they date other 2s and 3s / 8s and 9s respectively - they have access to large number of fairly desperate 1s or 10s. Yes, 10s' desperation comes from unreasonable standards, but it doesn't matter (mathematically that is).

DateRank


That's probably not what we're looking for. You'd think that these 10s are in better situation - they might not have much choice but it's all quality choice. And if you're a really desperate 10 you can always change your mind about one of those 8s that stalks you. A 1 doesn't have such luxury. So let's count unreturned links, but only for 1/5 as much as returned ones, sort of like ref="nofollow" about which search engines changed their mind so many times.

Scenario 1 results in DateRank by decile of 0.147 0.167 0.194 0.229 0.281 0.359 0.493 0.759 1.474 5.897 - quite reasonable. Scenario 2 results in 0.210 0.282 0.336 0.424 0.569 0.808 1.194 1.755 2.408 2.013 - 9s are strangely still better than 10s - but notice that everyone is equally attracted to both, it's only 9s' lower standards which increase their dating potential.

Now that our links have weight, let's try scenario 3 - people are attracted to those less attractive than them only 50% as much as to those equally or more attractive than they are. Surprisingly it only helped 9s and now DateRank is 0.188 0.235 0.278 0.349 0.469 0.686 1.080 1.730 2.558 2.426.
Everyone should have their own Nena by Tom Poes from flickr (CC-NC-ND)

Height and education


Now that we have a sensibly defined PageRank - let's try something closer to reality. Let's say guys and girls come in three tertiles by height - short, medium, and tall; and in three independent tertiles by intelligence and education - let's say dumb, average, and smart. Of course they're not directly comparable across gender lines - what counts as tall for a woman might count as medium for a man.

So the rules of scenario 4 are:
  • Women don't like men shorter than them
  • Women don't like men dumber than them
  • Men don't like women taller than them
  • Men don't like women either smarter on dumber than them

It's all loosely based on this paper, I'm not making this up. Could you guess who has it easier and who has it harder in such situation?

Here's table for guys (rows by height, columns by intelligence):
   0.240   0.401   0.985
   0.380   0.703   1.873
   0.550   1.047   2.821

And here's one for girls:
   0.652   1.091   2.676
   0.436   0.730   1.789
   0.265   0.414   0.946

So how good was the analysis? Let's look at girls' table first. It's best for the girl to be short and smart. We could have predicted the shortness - guys not liking taller girls was explicitly in the rules - but why would girls want to be smart if equally many guys will be attracted to her regardless? This is a good example of why graph analysis matters. If a girl is dumb, plenty of men will be attracted to her, but these will all be dumb men shunned by most. If a girl is smart, she gets exactly as many men to choose from, but these are some quality men.

And unsurprisingly it pays for a man to be either taller or smarter - but intelligence is a far greater factor than height. How did that happen? And why does the same hold for girls? (except with reverse order of height) In this model men are more selective on intelligence than on height - and only same-intelligence combinations are possible (3 combinations out of 9 are ok), while plenty of mismatched height combinations are possible (6 combinations out of 9 are ok). You decide how meaningful this is.

Age


A couple months ago OkTrends wrote an interesting post about men not being terribly attracted to older women. Now I'm not going to use their data because I'm too lazy to convert pictures into numbers, and it's rather noisy, so the rules of scenario 5 are:
  • There are 31 ensembles of men and women, for each age between 18 and 48.
  • Women are attracted to men no older than their age + 6, and no younger than their age - 4; and half as attracted to men between their age - 8 and their age + 10.
  • Men are attracted to women at most 4 years older than them, and this is a hard limit, no exceptions.
  • Men are most attracted to women older than their minimum target - which grows linearly from 18 at 23 to 32 at age 48; however they're still open to younger girls (0.5x).


And these are the result - unsurprisingly men peak later than women (around 28, not 22), and while they're not as hot at their peak as women, they don't crash as hard as women either.

There are some limitations of this analysis - first, because okcupid's data used hard cutoff of 18-year, it discounts the possibility that a given 18 year old might wish to date someone who's 16 or 17 - their actual potential is higher than indicated - and likewise for older people. By the way it is blatantly obvious in okcupid's graphs that there are plenty of early-30s women who lie and pretend they're exactly 29. And if you've ever been there you'll know that there are quite a few under-18s who pretend to be 18. So take their data with a pinch of salt.

Another problem is assumption that all ensembles are equally sized - in reality while there are about as many 48 old women alive as there are 22 year old, there are far fewer of them on the dating market. Let's run scenario 6 - with ensembles of under-30s are 5x as numerous as ensembles of over-40s, with sizes decreasing linearly during the 30s.


The peaks stayed where they were - but the fall with age is far more drastic, especially for women.

Offensive misogynist advice

Guardian-reading liberals are asked to skip this section.

To the extent that these models are valid - the advice they give to men seeking long term relationships would be to go after teenage girls before their peak; while men looking for a quick hookup would do better going after women in their late 20s or early 30s - when they are still hot but already getting desperate. And in either case go after taller girls to avoid competition.

Model's advice to women is - get pregnant while you can. Unless you're still a teen, your dating value is only going down, and quality of men you will be able to attract for a serious relationship is getting worse each year. And remember - your biological clock is ticking, and setting up a family takes years (accidents excepted). You might think that you're still hot now, but what if after 2 years with someone you decide he's not the right guy, then you spend 2 more years with someone else, then you decide to perhaps maybe try getting a baby - nowhere near as quick and easy as it seems in your 30s - all while your younger friends look more and more tempting to your man; while your eggs are less and less cooperative. The legal system is what it is - in most countries getting married and having a few babies sets up woman for life, so even if it doesn't seem terribly appealing now, you need to decide thinking what will be appealing in a decade.

That, or freeze your eggs and start saving for regular botox. Works either way.

Don't blame me - it's the reality which is misogynist.

kitty by rubyblossom. from flickr (CC-NC-SA)

Code and mathematics



Code can be downloaded here.

One problem with this approach is existence of two completely arbitrary numbers - booze factor (0.1) and stalker factor (0.2) - they are not derived from anything meaningful and changing them can completely change the results. In fact the booze factor gives a hard floor to how low can anyone's attractiveness fall, and three values of stalker factor (0.0, 1.0, 0.2) result in three completely different ranks discussed here.

Another problem is assumption of constant ratio of mutual to unreturned attraction. We might as well assign constant percentage of links to mutual attraction and the rest to all links bundled together. It matters as people with low standards would focus on attraction returned instead of wasting their link power / time on stalking. It would be a fairly straightforward modification, and I don't know which version would work better.

And remember - all models are wrong, some are useful.

Saturday, April 10, 2010

First look at kUbuntu 10.4 Lucid Lynx or why I hate KDE4

Close lynx by Tambako the Jaguar from flickr (CC-ND)

One thing that still amazes me is how in 2010 operating systems still require ridiculous amount of work from inserting installation DVD to having a semi-decent system - even though no technical reasons prevent that from being a 5 minute zero-click operation.

First, installer decided to crash a few times. It is only beta 2 I've been testing, not final release - but seriously, that just shouldn't happen. Random installer crashes a couple of weeks before Long Term Support release?

Next there's a few classic system configuration questions - region, timezone, keyboard - and shouldn't they just set the defaults based on DHCP + geoip? Anyway, it's a small issue compared to those to come.


And here we come to my first big complaint - partitioning. First, why the fuck do they still use swap partitions instead of swap files like every other operating system? Don't make it more difficult for users for some marginal gain in performance. If they cared about performance that much they wouldn't be using KDE, you know. And second - how about some sane defaults? There was an ext3 partition from some old Linux and ntfs partition on that computer, but I had to manually tell the installer what I want to do with them - as if it was so difficult to suggest / and /media/c or somesuch so as defaults.

Did I mention installer was ridiculously slow? Did they use framebuffer graphics driver or what? Anyway, a few clicks, and the system is installed - this is of course only the beginning.

Go to the OSX-ripoff system settings panel (Applications > Settings > System Settings), and let's start fixing things.

It's been an ancient tradition in all operating systems I know that mouse and keyboard defaults are designed for old people with Parkinson's - so we need to go to keyboard, reduce repeat delay and increase repeat rate to saner values. Of course unlike every system since probably Windows 3.11 KDE didn't even bother including test box in its keyboard speed configuration dialog. Seriously guys? If you cannot get even something as obvious as that right, what chance do you have for even chasing the 2x overpriced Apple, let alone Microsoft?

It's even worse when it comes to configuring mouse. Instead of one mouse speed slider there are 6 confusing numeric entry boxes. Tip: increase the first from 2x to 5x to restore sanity.

While in keyboard and mouse settings I was wondering if I can make one of special keys launch a browser - but application launching didn't seem to be available anywhere. And I stumbled upon something really ridiculous - monitor brightness controls are under "KDE dæmon". With a ligature. You're trying to outhipster Macs or what? Seriously, fix that spelling - or even better label these "monitor settings" or something like that.

hello by elekesmagdi from flickr (CC-NC)

Now it was time to install some software to make the system useful. Konsole was hidden deep is "Applications > System" and I needed to scroll down to get to it. I know it's a trivial inconvenience, but even Windows fucking 95 had that right. Do not use tiny constant height widgets for Start menu - and to add insult to injury make them use huge icons. It can only display 8 programs without scrolling, and they're not even arranged in any sensible order (it's supposedly alphabetic, except "Konsole" is under T for "Terminal"). Are you trying to repeat the spectacular success of "let's throw away everything and reinvent GUI" OLPC?

So I was looking for apt-something, and because it was not obvious I just typed "apt" in the program search box - it came with literally 15 results, and KPackageKit was not even in the first half.

While I looked around the menu I accidentally clicked Akregator - there's zero pixels of inactive margin between clickable areas to run programs - Fitts' Law called me and told to says hello - and instantly proceeded to quit it. Instead of quitting it showed me the "You're not gonna catch me, I'm going to stay in the system tray" message - I tried looking for it but the system tray in fresh KDE is as filled with unnecessary garbage as a Windows 98 installation which has been running since literal year 1998. Why do I need half of that? Anyway, I located some icon which looked like Akregator, asked it to quit and it proceeded to enrage me with "Are you sure you want to quit Akregator" dialog? What kind of question is that? I've told you to quit twice in the last 30 seconds you dumb program! And there are no unsaved documents or anything there - you're a fucking RSS reader! If there were unsaved documents you should tell me about them - and there is never ever under any circumstances any reason why a program should ask if it should quit or not, other than unsaved documents. How is it that every minute of using KDE I stumble upon such a basic usability failure?

So, KPackageKit started - let's install Firefox because you won't catch me using Konqueror even for web testing and I'm the kind of person who still tests in IE6. Actually I wanted to check if Firefox is maybe already installed - the useless Konqueror is prominently displayed in Start menu, but maybe Firefox is somewhere there. So I typed "firefox" in start menu search box and clicked on something called "Mozilla Firefox Web Browser Installer" - the only result this time. It steals the whole screen for some reason (all right, some video came installers use fullscreen mode, but I've never seen any regular installer do that before...) and when I click "Install"... it tells me that "Requested packages are already installed".

So is Firefox installed or not? KPackageKit search for firefox only lists "kubuntu-firefox-installer" package - exactly the same one which fails so hard. I even tried to search for "iceweasel" - in case kUbuntu shares Debian's obsession with legalistic minutiae of its trademark amendment to DFSG but no. I typed "firefox" in Konsole to get "Program 'firefox' is not installed. You can install it by typing sudo apt-get install firefox" - apt is the most awesome thing that ever came out of Linux - but when I tried that I've been told firefox package is not available.

Wait, did they even get apt repository listings? I assumed they must have done it automatically, as KPackageKit showed no button or anything suggesting that manual action was required - but "sudo apt-get update; sudo apt-get install firefox" actually did the trick. I wrote a whole post about configuring Firefox 3.6 a couple of months ago, so I won't be repeating myself now.

Faces of God by Unitopia from flickr (CC-NC-ND)

So, time for some serious package installation. Now I've noticed something I'm rather ambiguous about. Dragging a window to the left or right edge of the screen semi-maximizes it to full height / half width - which is an idea so brilliant that if I ever meet the person who came up with it they're getting some free booze. Unfortunately X is also the only graphics system with usable virtual desktops (if any of you ever mentions Mac Spaces, God is going to drown some puppies) - and usable virtual desktops work even better if screen edges move between desktops - especially since by default there are no keyboard shortcuts to move windows either - Mouse and Keyboard > Global Keyboard Shortcuts > Window to Desktop 1 > Custom > Ctrl+Shift+F1 etc. fixes that fortunately. I like having both ways of moving stuff from one virtual desktop to another, but at a very least one way should be provided, no? (right clicking on title bar doesn't count)

So package installation. First, 159 packages got updated since beta 2 release - maybe not that surprising so shortly before the big release. And upgrading programs with apt is such a joy after suffering of MacPorts.

Back to Firefox for a moment. Why is there no Bing in default search engines list, when they have ever obscure ones nobody uses like ask.com and creative commons? Is it all Firefox or just kUbuntu's? It's not a big deal by any means, but if you want Microsoft to offer users choice of browser with its operating system, why not offer users choice of search engine with your browser? And speaking of browser choice - why nobody asks me which browser I want as default? Because the answer is very much not Konqueror. Konqueror is the MSIE of ... well, of not-Microsoft. I have about as much interest in using Konqueror as I have in using Safari or IE. Basically, default browsers for all platforms somehow suck massively, and all sane people use Firefox... or maybe Opera. So I went to youtube to see if Flash works. I've been greeted with the usual "Missing plugins" message, so I clicked some buttons - and the relevant plugins have not been found obviously - why would it work if it can rather not? Fortunately apt-get install flashplugin-installer worked - by this time I abandoned pretty much all hope of installing anything from GUIs and went straight to good old console, as if it was 1999 and I was still using Debian 2.1 slink... By the way did you know youtube had ads? Wow, sometimes I don't realize how different the Internet for smart people is from the Internet for everybody else.

Crazy Kitten? // Nikkor 50mm 1.4 by Merlijn Hoek from flickr (CC-NC-ND)

This installation guide/diary gets ridiculously long, and we're still quite far from a usable system. From memory I just typed apt-get install build-essential irb1.8 irb1.9 octave3.2 unrar ttf-mscorefonts-installer mplayer mc git subversion mongodb - I'm sure I forgot half the programs needed, but I'll figure them out someday. By the way, how hard would it be to just have apt-get install everything? Yes, there will be a couple of conflicts, complicated packages, and such, but 90% of packages should be installable everywhere without any hassle. I couldn't find Sun Java, and I know past Open Source javas like Kaffe and gcj were essentially useless - but I'll give that OpenJDK a try. Once. Like I did with Tesco Value.

At this point the system is reasonably close to usable except for a few things which I'll keep open:
  • Why don't PageUp / PageDown / Home / End work in Konsole (or xterm)? They work in Firefox just fine and my keyboard is not unusual - just awesome.
  • How do I make Konsole and Firefox start when I log in? It's right there in dock menu on Mac, so it shouldn't be too hard in KDE either.