Press "Enter" to skip to content

Month: February 2008

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!

Techy: Microsoft Fasttrack2 C#.Net

I’ve just completed a 5 day Microsoft course (and I bet many people that read this blog never ever expected me to say or speak those words!) entitled “MS2124ADOE: Fasttrack 2 C#.Net Part 1: Object Essentials and Re-orientation to C#”. Quite a mouthful! Basically, the course is about Microsoft C Hash (or C Sharp as the USians like to call it) and a little bit of Microsoft’s .Net (which was basically Microsoft’s response to Java). I found it extremely simple to get my head around – maybe because I’ve done standard ANSI C programming nearly 10 years ago and I understand the concepts of Object Orientated Programming (OOP) as I spend the majority of my time in PHP code (ok, mainly PHP4 code which isn’t that OOP, but has a little bit). The only bits I had slightly trouble understanding was Events and Delegates (as I’ve not needed to use anything like that before in PHP), but once I “mentally mapped” them to RISC OS’s callbacks, it was simple. It was quite strange that out of the six of us there (2 with PHP backgrounds, 1 with Java background, myself [mixed backgrounds] and 2 Microsoft Visual Basic programmers), it was…

Fun: Human Japanese Tetris

I’ve just been told off by my other half for laughing too much at a Human version of an inverted “Tetris” style game. Basically, shapes arrive and the Japanese contestants just have to make their body fit the holes. Sounds simple – until you see some of the shapes! Source: Richard and Beth who found it from Gareth Saunders