I have created a small web page for my benefit that will list shortcuts to my favourite websites. So far so good! It has a database backend which stores various data including the date and time each time I access a site listed on the page. The reason for this is that I want to alter the order of the links in each category so that my most popular links appear higher up the list. Of course I could just count the number of times I have accessed each site but this has two flaws that I can see (perhaps more!):
1. If I add a new site that I access a lot, it would still appear lower down than some more established, less-popular sites
2. A certain site may become less popular over time but remain nearer the top of the list despite me not accessing so often.
Obviously I could simply count the number of times the sites are accessed in a given period, e.g. over the last 4 weeks, but I was wondering if there is a more efficient algorithm? I am sure a similar algorithm must exist as this could be used in a wide variety of circumstances, e.g. most played songs in a personal juke-box.
So if you know of any algorithm that solves this, and perhaps gives added weight to more recent 'accesses', and if there are any other issues I should consider, please let me know,