The best maths answers. Ever.

You’ve probably seen the following maths answer, which I found on rooijan‘s blog and posted here a few months back:

To add to that, I’ve just found these…

You just have to wonder what makes people come up with these…

In other news, I’m working on a little personal site similar to what jerith and Edd have. I’m hoping to get it up by the end of next week, but that depends if I can get jerith’s PHP menu generator working – it’s not displaying the little pictures next to pages that have been updated in the past 7 days, like it should. Since I’ve seen it work fine on jerith’s page, I can come up with two possibilities – either it’s because I’m testing it on a Windows machine (I made sure that my site will be hosted on a Linux box, by the way) or it’s because jerith uses PHP4 and the code doesn’t like PHP5, which I use. Knowing Microsoft, the former seems more likely.

And in yet other news, it seems like a lot of people I know have written off cars this year. First it was rooijan, then it was Glen – now Bushman has just joined that club…

UPDATE: rooijan just e-mailed me this…

Bookmark the permalink.

5 Responses to The best maths answers. Ever.

  1. jerith says:

    Part of the reason my site works fine is that it no longer runs on php — I’ve replaced the backend with a python/nevow based thingy that does twice as much in half the amount of code.

    On the other hand, the php code checks the mtime of the file and compares it to the current time minus a week. Perhaps NTFS or whatever handles timestamps differently. Also, I think there were a couple of little bugs in that php that I never fixed. Part of the reason for the change was that it was becoming a little unmaintainable. All programming languages suck, but php sucks more than most.

  2. Ron2K says:

    No, it’s not NTFS. Or Windows, which was my original thought. I just uploaded part of the site to test it out, and it doesn’t work there either.


    Oh well, off to Google we go…

  3. Ron2K says:


    Turns out that we were both wrong – the script was looking in the wrong place for the files. Once I figured that out, it didn’t take me too long to fix it.

    And here comes the kludge. It appears that PHP wasn’t happy with the “/” in front of the link, but taking it out (which is what got the script working) resulted in me having to create a second script file for the subdirectories as without the “/”, I need to put a “../” in front of the link path for the links from those locations to still work. The isNew() function seems to accept “../”. I wish it would just accept “/” as it would definitely make my life a lot easier.

    If I can figure out a) how to get the isNew() function to remove the leading “/” from the link path and b) to return the name (not the full path!) of the current directory, I could possibly get the isNew() function to check if we’re in the root web directory or one of it’s subdirectories – if we’re in the root, we remove the “/”, if we’re in a subdirectory, we add a “..” to the beginning of the link path. (This would only be done within isNew().) Only problem is, my Google searches returned nothing that I could use. I don’t know whether or not what I need is not there or just so well hidden away that I can’t find it.

    I’ve only just started dabbling in PHP and already I’m not liking it very much…

  4. jerith says:

    Have a look at php’s string functions. As a hack (if you’re sure there will always be / in front) you can just chop the first character, otherwise you can test for a slash or use one of the path manipulation tools.

    You’re welcome to my python code, but you’d have to make sure you can run python wherever you’re hosting and you’ll have to set it up with some kind of CGI unless they’ll let you run your own webserver and proxy it.

  5. Ron2K says:

    Thanks. I eventually found what I was looking for, and experimented with the code last night. Didn’t take too long for me to get it working.

    I may make some more (unrelated) modifications; when that’s done I’ll post my modified code.

    I don’t have Python enabled on my webhosting account, so my only option was pretty much getting that PHP working (which, as I’ve just said, it now does).