iPhone, iPad firmware corruption on Windows 7

May 7th, 2011

I was having trouble updating my iPhone and iPad software to the latest iOS version.  iTunes would download the update without a problem, but then fail while “processing” the file, claiming that the firmware file was corrupted.  I tried all the usual suggestions (reinstall iTunes, try it from a different user account, turn off anti-virus, etc.) and even had a lengthy phone conversation with two AppleCare techs.  No luck.

First, the solution (for those of you who got here via a search engine and have the same problem): run iTunes as an Administrator.  You’ll need to have an Administrator account you can use.

  1. Exit iTunes if you already have it open.
  2. Click the Start Menu and type iTunes in the search box to find the shortcut.
  3. Right-click iTunes and select “Run as Administrator”
  4. Perform the update.

The full story:

I looked up the updater log files, which on Windows 7 are located at

C:\Users\<name>\AppData\Roaming\Apple Computer\iTunes\iPad Updater Logs

and it listed

iTunes: Restore error 1403

Searching the Apple Community boards for this error code shows up a bunch of posts of people having similar problems, but none of the solutions worked for me.

I called AppleCare, and they had me try a few things but ultimately weren’t any help.  They were adamant that the file download was somehow being corrupted by either anti-virus software on my computer or malware.  It took some digging to find out where to get the file myself, but this page has good instructions, which I’ll just summarize.

  1. Go to: http://itunes.com/version
  2. Find the file you want in the XML, and use the URI to download.

The XML also has the SHA1 hash, so you can check for corruption of the download.  Which I did.  No, the file I downloaded was fine.  BTW, you can get iTunes to restore with a saved file instead of downloading itself by shift-clicking Update or Restore in the device view.  It still claimed the file was corrupt.

After a lot of poking around, including capturing IP traffic from my box to see if some authentication from Apple was failing, it dawned on me that it could be a permissions issue with decompressing the file.  Hence starting iTunes in Administrator mode to make sure it has free rein over the file system.

It’s a mystery to me how iTunes got locked out of whatever stuff it needs to access to do it’s update, but there you go.


Quantitative Skepticism

March 26th, 2011

I have an idea for a course that’d be appropriate for high school or college.  The basic idea is to try to distill and bring together a set of knowledge, skills, and habits that allow people to think critically about quantitative information.

I’d call this course Quantitative Skepticism, which I think captures the sense of what I’m talking about pretty well, although it isn’t very catchy.  I’d be tempted to call it Calibrating your Bullshit-o-meter, but I don’t think that would fly with many parents.

Anyone reasonably interested in their community, nation or the world is going to have to come to terms with numbers.

Facts, Questions, Claims 

We all need to understand quantitative facts, like Facebook has 500 million users, which only make sense in how they relate to other quantitative facts.  Is that a lot for a website?  For the world?  There were 30,797 fatal crashes in 2009.  Is driving safer than flying?

Quantitative Questions range from very personal, like “how much to I need to save to be able to afford a vacation next year?” to big, world-changing questions like, “how much would it cost to eliminate world hunger?”

Lastly, we all need to be able to evaluate quantitative claims. This affects who you vote for, “this new law will create 5,000 new jobs in the US,” and where you put your money, “buying a new refrigerator could save you 10% on your electricity bill.”

Estimation

At the core of the course would be what physicists sometimes call “Fermi Questions,” after Enrico Fermi who used them extensively in his teaching at the University of Chicago to train people to think quantitatively.  These are estimation questions which ask you to find a route to an unknown quantity by considering things you do know and the relationships between them.

The classic example is “how many piano tuners are there in New York City?” And, you work your way there by thinking about how many people live in NYC,  what proportion of them have pianos, how often they need to be tuned, etc to get some idea of the demand for piano tuning.  Then you think about how many pianos a tuner can do in a day, and multiply out all your estimates to get the final answer.  This interesting thing is the process: what starting facts are helpful, and how to you form a logical chain of connections between them and your question.  Maybe in the age of Google, you can just look this one up by searching the business listings, so we’d need some modern examples.

At its core, this involves

  1. Core numbers you need to know or be able to find.  Understanding what kinds of things are most useful as starting points is the key thing to teach in the course: populations, physical constants, metrics at the community, national, or world level.
  2. Relationships between quantitative facts.  There are main types of relationships: conversions and proportions.  Conversions are things like how many people are there in an average household?  Proportions are fractions of populations or probabilities, like what fraction of an average person’s income is spent on food?
  3. Sources and reliability.  Where do you get basic facts from and how do you know how good your sources are.  What is the uncertainty in your base facts and relationships?

Connections

There would be really great opportunities to tie a course like this to both STEM and humanities.

The basic mathematics of estimation are often no more advanced than multiplication, but there are plenty of ways to tie it in to other topics like calculus, statistics and geometry.  Science ties nicely into relationships via physical or biological laws and core numbers.

Critical reading of quantitative claims dovetails nicely into economics, politics, history and journalism.  These fields are a great source of interesting questions to investigate as well.


Comcast has a strange sense of fairness

November 30th, 2010

You may have heard about the Comcast/Level 3 dispute around the ‘tubes by now.  If not, then a few links for background are in order.  They each give a summary, so pick your favorite.

NY Times – Media Encoder Blog
Ars Technica
Susan Crawford

My summary is this:

Level 3 runs a major Internet backbone as well as what’s called a content delivery network.  Now, the backbone is designed to deliver traffic from one geographic location to another — a set of large, long-distance, high-bandwidth links for moving traffic from one area to another.  The content delivery network specializes in serving up data for people that request it, ideally by placing large data centers with speedy links near the people it will be delivering to.  Well, the content network that Level 3 runs got a big, high-profile expansion when Level 3 partnered with Netflix to be the provider for their new streaming movie service.  This means that Netflix will run its service out the Level 3’s data centers, depending on it to put the data where it can be quickly accessed by its customers, i.e. over home-broadband connections.

This is where Comcast comes into the picture: Comcast is the largest broadband provider in the US.  Now, prior to the Level 3/Netflix deal becoming public, Level 3 had what’s called a “peering” agreement with Comcast for the traffic.  This meant that Level 3 could send data to Comcast’s network and Comcast could send data to Level 3’s network for free.  This is a common relationship for networks of similar size and function.  Shortly after the Level 3/Netflix deal was announced, Comcast decided to end its peering relationship with Level 3 on the grounds that, with the Netflix deal, Level 3 would be sending Comcast much more data than Comcast sent it.  They’re demanding Level 3 pay fees to send data from now on.  From the Comcast blog:

Now, Level 3 proposes to send traffic to Comcast at a 5:1 ratio over what Comcast sends to Level 3 …  We are happy to maintain a balanced, no-cost traffic exchange with Level 3. However, when one provider exploits this type of relationship by pushing the burden of massive traffic growth onto the other provider and its customers, we believe this is not fair

And, some commentary:

In order to understand this issue, I think we need to be careful to make a distinction between different types of data when it crosses from one network to another.  Data originates in a network – there has to be some host that is sending it.  Call this the source network.  Where the data ends up is the destination network.  Sometimes these will be the same network and sometimes they’ll be in networks that are directly connected to one another.  But, since the Internet is world-wide, often to get from source to destination, the data will need to be routed across one or more transit networks.  This is what Level 3’s backbone is.  The content delivery network is primarily a source.  Comcast probably has elements of all three.  Its customers, both residential and business users are sources and destinations.  And, because it’s nationwide, it probably does transit for other, smaller networks.

We don’t know what portion of the data Level 3 and Comcast had been exchanging fit into each of these types.  Presumably Level 3 wasn’t the destination for much of the data Comcast sent it, since its business is transit and content delivery (i.e. sourcing data).  What is clear, though, is that the majority of the increased data Level 3 wants to send to Comcast is bound for Comcast’s own customers who want to stream Netflix.

That’s why Comcast’s reasoning seems suspect, at best.  You could expect Comcast to ask for compensation if Level 3 was using it as transport — Comcast doesn’t get any benefit from being used like that.  However, Level 3 will only be serving up more data to Comcast if Comcast’s own customers request it.  If Level 3 refused to pay and Comcast shut down the connections, it’s Comcast’s own customers that would suffer! Netflix traffic would have to be routed through other networks that do have agreements with Comcast.  It would be like driving from Minneapolis to St Paul by way of Chicago.  Level 3 is making Comcast’s broadband customers’ Internet connections more valuable, and Comcast is demanding that Level 3 pay for that privilege.

Obviously, this would be a dumb thing for an Internet Service Provider to do. That is, threaten to make the service they provide less useful.  But, as I’m sure you’re aware, Comcast isn’t just an Internet Service Provider: they’re also the largest cable TV provider and streaming video is a huge threat to that.


Please, use your computers safely

April 25th, 2010

This is post I’ve been meaning to write for a while, but time (as it does) has gotten away from me.  I started thinking about this issue back around the end of 2008 or so when it was announced that, globally, laptop sales had exceeded desktops.  It’s easy to see the appeal: setting up camp anywhere from the couch, to a train car, to Starbucks, to the library, all with (mostly) no wires and no hassle.  But, I can’t help but wonder if the shift to laptops will end up being, on the whole, rather unhealty for us.

There are a whole slew of unpleasant things that can happen to you from using computers:  neck problems, back pain, carpal tunnel syndrome, repetitive strain injuries, etc.  These things are too mundane to be really frightening, but occur with disturbing frequency.  I don’t want to sound alarmist here:  fortunately, the ergonomics of computer use have been well studied over the decades.  If you follow the published advice in setting up your work area and take on healthy habits (posture, typing technique, etc.) then you can dramatically lower your risk.

At a desktop, I think it’s much easier to pay minimal attention to adjusting your working environment and still get it mostly right: the screen will be in generally the right place, and its easy to find some combination of chair height and keyboard position that suits.

With laptops, however, it is nearly impossible to work ergonomically using the laptop on its own.  In order to have the keyboard at a comfortable position for your hands, you have to have the screen at a height that is much too low (unless, of course, you are a tyrannosaurus Rex) for your neck.  Simply put, if you work primarily with a laptop computer, and you don’t setup your primary work area with either a separate screen or a separate keyboard, then you are asking for trouble.  The stress we put on our bodies working like this may seem slight, but consider the amount of work you do at a computer day in and day out.  Most of our careers will be dependent on using a computer on a least a regular basis.  Some of us will have careers that we spend almost entirely in front of a computer.  Don’t risk it!

This problem has been so well studied, and the guidelines so easy to find (a google search for “computer ergonomics” will land you dozens of helpful sites.  I’d recommend the CDC, or DoHS) that you’d be foolish not to make a little bit of effort.  A separate keyboard you can plug in while you elevate your laptop to the proper viewing height is a cheap and effective solution if you’re freelancing.  If your laptop is issued by your employer and you live in an industrialized nation, then there will be appropriate health & safety statues that should make them only too eager to give you the equipment you need.

I already know two people (my age!) who have been diagnosed with various problems caused by their computer use.  It was a wakeup call for me, and I’m a desktop man.

The repercussions of the switch to a laptop-style interface remain to be seen in terms of long term health problems for computer users, but its hard to imagine them being anything other than, on the whole, bad news bears.  I don’t mean to sound anti-laptop or anti-computer here (nothing could be further from my sentiment!), but there’s a safe(r) way of computing and a dangerous(er)* one.  I’m optimistic that a little education will go a long way in preventing injuries.

Of course, the laptop is not the only interface paradigm that’s on the rise.  Apple’s iPad seems to be leading the charge into large(ish) scale touchscreen devices entering widespread use, and people typing on various cramped mobile phone keyboards have been common for several years now.  These interfaces need some scientific scrutiny as well, but the typical usage pattern (short activity with plenty of breaks) probably means there’s not too much to worry about.

 

*yeah, I know.


iPhone 3G Earbuds’ inline mic, controls not working

January 27th, 2010

I’ve just solved a rather curious problem with my iPhone 3G S and since previous posts on this site with troubleshooting information have gotten some hits and seem to be of periodic use to people, I though I’d post my solution for posterity.

I used this method on an iPhone 3G S, but I’m confident it also applies to the iPhone 3G, and perhaps even the original iPhone.  The problem was that the earbuds that came with my phone stopped working as they should: I could still hear everything through them—calls, music, games, etc., but the inline microphone and clickable controls (volume, play/pause, next/prev track) stopped responding.  No one could hear me on calls through the buds, and I could no longer control music or get the phone to answer calls.

At first I wondered whether the earbuds had gone bad.  It’s certainly conceivable that the inline module could fail without taking the headphones with it.  I also tried resetting the iPhone in various ways to no avail.  By far the most curious feature of this issue, though, is that when pairing the iPhone with a Bluetooth stereo headset (Jabra HALO), the play/pause button on the headset wouldn’t work either.

What tipped me off to the problem was that the 3.5mm stereo connector for the earbuds no longer seated properly in its jack on the top of the iPhone: there was about half a mm gap between the connecter base and the tallest extent of the iPhone case.  When seated properly it should be flush.  Now, seeing the bottom of the jack is no easy thing, even with some bright lights overhead, but when I looked I was pretty sure that there was some lint crammed into the bottom of the jack.  That’s right, pocket lint was the culprit. How pocket lint could stop a Bluetooth headset from operating correctly is interesting, and probably says interesting things about the design of the iPhone: high-level functions like play/pause being tied to their low-level inputs (headset jack, Bluetooth radio) in some non-trivial way, but I digress.  Removing the lint not only fixed the plug-in earbuds, but also fixed the Bluetooth headset.

Now, a word of caution: sticking things inside electronic connectors is generally not a good idea, and could void your warranty.  But, if you’re like me and the idea of relying on your own fine motor control and senses sounds better than taking a walk (or drive or subway journey) to your nearest Apple Store, then read on.  You need something small and rigid enough to get inside pick out the lint.  My feeling is that those little interdental brushes would be ideal, but I’m a floss man myself and a paperclip was what I had on hand.  It will take a bit of doing, since it’s been compacted against the bottom of the jack by your earbud connector.  A little scraping and blowing out with compressed air and I was in business again.

Now, if only Apple would allow Bluetooth headsets to do next/prev track functions by implementing the full AVRCP profile.


Google’s new approach to China

January 13th, 2010

Big news today for free speech on the internet!

Google has announced that they will no longer censor search results on google.cn.  Here’s Google’s official announcement on their blog, and a NY Times story covering it.  While Google is not the most popular search engine in China, it certainly is the leader among American providers.  We’ll have wait to see in detail what their new approach is, but it’s good news when companies stand up to China and say they won’t cooperate with the Great Firewall.


Selfish WiFi Sharing

December 24th, 2009

I’d like to share my internet connection over WiFi, but there are a couple reasons I don’t.

  1. I don’t want it to impact the bandwidth I have when I’m using my connection.
  2. I don’t want them to use it in such a way that it triggers my ISP to throttle my connection.
  3. I don’t want to be held responsible for what people do on my connection.

Basically, what I’m saying is that I’d like to be able to share without it negatively impacting me.  I feel like a lot of people would also share their own connections if it were easy to do and didn’t have negative consequences.  I also feel that it should be entirely possible to do this!

In (1), what I really mean is that my use of the connection should get priority over whatever random strangers I’m sharing with.  Maybe it’s my neighbors, who don’t have a connection of their own, or maybe it’s just someone passing through, looking for a few minutes of WiFi to check their email.  There’s plenty of time during the day when I’m not using my connection at all, and plenty of time when I’m just doing some light surfing.

What I want is a WiFi router that supports this kind of prioritizing.  Set up and broadcast two different SSIDs: one for priority traffic, one which just gets whatever bandwidth is left over.  The priority channel gets normal encryption and access control, the shared channel is unencrypted.  Maybe I’d call the shared channel “Spike’s Free WiFi.”  The quality of that connection would fluctuate wildly, depending on whether or not I’m filling up the priority channel, but hey, it’d be free.

For (2), I’ll start off by saying that net connections in the UK have advantages and disadvantages over those in the US.  I think they typically come out slightly cheaper per MBit of connection speed, but most ISPs have annoying “network management policies.”  These include throttling connections if you use push or pull too much data during peak hours, and, I suspect, if you use particular protocols, like those that run P2P services (I’ve noticed severe slowdowns when I put up a bittorrent client or the BBC iPlayer Desktop application, even before I’ve moved enough data to trigger the limits detailed below).  For the most part, ISPs are relatively transparent about their traffic management with respect to peak hour use (see for example Virgin Media’s), but I would like more detail.  Like, the kind of detail that would allow configuration of a router to keep strangers using the connection from getting my connection throttled.  In particular, a clear statement about how different protocols trigger throttling, if any.  If UK ISPs are going to go down the road of advertising “Unlimited” plans, but actually enforcing limits by throttling connections, then they should publish enough detail to allow customers to configure tools to avoid those limits.

(3) is one which needs a legal solution, rather than a technical one.  Basically, what is needed is either legislation or legal precedent that establishes that simply providing internet access doesn’t make a person liable (in both criminal and civil senses) for what is done by others over that connection.  ISPs enjoy this legal protection, as do other providers of communication services—you can’t sue the postal service if they deliver a harassing letter sent to you by someone else.  I know of no cases where a person operating an unencrypted access point has been successfully sued or prosecuted for what others have done on the connection, but there are particularly worrying measures being considered.   At the top of the list are the so called “3 strikes” proposals where being accused of sharing of copyrighted works over a network connection 3 times can get your connection terminated.  I think this is a bad idea for a number of reasons, but it would effectively kill the idea of sharing your network connection with strangers—which would be a real shame.

If you walk down a city block or residential suburb with a WiFi sniffer these days you’ll find dozens of operating access points.  Imagine how much coverage could be achieved if everyone got into sharing the bandwidth they had going spare.  Coverage would be patchy, and speed unreliable, but it would be free and leverage a piece of tech most people will be upgrading over the next few years anyway.  Crowd-sourced municipal WiFi!


iTunes 9 + Win 7 Play Nicely

September 14th, 2009

I’m running the Windows 7 Release Candidate, and pulled down Apple’s new iTunes 9, which debuted on last Wednesday.  I noticed a little added feature:

windows-taskbar-itunes

It seems iTunes 9 takes advantage of the Windows 7 taskbar enhancements and adds a back, play/pause, and forward button below the live preview.  It also adds a balloon above with current track info.  Nice!

This is the first non-Microsoft app that I’ve seen take advantage of the new taskbar.  Who says that Apple & Microsoft can’t play nicely?


Ending Email Distraction

August 16th, 2009

In terms of our interaction, email used to be essentially snail mail that you could send and receive instantly.  But our interaction with email has moved far beyond this simple analogue of open mailbox, get messages.  The postman comes to my house once a day; whatever letters come, that’s all there is until tomorrow.  The mail is a daily ritual, a one-off thing.  Email is more like a constant trickle (or a constant stream or even a firehose).  I can check for messages as often as I like, and modern email programs have all kinds of features to allow incoming messages to announce themselves: some subtle, some not.  Mail messages are passive, but email messages have become active agents!  They flash notifications, make noise, or increase little red counters while vying for your (limited) attention.

 outlook notification

The pull of email is very strong.  For me, when I know there are messages in my inbox, I’m incredibly tempted to deal with them, or at least read them, even if I’m working on something important.  A passive inbox creates more than enough temptation for me; email which asks for my attention is too much.

The daily ritual is effective for regular mail because delivery times are measured in days, and not too distracting because you take care of everything in one go.  Dealing with email as it comes in might be very effective, but because of the myth of multitasking, it torpedoes productivity on anything that requires careful thought.  Every time we change from one task to another, it takes a while to regain focus.  Some studies have suggested this is upwards of 15 minutes!  Even if the total time you spend on email is the same, the more you break it up throughout your day, the less other things you’ll get done.

Many popular email programs have these distracting message notifications turned on by default.  Here’s how to turn them off:

Microsoft Outlook 2003/2007
Tools > Options from the main menu, click Email Options on the Preferences tab.  Then click Advanced Email Options.  In this dialog box you can untick any (or all) of the options under When new items arrive in my Inbox

Mozilla Thunderbird
In Windows this is under Tools > Options > General > When a new message arrives.  For Linux, it’s under Edit > Preferences…,  on Mac OS X, it’s Thunderbird > Preferences…

Entourage
Entourage > Preferences > Notifications and untick all the unwanted notifications.

I also like getting my email on the iPhone.  It’s great to be able to read and sort messages while on the bus or waiting in line, but I’d go nuts with it constantly alerting me of incoming email.  You can disable these under Settings > Sounds…


Entropy is the opposite of knowledge

January 17th, 2009

Jeff Atwood, over at Coding Horror posed an interesting little puzzle about probability:

Let’s say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?

To put it in more precise language so we can concentrate on probability and not nuance of word choice, the person means that at least one child is a girl.  At first I was tempted to say what a lot of people came up with in the comments: 50%.  If one is a girl, my thought process goes, then we’re just looking at the probabilities for the other child, and surely those are not affected by the child we know about.

This is, of course, wrong.  In that argument we fail to take into account that having two children are distinguishable events, and we don’t know which child they were talking about when they said one was a girl.  When I actually wrote it down, then the solution became more clear.  Having two children gives 4 possibilities in terms of their gender (B for boy, G for girl):

BB, BG, GB, and GG

In learning that at least one is a girl, we can eliminate BB.  We cannot eliminate BG or GB because we’re not told which child was being referred to when we were told one is a girl.  Of the 3 remaining, 2 have one boy and one girl, so the solution is 2/3 or about 67%.

But wait!  Why should order matter?  As expressed by one commenter:

All the children learned probability theory and forgot how to think normally! Why would you care if the first one is a boy or a girl..they didn’t tell that their first child was a Girl, now did they? So, you have three choices: [BB, GB, GG]

To a certain extent, one is entirely justified in formulating the solution in terms that don’t include the ordering.  It wasn’t asked for in the solution or mentioned it in the problem.  However, if you formulate the problem in this way you are forced to abandon an implicit assumption we made in the previous reasoning: that all possibilities are equally likely.  If we leave out order, we can simplify our notation and just count the number of boys, and know that the rest are girls (leaving aside the relatively rare occurrence of gender ambiguity).  So our possible cases are [2, 1, 0].  However, the respective probabilities for these cases are [25%, 50%, 25%].  That is to say, having one boy and one girl is twice as likely as having two girls.  With this in mind, it’s easy to see that the solution should be 2/3.

But why are the probabilities equal when you include order, and not equal when you don’t?  Maybe you don’t even believe me.  The answer has a very deep connection to physics, and so my advice to any doubter is to try it out with a pair of coins!  Get two coins, flip them, and record the number of heads.  Repeat this 20 or 30 times and you’ll handily see that exactly 1 head comes up roughly twice as often as either 2 heads or 0 heads.  It doesn’t even matter whether you flip them at the same time or whether the coins are easily distinguishable!  Even seemingly identical coins are distinguishable in principle.  No two coins are exactly alike at the molecular level, and even if they were, it would be possible to track them individually through the air during a flip.  By only recording the number of heads we are throwing out some information which is, in principle, available to us.

Any time we don’t include information which, in principle, exists, then we don’t get equal probabilities.  However, we can still work out the probabilities of our incomplete description.  In thermodynamics, our incomplete description (in this case, the number of heads) is called the macrostate, and a complete description that uses all the information available in principle is called a microstate.  To find the probabilities of the macrostates, we have to weight them by the number of different microstates that give that macrostate.  In the case of exactly 1 head, this has two microstates (HT and TH).  The other macrostates each have only one microstate, thus exactly 1 head is twice as likely as either 2 or 0.

The number of different microstates that correspond to a particular macrostate is a measure of our lack of information.  When we get a macrostate of 2 heads, we know exactly which microstate we’re in—we have complete knowledge.  But imagine that we had 100 coins instead of 2.  There is only one microstate that has 0 heads, but there are 100,891,344,545,564,193,334,812,497,256 different microstates for 50 heads.  50 heads is astronomically more likely than 0 heads.  But just knowing that there are 50 heads leaves us without much knowledge of the microstate: there are over 100 thousand trillion trillion of them to choose from!  The measure of this is called entropy (technically, the logarithm of the number of microstates).  In our boy-girl example, having one boy and one girl has a higher entropy because we don’t know the order.  Entropy is sometimes called a measure of disorder.

In thermodynamics the macrostate of a system is given by things like overall temperature, volume and pressure, whereas microstates would have to be given in terms of the positions and velocities of each molecule.  That information is present, in principle (at least up to a quantum-mechanical limit), so it has a real effect on the probability.  Just like in coin-tossing the probabilities of the macrostates are weighted by the number of microstates that correspond.  The more likely macrostates must have higher entropy.  This is the origin of the famous 2nd Law of Thermodynamics.  Since macrostates of high entropy are so much more likely, random processes always end up there; the more elements in the system, the more this probability becomes like a simple fact.