Saturday, December 28, 2013

Chromecast Review

My Sony DVD player was not handling Netflix very well -- lots of pauses. After some testing to verify it really was the DVD player I went out and got a Chromecast. This is a dongle that plugs into the HDMI port on the TV and is controlled by a smartphone or laptop. It will serve Netflix content to the TV (or Amazon or other sources too).

It's a very cool idea: it connects to the wifi and hence to Netflix or Amazon or whatever content provider and displays it on the TV. It is controlled via an app on a smartphone, or a plugin to the Google Chrome browser. It is a very cool idea, but the implementation falls short.

To do this right, the dongle needs to contact Netflix directly. Having the smartphone/computer get the content from Netflix (via wifi) and then sending it via wifi to the dongle is a very inefficient use of wifi. The Chromecast mostly does this right. When controlling it via a smartphone/app, the dongle contacts Netflix directly for the content. But when "casting" from a browser - even for Netflix - the inefficient route is used. In time honored tradition, this is billed as a feature rather than a bug: you are "casting" the browser content.

The dongle is pretty limited in capabilities, but it handles Netflix which is 95% of our watching. So no complaints there.

It can be controlled via Android app or iPhone app. And here's where it really falls apart. On our first watching the iPhone app either crashed or gave up, leaving us with a playing show that couldn't be paused. A little research showed it was pretty easy to crash the iPhone app.

When starting a show via the iPhone app, the device is the owned by that app on that iPhone. When my wife started playback via her iPhone, I was unable to control it via my Android phone. The humorous point of view is that this solves the war over who gets the remote. But in reality, you want to be able to control the device with what is at hand, especially in the case of a buggy app, dead battery or phone call being answered.

In summary:

  • This is very cool: using phones/tablets/laptops as remote controls for the TV is the future.
  • Buggy apps are frustrating (iPhone app crashing).
  • A remote is a remote - you cannot have one remote "taking control" and locking out others.
It's not worth it yet, maybe next year.

Saturday, April 14, 2012

Facebook caching

Economy of scale takes on a new meaning at Google, Facebook and large cloud companies. I worked at F5 for a year, and learned a fair amount about deduping, link optimization and other strange techniques. I just ran into an issue with Facebook that highlights this, and may prove useful to others who encounter the same problem.

My wife has a blog, The Forever Marriage where she discusses her forthcoming book. She blogs about 3 times per week, and always updates her facebook status with a link to the latest entry. Facebook normally gets a nice picture and some text, but for the latest, it would only post the raw URL.

The issue was some strange html that crept in due to a Wordpress plugin, easily fixed. But Facebook had cached the link on first load, and thereafter only had that link. Any time she would try to post the new link, Facebook would only do the original page. I verified this by checking the logs as she was posting a new link: no activity in the logs.

Economy of scale: imagine millions of people posting links. A few links will be posted by only one person. The majority probably get posted by 5 or 10 people, and a few get reposted by hundreds or thousands of people. Caching the link turns out to be a large savings in bandwidth. I would estimate reducing the bandwidth used for links by 90 to 95 percent!

In case you encounter a similar issue, this website was very helpful: Rajesh Rana . net. It directs you to Facebook Developer debugging page where you can clear the cache entry for your page.

Wednesday, February 9, 2011

Y2K, Leap Years, and other fun programming issues

I will start by saying that I have a rule of thumb: Y2038 doesn't matter. You might think this rather short-sighted of me, but I will be retired by then. This has been a choice on my part after dealing with time programming for a while.

It started before Y2K. The developers at the small company I worked for had a friendly "demerit" board, just for fun. I even think I might have been the person to start it, but I was certainly the person who finished it, achieving 86,400 demerits in a single day. I had written a small time app and on February 1st (yes, really February 1st, so it probably should have been 86,401 demerits) it goofed a leap year calculation and was off by a whole day. I got one demerit per second.

In my current job I'm wading through some hairy time code, involving stock exchange delays, timezones and summer daylight saving time. The code is ancient C code and I'm supposed to refactor it to C++ and make it elegant. It's full of time_t and struct tm, as well as a custom type that is a "weekly time": a time that measures how long since the week started. (It doesn't matter what year it is when figuring out how long to delay a stock ticker report). It's really kind of fun, but is prone to the 86,400 demerit kind of pitfalls I have fallen into before.

To wit: one should always use symbolic constants, such as minutesPerDay, and never numeric expressions, such as 24 * 60. Even with such an obvious meaning as 24 hours and 60 minutes, sometimes it comes out 20 * 64, which is a different enough number to cause issues. Test Driven Development found this before it could get me any demerits.

Sunday, November 21, 2010

Rental Car scams

I just got back from a trip to New Mexico where I rented a car from Alamo. One of the many questions is how to pay for gas. I chose to return the car empty and pay Alamo's $2.73/gallon rate to refill it on return. The other option is to return it full, or pay over $4.00/gallon to fill it on return. The latter is more attractive to Alamo, so check your paperwork carefully, in case the rental agent "forgets" to use the right option (they did forget in my case, but switched it when I complained on returning the car).

I had a Chevy Malibu, I'm guessing a 2010. Almost all cars in the past few years come with an on-board computer that tells fuel economy in various ways, and how many miles left in the tank. Strangely, the Chevy Malibu didn't. I checked Chevy's web site and the new 2011 model comes with this computer as a standard option. So, either one of two things has happened: Chevy made the computer standard between 2010 and 2011, or Alamo has enough buying clout to get Chevy to make a rental-car version of the Malibu without this trip computer. And since the trip computer would have made it very easy to return the car with an empty tank, it is to Alamo's advantage to not have it.

I returned the car empty. And they charged me for 16 gallons of gas (which is pretty accurate, 16.1 gallons according to the website). But they charged me $2.73 plus 7% sales tax (which is the rate for the city I was in) plus 5% "leased gross receipt" plus a 9.89 percent "concession fee".

The sign on the desk said "$2.73 per gallon" with no asterisk or any information about the additional charges. I was told by the rental agent both on rental and return that $2.73 was the going rate of gas in the city. It wasn't. There were stations charging that much, but most charged less, and I bought gas at $2.57 in the suburbs.

When I buy gas at a station, they never charge sales tax. New Mexico actually doesn't have a sales tax, they have a gross receipts tax. But my bill shows me paying both.

The sign on the desk said $2.73/gallon. It didn't say anything about the almost 10% surcharge for a concession fee. Nor about the 7% and 5% taxes.

The amount is not much. I don't think an attorney general or the BBB would talk to me over this amount. But it is dishonest and unethical. Buying special model cars to prevent consumers from knowing how much gas in the tank is dishonest and unethical.

Wednesday, March 24, 2010

Domain Registry of America

I just got a paper letter from Domain Registry of America telling me my domain was going to expire soon and I could renew with them for their best price. But they sent it to my home address, not the P.O.Box address I use for all domain contacts.

I don't know how they do this. I'm pretty sure I never used the address for any of my domains. The domain is actually my name (first and last) dot org. I haven't received any other letters like this for my other domains, so I think they have purchased a usps mailing list from someone and correlated it to domain names.

The letter in question was a pretty straightforward attempt to catch me sleeping. It stated my domain was about to expire, and I really really really needed to renew it, and by sending in 3 times the annual amount I currently pay they would be happy to transfer me to their service.

Friday, March 19, 2010

The latest facebook phishing scam

There's a facebook phishing e-mail going around, it tells you your password has been reset and the new password is in a zip file attached to the mail message. There's nothing unusual about the phishing attempt. It's unusual that it is receiving so much attention, but that isn't newsworthy to me.

What is unusual and newsworthy is the source of the e-mail addresses it was mailed to. I use a different e-mail address whenever I register at a website. Typically it is company name @ my domain. Not only does this lead to lots of fun confusion when I tell a company representative my e-mail address (I've been accused of lying), but it also lets me track if the company sells their e-mail list, or uses it in nefarious scamming ways.

And it lets me see when a company might have been hacked, and their e-mail list stolen. I've received two messages so far, one for my Roku ( e-mail, and one for my Big Brand Water Filter ( e-mail. I don't know anything about Big Brand Water Filter, other than they sell cheap water filter parts, but Roku has always been a reputable company. I suspect their e-mail list has been stolen somehow.

Update: I cannot remember exactly in which context I used the roku address. I have purchased from them, and used their support forums, but I also had a professional relationship with them, and the only support forum account I could remember used my work e-mail address. The Big Brand Water Filter was used for a purchase, and only once I think. It is troublesome to think that the phishers hacked into servers and had access to sales data.

Tuesday, July 7, 2009

Whither OS (homage to Monty Python's Whither Canada)

Google announced their Chrome OS today:
“We’re designing the OS to be fast and lightweight, to start up and get you onto the Web in a few seconds.”

A couple of years ago, my kids' computer was infected by a virus. They said "oh, just re-image it, we don't need anything on the disk."

I'm slowly repairing a goof on my music collection where I erased all track numbers, not a huge deal, but time consuming. But I look at that time, then at my wife happily using Pandora, and wonder why bother.

Where is your personal data? Mine, currently, is mostly on a server hosted on the opposite side of the country for dirt cheap. I ran a server in my house for a decade, but the hassle became far more expensive than the cheap hosting available. So is the data really mine anymore? Probably not, the hosting company has access to it, though that would be outside the terms of service. I still have my old server, with tons of pictures and music, too expensive to host remotely.

Ancient history: the behemoth computer that ran jobs constantly, and mere mortals could only have jobs run during the wee hours of the morning. Your data was on punched cards, and you got more data back in the form of a print-out. Then time-sharing came along, and instead of waiting overnight, you sat frustrated at the terminal hitting enter and wondering how many other damn people were using it. Your data was in an air-conditioned room somewhere, perhaps on a disk drive looking like a washing machine with a label on the front saying "don't place anything on this disk drive, it will break if you do." Then there was the personal computer, and you didn't have to wait for anyone else, but it couldn't do very much. Your data was on floppies, or maybe a 10 megabyte hard drive.

Then networking came into the picture, and where data lived got confused. At first, it was pretty clear. When you got an e-mail, it was downloaded to your account or PC and removed from the server. But then, laptops and multiple accounts came into the picture. I want my mail available no matter where I am, or what computer I am on, and of course I don't want anyone else to read it. I have a cool music playing program at home, why can't I use it at work? Or at the coffee shop? I can get to my bank account from anywhere, why not music?

Where is your personal data? What is your personal data?

How is it backed up or saved from loss?

How is your privacy protected?

Why would you buy a desktop system for home use?

These aren't rhetorical, I'd like to know. For me - my data is on my server, or my old server. It is websites, e-mail, notes, music and pictures. It's backed up by various means, including RAID. It used to be privacy was protected by me being the only one with access to my server, but that's no longer true. Now I don't know. And I don't think I'll ever buy a desktop system again. The only reason for this would be because I needed a lot of CPU power, memory or hard disk space, say for software development (other people might want it for gaming or similar high demand applications). But right now I access powerful remote systems to do software development, I don't need the power at home.