background preloader

R&D

Facebook Twitter

Vaadin – User Interface Components for business apps. Home. How Not To Sort By Average Rating. By Evan Miller February 6, 2009 (Changes) Translations: Russian Ukrainian Estonian PROBLEM: You are a web programmer.

How Not To Sort By Average Rating

You have users. Your users rate stuff on your site. WRONG SOLUTION #1: Score = (Positive ratings) − (Negative ratings) Why it is wrong: Suppose one item has 600 positive ratings and 400 negative ratings: 60% positive. Sites that make this mistake: Urban Dictionary WRONG SOLUTION #2: Score = Average rating = (Positive ratings) / (Total ratings) Why it is wrong: Average rating works fine if you always have a ton of ratings, but suppose item 1 has 2 positive ratings and 0 negative ratings.

Sites that make this mistake: Amazon.com CORRECT SOLUTION: Score = Lower bound of Wilson score confidence interval for a Bernoulli parameter Say what: We need to balance the proportion of positive ratings with the uncertainty of a small number of observations. (Use minus where it says plus/minus to calculate the lower bound.) UPDATE, March 2016: Here’s the same formula in Excel: Wilson, E. Rich data for Javascript Apps is a breeze.

A practical guide to sort colors. Let’s start with something trivial: sorting numbers.

A practical guide to sort colors

Regardless of the algorithm you’ll use, real numbers are naturally ordered. Mathematically speaking, they have a total order, in the sense that you can always decide if a number is greater than another one. There is no ambiguity in this, meaning you can actually sort them, and (excluding duplicates) this sort is unique. There are other fields which are not that lucky: colour, for instance, are very unlucky. Supposing you’re representing colours with their RGB values, there is no standard way to order triples in a line, since they are naturally not organised in a line fashion. Part 1: Colour sorting Let’s start by creating a bunch of random colours, sampling them from the RGB space. import random colours_length = 1000 colours = [] for i in range(1, colours_length): colours.append ( [ random.random(), random.random(), random.random() ] ) All the examples in this post will refer to this very list of random colours.

RGB sorting HSV sorting. Choosing an OSS license doesn’t need to be scary - ChooseALicense.com. Radian ~ A scalable AngularJS framework ~ What is Radian? Apache CouchDB. Derby. App Isomorphic: la Single Page App parfaite ? – TechM6Web. Qu’est ce qu’une Single Page App (SPA) ?

App Isomorphic: la Single Page App parfaite ? – TechM6Web

« As rich and responsive as a desktop app but built with HTML5, CSS and Javascript » Les SPA se répandent de plus en plus, et deviennent un choix « commun » lorsque l’on veut développer un Front riche (souvent câblé sur des API REST) que l’on souhaite : testable (unitairement et fonctionnellement) fluide (pas de rechargement d’url etc) bien organisé maintenable et évolutif … Les Frameworks type AngularJs et EmberJs tiennent le haut du panier et ont largement fait leurs preuves, mais ils continuent à échouer sur deux sujets pourtant primordiaux dans beaucoup de cas : La performance (dont le rendu initial) Le référencement Aujourd’hui, quand vous chargez une SPA, voici grossièrement ce qui se passe coté client : Avoir ces quelques secondes à attendre avant de se retrouver dans un état fonctionnel est peut être acceptable pour un backoffice. Si l’on se soucie un minimum des aspects de performances Web, c’est forcément dérangeant.

<!

CMS

A JavaScript library for building user interfaces. Meteor. Hood.ie. Crossbar.io Unified Application Router.