AppleScript to Rotate Launching Apps

I used this script to always keep either Boxee or Hulu Desktop running. As soon as one is quit the other launches. Handy for using a computer as a home theatre PC.

Here’s the script:

global appIndex, appList
set appList to {"Boxee", "Hulu Desktop"}

-- close running apps at start to get clean start
repeat with theApp in appList
    quit_app(theApp)
end repeat

set appIndex to 0

repeat
    if not is_running(appList) then
        open_app(appItem())
        set appIndex to ((appIndex + 1) mod 2)
        quit_app(appItem())
    end if
    delay 1
end repeat

on appItem()
    return item (appIndex + 1) of appList
end appItem

on is_running(theAppList)
    tell application "System Events" to set processList to (name of processes)
    repeat with theApp in theAppList
        if processList contains theApp then return true
    end repeat
    return false
end is_running

on open_app(theApp)
    do shell script "open -a \"" & theApp & ".app\""
end open_app

on quit_app(theApp)
    set appId to 0
    try
        tell application "System Events" to set appId to unix id of application process theApp
    end try
    if (appId > 0) then
        do shell script "kill " & appId
    end if
end quit_app

Great Since Day One

Marco, of Tumblr/Instapaper fame, wrote an interesting post, “Great since day one.”

Too oversimplify and construe, he says that Android (and Linux) have the “release early, release often” philosophy while Apple has a “limit and extend” philosophy. He comments that Apple tends to release a product that has a limited feature set but one that leads to a very polished experience.

In my own anecdotal experience I have been very happy with Apple products and would agree that Apple’s method does appear to produce great results. Similarly, I would agree that Linux has failed to do so in many aspects including hardware support which is often trumpeted as a strength.

A great point that Marco makes is that there is a big difference between what is promised and what is delivered. He says,

I never make technology-buying decisions based on future promises, rumors, or potential. I let other people be the bleeding-edge extremely early adopters, and I stick with what I know will work and stay out of my way.

This is the same conclusion I have come to in the past few days after debating Linux vs. Mac OS X and iOS vs. Android vs. MeeGo. Certainly the fact that there is even a debate is honorable/notable. However, I have decided that I need to focus on a few specific goals, namely professional development and family, and that I no longer have the time to experiment and play with the bleeding-edge. I need something that works and doesn’t slow me down and as such I have decided to continue using Mac OS X and iOS for the time being.

First Video Calls = iPhone?

John Gruber’s latest claim:

But the ability to use the front-facing camera to actually make video calls is first on the iPhone.

Video calls on the Nokia N900 – May 25, 2010
Video calls on the HTC Evo 4G – June 9, 2010
Video calls on the iPhone – June 24, 2010

Yep. First. First with most limited use video calls. (I may still be getting an iPhone but it won’t be because of the video call implementation.)

AT&T’s New Data Plans Are Not So Bad

There has been a lot of criticism for AT&T switching to a “tiered” pricing plan. I’ve made two graphs showing the price per megabyte for each plan. The old plan is shown in red and the new plan is shown in green, as labeled in the legend. They demonstrate visually that for anyone who uses less than 2GB these plans will save you money. It also shows that if anyone is in the 4-5 GB range they will be paying twice as much as previously. The difference in price will obviously just be that much worse the more data you use.

We have already seen that most people don’t even come close to 2GB. In fact, there are claims that 98% of AT&T’s customer use less than 2GB. This is of course immediately before the rise of video chat, tethering, mobile video (Hulu, YouTube, etc.) and we will have to see how these technologies increase usage. For now it looks like AT&T really is lowering the price for almost everyone.

AT&T Price/MBAT&T Price/MB

Of course, the issue of the $20 fee to flip a bit on your phone to allow tethering is ridiculous. People should only be paying for what they use not some artificially induced value AT&T has created by exploiting control. Then again, this really shouldn’t be surprising to anyone.

Update: Rafe Colburn points out another issue. Their overage charges for the 200MB plan are gouging. AT&T has said you can just move up to the 2GB plan if you see yourself close to 200MB but why isn’t this automatic? Why do they instead decide to rip-off their customers?

Quantum Entanglement Might Influence Time

This blows my mind but somehow makes more sense at the same time.

In this interpretation, when we measure things on one entangled photon, the effect doesn’t propagate instantaneously across space through some sort of spooky action at a distance. Instead, it propagates backwards in time, influencing events when the photons are first produced.

From Ars Technica’s “Physicists look for the arrow of time, biologists find it.”

The Symphony of Science

The Symphony of Science is a musical project by John Boswell designed to deliver scientific knowledge and philosophy in musical form. So far the person behind this project has created two videos by remixing various clips of Carl Sagan (Cosmos), Richard Feynman (Feynman Lectures), Neil deGrasse Tyson (NOVA), Bill Nye (the Science Guy) into amazingly powerful music videos. Each video has meant a lot to me as a person, like many others, trying to understand our place in the universe and the potential of humanity.

I donated $5 after downloading the videos from his website, if you appreciate them you might think about donating as well, just go visit The Symphony of Science and click on donate link near the top. I don’t know that the donations go to making more videos but even if it’s just for making these first two then I am satisfied.

Be aware that this is kind of a modern art and it may seem strange if you haven’t seen a remix before:

Visit The Symphony of Science to find out more!

Why Should Gadget Makers Be Policing Stolen Products?

David Segal writes in the NY Times, Gadget Makers Can Find Thief, but Don’t Ask, about how high tech gadget manufacturers are being less than accommodating in disabling stolen or lost devices. It is partly an opinion and partly an interview of Mr. Borgese, a victim who recently lost his Kindle.

The claims are wide-spread, from sympathy:

If the company were to shut down a Kindle that had been erroneously reported as stolen, it might be accused of playing cop, judge and jury.

to accusations of greed:

“I finally concluded,” Mr. Borgese said, “that Amazon knew the device was being used and preferred to sell content to anyone who possessed the device, rather than assist in returning it to its rightful owner.”

Finally at the end Mr. Borgese proposes a solution, if you want to call it that:

Before a resold device could function, an e-mail message would be sent to the original owner, saying, in effect, “Click here to acknowledge that you’ve sold your Kindle.”

Unfortunately, the problem is much more complicated problem. Being too lenient would allow people to run scams or prank people. Being too strict would leave people feeling betrayed as Mr. Borgese was.

Personally I feel the current policy, requiring police action, is appropriate and any problems that exist should be addressed by the way police handle the issue. By requiring police action it holds claims legally accountable, something private business should not have to deal with.

WordPress Worm and the Ignorance of Bloggers

Robert Scoble, John Gruber, and others all have their anti-WordPress opinion about how it’s not the user’s fault they got hit by a worm. Gruber concludes his post by saying:

I fully acknowledge that there is much to be gained by running your own copy of WordPress. But clearly there is a price: constant vigilance.

This is 100% correct. The error he makes is implying that this is not the case with Movable Type or other blog engines. The fact is, if you have a computer connected to any other computer then no matter what operating system you’re running, no matter what software or services you are running, no matter how much security you put in place the price is ALWAYS constant vigilance. Any statement otherwise is ignorant.

Or maybe John Gruber thinks it’s fine for people to not update their OS either. Maybe he’s running the GM version of his OS with whatever Adobe Flash came on it. Or maybe like an intelligent person he UPGRADED his software.

P.S. I love Daring Fireball, it’s only the discussion going on around the WordPress vulnerability that is bothering me.

Why the RIAA Is So Wrong

Imagine a law which, in the name of deterrence, provides for a $750 fine [the lower threshold for statutory damages] for each mile-per-hour that a driver exceeds the speed limit, with the fine escalating to $150,000 per mile over the limit if the driver knew she was speeding.

Catch your attention? Go read the rest.