Thursday, February 22, 2007

Geocoding

What in the world is Geocoding? The basic idea is to supply your address and find the matching latitude and longitude values like this free geocoding service. Maps within Google use this technique as well as other web maps. It is kind of scary how much information is available from your physical address or publically listed phone number if you also retrieve the census track number. While there is free US Census TIGER data, the alternative is expensive up-to-date Tele Atlas data.

Monday, February 19, 2007

Customer support gone wrong

My father-in-law told me that his Compaq Presario 900Z wireless internet just stopped working one day. Since it was his 80th birthday I felt sorry for him and told him I would get to the bottom of it. I decided to call Linksys since he was using Time Warner Road Runner with a cable modem with a Linksys router, which was all working fine the last time I was in his home. I knew better than to try Time Warner customer support, as I had done that before and failed miserably, in getting any help that is. I struggled thru for 1 hour with Linksys explaining the problem and then I was finally told that I had a hardware problem where I had to reflash the IP stack. What in the world did that mean? I then called HP as I could not find anything about this model on their web site. For 1 hour I then walked thru the same problem again only to find out he did not know what reflashng meant nor now to fix my problem. I then called Linksys again with my trouble ticket number and for another hour explained the problem all over again - I was not sure what the trouble ticket did for me if I had to start all over again. At the end of the hour, he told me he would try one final thing. That did not work, but at least it gave me an idea of what to try. Finally after 3.5 hours I fixed the problem. Man do I ever hate Windows even more and am all the more thankful for my Apple laptop and iMac desktop at home.

Indochine Cafe

For my father-in-law's 80th birthday he requested we as a family eat at Indochine Cafe in Wilmington, NC. Besides the fact that my mother-in-law insisted on paying for the meal, it was a great place to eat. The food was so excellent that I would go back any chance I get.

We tried many things, but the 3 I liked the best were the following listed from hottest spice-wise:

1. red curry
2. green curry
3. yellow curry

The red curry was one of the hottest dishes I have put in my mouth and just kept getting hotter the more I ate. Finally my temples felt like they were increasing 1 degree in temperature every minute. Then the back of my neck started sweating. What a strange experience but the taste was so good. I also tried the green curry and it must have been the coconut sweetness that did not give it the same edge. It was also very hot but the hotness did not last. If you like coconut and hot food, then it is a perfect dish. The yellow curry was spicy with tumeric based spices and had a great flavor but was not hot at all.

The environment is so unique with Buddhist statues all around and lovely pottery as well. What a nice evening!

Thursday, February 15, 2007

PHP code

I have heard from several developers that they hate PHP, but I have to admit that every time I need example code to help me do something the PHP documentation has never let me down. Why is that? The PHP documentation allows user comments, just like a blog and the comments are displayed at the bottom of every PHP command. For instance, I needed to find a way to read an MP3 file MP3 files and return it to any browser to allow the user to save the file to their computer. Sounds easy, but it turns out the code is quite complex. I searched google for "read MP3 PHP" and found sample code that did not work, and then saw one line at the bottom of the sample that used a PHP function I had not heard of before called "fpassthru". When I went to PHP fpassthru, I learned that using fpassthru is actually much slower than feof and fread. The code I am using was taken from the post named file downloads verified by session vars : 22-Oct-2005 03:36.

Wednesday, February 14, 2007

left undone on A2D web site

I did not have enough time to add the following to my A2D web site:

  1. menus using Suckerfish menus as starting point

  2. AJAX using Prototype Javascript library :: when a need arises I will be ready within minutes

  3. Multiple column CSS layouts

browser compatiablity

I have been working all week long to get my A2D web site working correctly in Safari (Mac), Firefox, and IE 7. I finally achieved it, only to find out A2D does not work in the latest Opera. The good news is that it is not due to the way I designed A2D or coded A2D, but Opera reports errors in latest prototype and rico libraries I am using. I did not have time to revert to an older version of Opera or to debug these libraries and fix the code, so for now you cannot click on the toolbar buttons in Opera. This is the error in the Opera Error Console:

message: Statement on line 1194: Type mismatch (usually a non-object value used where an object is required)
Line 1194 of linked script http://www.attentive2design.com/js/rico.js
Line 78 of linked script http://www.attentive2design.com/js/prototype.js

Most of the fight involved using text shadow for the "Attentive 2 Design" text. I thought I had it working, but the CSS code is very dependent on certain CSS properties. If you set a "background-color" then the shadowing does not work in IE.

The second largest battle was on the width and height of the browser window. I needed this in order to size the content pane on the right hand side of the A2D web site to fill the browser window. I found a web site with working Javascript code to determine the browser size at:

http://www.howtocreate.co.uk/tutorials/javascript/browserwindow

var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
return {width: myWidth, height: myHeight};

active button underneath content pane
When I had all of this working, I noticed that the active buttons, which I configure to look like horizontal tabs did not look right on Safari as the active buttons were below the content pane. This started happening when I set the "overflow: auto" CSS style on the content pane. The only way I could figure out to fix this problem was to try the following:

Position.relativize(button);
button.style.zIndex = 100;

Then I found out that this code caused Javascript errors in IE, so I had to surround the block with a Safari check:

if (navigator.appVersion.match(/Konqueror|Safari|KHTML/))

Tuesday, February 13, 2007

UCD vs. Activity Modelling

I have been reading about Activity Modelling in contrast to User Centered Design:

Donald Norman's Activity Modelling

The problem is that I am comfortable with UCD so I will have to digest on this a bit before seeing if it can help me.

Swamiji's blog

I helped create a blog for a very good friend, who I was with in India recently:

http://samvaddialogueoflife.blogspot.com/

Sunday, February 11, 2007

blog on India

When I was looking for photos of India of the same places I went, I found one of the nicest blogs I have read. The photos are excellent and give you a great feel for the diversity of life in India:

Destination India

India photos

There are many ways to post photos on the internet, but an easy way to organize photos on your PC and then publish to your web site is to use JAlbum. This has been updated recently and is now even easier to use. Yes, I have a Mac laptop and iPhoto exists, but JAlbum works on just about any platform so I use it so I can help friends who use it. I used a very cheap disposable camera while in India and then scanned the photos on my PSC950 HP All-In-One printer/fax/scanner. Nothing high tech here at all, but even with all of this low tech cheap stuff, the photos did not turn out that bad at all:

Photos of India 2007 trip

I also used Google to search for other people's photos of the same areas I visited and created another photo album of these:

India photos found in Google

Both of these were created using JAlbum with different output skins.

Saturday, February 10, 2007

IE UL width fix

The only way I could get the <ul> custom lists to look right within IE 7 was to use the following Javascript code to adjust the widths os the <ul>:


windowWidth = $('content').clientWidth;
$A(document.getElementsByClassName(name)).each(function(element,index) {
// fix only for IE
if (Element.getStyle(element,'padding-left') != null) {
element.style.width = windowWidth - parseInt(Element.getStyle(elemen
t,'padding-left')) - parseInt(Element.getStyle(element,'padding-right')) - parse
Int(Element.getStyle(element,'margin-left')) - parseInt(Element.getStyle(element
,'margin-right'));
}
});

Thursday, February 8, 2007

rounded corners #2

rounded corners
Just when I thought all was well as the nice rounded corners looked so good on Safari and Firefox, I found out that they look horrible on IE 7. The first problem I found was that the Rico library in IE 7 does not like color names, so I switched the "white" color to "#ffffff".

IE bug with vertical-align:top
Next I have to find out why the Rico demos work on IE 7 but my special code does not. Why does web development have to be so hard? Who would have believed that setting vertical-align: top on the parent <div> would have caused all of the havoc? It is fixed now and looking the same on Safari, Firefox and IE.