Monday, July 30, 2012

I've Been Charging iPads Wrong For Over Two Years

I've got a number of these iPhone USB Power Adapters lying around the house. When I got the iPad 2, I knew of the higher power requirements for charging, but I just never thought much about it because I usually charged the iPad by plugging it into my iMac.

iOS 5 & iCloud changed all that. With backups now going to iCloud, I really had no reason to plug the iPad into the iMac. So I started plugging the iPad directly into the wall, using the iPhone USB adapter. Was charging slow? When I paid attention, sure, but I usually didn't notice because I charged overnight.

When I got the iPad Retina, aka iPad 3 or the new iPad, I noticed charging took a long time. I mean a really long time. I rationalized this away because I know how much larger the iPad Retina battery is. But I started to kind of plan around having to charge the new iPad, making sure the battery was topped up if I knew I needed to use it for an extended time on battery.

I don't remember who, or how it came up, but recently someone mentioned you have to be using the iPad 2+ included adapter or charging takes forever. I of course dismissed this out of hand. How could I, with all the iDevices, detailed knowledge of the development platform and hardware, possibly not be using the correct adapter? I certainly didn't remember any fancy adapter!

Yesterday I opened the iPad 2 and iPad Retina boxes, and sure enough, there's a 10W USB Adapter included! I immediately took my 50% charged iPad Retina and plugged it into the 10W adapter. A few hours later, 85% charged, BOOM! That is simply astonishing charging speed compared to what I was seeing before.

Best of all, the 10W charger works with all iDevices for the fastest charging possible. The cherry on top is that the 10W has a removable plug so you can use it with the World Travel Adapter Kit or the US extension cable.

I was feeling super dumb when I saw the 10W adapter in the iPad boxes, but I quickly got that once I realized how much an improvement this was. If you never took your 10W adapter out of your iPad's box, now would be the time.

While doing laundry this morning, I saw the iPad 1 box, which has been demoted to the basement. I wondered what charger was included with the iPad 1 ? Was it the iPhone Adapter? Opening it up, I see the box layout is the same as the iPad 2 and new iPad, but a charger wasn't in the box! I went back up to the office and opened my junk electronics drawer. Sure enough, another 10W adapter was there collecting dust. I obviously completely forgot about it when I moved houses late last year.

Feel like I should be busted to Apple geek private or something.

Monday, July 16, 2012

License Agreement Screens in Mobile Apps are a Really Bad Idea

Launched the latest update to The Weather Channel app and this is what I see:
IMG 0832
License agreements in apps are a terrible idea. The only app I've ever seen implement something like this is the iTunes app, and that has widely been derided as terrible user experience.
I know I've never seen this on a web site, I'm sure will never show a license agreement before showing the front page. Why should the app be different?
Worse, the App Store already includes a provision for license agreements, and custom ones at that. Every app gets a generic license agreement that Apple has written by default. However, if you want to provide a custom one, you can.
In the App Store page for The Weather Channel app, I've highlighted the relevant link.
Screen Shot 2012 07 15 at 12 49 38 PM

Monday, July 02, 2012

Sometimes it's the little things in programming that surprise the most

I need to brush up on Core Data, I've got bugs to solve and I haven't used Core Data for anything real yet, so best to school myself.

I've got iOS Programming: The Big Nerd Ranch Guide 2nd Edition with a chapter on Core Data and Core Data: Apple's API for Persisting Data on Mac OS X to choose from to get started. I chose iOS Programming because it's just a chapter, should be more focused if I can't get all the way through Core Data…

I'm reading through, getting reacquainted with the terminology when I see something that strikes me as odd. The sample is talking about how entities in Core Data don't automatically save their order relative to other entities and how you have to create an attribute yourself to manage this. Authors Joe Conway and Aaron Hillegass call it orderValue. No big deal, done this countless times. Then the authors do something completely unexpected. Instead of using an integer for the attribute, they use a double!

I literally think "huh, that seems strange, I've always used an integer..." and keep reading. A few paragraphs later, they explain why they chose a double. If the entity's position is changed, with an integer you have to change all the other entities orderValues. With a double, you just find the orderValue of entities in front and behind the entity that got moved, then add them together, and divide by two. Thus, the new orderingValue will fall directly in between... As soon as I read that, my mind did something very similar to this moment in Pixar's Ratatouille when critic Anton Ego has a childhood flashback after trying the titular food (starts at :15 into the clip).

 Of course instead of food, I flash backed to all the code I ever wrote using an integer to solve that problem. Correction, all the wrong code I wrote to solve that problem.