Livejournal interests suggestion meme!

Jul 06, 2004 19:02

Based on the lj interests lists of those who share my more unusual interests, the interests suggestion meme thinks I might be interested in
1. writing score: 36
2. books score: 31
3. music score: 27
4. harry potter score: 24
5. anime score: 20
6. poetry score: 20
7. cats score: 19
8. monty python score: 18
9. movies score: 17
10. chocolate score: 17
11. terryRead more... )

Leave a comment

Comments 107

heiligennacht July 7 2004, 08:12:28 UTC
I would love a copy of the script if that is okay.

Reply

ixwin July 7 2004, 12:57:41 UTC
Sure. E-mail me ( ixwin @ fluffhouse.org.uk ) and I'll send you a copy.

Reply

ixwin July 8 2004, 15:39:04 UTC
Script now up on my website here.

Reply

heiligennacht July 9 2004, 10:46:56 UTC
Mnay thanks

Reply


bassfingers July 7 2004, 09:26:19 UTC
Well, I fall into the group of people not able to access the script, with it timing out after 60 seconds. I was wondering what kind of caching you're using? One would think, that after a number of attempts to run, eventually enough interests would be cached to allow the script to complete? Or is the slow-down happening after the data collection stage, and really halting at the processing of said data?

Reply

ixwin July 7 2004, 13:36:41 UTC
*looks embarrassed*

erm...I'm afraid it's not caching at all at the moment, simply because I wasn't sure how to write that part of the code (I really am a beginner at this - this is only the fourth program I've written).

When testing it definitely was the data extract stages which were taking the time rather than the processing.

Having said which, remember it's only extracting data for those interests which 20 or fewer people have listed, so it wouldn't necessarily help that much (though it would speed things up when the meme was propagating between people with a number of shared unusual interests - quite likely).

Reply

purplepiano July 7 2004, 15:57:23 UTC
Maybe you could also cache the users' interest lists as well as the interests' user lists, but similarly that might not help significantly as LJ has a flippin huge number of users. Although there's plenty of disk space on spider :)

Reply

purplepiano July 7 2004, 20:07:55 UTC
Ooo *duh* I just realised that spider runs a caching proxy server (squid). I never use this, as we only have 2 users behind it on our network, so our browser caches are sufficient. So just tell wget to use this proxy, by (looks at info wget...) setting the environment variable http_proxy=localhost:3128. Actually I can do this myself in the server configuration *fiddles...* I think it's caching stuff now.

Also I think
use LWP::Simple;
$content = get($url);

is a more idiomatic Perl way of downloading web pages.

Reply


You've done the work, now can I steal it? justjohn July 7 2004, 10:47:56 UTC
I was trying to get to your homepage (as listed in your user info page) in order to see if I could steal the Perl code (it's how I learn), but access to the site timed out. I'm guessing your site's very busy.

Anyway, do you have the code handy in some form, for nosey people like me to look over and maybe appropriate bits of?

Reply

ixwin July 7 2004, 12:55:05 UTC
e-mailed!

Reply


Bug: ruakh July 7 2004, 13:03:11 UTC
Note that LJ presents all data in UTF-8; your site interprets and reports this data as though it were Windows-1252. This can cause French/German/etc. text to be hard to read (as when "montréal" is reported as "montréal"), and Russian/Greek/etc. text to be impossible to read (as when "музыка" is reported as "музыка").

To fix this, I think all you need to do is replace this line in your HTTP header:
Content-Type: text/html; charset=iso-8859-1 with this:
Content-Type: text/html; charset=utf-8 and optionally add the tag
to the head of the actual HTML document.

Big thumbs-up on this meme overall; it's really interesting. And you serve valid HTML1, which is always a plus. :-)

1. Technically it's not 100% valid, since you're include Windows-1252 characters in a page whose headers declare it ISO-8859-1, but close enough.

Reply

Re: Bug: ixwin July 7 2004, 13:30:23 UTC
That's very helpful - thanks! (I must admit I don't know anything about character sets, so I needed it spelt out to me as you have done)

I've made the change you suggested, and tried it on your list and it now displays montréal correctly.

Thanks again :)

Reply

ruakh July 7 2004, 13:42:48 UTC
Glad to be of help. :-)

Reply


beccastareyes July 7 2004, 13:37:48 UTC
Okay, I need to know how browser compatable thing sucker is -- I've been trying all day to get it to work (I run Mac OS X and Safari at home and Linux Red Hat and Mozilla at work).

Reply

ixwin July 7 2004, 14:02:09 UTC
Hmmm. It worked fine in Mozilla for me when testing and I've just tried it again now, and it worked on the second attempt. (I haven't tried it in any Mac browsers). It does seem noticeably slower to connect and run than in Internet Explorer though. I don't know why that would be - I'll point the person who maintains the server at this comment to see if he has any explanation.

In the mean-time, here are your results...
Based on the lj interests lists of those who share my more unusual interests, the interests suggestion meme thinks I might be interested in
1. lina inverse score: 33
2. reading score: 33
3. trigun score: 30
4. inuyasha score: 30
5. yaoi score: 29
6. fruits basket score: 29
7. music score: 28
8. final fantasy score: 27
9. bishounen score: 26
10. dragons score: 26
11. doujinshi score: 24
12. gravitation score: 23
13. art score: 23
14. rurouni kenshin score: 23
15. valgaav score: 23
16. allen schezar score: 21
17. gourry gabriev score: 21
18. fushigi yuugi score: 21
19. japan score: 21
20. computers score: 21

coded by ixwin
Find out more

Reply

purplepiano July 7 2004, 15:47:38 UTC
It's just server overload, too many people trying to use it. It should behave the same whatever browser you use to call up the script - it's a server-side script so all the work is done by the web server, not the browser. The browser only displays the result page at the end, and that's simple HTML which should look the same everywhere.

Reply

ruakh July 7 2004, 18:49:56 UTC
It should behave the same whatever browser you use to call up the script [...]

Except that some browsers, notably Safari, are less patient if your script is slow. I think Safari gives up after one minute. (? If I'm wrong about this, someone please let me know.)

Reply


Leave a comment

Up