Hybrid Cars

The regular Honda Civic gets 40mpg highway and costs $17,000.
The hybrid Honda Civic gets 50mpg highway and costs $22,000.

At $2.75/gallon for gas, the hybrid costs $0.01375 less per mile. Since the hybrid is $5,000 more, you’ll need to drive about 360,000 miles before the hybrid will actually start saving you money.

In the city, the regular Civic gets 30mpg and the hybrid gets 49mpg. This makes the hybrid about $0.03557 cheaper per mile. Even at that rate you still have to drive 140,000 miles before the hybrid starts paying for itself.

Why would anyone buy a hybrid car? Yeah, I guess you’re burning less gas, but for $5,000 you can get a nice motorcycle and then _really_ start burning less gas.

C++ inheritance ambiguity

Here’s something fun I discovered today:


class a {
public:

class b {
public:
virtual void dosomething() = 0;
};
};

class c : public a::b {
public:

class b {
public:
virtual void dosomethingelse() = 0;
};

void dosomething() {}
};

class d : public c::b {
public:

void dosomethingelse() { printf ("do something else\n"); }
void dosomething() { printf ("do something\n"); }
};

void main()
{
d *foo = new d();
c::b *myfoo = reinterpret_cast(foo);
myfoo->dosomethingelse();
}

With Visual Studio .NET 2003 you’ll see “do something” on the console. With GCC you’ll see “do something else”. In fact, with GCC you don’t even need the reinterpret_cast.

Where did my C/C++ settings go in Visual Studio?

This is crazy!

A while ago I noticed that the “C/C++” settings block in one of my Visual Studio projects disappeared. I couldn’t change any compilation settings in my project unless I made the changes on a per-file basis, which is really annoying when your project has over a hundred files in it, so I just did without. Well today I needed to change something so I set out to correct the problem.

After an hour mucking with the .vcproj file trying to figure out what happened, I finally discovered something: take all .c and .cpp files your project and the “C/C++” settings block disappears. Well, here’s what happened: in the studio where I work they don’t use .cpp for C++ files, they use .cc.

Add a single .cpp file back to your project and (tada!) you have your C/C++ settings again. *sigh*

Beastie Boys Movie

What do you get when you give 50 fans video cameras at a Beastie Boys concert? 1.5 hours of shakey, nauseating video. Or, you may prefer to call it the Beastie Boys movie.

I went to go see it last night. I’m a big Beastie Boys fan so it was a fun experience, but 80% of the movie was cut together from material shot by fans–completely handheld. It’s hard to watch handheld video on a theatre screen.

When I was walking out of the theatre I found I had a renewed appreciation for the Steadicam. I was also wondering why the cameras they gave out didn’t have better digital stabilization systems. Or, why couldn’t they have done some post-processing stabilization? A lot of the shots they used were zoomed-in, they could have easily run the video through some post-processing software.

I’ll definitely look it up when it comes out on DVD. This is a video you’ll want to watch on your 13″ TV, sitting at least 10 feet away. 🙂

Did Microsoft screw up the Xbox 360?

According to the Xbox 360 forums the March Xbox 360 update is bricking 360’s left and right.

after the update its frozen about 12 times…

Mine keeps freezing, with white lines on the screen and a loud noise. Then recently started giving me the three red lights…

A guy I work with had his 360 die last night, a few days after he updated. The rumor is the update slowed down the fan speed on one of the heatsinks, but due to a manufacturing flaw that caused some customers to have a piece of foil next to one of their heatsinks, the reduced fan speed is overheating the poor thing. D’oh.

Is Gilmore vs. Gonzales even relevant?

In Gilmore vs. Gonzales, Gilmore sued the government on the grounds that presenting identification at the airport violated his constitutional rights. He claimed that being required to present identification to board an airplane was unreasonable search and seisure (the court threw out his other claims).

The court decided that presenting identification at the airport does not violate your constitutional rights:

Airline personnel’s request for Gilmore’s identification was not a seizure within the meaning of the Fourth Amendment. Gilmore’s experiences at the Oakland and San Francisco airports provide the best rebuttal to his argument that the requests for identification imposed a risk of arrest and were therefore seizures. Gilmore twice tried to board a plane without presenting identification, and twice left the airport when he was unsuccessful. He was not threatened with arrest or some other form of punishment; rather he simply was told that unless he complied with the policy, he would not be permitted to board the plane. There was no penalty for noncompliance.

There it is: There is no penalty for noncompliance. You can show ID, or you can not get on the plane.

But, the court notes that Gilmore was given an alternative by both United Airlines and Southwest Airlines. If he did not want to show ID, he could have choosen to be a “selecteee,” by which he would be subjected to an “additional search.” The court decides that the additional search was reasonable:

To meet the test of reasonableness, an administrative screening search must be as limited in its intrusiveness as is consistent with satisfaction of the administrative need that justifies it. It follows that airport screening searches are valid only if they recognize the right of a person to avoid search by electing not to board the aircraft.

Gilmore was free to reject either option under the identification policy, and leave the airport. In fact, Gilmore did just that. United Airlines presented him with the “selectee” option, which included walking through a magnetometer screening device, being subjected to a handheld magnetometer scan, having a light body patdown, removing his shoes, and having his bags hand searched and put through a CAT-scan machine. Gilmore declined and instead left the airport.

Now the court is giving Gilmore three options: You can show ID, you can be a “selectee”, or you can simply not get on the plane. According to the court decision a “selectee” must:

A) Walk through the magnetometer
B) Get the handheld magnetometer scan
C) Get a patdown
D) Take off his/her shoes
E) Have his/her bags searched by hand and CAT-scanned

This makes me wonder: Is Gilmore vs. Gonzales even relevant? This decision was made in December 2005, but the last time I flew I was made a “selectee” and I DID show my ID. I politely showed the TSA officials my Oregon drivers license when they asked, and then when I walked through the magnetometer screening device like everyone else they took me asside and perfomed B, C and D on me while they did E on my laptop bag.

If you’re going to be made a selectee anyways, you might as well not show your ID and at least anonymously have your privacy violated.

Senator Wyden: Equal Internet for Everyone

From OPB News:

On March 2nd Senator Wyden (Oregon) introduced new legislation that would stop phone and cable companies from charging internet consumers differently depending on how they use their computers. He says a new fee structure — being discussed by the telecommunications industry — would fundamentally alter the Internet: from a system that’s open-to-all to a pay-as-you-go arrangement.

Three chears for Wyden! Today I’m proud to be an Oregonian. I’m not 100% convinced that Internet access should not be billed based on how much you use, but I’m pleased that the government feels it should have a role in how Internet access is charged. I believe Internet access should be regulated by the government just like any other utility.

For starters, the PUC should be given authority over Internet providers… It angers me that Internet providers can offer a service with no QOS agreement, shut it down whenever they want, slow it down whenever they want, tell you what you can and can’t so with the service, and then we as consumers have no recourse–in many markets there are only two choices for broadband: cable and DSL. There should be a government agency that oversees consumer Internet access, just like the telephone, just like water, just like electricity…

If your telephone went out for a day–and it’s the phone companies fault–you can file a complaint with the PUC and they’ll actually do something about it. But if you’re Internet access goes out for a day–you’re screwed. There’s no one for you to complain to, there’s no one that will listen, and good luck getting a refund for that day you were down.

Chain Letters and Ponzi schemes

My wife got a chain letter in the mail the other day from a friend. At first we weren’t really sure if it was a chain letter or not. Nether of us had ever seen one before, but it sure did sound like one when reading it. Of course, the letter said “this is not chain letter,” but we were a little skeptical of that claim.

That evening I found some websites online that described chain letters, and learned that chain letters violate federal law because they constitute an illegal lottery. This website has a good writeup on the topic: Regardless of what the author of the letter says, it violates Title 18, section 1302 of the United States Code, which makes it illegal to knowingly deposit in the mail any letter, package, postal card, or circular concerning any lottery, gift enterprise or similar scheme, offering prizes dependent in whole or in part upon lot or chance. It also violates Section 5 of the Federal Trade Commission Act, prohibiting misrepresentations in advertising even if the mails are not employed in operating the program.

I also learned that there are certain types of chain letters that are legal. If the chain letter does not involve money or any other item of value then it is not an illegal chain letter. Postcard chain letters, for example, are not illegal.

This chain letter was especially illegal because it not only sent an item of value, it sent a gambling instrument. This chain letter asks you to send a lottery scratch-it ticket through the mail, which violates postal service codes that prohibit the mailing of gambling instruments.

Another interesting aspect of this chain letter was the depth of the pyramid was really low. Most chain letter schemes I’ve read about have a list of 5-6 people on them, meaning the chain would need to go 5-6 levels deep before you saw a reward. This chain letter only listed 2 people. I suppose as chain letters go this was a pretty mild one. Or possibly it was just in the early stages and no one figured out yet to increase the depth of it.

That evening I also read about ponzi schemes, a system created where you convince people to make an investment in something and then you pay them off using money contributed by later investors, and so on and so forth until you’ve scraped enough money off the top that you can flee the country before the whole thing colaspes on you. Kind-of reminds you of a big government program that we all pay for in the form of a payroll deduction…. Social Security??

Dang, I wasn’t the first person to think of that. The forth hit is a link to www.ssa.gov/history/ponzi.html, titled: “Is Social Security a Ponzi scheme?”

Unboxing a MacBook Pro

A blog on zdnet has photos of unboxing a MacBook Pro. Part of me wants to say this is inconsiderate to future Mac purchasers… It’s a huge spoiler!

If you’ve ever unboxed an Apple product in the last 3-4 years you know what I mean. Apple’s packaging is the best in the tech industry. When I unboxed an iPod for the first time a few years ago I was stunned how well it was put together. The box for my 12″ PB G4 was no dissapointment either..

If you’re thinking about buying a MacBook, DON’T click the link above! 🙂