Wednesday, October 24, 2007

TigerDirect, UPS, and Hawaiian Shipping

I hate it when companies only use one shipping option. Because I live in Hawaii, certain shippers, such as UPS are absolutely outrageous because the only option is 2 day air. Unfortunately, many web businesses such as TigerDirect only ship via UPS, and this means that for a $50 RAM chip, shipping is $40. Clearly this really bites it.

Sometimes, a web business will hear our plight and agree to ship via the USPS or FedEx, both of which have much more reasonable shipping rates to Hawaii. Other times, as in the case of TigerDirect, they really don't give a shit about us out here in the middle of the Pacific. Wah.

I guess my ire should really be directed at UPS as well...

Dear Amoss,

That is indeed unfortunate for customers in Hawaii. I am sorry that
you do not value our business. I will be shopping at a competitor
with more reasonable shipping policies to Hawaii.

Thank you for your response.

Aloha,
David Donovan
- Hide quoted text -



On 10/24/07, TD Sales Leads wrote:
> Dear Valued Customer:
> We can only ship via UPS.
> Thank you for visiting our website. We at Tiger Direct appreciate your
> business. If you have further inquiries and reply to this email, please make
> sure to include your entire message, so we can address it appropriately.
>
> Sincerely,
> Amoss
> TigerDirect.com Web Response
>
>
> How are we doing? We would like to hear from you. Please give us your
> feedback at
> http://www.tigerdirect.com/sectors/custsurvey/service.asp .
>
>
>
> -----Original Message-----
> From: donovand@gmail.com (donovand@gmail.com)
> Sent: Oct 24, 2007 6:42:35 AM
> Subject: Pre-Sales Inquiries / Product Information
>
> **
> ** Message Sent from: TigerDirect.com website
> ** Please Respond with a tigerdirect.com email address.
> **
> Name : David Donovan
>
> E-Mail : donovand@gmail.com
>
> Phone : ()-
>
> Subject : Pre-Sales Inquiries / Product Information
>
> Message :
> I am interested in buying some memory from your company. Specifically, I am
> interested in a 1GB DDR RAM chip, which costs $51. Unfortunately, I live in
> Hawaii, and UPS ground is not an option for shipping, therefore the shipping
> costs for the item (which must be 2 day air) is approximately $40. I would
> really like to order from you, however the shipping is prohibitively
> expensive for me in Hawaii. Is it possible to ship via the US Post Office?
> This would be a much more reasonable option for me.
>
> Thank you for your attention to this matter.
>
> Sincerely,
> David Donovan
> http://questev.tigerdirect.net:7630/console/showSequence.do?sequenceid=28607304200710240607566420317232
>
>
>
>
>

Thursday, October 11, 2007

Bit Twiddling

Okay, so I have this problem... I want to do something like:

if(a == 0){
a = b;
}

where a is a positive integer.

But without using an "if" (branching code really sucks). I found this crazy page and adopted it to my needs.

Here's my solution:

#include <stdio.h>

int main(){
unsigned int a = 0;
unsigned int test_msb = -a;
unsigned int mask = (unsigned int) (((int) test_msb)>>31);
unsigned int c = 2;

int result = (int) (a & mask)|(c & ~mask);
printf("%x %d\n", mask, result);
return 1;
}

If I change a to another positive integer, a is printed. When a is 0 (as is hardcoded above -- kids, don't try this at home), c (i.e., 2) is printed. Wee-hoo.