Better star ratings? A sketch in a few words

5 stars are a very popular metaphor for visualising, very often sparkline-like, the popular opinion about an item. The values themselves usually come from voting, reviews and the like. The are popular because they show in a bar-graph like fashion what is the rating, and you can visually compare items. The downside is that as bar-graphs are quite crude, because they are one dimentional. It is not possible to judge if there is a consesus, or there are controversial opinions about the item in question. No idea about the distribution of data.

Ranking, ordering, weighted sums, hyperbolic discount and other beasties in the 5-star rating zoo

A very non-rigorous adventure into the realm of calculating ratings. All this is prompted by a problem I'm trying to find a fair and fairly efficient solution suitable for use with databases.

The problem can be stated as:

We have a collection of 5-star [0-4] rated items, with user ratings and creation and last update timestamps. Retrieve the most important items by rank, taking into account the item ratings, be fairer than simple average item rating.

The day monkey outraces a nitro fuelled engine

Anyone who is following the long benchmark javascript race between browser engines probably has noticed that for a first time since these particular records began mozilla's engine has crossed the daily finish line faster than one of the competition. Today Jaeger + Trace monkey cross breed is 1ms faster on the v8bench circuit.

Entities, Bundles, Fields and Field instances

Drupal 7 introduces a number of new apis and with those comes new jargon. Untangling that could be daunting. I'll try to briefly sketch what is what and relate it to terminology outside of the Drupal world.

This post is a work in progress, I am regularly revising the text from feedback.

Note Revised paragraph order and wording, clarified wording of definitions, added references, corrected glitches

How written decalration 29 should have looked like


Written declaration on setting up a European early warning system (EWS) for privacy offenders.

The European Parliament,

  • having regard to the Commission communication on the fight against cyber crime (COM(2007)0267),
  • pornography and sex offending,
  1. whereas it is essential to ensure that the internet continues to afford a high level of virtual democracy, which does not present any threat to privacy,
  2. whereas, however, improper use of the opportunities provided by technology may facilitate abuse of individual privacy and freedom,
  3. whereas the internet also allows governmental and law enforcement agencies to enjoy freedom of action,
  4. putting them on the same footing as honest citizens and making it difficult for the authorities to trace them,
  1. Calls on the Council and the Commission to act on Communication COM(2007)0267
  2. Asks the Council and the Commission to implement Directive 2006/24/EC and ensure that no tracking is implemented and individual freedoms safeguarded rapidly and effectively;
  3. Calls on the Member States to coordinate a European early warning system involving their public authorities, based on the existing system for food safety, as a means of tackling abuse of power;
  4. Instructs its President to forward this declaration, together with the names of the signatories, to the Council and the Commission.

I'm quite busy at the moment, but I think this is just too important an issue not to bother typing something about it.

Don't take me wrong, the issues the original declaration tries to tackle are important. Both children and adults shouldn't suffer from violence, sexual or otherwise. The offenders should be punished and stigmatised in a 21st century society.

I just don't believe that censorship and total surveillance is the way. Step by step individual freedoms are pushed to the sidelines by excuses such as fraud, terrorism, sex offenders... Yes, total surveillance can be effective, usually to monitor what the subjects are doing and punish them accordingly. The twentieth century eastern block security apparatus has proven it to be so. Do we want to be back there? Really?

I know I don't. The less powers the police and other government agencies have, the more I would trust them. And the reverse is true as well. I think history has taught us that the more powerful a state, or its representatives are, the more they become an enemy of it's own people.

It is none of your business what I search for. What I read. Whom I email.

The original

Digital Economy Bill passed through house of commons

Not in my name

Well. Done and dusted. A bad bill passed, full of, I hope, good intentions. The good intentions are to protect the authors, musicians, creatives and the like. I guess they are to protect me, in a way - I write software, and my wares should be protected.

Basta. I haven't asked for that. I don't want that.

Digital Economy Bill (Debill), 2nd reading, rehashed after sleeping on it

It is an important bill. Not just for the issues I am really concerned - the ones related to IP. The Digital switchover, availability of broadband and the rest are important but I'm not going to write about them. I still don't fully understand the logic to have all of the above bundled together in one bill. The only connection is topical - the internet, but mixing management issues with ones related to freedom of expression leads to some dodgy arguments, like "the law has to go through, as the management issues can't wait" and then mixed with "We have to do something now, will revise later". Anyone who has written software knows the logic. We have heard it and used it, with a difference - we don't release with known critical bugs. Debugging and fixing a release is not fun.

Digital Economy Bill, 2nd reading, a waffle, a stand and a joke

alnya Excellent, a bill proposed by the unelected, debated by the ignorant and voted on by the absent. #debill

Sums it all. Really. A controversial bill debated in the house and slightly more than two handfuls of MPs can be bothered to be present. A few Labour backbenchers and a surprising lone conservative:

  • Tom Watson (Lab, West Bromwich East) - 'Luke Skywalker'
  • Austin Mitchell (Lab, Great Grimsby)
  • Fiona McTaggart (Lab, Slough)
  • Neil Gerrard (Lab, Walthamstow)
  • John Redwood (Con, Wokingham)

take a principled stand against rushing through controversial bad texts, but are kind of ignored. The conservatives generally bitch about the rush, but say they will support the bill. LibDems are not there. Sorry, the one that is just agrees with the honourable members of the opposition.

A farce, a disappointment and random light entertainment in the form of references to Star Wars - Peter Mandelson is apparently Darth Vader - and this coming from an ex-minister. Overall - pathetic.

Flipping the coin on Iterator or deriving the subject-observer design pattern in php

Continuing from parts one and two of these series of posts I'll stick to iterators for the time being. I'll make a quick overview of the php Iterator and IteratorAggregate interfaces. Then will derive a pair of Observable(Subject) and Observer interfaces as their mathematical duals by flipping the methods (arrows) around and see what comes about. In fact, this technique was used by the C# team to derive the Rx framework.

Powered by Drupal, an open source content management system