Sunday, June 12, 2011


All over in the US, we use mpg, Miles Per Gallon. This is the way we compare vehicles in how efficient they are. Unfortunately, its a misleading measurement. It really should be Gallons Per Mile, or better yet, Gallons Per Hundred Miles. We could even go to the bastardization of metric and imperial, and go with Gallon per Kilo-Mile... For my examples, I'll use gp100m..In this example, there's two vehicles.. The first vehicle, a truck, is rated at 10mpg.. The second vehicle, a full size car, is rated at 20mpg.. Say each owner of the vehicle decides to upgrade to something more efficient, but still within the same class... The truck owner finds one at 12.5mpg, and the car owner finds one that is 25mpg.. Which owner saves more fuel?

The truck owner.

Even with twice the number in increase in mpgs, the truck owner made the better deal.Here's how you see that. Each owner drives his vehicle 100 miles, and we calculate how fuel is burned. In the original truck at 10mpg, going 100 miles means they burned 10 gallons. With their new truck, they burned only 8, a savings of 2 gallons!

The car on the other hand, with a original rating of 20 mpg, burned 5 gallons going the 100 miles. In his new car, with 25mpg, he burned 4.. He saved a single gallon...

How lets switch to the gp100m measurement, and see how easy it is to compare.. The original trunk got 10 gp100m.. The new truck gets 8 gp100m.. The original car gets 5 gp100m, and the new car gets 4 gp100m. Much easier to see the difference. The smaller the number, the more efficient.
This also makes it easier to calculate how much money it'll cost you to go a particular distance. You know you're going 300 miles, so take the gp100m * 3, thats the number of gallons you use. Then multiple by the cost of the cost. There you go.

Unfortunately, the mpg way of measuring things is ingrained in our American heads, and unlikely to change any time soon. Just like the anti-diesel bias in the US.. Why can't I get the European diesel version of my car? I mean, my car gets a 'great' 28mpg, highway.. But the equivalent diesel in the UK: 51mpg.. And it accelerates faster! Close-minded US officials. They had a 70's Detroit diesel car, and now think that all diesels are bad. *sigh*.

Tuesday, May 31, 2011

Logitech Harmony remotes

This is a general review of Logitech Harmony remotes. I won't review specific models, other than the 2 that I have owned, and those only briefly.

Whats so special about Logitech Harmony remotes? They're just universal remotes aren't they? Why would you pay $150 for a universal remote? The Shack has'em for $10!

The biggest difference: Those $10 remotes control devices. The Logitech Harmony's control "activities". What is an activity? An activity is "Watching TV" or "Watch a DVD". With today's complex home theatre setups, you have multiple devices that you need to control.

With standard universal remotes, you have to "press the TV button, then ON, then the DVD button, then ON, then the Receiver button, then ON, then switch the receiver to DVD, and the TV to DVD.

With the Harmony remotes, you press "Watch DVD".

Now, you may be wondering, how to we program the remote to do what we want? Well, we use the absolutely craptacular Java-based Logitech software. It works, its functional, but its a royal pain in the ass. The first problem is that its web-based, so you have to 'log on'. I'm programming a remote, why the hell do I have to log on? Then you need to add your devices.. Once the devices are entered, you add activities. The software attempts to lead you through the process, but even for someone who's been writing software, building computers, hooking up home theaters for years, its confusing. You'll spend a lot of trial and error.

Once you have the remote programmed, its AMAZING. The WAF (Wife Acceptance Factor) is very high. They only need ONE remote to control your man-cave HD TV, 100000 watt DTS/DDigital/MegaSound receiver. One button turns it on, or off, or to watch that Mamma Mia DVD she's been wanting to torture you with.

I started out about 6 years ago with a Harmony 550.. I liked that remote, except for some of the buttons. The ones that are the number keys (0-9) and a couple others are of the 'soft squishy' type. Half the time, they wouldn't register, and eventually they just stopped working. I took the remote apart a few times and cleaned it, and they would work again for about a week.

I currently have a Harmony One remote. This remote's buttons are all the hard type, with a solid feel. Much better than the old 550. It also has a color touch screen and rechargeable batteries. The touch screen is nice, though I wish there was more visual feedback. One REALLY nice feature is that you can program your favorite channels into it, and be able to quickly change to those channels. You even get to use the logos for those channels, which makes it very easy to recognize what channel you want.

Other models have different feature sets. The 550 cost me $75 6 years ago, and the One cost me $170 earlier this year. I know I've seen some models as low as $40.

There you have it, a quick review of the Harmony remotes.

Sunday, May 29, 2011

Game of Thrones, episode 7...

Just watched Game of Thrones episode 7.... To begin with, since I haven't posted on this topic before: I'm amazed that a series of books I started reading nearly 10 years ago have comes to the 'small' screen. When I heard it was being done by HBO, I signed up not to longer afterwards, just because they were doing this.  They are devoting nearly 10 hours of screen time to a single book. Thats longer than all of the Lord of Rings movies. (well, maybe not the extended versions). So far, its pretty well done. They are taking some liberty with the story, but I think in reasonable ways. The overall story line is the same.

A few annoying things though. It seems that they are getting into a habit of not introducing characters with names. For example,  in the very first episode, they didn't give Theon a name. Now its up to Bronn and Osha not having names, even though they all have a part to play. They aren't major characters, but they are having involved with some of the major characters.  I wonder if the directors are assuming that everyone will have someone who's read the book to explain whats going on..

Fav characters: Arya, Tyrion: They picked the right people for them.

Least Fav: Littlefinger. (Pietr Baelish) I know the game he's playing, and this portrayal isn't quite what I pictured. Its almost like he's forced to make his little quips.

Most of the others are pretty good.. Ned Stark is good, well played. Jon Snow is really good too.

Too much screen time: Theon, Theon, Theon... He's annoying, he's supposed to be. But I think they are pushing it.. I know why they are, but it doesn't have to be pushed THAT much.

Anyways. I do know whats coming (winter), and I'll try not to give away anything to those who havent read the books. If you're realllllly that curious, I'm sure you find a website where you can find the answers you are looking for.

Python game...

I've recently been working on a game written in Python. The game is a 'programming' game, in the fact that you write a program for a robot. The robot then goes into an arena, and it runs its program. The goal is to destroy the other robots, which are put there by your opponents..

One of the criteria I made for this, is that the robots have zero knowledge of where they are, and what direction they are facing. Its easy for the code to not allow the player not to have access to that in the program, but I'm making it a hard rule by writing the actual code for the robot that way. There is no code in the file that refers to position or direction. This has caused some interesting problems for me to solve.

When the robot fires its weapon, how does the app know which direction to fire it, and determine if it hit anything? How I ended up solving this is by the environment the robot is in, in my case, a 'maze' object, stores the position and the direction of the robots. When the robot fires, it creates a new 'maze action', with the robot as the parent or initiator.  Once the action is created, the maze executes it. Since the action knows the originator, the action can retrieve the position and direction from the maze, and perform its action.

Using this methodology also works really well for handling the movement of the robots. Since the robots don't know where they are, the robot asks the maze to handle the changes thats it performs.

This is really the hard way to do things. But I wanted to do this the 'right way', even though it may be more work.. Since this is my own private project, I have the luxury of time.

I have many ideas for this game, and maybe someday will make available.

Introducing myself..

Hello blogging world. This is me. Not someone else. I'm going to start blogging about whatever my mind happens to chance upon. Since most of interests are technical, most posts will be in that direction. But I may go off on politics, stupid things I see, amazing things I see, and so on. Yes, I have a facebook page. Thats for friends. This is for anyone who cares to listen.