Archive

Monthly Archives: March 2008

Sam made this cool double helix out of [http://en.wikipedia.org/wiki/Geomag Geomags] the other night, as we were sitting around the office.

[img[/img/misc/geomag-helix1-t.jpg]]

[img[/img/misc/geomag-helix2-t.jpg]]

[img[/img/misc/geomag-helix3-t.jpg]]

My ideal philosophy for Web application design is as follows:

The entire application exists on a single page, which loads once after the user logs in. All HTML is sent to the client at this point. All further interaction between the user (client) and the server is in the form of JSON data which is sent back and forth. This data generally doesn’t contain HTML or any specific formatting information; that was already sent over either in the form of HTML templates, or else rendered dynamically by Javascript code, which constructs specific widgets. For example, a textual screen with fields in specific places is sent as an HTML template, and the data for the template’s fields are sent as a separate JSON data block. Javascript on the client side is responsible for rendering the template and putting it up on screen. Certain fields in the template may reference sub-templates or more advanced widgets, such as sortable data tables, and the data, which was received through JSON, is rendered into the appropriate presentation and inserted into the template as needed.

As the user navigates from screen to screen, the hash portion of the URL is updated, enabling the browser’s Back button and bookmark functionality.

For an application with many screens, where loading all screens at the beginning before showing anything to the user would cause too much of a wait, the application can load sets of screens in the background once the initial set of screens is loaded and displayed.

A screen template may include more than just HTML with fields denoted; it may include Javascript code which is specific to rendering that screen. The code can then be eval’ed in order to add the requisite functions to the app’s codebase.

As a user is editing data, the browser should frequently send save-state information to the server, so as to prevent data loss in the event of a browser crash or connection-lost condition. On subsequent login, the user’s data should always be recoverable.

On the server side, the server is very data-centric and knows very little about the application’s UI structure. It just handles requests for data, and responds with it, given that the authenticated user has the relevant permissions. It has handlers which can respond with many forms of data. The server’s handlers are flexible and can respond to a single request which requires data gathered from many sources: this way, the UI’s data needs don’t need to be tied too closely to the handlers which satisfy them. In fact the term //source// would be better than //handler//. A true handler, on the other hand, may handle requests to update data.

To be continued…

I’ve noticed that this blog is becoming somewhat unreliable and frequently taking a long time to load. Is this because WordPress is inefficiently coded and running through reams of PHP code in rendering the page? But after the page is rendered once, it should be cached by the wp-cache plugin and so subsequent loads should be fast. I note that the administrative console is rather slow, too, but it does seem to load consistently and doesn’t time out (as the main blog page itself does). Also, once I’ve loaded a number of pages and navigated around my site a bit, the server’s responses become quicker and more reliable. Is load balancing giving me more resources, learning my route, or some such? The response data itself can’t be cached, but can other aspects? Database queries? In general, though, perhaps DreamHost is just more burdened than it once was. Perhaps it’s time to move on. But I do have faith in those guys. And the one factor I absolutely love about DreamHost is the customized control panel application, which blows cpanel and all other commodity-webhost online-configuration-management tools I’ve seen out of the water. I’m not ready to give that up.

My personal philosophy is, if I’m going to get somewhere by car, I’d rather be the one driving it.

It’s nice, then, that my passengers always thank me for driving, which is something I would have wanted to do anyway.

Sign on the door of my local 24 Hour Fitness: “The women’s locker room will be closed from 1:00 PM to 2:00 PM on Friday, March 7. During this time, there will be men in the women’s locker room.”

My first thought: Hmm, men get to use the women’s locker room? Hardly seems fair to the women, but I don’t make the rules around here. Might be interesting, I’ve never seen the inside of the women’s locker room before.

My second thought: Oh, right.

[

//U2 3D// is a concert, which was filmed simultaneously with a large number of (eleven?) IMAX cameras (across several actual concerts) and spliced together in the studio. Very well done, considering that almost no material other than the concert itself was used, with the exception of some lines or text rendered onto the image in two or three places. Sound quality was not that sharp, although probably equivalent to the level of fidelity an audience member would have heard through any venue’s sound system. I say this because during the credits, the studio-mastered music had a completely different balance and quality of sound. Interesting that a consistent and continuous mix was made even though several concerts were collapsed into one. (Were they all at the same venue?)

Tickets to the movie were slightly over $20 though, which is a bit outrageous for what is still just a movie, 3D IMAX or not. And this was short — a little over an hour, if I recall correctly. But still, cheaper (and less hearing-damaging) than being at an actual concert, with varied and versatile views (close-ups of the band members playing, instruments, facial expressions, the crowd, stage lights and effects, and so on). Visually, the best part was a 3-D rendered line-drawing animation right before the credits, though. I wish the film had had more of a big creative music video feel, than simply having been footage, no matter how well shot and cut together.

But the band’s simple message of peace and religious tolerance was moving. At one point almost every single person in the audience held up a cell phone, which got me thinking about how incredible it is, in our age, that so many people, no matter where they are across the globe, are just a phone call away. Almost every single person in the audience, linked through this little electronic device. How is it that cell phone towers can so easily handle the load of tens of thousands of devices in the same area, when usually the devices are not nearly that concentrated?

Just a shot away.

[ Title: Zodiac
Author: Neil Stephenson
Reviews: [http://www.amazon.com/dp/0802143156 Amazon]

Neil Stephenson has matured as a writer, and it didn’t take much effort to realize that this book predates //Snow Crash//, but is obviously better than //The Big U//, at least according to the impression I get of his first book. Still, as a Stephenson aficionado I feel obligated to read all his works, starting from the earliest, so //The Big U// it is. (It’s a good thing I’m not an Isaac Asimov aficionado.)

Next book I read, I’m going to keep a stack of Post-It-Notes handy so that I can tag and later list out all the typos I find. Because //Zodiac// sure was full of them. The writing style decayed a bit towards the last several chapters. I have no complaints about the story, though, as implausible as it may seem, which would have (and still would) make a great movie.

I worked for a company which in turn worked for Warner Bros. for two years during the heyday of the HD DVD / Blu-Ray format war, and I haven’t yet read a better article summarizing the battle as [http://blogs.msdn.com/andypennell/archive/2008/03/07/what-did-you-do-in-the-format-war-daddy.aspx this entry in Andy Pennell's blog]. Andy worked on the team which implemented HDi, the interactive layer for HD DVD, technology which we used to implement cool high-resolution animated menus and applications / picture-in-picture features. HDi is based largely on web-standard technologies (mainly XML and JavaScript), and all that JS is a big reason why I find myself at everybody’s favorite search engine, working on front-end, JavaScript-driven user interface functionality.

I commented on [http://personal.fuyuko.net/2008/02/blu-ray-is-winnerbye-bye-hd-dvd.html an entry in Fuyuko's blog] last month, writing the following:

: I programmed HD DVD stuff for a couple years (so it’s safe to say I’m a little biased, but trying to be objective here)… basically the Blu Ray win sucks (slightly) for consumers, too! (1) Blu Ray has region codes, but HD DVD doesn’t. Blu Ray has more complex/draconian copy protection. (2) There’s a free SDK from Microsoft online for creating interactive HDi apps (as of years ago), but for Blu Ray currently (or at least as of last year) the only way to go is a $60,000 authoring package from Sony. (3) The HD DVD specification was complete several years back, and all players conform to it; Blu Ray is still evolving as far as I know, so older players aren’t necessarily going to be compatible with the newest content. Also, there was no requirement for players to have an Ethernet port, so old players can’t necessarily have their firmware updated, either.

: It’s good that the “format war” is over (’cause now it’s safe to go out and buy a player), but anyone who thinks the result had anything to do with consumer choice is wrong.

Andy’s blog entry linked above relates pretty clearly the general demeanor of the format war, and why it wasn’t anything like VHS vs. Betamax all over again. It’s true that at the end of the day, technology still improves at its typical pace, and that Blu-Ray is far superior to DVD in most ways, but when we look at what //could// have been, clearly consumers are the biggest losers. But consumers were very careful to not get involved in the fighting, opting instead to let “the market” fight it out and choose a format before they did. (The market being, whom? Other consumers who were also sitting on the fence? Technology reviewers who were sitting on the fence? Nobody wanted to argue the case for one side, to recommend that consumers purchase one format or the other and to lay out the reasons, for fear of being wrong — when that’s just what consumers count on technology experts and pundits for.) I guess nobody felt strongly about region codes, player updateability and backwards compatibility, availability of authoring tools, standards maturity, interactive features when movies were compared side by side, interface (i.e., menus, applications) appearance when movies were compared side by side, and so on… and so fear (of taking sides) generally ruled the day, and Sony got to bully some studios and stores around, and in the end successfully bullied the market into submission.

My take on Yoga:

…down(ward) dog, ok now smoothly transition into dying chicken, now assume the dinosaur pose and place your tongue on your big toe, focusing on the dark energy of the universe while I play the Imperial March theme from Star Wars… now breathe in, breathe out, you should all sound like Darth Vader, excellent, excellent…

Soon after I first got my iPhone [first generation], perhaps after a few days, I wrote up the following list of criticisms/observations regarding different aspects of the device:

iPhone in General:

  • Reception is worse with AT&T than what I was used to with Verizon. I get 1-2 bars at home and a lot of interference, whereas with Verizon I had a perfect signal just about everywhere.
  • The phone induces sound in electronic devices with speakers. If I place the phone within 3 feet of my alarm clock, then periodically (every few minutes) the alarm clock will emit an annoying low-pitch morse-code sort of sound. If within 5 feet of my electronic piano keyboard, then when on, the keyboard emits the same sound, even more loudly.
  • The virtual keyboard is difficult to type on. A sideways-oriented keyboard option with larger keys, perhaps, would have been better. Or an optimized arrangement (not qwerty) such that keys for letters most likely to be found next to each other in words (weighted by the most common words) would be farthest away from each other on the keyboard.
  • The virtual keyboard’s “autocorrect” function is not very good at figuring out what I was intending to type, and I find myself very frequently backspacing.
  • It is difficult to position the cursor within text, to make edits. [This is before I learned about the magnifying glass.] The keyboard suffers from a lack of arrow keys. The cursor itself is too small to position accurately with a fingertip, and several input modes prohibit this. So to fix a mistake near the beginning of text, I need to hit “backspace” and erase everything typed subsequently, fix the mistake, then retype.
  • The phone crashes frequently in a certain specific location. Perhaps due to electronic interference, the whole unit will freeze up and become wholly unresponsive to the touch screen. I had to find instructions online for how to hard-reboot the phone, and the problem subsequently recurred several times. [I now suspect that this is due to the phone trying to connect to a wireless network with the same SSID as that of my home wireless network, but with a different passphrase.]
  • Animation speed should be variable, or it should be possible to turn off animations altogether.

Web Browsing:

  • Browser (Safari) does not support Flash or Java.
  • I cannot increase text size on a web page independent of width. (I.e., I can only zoom in and out and see parts of the window close-up, not make the window narrower in relation to the text size.) Pages which are very wide are difficult to navigate, because once text is zoomed to a readable size, lines of text are many times wider than the screen, which must be scrolled back and forth horizontally to read content on the page.
  • The browser window picker frequently does not save window thumbnail images between “sessions” (i.e., turning the phone off and on). [Actually it seems to be some other algorithm which decides which thumbnails to forget.] This makes having thumbs for each window nearly pointless, as at any given time almost all thumbnails are blank.
  • Browser window history is often not saved between sessions. I count on the back button working when I click on a link — but if I lock and unlock the phone, or temporarily stick the phone in my pocket for a bit, Safari seems to have “forgotten” about past pages and back becomes disabled. [This also occurs randomly, and is not specifically due to turning the phone on/off.]
  • A page is not rendered while scrolling; the scrolling action needs to be completed before the newly-revealed section of the page is rendered. This makes it feel clumsy to locate sections on a content-full page, when the page is zoomed in.
  • Mobile versions of pages, when a website has provided them, cannot be zoomed, no matter how small the mobile site’s text is.
  • Window-picker view will not change orientation (from portrait to landscape or vice versa) if the phone is rotated while in that mode, but follows the currently prevailing orientation when entered.

Phone:

  • Contact’s photos, when assigned, are not shown in the contact list, only when the details for a contact are opened.

Email:

  • There’s no quick way to go back after clicking on a link in an email. The link is opened in Safari, but to get back to the email from which the link was clicked, I must press the “home” button and re-open the email application.

Sounds:

  • Speakerphone/ringers are too quiet.
  • There’s no “reminder” mode whereby a text message / voicemail / missed call will periodically chime until acknowledged. Granted, most users are probably so in love with their iPhones that they look at them every few minutes to see if something new has happened on the screen, but I’ve missed meetings because the SMS reminder I set up for myself came in while I was walking, or in a noisy place, or had momentarily stepped away from the phone.

Weather:

  • The world clock could easily have been completely integrated here. Simply show the local time next to the local weather forecast.

Calculator:

  • A more advanced calculator, scientific or graphing, should be available; at least a basic calculator which allows the typing of mathematical expressions, with parentheses, for evaluation.

Now that I’ve had it for several months, I’m comfortable with the functionality, but need to refine a few of my observations.

  • Reception is much worse than I had originally thought. Inside my apartment, I can barely hold a conversation. I need to stand in a specific spot in the living room to minimize the frequent cut-outs and static. If a call is dropped (because I’m not standing in the magic spot), I typically won’t be able to call the other person back for a couple minutes while the number of bars on the display is reduced to 0. This cycle repeats itself every 10 – 15 minutes.
  • Outside on the street, I usually have perfect reception.
  • At work, in my office, I have the same problems as I do at home reception-wise. Spotty signal indoors, perfect outdoors.
  • AT&T’s EDGE data network, which the iPhone uses to check email and browse the web, is horribly slow. Picture using a dial-up modem (if you’re old enough). Now think back through older models. Start with 56k, then go back to 33.6k, then to 28.8k. Finally, think of a 14.4k modem. Now take its speed and halve it. Quarter it. That’s about how fast your data will come in, if you’re lucky and have all bars of reception. Otherwise, minutes will go by while a single non-graphics-heavy page finishes loading.
  • Google Maps’ map tile data seems to load much faster than the general speed of the data network would allow, judging from Web page loading / email checking performance. Perhaps AT&T prioritizes certain traffic for Apple, somehow?
  • While visiting Mexico, I had a nice strong full-bar signal which would have cost me $1 a minute to use. Data was similarly outrageously priced and metered per kilobyte. (Thankfully our hotel had free wi-fi.)
  • Battery life isn’t all that great. I drain a little over half the battery in one day’s typical usage. If I forget to charge the battery for one night, the phone will likely die towards the end of the following day.
  • The iPod functionality is good, and sound quality is beautiful. It would be nice if Internet radio stations were available, though. (This wouldn’t work over EDGE, obviously, but could easily work through wi-fi.) It would also be nice if podcasts were supported. (Here, EDGE would work just fine, as it doesn’t matter how slowly podcast data trickles in.)
  • The iPhone’s OS isn’t particularly stable. I’ve crashed the phone many times and needed to hard-reboot it by holding down both buttons for several seconds. Individual applications also crash if something is clicked incorrectly, and there’s no way to restart an app — although here, the phone can be powered down nicely just by holding down the “off” button on top of the device.
  • I don’t like the necessity of hitting the “home” button to switch applications, and would prefer an area on the screen I could tap.
  • The phone itself is uncomfortable to hold to my ear.

Granted, most of these (besides the data rate, reception, and crashing issues) are nitpicky criticisms from a UI perfectionist, not things which particularly bother me. Just things I’ve noted. (And I could have gone on, but this list had gotten long enough.) Indeed the complexity and level of functionality of the device itself is what even enabled this criticism to have been possible in the first place. Standards are higher, and this phone is more ambitious than anything else out there, at least currently, at least as far as I know. Also, I’ve never been a big fan of “the Apple way”, so some of this (lack of more detailed configurability such as not being able to turn off animations; an overall tradeoff of speed and snappiness in favor of polish and pixel-perfect drop-shadows) is old hat.

After all this, I’m glad I bought an iPhone. I’m also glad I opted out of the two-year contract and into a pay-as-you-go plan.