Monday, January 16, 2006

my blog is moving...

I have moved my blog, as promised to a new site. Very soon you will be able to get to it at www.andrewyager.com. We're just waiting for the DNS address to be propagated around the world. So check it out. I will no longer be updating this site after today!

Sunday, January 15, 2006

My wife has a blog...

... and I didn't realise. How unfortunate. Read it and comment on it. She sometimes says very profound and interesting things. And I love her lots too :-)

Saturday, January 14, 2006

This is quick... so i'll be quick...

Have you seen the new MacBook Pro? It looks very cool. Noticably, Apple doesn't specify battery life, it no longer has S-Video out built in, it no longer has a DVD dual layer super drive, but it is 4 - 5x faster than the old model. Oh.. it doesn't have FireWire 800 anymore and the PC card slot is not CardBus, it's ExpressCard. So there goes any chance of using P2 flash (see www.panasonic.com if you are really interested) until someone makes an adapter. I presume they will... but... speed... 4 - 5x faster... intel chips... running Windows on my MacBook (I know... sounds odd... but would certainly help with some annoying troubleshooting things and save me from running VirtualPC)... universal binaries... MagSafe (patent pending...) power...
I think I want one. Battery life is reported to be 3 hrs on a full charge, and the S-Video/Composite DVI adapter can be bought for about $19US. I'd need to upgrade my final cut suite, but they don't have pricing for our volume license for the software yet. What I'm wondering is how long before the next model is announced. I don't think there will be anything new until say September. I think I can deal with having a 15" model that has the same screen res as my 17" PB for at least the next 18 months.
On other news... we're off to the Belgium Beer Café tonight. Don't ask me where... maybe someone can google it and let me know... hey... use my google bar below :-)
Will write more later. Will also probably move my blog to a wordpress site hosted by me.
Oh... and in other news... my web server acquired a new IDE controller and HDD this week. It seems to have stopped freezing randomly at 2 in the morning... or 11am... or whenever... hmm... good move :-)

Tuesday, December 13, 2005

foreach in php5

So... many new things appear in PHP5... one of which is a significant change in the behavior of the foreach function. Take the following example:

$array = array(array("asdf"=>456));
foreach ($array as $item) {
$item["asdf"] = 123;
}
print_r($array);

in PHP4 this would have printed
array (
array ( asdf => 123 )
)
however in PHP 5, it prints

array (
array ( asdf => 456 )
)
I hear you asking why! How is it that this function does not assign the value 123 to the "asdf" property any more? Well... my friends... here is the trap for the unwary. As of PHP5, the foreach function creates a copy of the items, whereas previously we operated directly on the items. So now, we need to have the following code to specify a reference assignment:

$array = array(array("asdf"=>456));
foreach ($array as &$item) {
$item["asdf"] = 123;
}
print_r($array);

This now works correctly thanks to the lovely &!

Thursday, October 27, 2005

Google Ads...

So, you may have noticed the addition of Google ad's to my blog. It was an expirement. I haven't made any money yet, but if you click on the links, I get paid... and the more people who click, the more money I get :-)
But what I was particularly interested in is the topics that come up. Recently, I've had a lot of stuff about DMX, lighting and Wireless DMX. I've found that quite facinating given my discussion about writing software that uses DMX protocol. And even more interesting is that fact that we are planning to write ArtNET control software. ArtNET is the current standard for DMX over Ethernet. Hmm... I hear your mind ticking over. DMX over ethernet. I know you next question is can I run it over a WiFi connection, and thus make wireless DMX? Well, the answer should be YES! We have the directions to turn a netgear router into a box running embedded linux, and then, by simply connecting a Enttec DMX USB device to the Netgear router's USB port we can turn it into a remote DMX node controlled over WiFi from an ArtNET server (eg a Powerbook). It's interesting to see what else is out there. On a slightly different note - I've always wondered about the logistics of Wireless DMX. It could be great to just shove a Wireless ArtNET (notice the transition) node onto some truss in the roof, plug a DMX dongle into it and run all of the Moving lights that require DMX through it. That should save a lot of energy/hassle with cabling and looping DMX around to various different locations. Not to mention, it's only about $400 to build.
But is it reliable? Well the answer to that is that in theory it's as reliable as your WiFi connection...
Google