RSS
 

Archive for February, 2009

LG VX8700 Review

15 Feb

The LG VX8700 is a slick looking phone without a lot of frills, and misses the mark in respect to usability.

Pros

  1. Looks cool…low profile
  2. Voice dialing
  3. Not a lot of “frills”
  4. 1.3 MP Camera
  5. Video
  6. 1000 contacts in the addressbook

Cons

  1. Non-standard plug for data and headphones. The phone comes with an adapter to fit a standard headphone jack, but is rather bulky and completely useless in the event you left it in another car.
  2. Heavier and wider than the Motorola RAZR v3
  3. Screen is not as wide as the RAZR, but does make the phone a bit skinnier
  4. The data interface is not USB, as is the case with most modern phones. This is yet another accessory you must by, and carry with the phone at all times. I ordered a USB cable that plugs into the non-standard plug on the phone….do not know yet if it will charge the phone from the cable->laptop as my old PDA phone did.
  5. No games are included. You must buy a game to play one. My old LG phone had 2 or 3 games installed by default, as does the RAZR.
  6. Usability lacks on the LG VX8700. There are no bumps to indicate which key you are on, and the arrows are difficult to use, even when looking at the phone. This is a hinderence when driving, as I like to be able to hit keys without taking my eyes off the road.
  7. The RAZR has a bump on the “5″ key, and the arrow keys have some relief to them to ensure your finger is on the key without having to look.

Here are the manuals for the Motorola RAZR v3 and the LG VX8700.

Only one volume control setting for the entire phone. There is no way to make the ringer volume “low”, and the call volume “high”.

VN:F [1.9.3_1094]
Rating: 6.0/10 (1 vote cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Retweet
 
Comments Off

Posted in Advocacy

 

Error Checking Pattern for Form Fields

02 Feb

The below is written in Perl, but is simple enough to adapt to any web programming language.

Our simple form has two fields. Lets say a phone number as an optional field, and another required field for first name.

For simplicity, I’ll assume a first name can contain spaces and uppercase or lowercase letters, and a phone number can contain parenthesis, hyphens, spaces, and digits.

We will assume your application framework already has a mechanism in place to create or update an application user (Application::User), and a means of notifying the user interface (UI::Message) with the appropriate methods and constructors.

my $user = new Application::User;
my $msg = new UI::Message;
my $first_name = $ARGS{'first_name'};
my $phone_number = $ARGS{'phone_number'};

#required field first name must always be present.
unless ( $first_name && $first_name =~ m/^[a-zA-Z ]+$/ ) {
   $msg->err('first_name', "First name is a required field and can only contain upper and lowercase letters with spaces.");
}

#validate phone number if we have data for this field (optional)
if ( $phone_number && $phone_number !~ m/^[0-9\-\(\) ]+$/ ) {
   $msg->err( 'phone_number, "Phone number should be in the form: (555) 555-5555." ).
}

#stop if we encountered errors
return if $msg->has_errors;

#continue saving the data if we get this far because we have a valid First Name and valid Phone Number

$user->set( 'phone_number', $phone_number ) if $phone_number;
$user->set( 'first_name', $first_name );

if ( $user->save() ) {
    $msg->ok("You have successfully updated your contact details.");
}

Its an important security practice to “white list” all acceptable values prior to saving data or handling it within a web application.

Perl regular expression are a good way to validate strings of values. Simple regexes should always be tied to the beginning and end of the variable in question, otherwise you’re only matching against a substring.

For example:

$phone_number =~ m/\d+/; #matches at least one digit (but could contain any number of nefarious characters)

Better example:

$phone_number =~ m/^\d+$/; #tied to beginning "^" and end "$" of the string

…ONLY digits are allowed with this rule.

VN:F [1.9.3_1094]
Rating: 6.0/10 (1 vote cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)
Retweet
 
Comments Off

Posted in Development