Ok, one step better is the built in context switching action helper. This will make my code much easier to work with (I miss this from Solar

Zend PHP5 Certification Study Guide Annoyance

April 18th, 2009 by Ray in Computer Related, PHP/MySQL, The Bin | Tags: , | 3 Comments

Zend PHP5 Certification Study Guide by Davey Shafik annoys me in many ways which include grammatical errors and erroneous coding examples.

Today’s rant will be on coding examples:

Page 133.

function __autoload($class)
{
//Require PEAR-compatible classes
require_once str_replace("_", "/", $class);
}
$obj = new Some_Class();

At first glance this looks OK but the author goes on to state that the file, Some/Class.php will be included automagically. WRONG! Autoload passes in the name of the class, not the name of the class plus .php at the end (which is what he is thinking). $class is really Some_Class, so the code above should read:

function __autoload($class)
{
//Require PEAR-compatible classes
require_once str_replace("_", "/", $class) . '.php';
}
$obj = new Some_Class();

I’m annoyed not just because the code is wrong, but because he says “When instantiating Some_Class, __autoload() is called and passed “Some_Class.php” as its argument.” If Mr. Shafik took just a couple of minutes to read the documentation, he would have realized he was wrong, and I could avoid some frustration this book has (and still is) caused me.


Time Warner Cable Remote Control FAIL!

April 8th, 2009 by Ray in Computer Related | Tags: , , | 2 Comments

Today I came home to our Time Warner Cable DVR (Motorola) box not working properly – the DVR function(s) wasn’t working. Taking matters into my own hands I thought it may be an issue with our remote. Some things worked on the remote, such as ch+ ch-, vol, and basic stuff. I WANTED MY DVR FUNCTIONS!

As I flipped the remote over to take the batteries out I saw the following text:

Quick Remote Setup
1) Turn device on.
2) Press Device key (TV, DVD, etc.).
3) Press and hold SETUP (LED blinks twice).
4) Press 9-9-1 (LED blinks twice).
5) Press POWER key.
6) Press CH+ repeatedly until device turns off.
7) Press SETUP when device turns off.

I thought, hrmmm, maybe that will fix the remote. So I tried it. On step #2 I selected the CBL (cable) button on the remote. I got the blinking but the device never turned off.

I got fed up after trying several different things. I called TWC support and they told me they were in fact having issues with their DVR service. After talking with support for a few minutes (very nice by the way…I think I got the Portland office) I explained I followed the instructions on the back of the remote thinking it would reset the remote. The support person said if I did that on the remote when the CBL mode is selected, I cleared out the remote settings. I asked him if there was anyway to reset the remote and he said no. All remotes come pre-configured from TWC and there is no way to reprogram them yourself (unless someone has a nice hack they know of out there). If you pop the battery cover off the back of the remote you will see 6 pins…that’s what they use to reprogram these things.

The reason I am so ticked is because there is NOTHING on the remote that says that following those instructions wipes out the settings and the only way to get the settings back is to call TWC for a new remote! Why oh why would you do this TWC?