lukebaker.org

lukebaker.org

Archive for March, 2007

AT&T: Support and Naked DSL

with 4 comments

Lots of people like to complain about support from various large companies, particularly if the support is comcastic. I certainly have enjoyed complaining about them from time to time. However, today I had one of my first good experiences with AT&T’s support (formerly SBC in our area).

  1. The line quality was good. No static making it hard to hear the support people.
  2. Relatively short wait on hold.
  3. The people I talked to spoke English in such a way that I could easily understand them. One even had a charming southern accent.
  4. I received useful information the first time I asked for it.

I also discovered that AT&T now offers naked DSL or as they call it “dry-loop DSL”. In other words, they allow you to purchase DSL without requiring you to have phone service through them. I had heard mention of this happening in the future, but didn’t realize it was already available.

Unfortunately if you remove your phone service, your DSL no longer qualifies for whatever special offers they have, which means you’ll be paying more for your DSL. So, despite removing phone service, your bill may not decrease by all that much. The support folk informed me that if I were to switch to dry-loop DSL, they have to shut of my phone AND DSL prior to turning on the dry-loop DSL. I was told that I might be DSL-less for up to 5 business days. Surprisingly, the support person was apologetic about this issue.

Dry Loop DSL Options from AT&T

  1. Express: 1.5 Mbps / 384 Kbps — $44.99
  2. Pro: 3.0 Mbps / 512 Kbps — $49.99

To talk directly to the dry-loop folk at AT&T, call 1-888-800-4095 (7am – 9pm M-F; 8am – 5pm Saturday).

Written by Luke

March 9th, 2007 at 12:47 pm

Posted in General

PHP and Named Parameters

with one comment

Since working with Ruby on Rails, I’ve become much more conscious about how my code looks. Occasionally, when working with PHP there are things that are a part of the language that tend to make my code look ugly or just not very clear and succinct.

One such case is when defining arrays, particularly nested associative arrays. PHP makes working with arrays fairly handy, however I always shudder when I have to create / populate an array explicitly. Some of the code I’m working with lately uses associative arrays as a way to have named parameters in PHP. Here’s some example code that uses associative arrays in this way:

  1. $p1 = new Person(‘Luke Baker’,
  2.      array(‘home_phone’ => ’555-5555′, ‘cell_phone’ => ’555-5551′));
  3. $p2 = new Person(‘John Doe’,
  4.      array(‘cell_phone’ => ’555-5531′, ‘email’ => ‘john@doe.com’);

Named parameters let us accept lots of different types of information, without splitting them up into individual parameters and having to remember which order the parameters are in. I can handle home_phone, cell_phone, and email in the person constructor and the call to the constructor doesn’t have to worry about the order of parameters or filling in null values for information it doesn’t have.

The above example doesn’t look too ugly, but we also aren’t stretching the named parameters very much. Here’s a slightly messier example:

  1. $p3 = new Person("John Calvin", array(‘dates’ => array(‘birth’ => ‘July 10, 1509′, ‘death’ => ‘May 27, 1564′)));

We could break it into different lines, which doesn’t look too shabby:

  1. $p3 = new Person("John Calvin", array(
  2.     ‘dates’ => array(
  3.         ‘birth’ => ‘July 10, 1509′,
  4.         ‘death’ => ‘May 27, 1564′
  5.     )));

Another option, might be to use JSON to represent that associative array. We could have our constructor decode the second parameter from JSON if it looks like it might be JSON. Once it is decoded, we’re back to an array representation in PHP, which is what we started with. In other words, we can easily allow our constructor to accept either JSON or an array as the second parameter. Then we could write the call the to constructor as follows:

  1. $p3 = new Person("John Calvin",
  2.     ‘{"dates" : {"birth" : "July 10, 1509", "death" : "May 27, 1564"}}’);

Maybe I’m silly, but I like the look of the JSON example a bit better. I certainly won’t be using JSON everywhere I declare arrays, but here and there I find it useful. What do you think, is it worthwhile to support JSON in this way?

Written by Luke

March 1st, 2007 at 8:51 pm

Posted in Programming