How we love the iPhone

TechCrunch: “But every single day I have some kind of AT&T issue. And many of the aforementioned people I know do too. So rather than making us pay the $150 for this device, why not just send one to every customer living in areas that you yourselves admit has service “below our standards“?” – Yep, that’s right, AT&T has a device you can pay $150.00 for that will use your existing broadband connection so your AT&T based service is better. What the? So, get this, most folks pay around $120.00 per month for the “honor” of using the iPhone, they could care less about the service provider, unless that provider’s service is horrible. Instead of fixing their network in San Francisco and New York they’ve found a way to make a profit off of it. Wow, just wow.

Let your money do the talking

Look, I don’t have this issue with AT&T where I live. The network seems to work just fine most of the time, cellular still has a long way to go to match the quality we get with land lines. Here’s the thing. Either you live with the poor network, or move to a different carrier. Yeah, it’s that simple. Ahhh, there’s a catch. You can’t take your iPhone with you. That one thing is keeping people on a network they’re unhappy with. Another wow. Really? You’re picking your network because you won’t give up your iPhone?

If you won’t let your money do the talking because of the device, should you complain about the service?

There are other phones

The Palm PreI don’t actually own an iPhone, I have a Palm Centro. It works for me. I only have voice and text services so the device isn’t as important, I just need something with a QWERTY keyboard. Sure I’d like to have one, but I’m not yet willing to play the extra price for the service. At one point back in the summer I’d looked at switching to Sprint because of their great pricing. You can get the same services; unlimited text, and data, with 450 voice minutes for $70.00. Sprint, as you may know, had an exclusive deal with Palm. The Palm Pre is an amazing smart phone, in fact I think it’s the second best smart phone on the market. Of course I think the iPhone is better, but the Pre is a great number two! I know they’re in trouble, and folks have criticized their hardware, but they do have an amazing operating system in WebOS, and they’re not going away anytime soon. If you want to spend a little more and get what most consider the best cellular carrier in the country you can now get the Palm Pre Plus through Verizon and you can tether with up to five devices. Nice.

What if?

If you’re an iPhone user and you could use your phone on Verizon, Sprint, or T-Mobile, what would you do? Would you switch in a heartbeat? My brother is a Verizon fanboi so he lives with the phones he can get his hands on. I’m not convinced he’s liked any of his smart phones because he keeps buying new ones. I know, I just know, he’s waiting for that glorious day to come! The day the iPhone is available on all the major carriers, then I’d put money on him buying one the day it’s available. I also know people that are living with AT&T service, because of the iPhone, and are due to commit to a new two year deal, but won’t do it because they’re hoping the exclusive iPhone deal will AT&T will lapse and they can switch carriers. Interesting isn’t it.

Yeah, people love the iPhone.

The Wizarding World of Harry Potter

Harry Potter, boy wizardMuggleNet: “Universal has announced that the Wizarding World of Harry Potter theme park will open on June 18th, 2010!” – Well, it’s about time! Would I love to go, absolutely. Will I be there day one? Nope. It would be a great experience for any Potter fan but the place will be a mad house.

Now all I need to do is convince my lovely wife we need to take a trip to visit Mr. Potter.

P.S. – I talked about my desire to have a Harry Potter themed attraction at Six Flags Magic Mountain, here in California, way back in 2003. We’re a month short of that post being seven years old. Wow.

Why derive a C++ class from a struct?

This question came up on Twitter yesterday, and got me thinking. Yeah, why would you do that? The only answer that sprang to mind was for compatibility reasons. If you have the luxury of working on a modern codebase you may not do this sort of thing, but if you have a legacy application or are working with a legacy API you may have need to call C functions that take structs and you may want to manipulate those structs in your C++ code, but do it in a C++ way. Make sense?

Here’s what I’m talking about. Take this C struct for example.

typedef struct tagABC
{
	int      a;
	long     b;
	float    c;
} ABC;

Back in the day, when the ABC structure was created, the developer also created a function to operate on this structure, something like this…

float OldSchoolCDoFancyCalculation(ABC* abc)
{
	return ((float)abc->a+(float)abc->b+abc->c);
}

That looks pretty darned straight forward. The OldSchoolCDoFancyCalculation() function takes a pointer to an ABC struct, sums the field values, and returns the result. Not uncommon. Here’s how it could be used.

	// Old school C style.
	ABC abc;
	abc.a = 10;
	abc.b = 99;
	abc.c = 99.99;

	float value = OldSchoolCDoFancyCalculation(&abc);
	printf("Old School C Struct + C Function == %f\n", value);

Moving on

Let’s say your team has decided to embrace C++ but you don’t want to go back and rewrite a bunch of code, and moving forward you’d like to make use of the nice stuff C++ has to offer. Someone may choose to do something like this with your ABC struct. I say may choose because they may do something totally different, this was the only real example I could think of, so it fits for illustration purposes.

class ABCObject :
	public ABC
{
public:
	ABCObject(int aa, long bb, float cc);
	virtual ~ABCObject();

	void DoFancyCalculation();
	void PrintValue();

private:
	float _value;
}; // ABCObject

Take note. ABCObject is derived from the struct ABC. Yes, of course you can do this in C++. When C++ was being defined this was one of those things that had to be addressed for backward compatibility with C. By default all struct members/fields have public access.

This will allow you to mix instances of ABCObject with the old C functions that operate on ABC structs. Here’s how that would look, and it’s perfectly legitimate.

	// New school C++ style, using old school C code, no problem.
	ABCObject abcObj(11, 100, 100.09);
	float value2 = OldSchoolCDoFancyCalculation(&abcObj);
	printf("New School C++ Object + C Function == %f\n", value2);

Notice we’re passing a pointer an instance of an ABCObject. What the? Sure, you can do that. It’s perfectly legal because ABCObject is derived from the ABC struct. The compiler would notice the function takes an argument of ABC* and ABCObject just happens to fit the “is-a” rule, so it can be passed as an ABC* to the function where it can be operated on like a standard ABC struct pointer.

Like I said, someone could do that. You probably wouldn’t, but the point is you could, and some folks will definitely have need to write code that looks similar to this for some very good reason. More often than not most developers would probably choose to wrap an instance of the old ABC struct as a member variable of the class and then just operate on that from within class methods.

More on the new Pelco

Security Systems News: “Would Pelco be in the same place had Schneider never purchased it? Fages, who’s been with the company seven years, took some time to think. “Would it be the same? My answer would probably be, ‘no.’ I believe Schneider is probably better prepared to fight the downturn in the economy that we are facing today. I was in charge of Asia for the last four years. The previous ownership didn’t understand what it meant to manufacture in China. All of those changes we’ve made to get more international, Schneider has stronger experience with that. The previous ownership wouldn’t have been able to implement those changes quickly and to face the economic situation.” – This is the best article I’ve read on the changes at Pelco. It’s about becoming a stronger company, period. I like that, it’s truthful, and gets beyond all the bluster of “if the prior owners were here…” because the honest truth is this, if the prior owners had been in charge of Pelco in the face of the economic crisis I’m not certain the company would still be operating. The new Pelco answers to shareholders and that’s a good thing. We have a new direction, new leadership, and some very interesting work ahead of us. Becoming a stronger company, a more agile company, will help move us forward and allow us to build the products we need to build.

The new open Pelco is a better Pelco.

I like Palm

ars technica: “In January of 2009, shares of Palm traded at a little over $3 as everyone awaited details of the once-mighty smartphone maker’s plans to save itself from certain death. In the wake of the Pre’s successful unveiling later that month at CES, Palm’s stock price more than doubled, and optimism about the Pre’s prospects eventually drove shares to a high of over $17 in October of last year. But as of this past Friday’s earnings report, sales are way below Palm’s and Wall Street’s expectations, the company has little cash left on hand, and shares of PALM have dropped all the way back down to $4. There’s a growing consensus—as expressed by the market—that there are only two possible futures for Palm: acquisition, or insolvency.” – Darn. I’ve always been a Palm fan. I had a Handspring Visor and used it for years, and I’ve even written, and contributed to, applications that run on the original Palm platform. The new Pre, and more specifically WebOS, are beautifully designed. In fact I’d put them firmly in second place to the iPhone. I would hope they won’t go away, but I’m not sure who would be interested in acquiring them at this point. A few months back I’d have said Microsoft was the perfect place for Palm but with the introduction of Windows Phone 7 (what a horrible name) I think Microsoft is now in a fairly decent position to be a good number three or four in the market. About a year ago I considered moving to Sprint for my cell service and the Pre was a natural choice, hard to beat unlimited use for $70.00 a month, the same plan on AT&T, with an iPhone, would run $119.00.

Anywho, I hope Palm can manage to stick around. They’re now offering the Pre at Verizon, which is a very popular carrier, and Verizon still doesn’t have the iPhone of course. Once the iPhone hits these other carriers it could be game over.

Addy Boy!

Hundred10 Chronicles: “We were pleased to learn that all four earned Gold ADDYs this year (hey, those entries aren’t free, we might as well get our money’s worth). But the icing on the cake came when it was announced that GetJules.com also was named Best of Interactive and Best of Show (the Big Daddy ADDY, if you will). It’s the first time an interactive entry has ever taken home that award over the best of TV, radio, or print, which makes it doubly gratifying.” – I couldn’t think of a group of folks more deserving than the gang at Hundred10. They’re a class act and they deliver the goods. Well done!

The great California Marijuana problem

Fresno Bee: “FRESNO, Calif. — The operator of Fresno marijuana dispensary is pledging to continue selling marijuana even after a being found guilty of violating a court order banning him from selling the drug.” – Personally I don’t use drugs, and yes, I include Marijuana as a drug. We have a strange system here in California that allows it to be sold for medicinal purposes, but some are obviously questioning that. I’m of two minds on this subject, here are two options to “fix” the problem.

Better control

Why are pot businesses allowed to exist? In California I can’t even buy pseudoephedrine over the counter, that’s right, it’s controlled because it’s used by knuckleheads to create meth. Why is it Medical Marijuana isn’t controlled like any other prescription drug? Look. If I go out and break an arm and the doctor decides to prescribe some sort of pain medication I have to have that prescription fill by a pharmacist, someone that’s spent many years learning about the effects, and interactions, of drugs on the mind and body. Why is it medical marijuana isn’t sold by pharmacies? If it’s such an important drug in the treatment of certain medical conditions why isn’t it better controlled? It should be, just like all other mind altering medications. That’s one way to solve the issue. Shut down the private pot distribution facilities and distribute through qualified pharmacies.

Just legalize it

I want my Cheesy Poofs!I’d imagine the first, and best option, isn’t all that popular with a certain crowd. Lets face it, most of the folks visiting the medical marijuana shops probably don’t need it for legitimate purposes. I’d bet there just addicted and like to get high. The second option is for them. Let’s just legalize it and sell it through Government controlled distribution facilities. In California we have liquor stores, but in states like Washington you have to purchase liquor through a state run facility. Why not create a state run pot store, or how about the dope store, yeah, I like that name. So if you wanted to get high you’d go to “The California Dope Store” and purchase your legal pack of marijuana cigarettes. They could tax the crap outta these things because it’s addictive and the folks that use them are desperate enough to pay for their high. Lets say a pack has five cigarettes in it and it’s, I dunno, $40.00? How much would it cost the State of California to grow and distribute this stuff versus what they could make selling it? This could be a great way to get the state out of trouble in the short term, because in the long term we’d be in trouble because all the doped up folks would quit working and spend all their food stamp money on Cheesy Poofs and more weed, but I digress. I’m not sure if the state is actually considering legislation to make the stuff legal, but it might be worth a try if it’s tightly controlled via state run farms and distribution centers. Food for thought.

Movie line of the week

And.... ACTION!Good afternoon movie liners, here’s the line, good luck!

Actor #1: So, is this how you seduce all the girls?
Actor #2: Only physicists with hypothermia who are accused of being a terrorist.

Ok, quick, what movie! Send your guesses here.