Caffeine Powered Automaton

New Layout

12.29.08

The new site layout is up and running and I'm probably going to be tweaking it a bit more now that it's live and I can view it on multiple machines and monitor sizes. There's actually a semblance of a menu now. There will probably be a few minor problems at first but I'll try to get those resolved as quickly as possible. I'm also going to be messing with the RSS a little, so if there are any problems with the feed that is why.
link comments (3)

PHP: Variable Variables

11.28.08

PHP variables are loosely typed in that the type of variable you are using does not need to be stated. The variable can hold a string one moment and an integer the next. All variables are prefixed with the ‘$’ and are case sensitive. However, you can do some unique things with these variables in PHP that you can’t do in many other languages. Take the following code:

<?php
$var0 = “zero”;
$var1 = “one”;
$var2 = “two”;
$var3 = “three”;

for($i=0; $i<=3; $i++)
{
  echo ${'var'.$i};
  echo '<br/>';
}
?>


When ran it will print out:
"zero"
"one"
"two"
"three"

More open than not the same effect would be achieved by storing all the variables in an array and iterating over that (appending quotes of course to get the exact output). This is not the only thing unique about PHP's typing. Variable variables allow variables to have variable names. This functionality actually allows a lot of hacky behavior into PHP. Found on the PHP page about variable variables:

//Following code can re-assign the value of this without any error reporting:
<?php
$var = 'this';
$$var = 125;
var_dump($this);
?>

link comments (1)

Vote!

10.14.08

Normally I talk about technology or geeky news here, but today I'm going to remind everyone that the election is November 4th and anyone who can should vote.

voting bitches
link comments (2)

Graph Fun Time

10.04.08

sucks

So some reason its okay to use 'sux' for Microsoft and Apple, but when it comes to Linux only 'sucks' will do.

web 3.0

"Web 4.0" had 104,000 results and "web 5.0" had 28,200 results.
link comments (1)

Flickr's Most Annoying Feature

09.28.08

The ability of people other than the original photographer to add notes to a picture is the most annoying feature that Flickr offers. Not only do 90% of the notes have nothing to do with the area they are highlighting, but often they are redundant and are totally out of control. The extremely popular pictures quickly become obscured by the sheer number of notes on the image. Notes are also buggy to the point where they don't always disappear when you move your mouse outside of the image.

flickr notes

This image clearly shows notes gone completely out of control. The original image can hardly be seen beneath the flood of notes.
link comments (1)
Next »