Work Results

Focus Point
A random colorful wallpaper inspired by how, when you look through an out-of-focus lens, lights form interesting little circles.
ImageEvolution
...Each image is made up of random shapes. Some contain arbitrarily placed triangles, some contain only circles of varying radii, and some contain a mixture. When an image is chosen over another image, offspring are generated. The number of offspring depends on the percentage of "battles" against other images that have been "won." The more often an image is favored over another, the more offspring it produces. The offspring contain random variations of the shapes that made up the parent. Positions, sizes, angles, and even color (there's two, green and white) are subject to change.
...What's unique about ImageEvolution as compared to Mutating Pictures is the user flexibility. If a user sees a picture of a body but they feel it looks more like a turtle, they can create a branch. This adds more possible subjects of images.

Wii Browser Viewport Size
Since making web sites that are compatible with any browser is a big thing nowadays, making sites work on the brand new Wii browser is important. Of course, without some information on what to design for, that's pretty hard. So, I created a test web page with a few statically sized div's and set to work finding out some information. Other sites say 640x480, but that's are based on the Wii Shop channel. Here's my results:
Followup: PHP: rand() vs. mt_rand()
My past comparison of rand() and mt_rand() only compared the speed, and I saw very little difference. This time I'll compare how truly random the numbers each function produces are. The code used to test this is:... mt_rand(0,512), mt_rand(0,512),
... mt_rand(0,255), mt_rand(0,255), mt_rand(0,255), mt_rand(0,127)
... imagepng($img,"mt_rand.png");
... rand(0,512), rand(0,512),
... rand(0,255), rand(0,255), rand(0,255), rand(0,127)
... imagepng($img,"rand.png");
...On Linux (Slackware 10.2), the results looked fine, two seemingly random graphs were produced. On Windows (XP), however, the results were drastically different between functions:
...rand()
...mt_rand()
...So, if your code relies on random numbers, and you plan on using it on multiple operating systems, mt_rand() appears to be the way to go.

PHP: rand() vs. mt_rand()
The documentation for mt_rand() says that it produces numbers four times faster than the standard rand(). So, being that I use random numbers in my code often, I decided to test this....Note: There is a followup to this article that discusses the randomness of the numbers generated by the two functions on different operating systems.
...rand();
...echo "{$max} random numbers generated in {$time} seconds using rand();<br/>";
...mt_rand();
...echo "{$max} random numbers generated in {$time} seconds using mt_rand();<br/>";
...On my laptop running a slightly outdated version of PHP 4.4 (around 4.4.0 if I remember correctly), the results were not as I expected. Most of the time, rand() was faster than mt_rand() by about 0.02 seconds. Of course, this isn't a big performance difference, but it's not the four times faster that was promised.
...100000 random numbers generated in 0.127249002457 seconds using rand(); 100000 random numbers generated in 0.140385866165 seconds using mt_rand();
...On TechnoServ, the results were closer. Usually rand() won by 0.01 seconds or less. Once again, not the supposed "four times faster."
...100000 random numbers generated in 0.11243796348572 seconds using rand(); 100000 random numbers generated in 0.11861705780029 seconds using mt_rand();
...So, despite the PHP documentation, rand() and mt_rand() are about the same speed, rand is just slightly faster.


