Ben Godfrey

Archive for July, 2001

Look, it’s started…

+--------+---------+------+-----+---------+----------------+
| Field  | Type    | Null | Key | Default | Extra          |
+--------+---------+------+-----+---------+----------------+
| id     | int(11) |      | PRI | NULL    | auto_increment |
| title  | text    | YES  |     | NULL    |                |
| link   | text    |      |     |         |                |
| points | int(11) |      |     | 0       |                |
+--------+---------+------+-----+---------+----------------+

Auto-links refinements

Database has id, title, url, points. When page is added to the db the url is checked and the title retrieved for the database. Each link is pre-allocated a number of points, points are awarded when the link is clicked. When points are removed is interesting. Should it be every time the page is viewed or should it be after x minutes have ticked by? If the post form is on the main page then demoting after page views may lead the system to slightly more load friendly. Hypothetical is not load friendly, it is load agnostic/stupid. I think I will implement page views first and maybe see how it goes…

Another blogdex inspired idea

Auto-links system. Real simple see. PHP + MySQL. Links can be added and are stored with a time. Links are displayed on a simple page, however many you want.

The interesting bit is in how the system selects the “top” links, the ones to display. The first implementation would have two metrics of “topness”: link age and number of clicks. Both would be sliding scales: 2 days old beats 10 clicks and so on. The db should store link data, each link having a tally of page renders it can be used in, the tally should be demoted after 24 hours and when pages are loaded and promoted when the user clicks through. Something along these lines anyway.

It would be nice to test the links before putting them in the database as well. Either simple test on doc returned, or advanced and spots 404’s etc.

Eh oh

I had a good day at work today. I don’t know why. Maybe it’s because I got something done for the first time in a while.

The challenge I am currently beset by is quite a teaser. It involves getting events from a list and displaying them in handy chronological boxes, for year, month etc. It’s tricky because I might not have any events for January but loads in June. The data has gaps and clusters, a state which I’m sure has an excellent Com Sci name. Additionally I may have even known this name once.

I’ve just been reading about an interesting system developed at MIT Media Lab. Blogdex indexes blogs by popularity and by some mechanism is able to spot memes. The article I read glossed over a lot of the technicalities. It occurs to me that if such a system indexed the blogs daily, it could search for patterns in the words coming in. If the occurance counts were kept on each word, new memes could be detected this way. Evolutionary algorithms could be applied to clean the data based on human input. E.g. for each meme a list of ten or so sites could be displayed, humans could then rate these (probably just by clicking through to them) and the unpopular ones thrown out. This depends on good title writing. Enhancements to this system would include the whole gamut of pattern matching techniques from the AI community, especially anything good with phrases or, potentially, natural language. How far you go depends on how much money you have to spend on CPU cycles (and development time).

Another random thought was that I could in some way employ evolutionary alogrithms in Hypothetical. In searching rather than anything more sophisticated.

I miss being a student. I wish I could be an ideas hamster at a major software think tank.

I made this

In my anger at the scandal blown up over the Brass Eye episode, I wrote this to Tessa Jowell, current Culture Minister. I know it’s full of holes, but I wanted to register my anger rather than any specific point.

Dear Tessa,

Sorry if this comes across as rude, I realise none of this scandal is your fault.

It is my view that the News of the Worlds Name and Shame campaign “had gone beyond the boundaries of taste and decency”. What are these standards of taste and decency anyway? By saying “If this is considered acceptable material then we are tearing down all the boundaries of decency on television,” you seem to have missed the point that any such standards have already been torn down by the capitalist centre-right media. The Brass Eye episode did not in anyway promote paedophilia, Trainspotting did not promote heroin use, both trivilised these issues. Both issues need bringing back down to size. While we discuss them in such a knee-jerk manner we will never make any headway into helping or treating any victims.

What’s most galling is that Chris Morris offends and disturbs in an effort to highlight stupidity and self-promotion in the media, but the media, and by this I mean the Daily Mail, does it EVERY DAY just to make money. I find it outrageous that Chris Morris has borne the brunt of this scandal when it is the media who have created it by whipping up stupidity and bigotry amongst the people of this country.

Well, I’m sick of Rupert Murdoch deciding what’s people are allowed to like in this country and I expect YOU as my elected representative to do something about it. I also believe that if the ITC has the right to pull a stations license, they have sufficient power to tackle any violation of their code.

Regards,

Ben Godfrey

Customisable image colours for hypo

Simple really, should of thought of it earlier. Instead of hacking around trying to get GD to load TrueType fonts I can just create the text as transparent GIFs and superimpose them on to whatever colour backgrounds with GD. This will work for both frames and has the advantage that all the buttons in all the themes folder can be replaced with one function in the inc file.

All this will be part of the NEW ENHANCED THEME ENGINE.

Arsecandle

I wish more of the world understood the actions of Chris Morris. Patrick Marber says that Morris isn’t doing it to change anything, which I suspect is probably true, but it would still be nice if more of the world understood. It amazes me that even though people are so jaded by the size of today’s world they can’t understand that Morris is a satirist.

I guess they are just too wrapped up in the mundanities of day-to-day boredom, money-grabbing and… OK, I’m just going to stop, this is going nowhere.

Admin page SUX0Rz, WAP site also

The admin page takes ages and ages and ages to load. This is because it’s loads of stuff lumped into one page. The solution is modularisation. The site needs a proper Admin _AREA_ instead. Modules include:

  • Messages
  • Users
  • Threads
  • Files
  • Themes

Plus any others that turn up in the process of redesign.

The completed version needs to be secure as well, although I can’t see why I need to go much further than the PHP user login combined with the htaccess password.

Off-topic, the WAP microsite needs a complete rethink also. It’s probably possible to get PHP to encode the session keys into link URLs, thus providing better security without cookies. God I hope sessions fix all my log-in troubles, God knows I haven’t got any better ideas.

Well

It looks like I’m getting into the sensational headline writing. I’ve often wondered about putting titles on the messages on Hypothetical but never quite did. I think it adds something to a message, but only when used well and I’m not sure quite what it adds even then.

Ah well, you can get a feel of what Hype would be like from this anyway. In the mean time I’m trying to work out what should go here and what to Hype. I’m also not sure how far I want to go with posting. I need About.com to have a “So you’ve decided to write a weblog” tutorial. Sometime maybe.

Log now part of cityroad.org.uk

The log db has been integrated with City Road’s. Now I got me two weblogs, but only one copy. Hehe.

User services

Lots of users getting confused, new accounts for each post, it’s a mess. Hypo needs to help them out more — anything to make their lives easier.

Ideas:
  • Password reminder facility, sends to registered email address. This is the key to stopping the multiplying of accounts.
  • More help. The welcome screen is OK (I wonder if anyone has actually looked at it…), maybe it needs renaming to “HELP!!!”. Maybe a help screen that is shown to users after they signup. Jeez it’s a long time since I thought about the signup page. Anyways, there should be a help page always available.
  • Comments. Every page should have a link to allow users to comment on that page (or just generally). Ideally it should gather as much info about the user’s setup as possible. E.g. name, email, browser + platform, page they were at, logged in or not.

Also the log entry editing page for this log needs to remember which mood I was in when I posted a message.

Known Issues from a-new-hope.txt (legacy notes file)

General

as a cure for both security and cookie setting, go for PHP sessions and keep all hypo-data on the server (db?)
page expiry date should be set to time of last message (cunning 4 caching)
review caching stuff thoroughly, cos it’s shit (is it required at all?)
add target=”_blank” to all off-site urls
try and find a workaround for very long “words”
I am lame and have forgotten my password, please de-lame me via my email address
how are you going to fix that nasty bug in the message summary code where you split the message halfway through a tag? eh?
cut admin/archive/profile to given number of messages, set by user in profile
2cols lpage situation needs CHECKING, complex one that
login failed screen offers chance to be mailed your password
Crazy REGEX generation time is NEAR!
more user fields: description, tea grade, general courtesy personalisation stuff
check for odd numbers of quotes in posts, as this really fucks the browser over
more functions!!
image gallery
microsites box — links to other hypothetical network content.

Threads

new fields: parent thread, public/private, aggregation yes/no, write userlist
thread owners can set read and write user lists and kick messages to other threads (maybe only parent)
whole gamut of thread management tools in admin page, tools for thread owners in profile page (“Your threads”)
user levels for creating threads?
editthread.php: parent thread select box, public check box, aggregate check, + a whole set of checks for setting up user read + write lists

WAP

Number of messages, rather than chronological period. Homepage more like archive
Logging in, posting messages most urgent.
when CENSORING for FILESIZE, always provide a link to next content group

and anything posted in messages and everything in the Yet to come… box

Is that really why you made a weblog?

No. The real reason is I found myself sending myself a lot of email. This is my main way of keeping notes about life in general, mostly about Hypothetical. So I’m going to post all that shit here from now on, when I’m in a webmasterly mood.

Here’s a load of back-dated crap:

  • remove all isset and replace with !empty
  • Moot idea of developing a Flash HTML editor.
  • Add more stuff to the user profile, dowse the anonymity factor a bit. Maybe this will be good for the community.
  • Add logic to post a special message to the front page with new user details!
  • Use file in message…” link on profile and files pages.
  • What about the download script 64k nonsense?
  • More folder structure is required (i.e. some).
  • All the modularity should be done with classes, although this depends on the schematic. If the glove fits… Functions work really well anyway, they just don’t take care of the data anywhere near as well.
  • Sessions all the way.
  • Chunkification of message/file/user/thread lists into blocks of 25 or something, with links to navigate through the pages. Tricky one on the backend this.
  • Go with indices in the database, keeping uname in the user table. When deleting a user provide the option to move a users messages to another username first. The tacit assumption is that no user should be deleted unless they have a replacement login.

So you’re never going to see anything interesting on this log. If I have something to say, I’ll post it to Hypothetical, because I’ll want people to read it and shout at me (if you get my meaning).

Wilkommen!

Well, everybody else has got a weblog. OK, I already have another one, but I made the mistake of sharing that with my friends. So now I’ve got my own.

And it works! Joy.