Monday, April 12, 2010

Mobile Computing Growing Pains

The experts have been saying for years that the future of computing is in mobile devices. I ignored them until recently, but now the iPhone, iPad, Kindle, and similar gadgets have gotten my attention. I own an iPhone myself, and I’m beginning to see the potential of mobile platforms for some of my own creative projects. These projects might include textbooks, educational software, and perhaps a trail guide to the local area.

I’ve already written about some of the challenges in delivering a textbook or trail guide on a mobile device. But perhaps the biggest challenge facing any of these projects would be the diversity of competing mobile platforms, and the fact that only a minority of the potential audience owns any one of them.

The obvious solution is to create content in a cross-platform format. This is trivial for a book whose formatting doesn’t matter. But a versatile and attractive electronic format for physics textbooks doesn’t seem to exist, so some custom, platform-dependent coding would probably be required. A good, practical trail guide would require much more coding. And a decent interactive simulation of molecular dynamics or the night sky requires a thousand or more lines of user-interface code.

For several years I’ve been writing these kinds of simulations in Java, which makes them portable to virtually all of today’s desktop and laptop computers--and deliverable over the web. I can’t overstate what a huge advance this is compared to the bad old days when you had to write native code that would run on only one platform. (The native Mac simulations that I wrote between 1985 and 1992 were never widely used, and now they don’t even run on the new Macs.)

Unfortunately, mobile devices don’t run Java applets. Apple’s mobile devices don’t support Java at all. I’m not absolutely wedded to Java, but I’ve been hoping that some kind of usable cross-platform development environment for mobile devices would soon come along. Last week my hopes got a major setback.

Apple has now added the following sentence to its iPhone developer license agreement:
Applications must be originally written in Objective-C, C, C++ or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++ and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).
The geek blogs are all abuzz over this new rule, and rightly so. It seems to prohibit virtually any sort of cross-platform development tools, and even restricts what programming languages you can use to develop iPhone apps. Bloggers are inferring that Apple isn’t merely trying to maintain the quality of apps; it’s literally trying to make life difficult for any developer who wishes to deploy an app on multiple mobile platforms.

For a part-time, half-assed developer like me, this move by Apple is devastating. I write software not to make money but to reach a target audience. I have no intention of writing software that can reach only the fraction of that audience that owns a particular device. And I don’t have the time or the resources to port software from one device to another.

Eventually, I suppose, the situation will improve--just like it improved for personal computers when Java came along. Until then, I’ll keep deploying physics simulations as Java applets for personal computers. And I’ll keep publishing books in the tried-and-true format that’s universally readable by all.

Friday, March 12, 2010

The Fourth Estate?

Today Utah woke up to the news that House Majority Leader Kevin Garn has been keeping a secret.

It seems that 25 years ago he had a little naked hot-tubbing encounter with a young woman. That’s no big deal in itself, but it seems that this woman was a 15-year-old girl at the time, and that Garn was approximately 30, and that she was also his employee, and that he was also married, and that when she threatened to go public during his 2002 campaign for Congress, he paid her $150,000 in hush money. Oh, and after he confessed all this to the Legislature last night, they gave him a standing ovation.

But among all the juicy details of this still-unfolding story, the one that interests me most is this: The Deseret News knew all about it 8 years ago, and never printed a word.

Their excuse is that they learned Garn’s secret shortly before the primary election in which he was defeated. They didn’t want to print something so inflammatory right before the election, when voters might not have time to hear and absorb all sides of the story. And after the election it wasn’t newsworthy because he was no longer a candidate or office holder.

They may have been right about not publishing before the election. Depends on how close to Election Day it was, and exactly how much information they had at that time. But there’s no excuse for their suppressing the story even after the election. Garn had then served in the Legislature for 12 years, and a story like this is newsworthy even when it’s about a former legislator or former candidate (just as the John Edwards scandal was newsworthy when it broke). And when Garn joined the Legislature again in 2007, the story became even more newsworthy.

Makes you wonder what else the Deseret News knows that it isn’t telling us.

The behavior of the Deseret News reminds me a lot of how our local Standard-Examiner treats Mayor Godfrey. In his case there have been no sex scandals, but there’s been plenty of lying, cheating, and illegal activity that the Standard-Examiner has done its best to ignore.

When the Press is part of the cover-up, there’s something seriously wrong with our democracy.

Saturday, March 6, 2010

iPad Textbooks


I have no immediate plans to buy an iPad, since it can’t replace either my iPhone or my laptop computer. But as a textbook author, I’m intrigued by the iPad’s possibilities as a book platform.

Following a link from the New York Times, I just read a thoughtful blog essay by Craig Mod on the future of printed and digital books. Mod wisely divides book content into two categories: “formless” (which is trivial to port from one delivery platform to another) and “definite” (which is created with a particular platform in mind, using that platform’s physical features in an essential way). Last year’s digital book platforms--Kindles and iPhones--were fine for formless content, and allow us to foresee a day when these kinds of platforms will be common enough to make most mass-market paperback books obsolete. The iPad, according to Mod, changes the picture by opening up new opportunities for digital definite content.

Mod doesn’t specifically mention textbooks, but they’re discussed in the comments below his essay. Electronic textbooks have some obvious advantages: they’re less bulky; their text can be cross-linked and searchable; they can incorporate multimedia content; and they can link to related content on the web. Also, textbooks are so expensive already that the additional cost of an electronic reading device shouldn’t be much of a barrier.

As an author, I’m attracted not only by these advantages but also by the prospect of no longer having to worry about page breaks. Both of my textbooks were created using TeX, a mathematical typesetting system that mostly frees the author from thinking about form. But inevitably, when a book is full of equations and illustrations, one of the last steps before going to press is to manually tweak the layout to minimize awkward page breaks. Even then, there will be many places where students end up flipping a page back and forth to see what’s on both sides. Electronic books on portable devices won’t show as much information at once, but at least they can (if done correctly) present an entire chapter on a single scrollable page, with no artificial discontinuities.

Unfortunately, the technology for good electronic physics textbooks isn’t yet where it needs to be. For one thing, there still doesn’t seem to be a good way to incorporate complex mathematical equations into electronic documents. In html pages, equations are usually rendered as ugly, low-resolution bitmap images. A pdf document can incorporate equations made of scalable fonts, but you can’t (as far as I know) create a pdf without breaking the document into pages.

Another limitation of electronic textbooks is that it’s hard to scribble notes in the margins. Reading a textbook should be an active experience, during which the student frequently jots down thoughts and questions. (When my thermal physics textbook was published, I made sure the publisher gave it wide margins for students to write in.) Perhaps, though, the iPad can help here. With the right software, a reader should be able to add text annotations to a document using the on-screen keyboard. And with the large touch-screen, it should even be possible to add graphical annotations that include math symbols and sketches.

So even though I don’t yet plan to buy an iPad, I’ll be eager to borrow one and check out the iPad book reading experience.

Thursday, March 4, 2010

The War Against Science Escalates

Yesterday’s New York Times reports that the anti-evolutionists are joining forces with the global warming deniers. I suppose this was inevitable, as both groups share the common practice of believing what they want to believe, without regard for the facts.

Here in Utah we get a strong dose of anti-science every winter during the legislative session. This year our elected leaders have officially proclaimed that global warming is a hoax. They also introduced a bill requiring the health department to produce a video of the heartbeat of an “unborn child” of three weeks gestational age, despite the fact that at that age an embryo does not have a heart.  (This bill was later modified to add another week, making the health department’s task barely possible.)  If the legislature had political reasons to dislike the law of gravity, they would undoubtedly try to repeal it.

Amidst all this, I recently received the latest Save Our Canyons newsletter, which contains a refreshing essay by SOC President Gale Dick titled “Is Science Just Another Opinion?”. Dick is also a retired physics professor from the University of Utah, so he and I naturally look at a lot of things in the same way. In the essay he insightfully lists possible reasons why so many people reject science:
  • Flaws in our education?
  • Sheer laziness?
  • Fear?
  • The inability of science to explain why so many terrible things happen to us?
  • Distrust of academic scientists who come across as arrogant and elite?
  • Belief that science is the enemy of religion?
  • Cultural aversion to mathematics?
  • Reluctance to accept the limitations that science puts on what is possible?
  • Reluctance to accept the responsibility that comes with scientific knowledge?
There are no simple antidotes to any of these understandable human shortcomings. The only cures are education, hard work, and integrity. All three of these things are part of the difficult process of growing up, when we recognize that we must accept the things we cannot change, work to change the things we can, and inform ourselves well enough to tell the difference.*

Monday, February 15, 2010

Yet Another Planetarium Simulation


Last November, as another semester of teaching Elementary Astronomy drew to a close, I finally broke down and started writing my own planetarium simulation.

On its face, this was a ridiculous waste of time. There are already dozens, if not hundreds, of planetarium simulation programs that will show you where the stars and planets appear in the sky, as viewed from your chosen location at your chosen time. They run on every microcomputer platform and many handheld devices. Some are extremely sophisticated, with databases of millions of stars, beautiful images, and even the ability to interface with a telescope.

But I wanted something a little different. To be useful to most of my students, a simulation program has to be (a) free; (b) delivered through a web browser, with nothing to download or install; (c) easy for beginners to understand; and (d) convenient for showing the motions of the stars and other objects with respect to earth's horizon.

Sky View Cafe is a great Java applet that almost fits the bill, and I’ve been recommending it to my students for several years. It’s loaded with features and was obviously written by a pro. But its time/date control is a bit awkward to use, so it isn’t ideal for showing celestial motions. Worse, its default full-sky view can be disorienting for beginners, who often have trouble relating the circle on the screen to the domed sky overhead.


Fifty-six years ago, H. A. Rey showed the best way to draw the sky for beginning observers. The illustrations in his delightful book Find the Constellations show half the visible sky at a time, as if viewed through a huge domed window stretching 180 degrees from side to side, from the horizon at the bottom to zenith at the top. I vividly remember reading that book as a child, and I wanted a web applet that gives a similar view of the sky.

I also wanted intuitive, analog controls for changing the time and date, so the sky’s motions would be easy to explore. Inspired by the GoSkyWatch iPhone app, I settled on a circular dial for changing the time of day, with a concentric inner dial for changing the date of the year. I added similar analog controls for setting the latitude and longitude.


To make the motions even more apparent, I included a feature that WSU’s digital planetarium projector has: the ability to show “trails” that simulate long-exposure or multiple-exposure photographs. Besides the familiar star trails, you can use this feature to trace out analemmas and retrograde loops.

This project has soaked up much of my free time for the last three months, but I think it’s essentially finished for the time being. I hope my students--and others who discover it--will find it useful.

Thursday, February 11, 2010

Skiing Wheeler Creek


Without a doubt, Ogden’s best easy ski touring is on the Wheeler Creek trails, below Snowbasin. While the better skiers are risking their lives on higher, avalanche-prone slopes, I find plenty of challenge--and great exercise--on twisting, narrow trails over gentler terrain.

My favorite tour, when snow conditions allowed, was to ascend the East Fork of Wheeler Creek from the Art Nord trailhead to Green Pond. After an initial 1.5-mile climb, the terrain opens out and you’re suddenly rewarded with an expansive view of Mt. Ogden and its satellite peaks. The photo above was taken from that magical spot on my very first trip up this trail, 15 years go. (That’s Jock up ahead.)

The final leg of the three-mile trail to Green Pond is now crossed by the new Snowbasin highway, which has ruined several of the old routes in the Green Pond area. So now the best option is to stop just short of the highway and descend the lovely trail along the Middle Fork of Wheeler Creek, closing a five-mile loop either on the old highway (now unplowed and groomed for skate skiers) or on the more challenging trail that parallels the highway just to the north. Ten of us went on a Sierra Club outing around this loop last Sunday, enjoying it as much as ever.

Fifteen years ago, navigating any of these trails in winter required good route-finding skills and a high tolerance for oak brush. But the Forest Service rebuilt all the trails shortly before the 2002 Olympics, clearing the brush and building excellent bridges across the many tributary creeks. Now the trails get packed down by snowshoers soon after each storm, so navigation is rarely a challenge.

The East Fork / Middle Fork loop outlines a small peninsula of public land, bordered by private land on the east, west, and south. It’s just a matter of time before those private lands will be developed with trophy homes and golf courses. The solitude and sense of remoteness will then be nearly gone, but at least the trails themselves will remain.

Sunday, January 10, 2010

Happy New Year!

If anyone out there has been checking this blog for the last 11 weeks, hoping to find something new, please accept my apologies. Blogging got pushed to the back burner by a combination of the November election, professional duties, holiday travels, and personal matters. In any case, Happy New Year! 

Speaking of holiday travels, I again spent New Year’s weekend in remote Boulder, Utah, with a group of accomplished environmentalists. Couldn’t ask for a better setting, or better company, to start the year off right.

Besides enjoying the scenery and getting some exercise, we did a bit of work during our day hikes. On New Year’s Day we documented the existence of a new house that someone has illegally built on BLM land in the Grand Staircase-Escalante National Monument. I suppose the builder figured it would be easier to get forgiveness than permission. Let’s hope he gets neither.


Then on Saturday we helped Bill Wolverton in his ongoing war against invasive Russian olive trees in the Escalante canyons. Bill is a seasonal employee of the Glen Canyon National Recreation Area, and I’m pleased to report that after a decade of work he is winning the war--at least within the NRA boundaries, where he has cleared the Russian olive from the Escalante River canyon and nearly all of its tributaries. Let’s hope that the BLM, which manages the upstream portions of these canyons, will soon step up its weed eradication efforts to match those of the Park Service.

Our small project was merely to cut and burn some Russian olive that Bill had already killed some time ago. This is important not just for aesthetics but also to clear out the thorny brambles for the benefit of hikers and wildlife. First we had to hike through a couple miles of weed-choked canyon down to the NRA boundary, where Bill’s past efforts were immediately apparent. Still, there’s more work to be done, and we built two splendid bonfires to dispose of the cut logs and brush.


Returning to Boulder at nightfall, we were treated to a spectacular sky full of stars. So I quickly changed into dry socks, grabbed my camera and tripod, and ran back out to the road to take a few photos before moonrise (and supper). I first shot a photo of Orion rising and another of Cygnus (and the Milky Way) setting. Then glancing over at Jupiter, I saw a distinct glow around it and realized that, for the first time in my life, I was seeing the famous zodiacal light. Boulder must be one of the few inhabited places on earth where this faint band of light is still visible. I’m already making plans to go back for a star party in warmer weather.