Sleeping Beauty

January 3, 2009 on 7:41 pm | In Deep Thoughts | No Comments

Our daughter loved the Princess Fantasy Faire at Disneyland. The show included a knight who spoke of the Shield of Virtue and the Sword of Truth, references to the shield and sword in Sleeping Beauty. It sounded rather corny the way it was presented, but it got me thinking. Pop culture has long since discarded them, but Virtue really is a shield against many forms of Evil, and Truth really is a sword that cuts through an awful lot of nonsense, including pop culture!

Resetting Your Tongue

January 3, 2009 on 7:30 pm | In Miscellaneous | No Comments

Have you ever been faced with a suite of sweets for dessert? If you’re not careful, you might eat a really sweet one first, and then another, equally good but less sweet item may taste nothing because your tongue is already saturated. I’ve discovered that salt is the perfect way to reset your sweetness receptors. Salty soup, salty peanuts, etc. all reset my tongue almost instantly. YMMV!

OS X Dashboard Games

December 31, 2008 on 10:11 pm | In Computers, Virtual Worlds | No Comments

A few weeks ago, I was very disappointed to discover that VMWare still cannot run games very well. Even Doom, most venerable of 3D games, has a terrible frame rate. Unreal Tournament simply crashes. Thus, ended my hopes of an office LAN game…or so I thought. I just discovered the Crashdrive and ParadisePaintball widgets for OS X Dashboard. These are awesome!

Disney Magic

December 30, 2008 on 12:37 pm | In Deep Thoughts, Family | No Comments

I enjoyed Disneyland as a kid. But I never truly understood Disney Magic until yesterday, when we took our 3½ year old daughter on her first trip to Disneyland. Her reactions to meeting Mickey Mouse (her primary goal, and clearly a transcendent experience), riding It’s a Small World, watching the parade and seeing Goofy (her secondary goal), riding the train and riverboat, etc. were priceless. And so not only did my wife and I not grumble at all about the ticket price, but we are also going to use Disney’s custom photobook system for this trip instead of Shutterfly. That’s the real Disney Magic: making parents happy to spend money!

Rhyming

December 30, 2008 on 12:18 pm | In Deep Thoughts | No Comments

I found myself thinking about Disney’s clip show House of Mouse this morning. We saw the same show in Norway, dubbed with the title Muse Hus, which when pronounced correctly (moo-se hoos), still rhymes. At first, I thought it was simply clever that Disney managed to make the translation rhyme. But this morning, I realized that it could also rhyme in German: Maus Haus. And in Danish. And in Swedish. I don’t know the underlying cause, but it seems too far fetched to claim that it is pure coincidence that all these languages, which have been diverging for hundreds of years, would maintain such a strong connection between the two words!

The Brick Testament

November 24, 2008 on 11:30 am | In Miscellaneous | No Comments

This site is worth a look: The Brick Testament

I discovered it from Dan Piraro’s blog. Regardless of whether you are a Christian or you just like LEGO, the people behind the site have clearly put in a lot of effort!

User Interface Layout Resizing

November 22, 2008 on 9:08 pm | In Deep Thoughts, Programming | No Comments

After taking a walk this evening, I’m beginning to doubt the simplicity of proportional sizing. This example is what it should achieve. But how is it possible? To make the numbers simple, assume horizontal sizing:

| 10 | 35 | 10 | 35 | 10 |

Assuming the configuration shown in the example, if each list is 35% of the resulting width, then the gutters will grow, too. If you ignore the fixed margin for each list, then the size is 35/90 = 38.8% of the width, but this doesn’t help. The only way to keep the margins the same is to place each list inside its own container, with each container taking 50% of the available width and enforcing fixed padding inside. Perhaps the example works because each list enforces its own margins, so the two items do actually take 50% each? Normally, widgets don’t do this. The example is from a specialized report builder.

So proportional sizing isn’t simple. It requires introducing layers of nested containers which serve no purpose other than anchoring enclosed objects. I shouldn’t be surprised. This happens all the time within the web browser.

Proportional clearly isn’t useless, either, but I do wonder if it’s worth the extra trouble.

Localizing User Interface Layout

November 22, 2008 on 6:16 pm | In Deep Thoughts, Programming | No Comments

Layout and Localization (l10n) have been on my mind a lot recently because these are two pieces of my company’s Big Bet on which I have been working and because the intersection of the two is an issue that I never resolved in the JX Application Framework. While taking a walk yesterday evening, I think I finally found the right answer. But first, some background…

I started real GUI programming with Think C and its class library on Mac OS 6. (My earlier games written in FORTRAN, while graphical, don’t really count :) ) This provided the same simple layout resizing functionality that I built into JX: fixed left, fixed right, or elastic (and the same for vertical). Back then, localization wasn’t a big deal, but since everybody was encouraged to put strings into the resource fork, it was theoretically simple, though painful in practice, to localize an application: simply replace the contents of the resource fork. I didn’t think deeply about it at the time, since I never actually localized any of my programs, but one would have to replace both the string bundles and the layouts, because the layouts contained all the labels, and the arrangement of items would have to change to accommodate changes in label length after translation.

Later, while I was transitioning to Linux and the X Window System, I heard about Galaxy. They had developed a springs-and-struts layout manager which, while I went starry eyed at its sophistication, I never really understood. It supposedly made the layout so flexible that it could automatically handle changes to label lengths due to translation. Truly an impressive feat, though now that I have analyzed the problem, it seems that it would have been quite confusing to use because of the complexity of the underlying behavior. Certainly, Java’s SpringLayout class is very complex, and I think it had the same goal.

Nowadays, I work within the web browser. This has also chosen to go down the path of algorithmic layout. The order in which the elements are listed in the HTML source provides the foundation, and CSS rules are used to control the layout algorithm: floating, absolute positioning, etc. To say that this is a mess is an understatement. Heroics are routinely required to achieve what would be quite simple in a desktop application.

This led me to the realization last night that algorithmic layout really is the wrong way to go. It may start out simple enough, and it may sound great that one layout will work for everything, but if it needs to be the foundation on which applications are built, it will eventually become unwieldy, and designers will curse its limitations.

So, back to the basics:

A designer’s drawing should be easy to translate into program data.
Start with fixed positioning.
The layout needs to expand and shrink gracefully.
Allow fixed or elastic behavior for each individual element.
The layout needs to be localized.
Create a separate layout for each locale. Help the engineers stay sane by ensuring that additions and removals affect all locales.
The layout needs to acommodate changes in font size.
The solution to this seems to beg for algorithmic layout, but I don’t think it’s necessary. OS X Finder only lets you change the font size of the file names (which is easy), not the rest of the text. Web browsers only let you change the size of the text in the page. If you want to change everything, scale all coordinates by the size of 1 em. It won’t look perfect, but for those who really need a bigger font, it will be infinitely better than squinting.

A bit of web searching revealed that Apple’s latest Interface Builder for OS X does just this. Their expand/shrink mechanism is more general than in JX, since it decouples the behavior of the left and right edges (same for top and bottom), thereby allowing proportional sizing, but it is still simple! A separate layout is created and maintained for each locale.

Coupled with the fact that fdesign only works on Linux, I’m clearly going to have to finally write Mondrian to give JX a real layout editor!

Don’t take yourself too seriously!

November 20, 2008 on 6:11 pm | In Programming | No Comments

A colleague forwarded this site to me. Great stuff!

Waterfall 2006

My personal favorite is:

Eliminate Collaboration: Get More Done Alone

The Godfather

November 17, 2008 on 3:52 pm | In Movies | No Comments

I think I’ve mentioned in earlier posts just how boring it is to be sick. Being in the hospital is even worse. But it gave me a chance to watch The Godfather. It was on infinite re-runs on one channel.

Terrifying movie! It must suck living in a world where you really can’t trust anybody.

I am hopelessly out of touch with film, since I tend to read books, unlike the guy I saw in an infomercial who, while hawking his book on how to get rich on real estate, proudly stated that he had read, like, maybe 5 books in his entire life. (Do textbooks count?)

Given this blissful ignorance of film, The Godfather must be a very influential film, because even I could recognize scenes that had inspired others:

The Devil’s Advocate
The sequence where Al Pacino stands in church and dips his finger into the Holy Water while Keanu Reeves listens to an endless list of crimes recited by a federal agent who is ultimately hit and killed by a car is clearly intended to parallel the sequence where Al Pacino renounced Satan at the baptism of his godson while his rivals were gunned down. Whoever wrote the sequence for The Devil’s Advocate must have been having fun.

The Fairly OddParents
Big Daddy sleeps with a horse head pillow. This must be a reference to the scene where the movie directory wakes up to find the head of his best, most expensive horse lying in his bed, as payback for refusing one of Don Corleone’s requests.

Next Page »

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^