Friday, May 30, 2008

Long Now: Views: Essays

Long Now: Views: Essays: "Every great man that I have known has had a certain time and place in their life that they use as a reference point; a time when things worked as they were supposed to and great things were accomplished. For Richard, that time was at Los Alamos during the Manhattan Project. Whenever things got 'cockeyed,' Richard would look back and try to understand how now was different than then."

The Richard in question here is Richard Feynman. I wonder how you know you've found that reference point? Does the lack of such a reference point limit one's "greatness"?

Bob Sutton: Strong Opinions, Weakly Held

Bob Sutton: Strong Opinions, Weakly Held

Pure genius. I think this is really what the scientific method is all about -- the ability to be both confident and questioning at the same time. I need to work on the former.

Friday, April 4, 2008

Google NewsBot Humor


Sometimes I think that the Google bot that assembles the news page has a sense of humor when it chooses the image to show. I think this is an example.

Friday, March 28, 2008

Progress

Ecology, Art, and Technology | Environmental Risk Assessment Rover - AT Version 1.0: "Why has modernity, which was supposed to create a sense of security, produced more anxiety and threats than ever? Can scientific data and research help us understand the “riskiness” of contemporary life?"

Good question. I bet old Ned Ludd would have a theory on it.

Friday, March 7, 2008

Computer Jokes

Const-Correctness in C: "In C, you merely shoot yourself in the foot.

In C++, you accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical care is impossible, because you can't tell which are bitwise copies and which are just pointing at others and saying, 'That's me, over there.'"

Haha.. I thought that was funny. I'm a nerd.

Generating N contiguous bits

So say you want to generate a bitmap that is N contiguous bits, without using some kind
of crazy inefficient for loop. Here's a way that I figured out how to do that (not to say I invented it or anything, but I couldn't find it when I searched for it).
Obviously this has compiler and machine dependencies, and probably doesn't work on the Ides of March, so use at your own risk.

In this example, I want to generate 6 bits of 1's (so 0b111111):

#include <stdio.h>
main(){
unsigned short a;
short b;
int n = 6;
b = 1 << n;
a = (unsigned short) -b; // extend the left bits
printf("a is %hx\n", a);
printf("~a is %hx\n", ~a);
a = ~a; // now b should be 0b111111
}


That's probably like 4 or 5 operations, so for 6 bits it probably sucks. But if you use 64 bit long longs and want to generate 47 one's then it will save some cycles.

Isn't playing with bits fun?

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
>
>
>
>
>