No iPad for me…yet

February 1st, 2010

Like many, I am annoyed by Flash ads, yet love Flash when used responsibly.  My biggest peeve about my iPhone is that it doesn’t support Flash when I’m browing the web. This is a real problem. Nearly every site I visit employs Flash in some way or another. It also doesn’t multi-task very well. I have to close one application to use another. Okay, it’s a phone, not a computer. So mostly, I’m okay with those limitations. For my PHONE.

But for the iPad to have these same limitations? Are you kidding me? A computer that can’t do two things at once? Even a small netbook wannabe? I better be able to listen to Pandora AND read a book. At the same time. After all, that thing is far from cheap. It costs more than a netbook. To not be even half as versatile is just ridiculous.

I suppose if you really want a giant iPhone that doesn’t place normal voice calls or take pictures, more power to you, but personally I don’t see the point. If I were looking at a larger device like this, it damn well better be a good way to surf the internet, as Apple claims on their product page. However, when 90% of the sites I visit use Flash, and your device doesn’t support it, then it certainly doesn’t qualify as the best way to surf the web, now does it flyboy? In fact, it’s a really SUCKY way to surf the web. I would go as far as to call the iPad’s web surfing interface broken.

Sometimes we don’t even realize how many of the sites we visit use Flash. Download Firefox, if you don’t have it. Download FlashBlock extension, and use it. See just how broken your browsing experience would be if you didn’t have Flash on your browsing device. A few examples of popular sites seen in the iPad’s broken interface are here.

Sorry, Apple, but until iPad supports Flash and multi-tasking, I won’t be buying this fancy table decoration. Which is a shame, ‘cuz it looks really cool.

PHP simple XML parsing

January 12th, 2010

Little example of using PHP and XPath to grab values from simplistic XML structure. Requires PHP5+


<?
// the xml would be read somewhere, or sent in the request
$xml = <<<XML
<order>
<header>
<transactionDate>01/01/2010</transactionDate>
<client>elmer fudd</client>
</header>
<defendants>
<defendant>
<name>Bugs Bunny</name>
<addresses>
<address>
<line1>555 Elm Street</line1>
<line2 />
<city>Elk Grove</city>
<state>IL</state>
<zip>55555</zip>
</address>
<address>
<line1>555 Lake Shore Dr</line1>
<line2>Apt 201</line2>
<city>Chicago</city>
<state>IL</state>
<zip>55555</zip>
</address>
</addresses>
</defendant>
<defendant>
<name>Daffy Duck</name>
<addresses>
<address>
<line1>555 Elm Street</line1>
<line2 />
<city>Elk Grove</city>
<state>IL</state>
<zip>55555</zip>
</address>
</addresses>
</defendant>
</defendants>
</order>
XML;

$xmlDoc = new SimpleXMLElement($xml);
($transactionDate = $xmlDoc->xpath('/order/header/transactionDate')) || die ('invalid: missing transaction date');
echo 'Transaction Date: ' . $transactionDate[0] . '<br/>';

$nodes = $xmlDoc->xpath('/order/defendants/defendant');
foreach ($nodes as $node)
{
//print_r($node);
echo '<br>';
echo $node->name . '<br/>';
//print_r($node->addresses);
foreach($node->addresses->address as $addr)
{
echo $addr->line1 . '<br/>';
echo $addr->line2 . '<br/>';
echo $addr->city . '<br/>';
echo $addr->state . '<br/>';
echo $addr->zip . '<br/>';
}

}

?>

Fun with Linq

December 22nd, 2009

I’ve been playing with Linq a bit. We use .NET 2.0 at work right now, so I haven’t had much exposure to this. I started out messing with the basic extension methods on simple generic collections.  So far, I like it. As someone who is used to SQL, I find the query syntax to be confusing because of the reversed order. I prefer method syntax. I’m a C# kinda gal, so it just feels more intuitive to me. I’m used to delegates.

Little examples below for Any, All, Where, OrderBy, and Distinct.

Read the rest of this entry »

Upgrading Wordpress

December 14th, 2009

I’m going to be upgrading my version of WordPress, so if things look funny for a bit, that would be why.

Elements 8: Resize a square image

December 11th, 2009

I’ve mentioned that I’m really new to Elements 8. One of the things I needed to do was take an image, crop out a square section, and resize it to 100 by 100 pixels. I had a hard time doing this due to the default selections and my complete unfamiliarity with this editor.

If you have an image and need to resize it to a particular pixel dimension (I do it for LJ icons), you select a square portion of the large image by holding down the shift key and dragging the rectangle selector. Don’t look for a property of that tool to turn it into a square like I did; there isn’t one. Use the shift key.

Crop the image (Image –> Crop) to the square selection you chose.

To resize it, select Image –> Resize –> Image Size. When the dialog box comes up, you may not see a way to tell it the pixel size. This happened to me. It just wasn’t in the dropdowns for the units. Apparently, you need to select the two checkboxes “Constrain Properties” and “Resample Image”. THEN the pixels show in the unit dropdown. Go figure. Choose your desired size and you’re good to go.

It drove me batshit crazy looking for this, so I hope this helps someone. It’s both amusing and really frustrating that I find it so difficult to do simple things I’m used to doing easily in PSP…