I’ve been tinkering under the hood, yet again.

Earlier last year, I added support for mirror sites. However, it was a rather trivial hack, which merely allowed you to state wether there were mirrors, and what the relative paths were for these files.

However, tonight I’ve finally fixed things up a bit more – I’ve added a boolean for each specific file, which is either NULL, or a variable stating wether the file is morrored. When I decide on a global scape for this, it will probably be rewritten to include an array of all possible download points, and perhaps do trivial HTTP connections to assure that the host connects, and the path is not a 404.

As for now, enjoy my now slightly-lopsided download manager.

PHP, despite what many “purists” might say, is a powerful programming language. It’s inception has created many things which now exist on the Internet in record time – programs that used to be written in CGI, with custom libraries and horrible amounts of development time, can now be produced with less time, less Q&A, and much less effort.

This, of course, comes at a price. It can do many things, and it assumes the author to know exactly what they’re doing – that, and for the bazillion things it does offer – there are many things it does not.

For instance, I’m currently working on a “Who’s Online” system, which allows one to add friends by name, and see if they’re utilizing a certain service. This is pretty trivial, but PHP does not natively offer case-insensitive searches.

This would mean that you might have to iterate through an entire array and do string comparisons, since there’s no obviously-easy way to do an array-wide strtolower() or strtoupper(), et al.

However, rather than killing CPU cycles and memory on this, there is a somewhat-odd solution I tried, and worked – mapping the array unto another array.. and performing a function on that during the mapping. E.G:

$lowerUserConnected = array_map(‘strtolower’, $usersConnected);

This assigns the $lowerUsersConnected variable to assume the data of $usersConnected, after performing the internal strtolower() function upon it. It seems a bit awkward, but it works. Being that it keeps the keys (which are numeric), it’s possible to obtain the data from the $usersConnected array, and utilize the data in the $lowerUsersConnected array for comparison – it seems a bit costly, but certainly less than manually stepping through and converting $usersConnected by any user-written function.

Thus, it’s possible to:

$arbitrary_data = array_intersect($lowerUsersConnected, $friendsList));

and utilize the appropriate names from $usersConnected.

I’ll be the first to admit: I can be quite juvenile. After work, I enjoy relaxing to a couple hours of Law and Order. While busy hacking away, I heard Sam Waterston mention “upyourbutt.net”, which was referenced as a website, similar to Smoking Gun.

I decided to check the registration on this site, and, yes, it exists.

Registrant: Universal City Studios (FNCXBPVGDD) 100 Universal City Plaza Universal City, CA 91608 US Domain Name: UPYOURBUTT.NET

Seeing the corporate namesake on this domain made me smirk. Simple minds..

I’ve been working on getting all of my software up to date, from tweaking and rebuilding Rollator, to maintaining the software currently on my website.

For roughly the last week, I’ve been unable to accomplish much, due to an injury at work. My left arm is stuck in a sling, and is quite painful.

The medication I have been given does little – allowing me nearly two hours of sleep at night; hence, I’m scatterbrained, tired, and in pain.

I’m sure I’ll be fully healed shortly, however, until then, all software and updates will be slowed.