12,554,623 members (58,314 online)
alternative version

113.3K views
27 bookmarked
Posted

# CodeProject's Article Voting System

, 26 Apr 2004 CPOL
 Rate this:
Discuss the CodeProject's Article Voting System

## Introduction

In this article I discuss the voting system that I thought is used on CodeProject's website and compare it with the "standard" voting system.

I will still refer to this voting system as to the CodeProject's voting system but note that the real system that is used on the CodeProject website is discussed in the following article: "Is the CodeProject's Voting system really smart?".

## Standard voting model

Usually when we want to estimate the quality of the article, we create a voting model for it. The structure of that model is usually as follows:

• Each person can leave his vote only once

• Vote is a number from the following set {1,2,3,4,5}

• The average value is calculated as where is considered to be the current grade of the article

Here N is the number of received votes and is the vote value. It is obvious that we have a stochastic process that is defined by the formula (1) and are the discrete random variables that take values from the set {1,2,3,4,5}. The distribution of each is unknown but each of these variables is independent from another and all of them have the same distribution.

Now let us introduce another voting model that used on the CodeProject website and as we will see seems to be seriously different from the standard one although it is pretty much the same.

## CodeProject voting model

The voting system that is used on the CodeProject web site differs from the one represented above. On this website the average value is defined by the following formula . In other words the average value is calculated as an average between the previous article mark and the new vote value.

It is obvious that the difference between this voting model and the standard model is that this one calculates grade as average between last vote value and previous grade and the standard one calculates the total average for all votes.

In the following section we are going to state questions that will help us to investigate what is the real difference between these models.

## Compare voting models

It is clear that in the standard voting model, described in the first part of the article, every vote takes an equal part in the average grade. For the CodeProject voting model this statement could be more then doubtful.

There are at list two questions about these models we might want to answer to:

1. If we consider the same votes what will be the difference between and values?

2. Is the votes order significant for and values?

Let us try to answer the first two questions.

## Does for the same and whether the order is significant?

To answer the question stated in the title let us try to use the mathematical induction:

1. Prove that : This is obvious as far as and .

2. Assume that

3. Prove that

Note that and . Thus we have the following formula that we need to prove:

Hence we have the following system of inequalities:

By multiplying the first inequality by and subtracting it from the second one we have from which in its turn we have that is true in case when as .

This is an important result, as we now understand that:

1. The inequality holds only on some special occasions
2. The value of depends on the order of . Because doesn't depend on their order we have either in case of and or possibly otherwise

We can suspect now that the value with respect to is not so good to estimate average grade as the order of influences its value.

To understand this, let us define the following random variable: . To understand the difference of influence on the value we might be interested in the value of where and .

From the last formula we see that was obvious before. The influence of depends on the values of and . Thus we come to the probability theory, as is a random variable. Even more as depends only on then this is a Markov process.

If then the late vote influences the average grade less then the early vote. Form we have and this is quite obvious but leads us to nowhere as it only shows that the influence of vote on this or that stage may influence the average grade in different ways that depend on the preceding average grade values.

That is why recall that and are random variables that depend on the sequence of independent random variables with equal distributions. To compare and let us use their mean values and .

Let's assume that is true, as have equal distributions. Then

also note that and thus

From these equalities we see that the expected value is the same for and and hence they can be considered to be quite the same from the point of the average grade estimation.

## Conclusions

In this article I tried to show that the article voting system used on the CodeProject website is quite good to estimate the average article grade although this might be not so clear.

The advantage of their approach from the software point of view is that there is no need to store all votes but only the last average. It significantly reduces resources needed for calculation of average grades of articles.

At the same time further investigations may show that the variance of and are different and it might be interesting to estimate and compare their values.

To get the analysis of the voting system that is really used on CodeProject's website, read the following article:

## Share

 Instructor / Trainer Fontys Hogescholen Netherlands
A software architect, designer, and a researcher in formal methods, algorithms and tools. Bachelor and Masters degrees (with honors) in Theoretical Mathematics. PhD in Theoretical Computer Science. Nine (9), DBLP recognized, international research publications (http://tiny.cc/umwaux). Five (5) Codeproject articles (http://tiny.cc/qlwaux). Fiveteen (15) years of work experience in research, design and development of Verification Algorithms, Scientific Software, Embedded Systems and Web applications. Young, energetic, pragmatic, smart, quality demanding, proactive, and eager to take responsibility. Working to the fullest, used to solving large-scale multi-disciplinary problems targeting long-run goals. Looking for a new challenge in a field of research and technical leadership.

Experience with development processes: Waterfall model; V-model (Rational Unified Process); Agile (SCRUM)

Specialties:
* Doing formal and applied research in the field of System and Software Verification
* Acquiring information, sharing knowledge, lecturing, mentoring, motivating and evaluating people.
* Creating object oriented architectures and developing large scale projects.

Experience with tools:
ASD suite, Rational Rose, Borland Together, Eclipse, Rational Soda for Word, Idea, JBuilder4/5/6/7, jdk1.3-1.6, Ant 1.x.x, Make, WebSphere, Tomcat 3.x, Weblogic, MySQL, Matlab 6.5 SP13, Clear Case, Clear Quest, Microsoft Visio.

Experience with programming languages:
Java (5 years), C (5 years), C++ (4 years), UML (4 years), CSS (2 years), HTML (2 years), Modula2 (2 years), Oberon (2 years), Microsoft .NET C# (1.5 year, ASP), SQL (1 year), OQL (1 year), XML (1 years), CSH (1 years), EL-76 (1 year), Visual Basic .NET (0.5 years), Pick Basic (0.5 years), OCL (0.5 years), JSP (1 year), Scala (0.3 years)

Knowledge and use of Version Control Systems:
SVN, CVS, GIT, Clearcase, SCCS

## You may also be interested in...

 Pro Pro

 First Prev Next
 My vote of 5 Mahmoud Fayed26-Sep-10 15:44 Mahmoud Fayed 26-Sep-10 15:44
 Try Emocracy JCaeiroAntunes@netcabo.pt24-Sep-04 15:56 JCaeiroAntunes@netcabo.pt 24-Sep-04 15:56
 Re: Try Emocracy Ivan S Zapreev28-Oct-04 22:16 Ivan S Zapreev 28-Oct-04 22:16
 Re: Try Emocracy Anonymous18-Nov-04 11:23 Anonymous 18-Nov-04 11:23
 Simple. Mr.Prakash17-Apr-04 21:33 Mr.Prakash 17-Apr-04 21:33
 nice! mystro_AKA_kokie17-Apr-04 10:46 mystro_AKA_kokie 17-Apr-04 10:46
 Re: nice! Ivan S Zapreev18-Apr-04 5:07 Ivan S Zapreev 18-Apr-04 5:07
 Franckly, I don't care about the marks ! Kochise17-Apr-04 8:57 Kochise 17-Apr-04 8:57
 Thanks for your opinion! Ivan S Zapreev18-Apr-04 5:16 Ivan S Zapreev 18-Apr-04 5:16
 Voters have to be smart ! Kochise18-Apr-04 21:12 Kochise 18-Apr-04 21:12
 Re: Voters have to be smart ! Ivan S Zapreev18-Apr-04 21:25 Ivan S Zapreev 18-Apr-04 21:25
 Stupid ! Kochise27-Apr-04 2:58 Kochise 27-Apr-04 2:58
 Re: Stupid ! Ivan S Zapreev27-Apr-04 4:38 Ivan S Zapreev 27-Apr-04 4:38
 Any chance of... Colin Angus Mackay13-Apr-04 8:35 Colin Angus Mackay 13-Apr-04 8:35
 Re: Any chance of... cmlawson14-Apr-04 11:19 cmlawson 14-Apr-04 11:19
 Re: Any chance of... cmlawson14-Apr-04 11:21 cmlawson 14-Apr-04 11:21
 Re: Any chance of... andipan16-Apr-04 3:02 andipan 16-Apr-04 3:02
 Re: Any chance of... Anonymous16-Apr-04 3:05 Anonymous 16-Apr-04 3:05
 Re: Any chance of... Ivan S Zapreev17-Apr-04 7:50 Ivan S Zapreev 17-Apr-04 7:50
 Re: Any chance of... Colin Angus Mackay17-Apr-04 11:39 Colin Angus Mackay 17-Apr-04 11:39
 Arithmetic mean whizer12-Apr-04 8:50 whizer 12-Apr-04 8:50
 Re: Arithmetic mean Ivan S Zapreev12-Apr-04 21:50 Ivan S Zapreev 12-Apr-04 21:50
 Re: Arithmetic mean whizer12-Apr-04 23:53 whizer 12-Apr-04 23:53
 Dont you have anything else to do???? :) Miguel Lopes12-Apr-04 8:22 Miguel Lopes 12-Apr-04 8:22
 Re: Dont you have anything else to do???? :) Ivan S Zapreev12-Apr-04 8:29 Ivan S Zapreev 12-Apr-04 8:29
 Re: Dont you have anything else to do???? :) HAHAHA_NEXT12-Apr-04 9:10 HAHAHA_NEXT 12-Apr-04 9:10
 Re: Dont you have anything else to do???? :) Anonymous27-Apr-04 23:32 Anonymous 27-Apr-04 23:32
 Re: Dont you have anything else to do???? :) dalabera10-Jun-08 6:08 dalabera 10-Jun-08 6:08
 Excellent analysis. Unfortunately not quite correct Chris Maunder12-Apr-04 7:35 Chris Maunder 12-Apr-04 7:35
 Re: Excellent analysis. Unfortunately not quite correct whizer12-Apr-04 8:32 whizer 12-Apr-04 8:32
 Re: Excellent analysis. Unfortunately not quite correct Mr.Prakash17-Apr-04 21:36 Mr.Prakash 17-Apr-04 21:36
 Re: Excellent analysis. Unfortunately not quite correct Mark Focas12-Apr-04 19:22 Mark Focas 12-Apr-04 19:22
 Re: Excellent analysis. Unfortunately not quite correct Ivan S Zapreev12-Apr-04 20:58 Ivan S Zapreev 12-Apr-04 20:58
 It is strange strange .... Ivan S Zapreev12-Apr-04 22:28 Ivan S Zapreev 12-Apr-04 22:28
 Re: Excellent analysis. Unfortunately not quite correct Tony Truong13-Apr-04 12:13 Tony Truong 13-Apr-04 12:13
 Re: Excellent analysis. Unfortunately not quite correct Anonymous15-Apr-04 12:59 Anonymous 15-Apr-04 12:59
 Re: Excellent analysis. Unfortunately not quite correct Brian Delahunty21-Apr-04 1:14 Brian Delahunty 21-Apr-04 1:14
 Graphics Colin Angus Mackay12-Apr-04 6:01 Colin Angus Mackay 12-Apr-04 6:01
 Re: Graphics Ivan S Zapreev12-Apr-04 7:24 Ivan S Zapreev 12-Apr-04 7:24
 Last Visit: 31-Dec-99 18:00     Last Update: 25-Oct-16 14:25 Refresh 1