Solipsism Gradient

Rainer Brockerhoff’s blog

Browsing Posts published in March, 2008

Updates

No comments

While waiting for several updates to download, I took the NerdTest 2.0 update. My score:

At least my “dork” score is 0… icon_wink.gif

This twitter thing can be a serious time sink if you’re not careful, but so far I like it. I’m even getting linkback from stuff I posted only there! (Thanks, Jeff.) But in retrospect, this is worth linking to directly: On the Effectiveness of Aluminium Foil Helmets: An Empirical Study. Jeff’s found the crucial quote, too:

The helmets amplify frequency bands that coincide with those allocated to the US government between 1.2 Ghz and 1.4 Ghz. According to the FCC, These bands are supposedly reserved for ”radio location” (ie, GPS), and other communications with satellites… The 2.6 Ghz band coincides with mobile phone technology. Though not affiliated by government, these bands are at the hands of multinational corporations.

It requires no stretch of the imagination to conclude that the current helmet craze is likely to have been propagated by the Government, possibly with the involvement of the FCC. We hope this report will encourage the paranoid community to develop improved helmet designs to avoid falling prey to these shortcomings.

Some years ago, when I needed to re-check my eyeglasses’ prescription, I found an article on the Internet about an optician – I think in Los Angeles – who was making special glasses for computer users. (I can’t find that URL anymore, unfortunately.)

Aside: my personal case is rather uncommon. I’ve always been nearsighted in the left eye (-4 to -5 diopters), while my right eye was normal. The left eye also has a slightly different color response, seeing things a little greener and darker than the right. Until my late 30s, both eyes had an overlapping range where both would focus well… starting at 30cm out and going to about 90cm (1 to 3 feet if you’re stuck in the imperial backwaters). Then, presbyopia set in and astigmatism became worse; my eyes’ focusing ranges no longer overlap at all, so I started needing different eyeglasses to work and to drive. (I still need no glasses to read with the left eye, at least.)

Anyway, having two different eyes taught me to be able to switch between them as needed and to tense and relax the eyeball voluntarily – call it manual focus. I hear this can be learned in a short time even if your eyes are equivalent.

So, the trick is to learn to relax your eyeballs, deliberately making stuff go out of focus. When you do that, you should see things at some distance between 4m and infinity in perfect focus. Next, you should measure your desired working distance to your screen; mine is exactly at arm’s length.

Now you go to the optician and do all the standard procedures, except that you’ll hold that small eyechart at arm’s length, or whatever your preferred distance is, and relax your eyeballs throughout – think of “idly gazing into the distance”. I find that the resulting diopters are about 0.25 to 0.5 stronger than they are for my driving glasses, but of course YMMV. Ideally this should also be done without any of those pesky dilating eyedrops, as you want your eyes to be as near to the normal state as possible.

If you did this correctly, you should be able to sit at your screen for hours without any eyestrain. Of course you still should get up and stretch every thirty minutes or so, unless you also have an “infinity focus” chair… icon_wink.gif

I seem to remember hearing that there are modern laser-based machines that measure your lens directly without having you read charts or whatever; I suppose that if you run into such a thing, you’d have to do the “relax” trick while this is done. Be sure to talk it over with your optician; mine needed some convincing the first time.

Update: this article about computer glasses confirms my experience. You may want to check other articles on that site for more up-to-date information about vision problems and corrections (especially if you’re based in the USA).

So, last August I switched over to the Lumix FX100 – great camera, if a bit noisy in the high-ISO shots. Then a few weeks ago the Lumix FX35 came out, with a wider lens angle and 30fps HD video, so I ordered one on the day it became available and found a buyer for the FX100.

Now, while the FX35 is still in transit, the Lumix FX500 is announced, with a better lens and larger LCD. Argh. In a couple of years I suppose we’ll have to just rent the camera du jour for a few days while a better one is shipping…

Then again, the FX500 won’t fit into the old, battered cellphone case I always walk around with, so I shouldn’t be too upset. Also, they haven’t yet implemented my ideal features; namely, an option for RAW storage, manual speed/aperture selection (correction: it does have that!), a way to override autofocusing, and a remote shutter release (for doing shake-free tripod shots).

Trying out this newfangled Twitter thing… hopefully it’ll mean faster updates on the latest memes.

So far, I like it. Took out a few hours to build a starting list of people to watch; it’s an oddly familiar neighborhood, of course, as it duplicates parts of my list of chat buddies, RSS feeds and so forth.

In a way it’s a slow-motion, somewhat less coherent, version of IRC. Which is actually a good thing.

Good extra argument against background processes from Craig Hockenberry:

The heart of the problem are the radios. Both the EDGE and Wi-Fi transceivers have significant power requirements. Whenever that hardware is on, your battery life is going to suck. My 5 minute refresh kept the hardware on and used up a lot of precious power.

Two interesting developments came up while I’m studying for my next post about code signing.

Firstly, every developer who has signed up for the $99/year program has gotten a letter which says, in part:

We have received your enrollment request. At this time, the iPhone Developer Program is available to a limited number of developers and we plan to expand during the beta period. We will contact you again regarding your enrollment status at the appropriate time.

The message for non-US developers also mentions that the program will be implemented in the US first. At this point, some developers went off in a huff, interpreting it as a rejection, and numerous complaints and conspiracy theories have been aired. So far (as I know) nobody who applied to the $99 program has been formally accepted – the ones who said they were are apparently newbies interpreting their ability to download the SDK as “acceptance”. On the other hand, a handful of companies have stated they’ve been accepted into the $299 enterprise program.

Well, my understanding of English may be faulty (it’s only my fourth language, after all) but let’s look at the 3 sentences I quoted above:

We have received your enrollment request.

Nice of them to reply.

At this time, the iPhone Developer Program is available to a limited number of developers and we plan to expand during the beta period.

This is just repeating what Steve Jobs said during the iPhone event… nobody would expect Apple to accept all applicants immediately and at the same time. There certainly are several thousands at the very least.

We will contact you again regarding your enrollment status at the appropriate time.

Meaning, as soon as we dig out from under, we’ll check your application. I see no problem there either.

Apparently, some people are indeed interpreting this as a poorly worded rejection, or at best as an ambiguous directive that you have to go to the end of the line or try again. Now, I’m the type of person who has difficulty in understanding the logic of “I’m afraid I’ll have to tell you that your credit card has been declined” – the first time I heard that in person I couldn’t follow at all (heh! he’s afraid of what? will he have to say what in some unspecified future? Why doesn’t he then say whatever he will have to say, then?) But I can’t see anything like that buried in that last line either.

Second item is that the SDK’s restriction on background process has been much-commented on, among others by John Gruber and Mike Ash. Along the way, there have been complaints about this and other restrictions imposed on third-party applications. Some have even pointed out (I can’t confirm or deny) that the APIs published in the SDK are just a small subset of the APIs ferreted out by people examining the previous iPhone firmware. Some commenters even seem to believe that Apple not publishing certain APIs is illegal in some way… witness the comments about unpublished APIs called by WebKit/Safari some weeks ago.

Well, Apple can certainly opt to tell people not to use certain APIs. In fact, on the Mac in the past, some large software publishers went ahead and used some of those “hidden” APIs anyway, with the result that Mac OS X still has to support lots of legacy calls that are broken, but can’t even be properly fixed without breaking those applications!

So, on the iPhone, they’re certainly making sure to avoid the legacy/unsupported/hidden API problem at all costs. Apparently the SDK license says that applications may not use any unpublished API, period. Note that this does NOT mean that Apple will have to examine your precious source code line-by-line; no, they’ll just run a tool that looks at your executable, sees what symbols in which frameworks are referenced, and produce a listing of whatever non-documented stuff you’re calling.

So, there are no documented APIs that let you run an application in the background, or start a background process. I’m sure we all agree that having any GUI application continue in the background after another GUI application starts will be too resource-hogging – after all, if you allow one, you have to allow any. From what I’ve read, no Apple application does that either; a few seem to have a background process or daemon running to take care of communications, but that’s of course much more lightweight.

I agree with Mike that obviously the iPhone OS does support multitasking in a generic way. I also agree that the relatively limited RAM (I heard that 64M are available to a third-party application) and CPU speed are no obstacles. To mention an even older example than he gives, I managed to write an embedded system running on a 4MHz Z80A CPU, with 32K of RAM, that handled a GUI, a foreground thread, and two background threads tracing several realtime signals on a screen.

But make no mistake, embedded systems are hard to keep responsive, even if you have no arbitrary code running at all. Apple apparently elected not to have full virtual memory swapping in the iPhone OS; here again, it’s not a limitation of the hardware (Flash memory can support swapping) or of the OS (it’s Unix-based after all) or of the CPU (it does have page tables etc.).

No, I think Apple simply is trying to keep “teh snappy” always happening, keep battery duration as high as possible, and avoid Flash RAM filling up by swapping. Also, swapping pages takes time and burns battery power. A wait of 2 or 3 seconds may be shrugged off if you sit at a desktop computer but may be unacceptable if you’re trying to answer a call on the iPhone.

Consider the MacBook Air with SSD. It has 64GB of flash and 2GB of RAM, with full swapping virtual memory of course. I’ve seen people leaving 20 or 30 applications running on a Mac and not noticing that their swap files grew to 12 or 20GB… but even that may already become a problem on the Air. I suppose Apple didn’t want to face telling people that they should leave 2 or 3GB free on their 8GB iPhone… and risk crashing or hanging when it suddenly fills up.

Still, I feel that if you do have a compelling application that absolutely depends on having a background process running, you’ll probably be able to ask Apple for an exemption… if you can prove that your process won’t hog the system. Also, Leopard (for one) has facilities to start processes on-demand – using launchd, you can have the system watch a certain port or socket and start up your process when data arrives there. No doubt we’ll see more such facilities being deployed.

Before getting to the actual discussion of code signing on the iPhone, here’s an interesting tidbit I discovered while researching details about Apple’s certificates: a PDF file detailing the iPhone certificate conditions – officially, it’s a CPS (“Certification Practice Statement”). This is publicly available, and linked to from Apple’s Root Certificate Authority page, by the way.

Some interesting parts:

This CPS is applicable to the following certificates issued by the WWDR Sub-CA:

• WWDR iPhone Software Development Certificates (“Development Certificates”)

• WWDR iPhone Software Submission Certificates (“Submission Certificates”)

• WWDR CRL Certificates (“CRL Certificates”)

That means, in order, certificates for testing an application on actual iPhone/iPod Touch hardware during development; for actuallly submitting an application for publishing on the App Store; and finally, for submitting a CRL (“Certificate Revocation List”). This shows that development and publishing keys are different, as I’d thought. It remains to be seen whether the publishing keys will be applied by developers themselves before submitting their apps, or (more likely) by Apple after verifying the apps for compliance. Also, CRLs are the technical explanation for Steve Jobs’ comment that “if [developers] write a malicious app we can track them down and tell their parents”… meaning, certificates can be revoked and those apps will cease to function.

No fees are charged for this service. Digital certificates are available at no additional cost to

members of the iPhone Developers’ Program. Certificates are valid for the duration of the membership period unless otherwise revoked.

This clears up details about the $99 fee. This is an annual fee, then, for membership in the “iPhone Developer Program”, distinct from the “Mac Developer Program”. See the new http://developer.apple.com/ page, which is now split left/right between these two programs. The certificates themselves are free of charge. Elsewhere, expiration and renewal are discussed, but no actual expiration period is mentioned.

There doesn’t seem to be an equivalent document for signing Mac OS X applications, although a separate page says that you can apply to Apple for the purpose of getting your own root certificate recognized. The conditions (especially regarding auditing) appear to be much more stringent, so this looks to be directed at larger companies. Even so, there’s no fee for that either.

Photos licensed by Creative Commons license. Unless otherwise noted, content © 2002-2017 by Rainer Brockerhoff. Iravan child theme by Rainer Brockerhoff, based on Arjuna-X, a WordPress Theme by SRS Solutions. jQuery UI based on Aristo.