Press "Enter" to skip to content

Richy's Random Ramblings

Net: Checking Sites on Multiple Browsers

Until yesterday, if I was doing a design for a website I would either need access to multiple machines with multiple different web browsers on multiple different operating systems – or (and this is the route I took), just set up virtual machines (I used Microsoft VirtualPC which is free of charge) to get as many environments running as possible and then just cross my fingers.

But no longer is this needed! I’ve just come across Browsershots.org which generates previews of your website in around 60 different browsers/browser versions/operating systems with you giving the chance to specify if Java/Javascript/Flash should be enabled or disabled, which screen resolution should be used, what colour depth etc. So if you’ve been developing in a 1280×1080 64million colour Windows Vista with Windows IE 7 environment, but wanted to check it looked ok on Safari on an Apple Mac in 800×600 or Epiphany 2.20 on Linux FreeBSD 6.3 in 8 bit colour, now you can!

It is free of charge by default, although you can pay just $10 a month for “priority previews” if you wanted.

Net: Simple Tricks to doing Arithmetic (Maths) In Your Head

If, like me, you sometimes have difficulty in doing basic maths sums in your head, then head along to GeeksAreSexy (oh yes we are 🙂 ) and have a look at their simple “is a multiple of” rules. And after that, why not mosy on down and have a look at 10 Easy Arthimetic tricks on ListVerse. If only these tips were taught in schools then I wouldn’t be so reliant on a calculator or computer….

PHP: Making faster PHP scripts

Making the web has a couple of articles about how to make PHP scripts run faster and more efficiently. Checking the lists show I’m already doing quite a few of the items listed:

Page one

Multiple arguments with echo (i.e. using “,” instead of “.”)
I don’t currently do this, but it’s only 0.396% faster
Reduce function calls (i.e. find out the size of an array before a loop, not in the “for statement”)
I do do this, but not as much as I should – especially with a 54.095% difference!
Avoid using variables if they aren’t needed and unset them once you’ve finished with them
I try to do this, but there doesn’t appear (from the site) to be any speed penalties in not doing this.
Use single quotes (instead of double quotes – ” )
I’ve done this for ages as I knew PHP didn’t have to parse the string – but I didn’t know it was only a 0.696% speed difference.
str_replace() vs ereg_replace() and preg_replace()
I tend to use preg_replace instead of ereg_replace anyway, and I’m aware that using any sort of regular expressions is slow. Therefore I do try and use str_replace instead – after all, it’s a 59.224% saving in speed!