Happenings

Google Graphs

The Google Browser is a fantastic Java applet that takes in a URI and returns a graph of related sites. Related sites comes from the Google index of related sites e.g. here are the related links for this site.

I’m not entirely sure how Google creates this related list, but it doesn’t really matter. Try out the Google Browser to see some bouncy graphs.

The Internet Is Stupid

World Of Ends is a site talking about why the simplicity of the net is its strongest “selling” point.

By keeping all of the detail out of the lowest belly of the internet (the Internet Protocol), we can build all kinds of complex (or simple) systems on top of it, without going to stupid lengths.

Adaptation.

The film, “Adaptation“, is about Charlie Kaufman. He’s a screen-writer who is given the task of adapating the book, “The Orchid Thief“, by Susan Orlean, into a movie. The problem is that he doesn’t know how. So, instead of writing a film directly about the book, he writes a film about how he doesn’t know how to write a film about the book.

The really bizarre thing is that the film “Adaptation” was written by the real Charlie Kaufman, who was actually given the task of adapting the very real book “The Orchid Thief” by the real Susan Orlean. He, instead, wrote about how he couldn’t do it. Now, to really mess things around a bit, “The Orchid Thief” book seems to echo the story of the character Charlie in an abstract way. Are you following?

It really blurs the line between reality and fiction to a point that I’ve never seen in a film. So many parts of the film are “real”, and some aren’t (Kaufman’s twin brother, Donald, for example).

To really understand, you have to see it; something which I must insist that each and everyone of you do. Now! Then you too can be stuck in the same nightmare of trying to sort various levels of reality into some ordered form. Enjoy.

PHP Challenge #3

As a result of some feedback, this challenge is going to be a bit more practical. The previous were practical in the sense that they could be used in some circumstances, but they had nothing to do with every day usage of PHP. This one does.

I want a function that takes in 3 variables:

  1. $Path: a directory path in the form “/path/to/folder”,
  2. $Filename: the name of some file (including extension, i.e. file.txt,
  3. $String: a string of characters

Now, the function must:

  • Create all directories in $Path that don’t already exist,
  • Create $Filename in the directory created by $Path,
  • Put the contents of $String into $Textfile

Please remember, I’ll be testing this on a Linux server so file permissions matter. You will almost certainly need the chmod() function.

The rules are:

  • The winner is the person who writes the most efficient script (i.e. the one whose script runs the fastest over several test runs). Size of the function is not an issue this time,
  • All functions should return a value of true if the operation is succesful, false otherwise,
  • All functions must be called FileCreator,
  • All functions submitted are considered public domain and hence can be reproduced and used with or without credit to anyone by anyone (so no bitching if someone rips off your script after the challenge finishes),
  • The winning script will be archived here for prosperity and to help others,
  • New rules may be added here at any time,
  • My decision is final,
  • All functions should be submitted to solitude@vkps.co.uk,
  • This is a slightly harder task, so the deadline is 12pm GMT on 19th March 2003

You have 11 days from now. Good luck!

PHP Challenge #2 Results

So the results are in from the second PHP challenge.

Runner-up was Plix with an entry that recursively slices a string of the numerals after comparing it to the number being thrown into the function. Quite clever, really. 236 bytes, in total.

Not clever enough, however, to beat ZeroByte who also won the last challenge. Rather than putting the numerals into a string and slicing it, he put them into an array and just pulled them out (although he admits he doesn’t know how the code works – he adapted a JavaScript version). So there you have it. Congrats to ZeroByte (again) and Plix!

The next challenge will be set within a few days.