Thoughts and Ramblings

General things I find of interest.

Google's Analytics Mistake

So, as I said earlier, I have started using Google Analytics. Google now suggests some new code to use in running the analytics. The problem: it’s broken! Here’s their code:

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? " https://ssl." : "http://www."); document.write("\<script src='" + gaJsHost + " google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );

var pageTracker = _gat._getTracker("UA-xxxxxx-x"); pageTracker._initData(); pageTracker._trackPageview(); </script>

Now for what is broken:

  1. There is a space between the " and google-analytics.com. This causes browsers to load the wrong (and invalid) address
  2. Code that is dependent on code in the ga.js is executed immediately after the html is written to load the external javascript. There is no explicit indication as to the order this should be done. Race condition!

So, here is the fixed code:


Switching back to Safari

A while ago, I switched to Firefox since it supported several features I liked, the most notable being an ad blocker.  I knew that there were ad blockers for Safari, but none of them were very good.  All required manually managing the block list, which is just painful.Yesterday, I found out about Safari Adblock, which has support for the ad block lists, like Adblock Plus in Firefox.  So, I decided to install it, and finally opened Safari to try it out.  No adblock; nothing.  It didn’t do anything.  I then tried another account on my computer and it worked there, so it was something specific to my account.  I finally noticed that the adblocker was an Input Manager, so I researched reasons why one wouldn’t load.  I finally ran across this post, which described some of the problems.  Mine was simply that my user belonged to the wheel group.The solution seemed to be simply remove my user from the wheel group.  It wasn’t so easy in practice.  Since leopard, NetInfo is gone, and so it the nice tool used to edit the group associations.  I had to find out how to use the new tool on the command line, and then remove the group that way.  Then, it turns out you have to reboot for it to fully take effect (which is ridiculous).  Finally, I was able to test out Safari, at the cost of no longer being able to su to root (my account is not an administrator account for good reason).The Good:


Apple has become the new Microsoft

So, people often ask me, why do I not use Windows. The reason is simple, nothing works right. Granted, many thing work, but none of them correctly. There are little tiny bugs in everything that, if the programmers had any competence in design, shouldn’t exist. Now Apple has fallen to the same regime.

I have been running Leopard for some time now. I don’t think a single day has gone by without running into a notable bug. To make matters worse, none of them were fixed with the recent update. That means I get frustrated every day with things that don’t work correctly, which is reminiscent of my experience on windows.


Sapphire Plugin

Well, it’s official. Sapphire, one of the best AppleTV plugins, has released beta 4. This is a major upgrade from beta 3, adding support for movies and improvements overall. One of the most interesting features is that this version also works as a frontrow plugin in Leopard. As far as I have been able to find out, this is the first plugin to do this, which means it could open up a whole new world for frontrow. Previously, it was limited to those with an AppleTV, but now, anyone with a mac can use it. The only question is how many would find it useful?


Key Fixed

Well, after all the fun in my previous post on my laptop’s keyboard, I have finally gotten the key fixed. I set an appointment for the Apple Store in Austin as I was driving through there this past weekend. I just showed up, opened the computer, showed him the key, he popped it in. That’s it. I spent more time walking into the store itself than I did getting the thing fixed.