Tuesday Jun 13, 2006

When it rains it pours

I actually have pretty good reasons for my low blogging rate recently, although they're personal so I won't get into it here. But on top of everything, I've been moving to a new place, and with six years worth of accumulated stuff packing and cleaning was quite an effort. Not to mention all the small annoying things I have to deal with, like no internet service for a week (my brother who is visiting is going crazy! Especially when the cable TV hookup is going to take another full week, during the all-important soccer world cup!). Just yesterday I found out that the garbage company is refusing to establish service for me because they claim the previous tenant has not paid his bill. I still don't understand how that's my problem. Garbage company, indeed!

Here are some quickies you might find interesting.

  • There is a "Developing Rich Web Applications Visually using JavaTM technology" class in San Francisco on June 20,21,22. This is being taught by the authors of the Creator Field Guide - Paul and Gail Anderson. There are just a few more seats left in this class. More information about this class can be found here.
  • There's a webcast on Ajax with Java, DWR and NetBeans tomorrow (6/14) with Dave Johnson, CTO at eBusiness Applications. More information here.
  • Oliver Widder did a small cartoon on the Java Posse hat mystery...

Tuesday Apr 18, 2006

Learn Twice As Much With Same Effort

You may be familiar with the Universal Law of Gravitation. And in schools and other auditorium settings, you may have observed the "Second Law Of Gravitation":

Students will gravitate towards the back of the class room. The seats in front fill up last.

Perhaps students are afraid to be picked out by the teacher to answer questions. Or perhaps they are afraid to be seen as eager to learn.

However, at some point in college I discovered that actually picking those undesirable seats up in front was a good idea. I've stuck by it ever since. In presentations at work I always beeline to the seats up in the front. Why? I discovered that lectures actually seemed more interesting that way. Perhaps there were fewer distractions between me and the instructor. Perhaps being up close let me see and hear everything clearly, and perhaps occasional eye contact with the instructor kept me from pulling out alternative reading material (e.g. computer books) if I got bored.

It turns out that if you sit in the center front, you will actually retain more of the material. Research shows that if people are placed randomly and then presented with information, people in the front, and people in the center, can recall a lot more of the presented information than listeners to the sides and back. And we're not talking 10% more. We're talking twice as much.

Retention in a class room based on seating positions [Source]
57% 61% 57%
37% 54% 37%
41% 51% 41%
31% 48% 31%

This has been called the "Attention Zone" by some, and the "Action Zone" by others. (Information retention is just one aspect we can measure; verbal interaction is another.) This has been studied in depth because it has implications for class room design and student seating assignments.

Taking a seat in the front is a simple tip you can use to start enjoying lectures more. And you'll probably learn more. It's not exactly one of my coding tips, but potentially much more useful.

Thursday Dec 29, 2005

Real 3D Graphics

I've been on vacation this week - and I took last week off too. One of the things I did was to take my kids to a movie called Polar Express. We saw it last year - but this year it has been re-released in IMAX theaters in full 3D.

Lots of games claim to be in 3D - but what you're really seeing is a projection of 3D onto a 2D surface like your monitor. Cues like perspective and occlusion lets your brain figure out (through educated guessing) the spatial relationships. However, we can do better than that. If you look around, you can actually perceive depth around you. If you look with just one eye, the depth perception disappears (and you're back to the two dimensional view again where you guess things based on size, appearance, occlusion, etc.).

The trick to presenting a real 3D view, is to project two different images to the viewer - one for the left eye, and one for the right eye. Objects far away appear in the same place in the two pictures, but objects closer will appear in different places. A finger held right in front of your face obviously looks different from the left eye than from the right eye, even though the distant background stays roughly the same.

A number of things have been tried. One way is with color glasses - usually one red lens, and one blue lens (anaglyph stereo). The whole trick here is that the 3D image can be presented as a mixture of red and blue. Since these colors are complementary, the overlaid red and blue images blended together will be split apart again by the red and blue eyeglass lenses. (The red lens will see only the blue colored image, and vice versa). The problem with this approach is that you can only do "grayscale" images - the red and blue lenses obviously warp any attempts to do full color images. Here's an example of such an image. I created this with a raytracer I wrote ten years ago, back when I was really into graphics and real 3D in particular. It's a simple model of some screenshots from the product I was working on at the time (Sun's Workshop debugger) along with a 3D model of the signature green "Run" debugging arrow:

Another approach is to use 3D shutter glasses. Here you're using a special headset which very rapidly opens and closes the left and right eye lenses in succession. This is synchronized with a computer, which shows the left image followed by the right image. This allows full color 3D, since you're using time rather than color to do the image separation. I've never tried this technology so I don't know how well it works but I believe it's been used in games.

Another approach is the original, historical approach to viewing 3D images - "free" viewing. Here you simply show the two images, right next to each other. With a little training, it's easy to view this image and visually fuse the two together in your head (by changing your eye focus to be behind the screen) and suddenly see a 3D picture in the middle. Try it.

In the Polar Express IMAX version, however, they were using another technique which relies upon light polarization. The trick here is to use two movie projectors, projecting through perpendicular polarizing filters. Viewers then also view through glasses with perpendicular polarization lenses. The net result is that you get to view beautiful (full color, no time lapse) stereo images. I assume it was fairly easy for the creators of the Polar Express to create a 3D version - they already had the full 3D models; they "simply" had to render all the scenes over again - twice, one from each eye location. Hope they had good rendering hardware.

I had heard a lot about the polarization technique - but this was the first time I actually saw it. It looked fantastic - and of course the "screen resolution" in IMAX films is fabulous. But there is one remaining problem. I discovered that I tend to lean my head to one side or the other during a long (two hour) movie - and as soon as you do, you start seeing visual artifacts. Your head had better be completely aligned with the polarization axes! (And the images also were rendered assuming a horizontal pair of eyes).

All in all it was definitely the movie experience of the year - yes, there have been movies I enjoyed more, but the combination of cool technology and seeing a movie that the kids loved so much and really put them in the mood for Santa was ..... priceless.

(P.S. That's a good thing since the tickets were nearly twice what I'm used to - $15 for adults and $10 for kids!)

Thursday Sep 22, 2005

Better radio

The morning commute. The San Francisco bay area has lots of radio stations to help you through it - provided of course you enjoy listening to commercials or "flipping stations". And despite the large number of software people in the area, the morning show topics are invariably the safe staple of morning shows anywhere: celebrity trash, traffic, and endless banter. Oh, and if there's ever a good segment, you can be sure it's right when you're about to lose reception as you're heading into a tunnel or the train is going underground.

One of my coworkers today asked me what the deal was with "podcasting". It is not named podcasting because people walk around recording their diaries on their iPods. Podcasts are basically radio programs. iTunes and your iPods have special support for podcasts, and treat them quite differently from regular music files. In particular, in any given program, it remembers where you left off. Therefore, if you come back to play the same program later (having played other music other podcasts in the meantime), it continues right where you left off. Podcasts are organized separately from other music, and is listed chronologically automatically. And today I discovered that if you hit pause, and later resume, it will back up a couple of seconds in the soundfile such that you don't miss a single word.

So, podcasting is really the ability to broadcast radio programs to pods - playing devices. This has some advantages. For example, since they don't rely on the airwaves for distribution, they don't have the same restrictions that radioprograms do, where the range is so limited they have to focus on topics of broad population interest. Instead, you can have highly specialized podcasts with listeners spread throughout the world. I've found it a great way to replace my constant radio frustration. Reception is perfect since you're not relying on an antenna. The topics are interesting since I picked them myself. And in addition to the special interest topics, I can get good radio programs like NPR's Nova and Jim Lehrer's Newshour.

Monday Sep 12, 2005

Rejected Ads

Check out these ads eventually rejected by "top business publications". clientjava.com claims it was Wall Street Journal - I have no inside information.

(There are more ads at the marketing site)

Friday Sep 09, 2005


PBS is making available online NerdTV: a series of hour-long programs where Cringely interviews various technology luminaries. The format is a lot like the Charlie Rose show. I just "watched" the first program this morning while sifting through my e-mail. It's with Andy Hertzfeld, of Apple++ fame. Episode #3 will be with Bill Joy; I'm especially looking forward to that one.

So I'm definitely bookmarking the URL.

Saturday Jul 30, 2005

Graphics File Formats

I get screenshots every now and then in the mail, and frequently in bad formats, so perhaps the following is not known to all:

  • Do NOT send BMP files! They are uncompressed. A simple screenshot, which should be a something like a 50k gif, will be a 5 megabyte attachment - 100 times larger than necessary! Unfortunately, BMP is what you get by default when you grab screenshots with Ctrl-Printscreen in Windows and paste it from the clipboard. TIFF, common on the Mac, suffers from a similar bloated file size problem since it too typically is not compressed.
  • Do NOT use JPEG for screenshots! Unless all compression is turned off (which it never seems to be), JPEG is a spectacularly bad format for uniform color surfaces like those you get from application screenshots. JPEG is great for photos - much better than GIF or PNG. But for screenshots it introduces all kinds of ugly visual artifacts.

...and finally, a related issue: If you're going to show a scaled down version of a picture in a web page (e.g. a thumbnail), don't just use the width and height attributes on the image tag! Not only does that require the full image to be downloaded anyway, but worse yet, most browsers do a horrible job scaling pictures. Prescale the picture in an image editor instead.

Saturday May 21, 2005

Deceptive Art

NetBeans logo on a T-shirt Check out the image on the T-shirt on the right (I snagged it from Lukas' blog). The T-shirt is for their NetBeans 4.1 release party. Look closely at the logo - they've constructed "4.1" using little NetBeans cubes. But look closer - the "4" is an impossible geometric construction!

I've been reading an interesting book lately: Masters of Deception by Al Seckel. Well reading is the wrong term - it's really an art compilation with page upon page of reproductions of famous "deceptive" art by artists like Escher and many I had never heard of. I was amazed by the breadth of creativity in this area.

One really interesting image he included is a painting by Sandro Del-Prete. This image has the property that the interpretation of the contents really depends upon your experience (which is probably true for most pictures, but more so here). I've reproduced only a small fragment of it - click on the small image on the left to see the real image. Nearly all kids who see the picture see dolphins. Most adults see, well, something else... From the book:

This image was displayed in an illusion exhibit gallery at the Museum of Science in Boston. When asked if there was any controversy about displaying this image, the curators replied that once a group of nuns had objected, but had quickly silenced when told that one's perception is based upon past experience.

Monday Mar 28, 2005

Even the Tooth Fairy Is Too Busy

My daughter was pretty disappointed this morning. She lost her front tooth, and put it in a glass by her bed last night. And this morning, the tooth fairy had apparently not stopped by - or perhaps she did, but after taking a look at the tooth decided she didn't want to trade.

The last couple of weeks have been really busy. On the home front, all three of my kids have been sick, which with all the implied sleepless nights has really taken its toll on me. But we've had fun too - on Sunday my youngest son took an unintentional swim in the Vaillancourt Fountain in San Francisco. Luckily there was a clothing store nearby so he didn't have to take the train home in soaking wet cloathes!

The main reason I've been busy however is work. Those of you using Creator today will be very happy to see the fruits of our labor in the next version.

This is my favorite part of the development process. Yes, you have more freedom in earlier stages too take all kinds of input and plan to do everyhing. Yes. Yes. Yes. And a pony too? Sure, no problem.

However, my favorite part is later in the cycle. All the major systems are getting done, they're getting integrated, they're working, and it's really exciting to see hard work paying off. And especially to actually start playing with what will be the end product.

My favorite quote from the Creator team is "It's all uphill from here!". I only vaguely remember the context, but I know it was Joe who said it, so perhaps he can blog about it. Anyway, the beauty of the quote was that it was said eloquently and in context such that it meant exactly the opposite of what it sounds like. But I think it's that inflection point in development I like best - acceleration. Or maybe even the Big Bang metaphor. We've had a couple of big bangs lately, with different people integrating big changes simultaneously, and seeing it all work together is inspiring.

I'm working from my garage office, but I have a baby monitor so I can hear the kids in the house. And they sound asleep. I'd better go play the Tooth Fairy. I told my daughter this morning the fairy is probably busy and can't stop by every house every night. But I'd better take care of it tonight. After all, if she's not writing software, how busy could she be?

Monday Feb 28, 2005

Privacy and Security

James Gosling's latest blog entry points to John Gilmore's fight for privacy, and in particular, airport rules. The requirement for all travellers to present IDs to fly helps security how exactly?

This story really struck a chord with me. A couple of months ago, I was going on a business trip from San Francisco airport. I had a million errands to get done before I left - so I brought my bills, envelopes and stamps to the airport. After checking in, I sat at the gate and filled out the payment slips. Then I figured I'd look for a mailbox. Surprise surprise - there are NO mailboxes ANYWHERE inside San Francisco airport. The only one is outside, on the curb! I thought this was unbelieavable - I have often mailed postcards to friends and family from airports while waiting for my flight. But when I talked to the security guards who were pointing me outside, they were telling me that this was for "security reasons".

That didn't make a lot of sense to me. I've brought the letters IN, THROUGH security. If there's a bomb, or anthrax or whatever in my letters, I've already got them with me, ready to take on board. How would having a mailbox for me to drop them in make for a security threat? What if I drop my letter in one of the thrashcans, or airport flower pots, instead?

Presented with this argument, the security guard just smiled and said knowingly "I wish I could tell you, sir, but this is classified and we don't want to give terrorists any ideas". So... I obviously don't have a mind made for terrorism because I can't figure it out.

Tuesday Jan 25, 2005

Open Solaris


There's some exciting Solaris news today -- the first part of Solaris has been open sourced (with the rest on the way - and also, a record 1,600 Sun patents have been released.)

I'm a big Solaris fan - I used SunOS in college, and since then I've been at Sun for nine years where Solaris has been my primary development platform. The first five years at Sun I worked on the Solaris development tools, mostly the debugger, so I really got to get close to the metal. I therefore found Bryan Cantrill's blog entry on the just released Solaris DTrace code really interesting -- I love source code snippets with juicy comments!

Now that I work on Creator, the platform focus is different since we're trying to address other platforms like Windows, Linux and OSX. Most of my coworkers work on those platforms, so I'm the primary "Solaris advocate" in our group. I work at home three days a week (let's not count the number of nights...) and it's all on Solaris. On my two days going down to the Sun campus I work on OSX with my Apple laptop. I really like OSX since I can find a terminal, and treat it like Unix with a pretty GUI. But I sure miss Solaris facilities like the p-tools (pgrep, pkill, ptree, ...).

Thursday Dec 16, 2004

iPod to the Rescue!

I just saw this on webstandards: You can install the CSS 2.1 spec on your ipod! Good for offline reading while stuck in line at DMV or elsewhere...

I recently argued why learning CSS is going to be worth your while when working with Creator and JavaServer Faces in general.

I was just about to install it when I realized I don't really need to; in implementing the designer I've actually memorized most of the spec! It's the first item in my Firefox bookmarks list.

Sunday Nov 21, 2004

Back In Business

I just got back from a really nice week in Prague. I got to see some demos of upcoming NetBeans features. Unbelievably cool. The form editor has a new design mode which is just going to, well, kick ass. No more gridbag, dude. The new mobile stuff is also fantastic. NetBeans is really getting fabulous.

What's the deal with airports and power sockets? I really wanted to connect my laptop while waiting for my next flight (and the battery was flat) yet I couldn't find a place to plug in anywhere in Frankfurt airport. I had the same experience last year at Heathrow. That time I finally found one in the middle of nowhere, but as soon as I had gotten comfortable security came by and told me to leave because there's some kind of "danger" with having people connect their own hardware to the airport power net. In Frankfurt I walked around for 45 minutes before locating a place to plug in -- at the airport McDonalds. So I was lovin' it...

Sunday Nov 07, 2004

Source Code Profanity

The source code for J2SE 5.0 has been made available. Slashdot covered the event, and one of the posts showed that the community has already poured over the source code in an attempt to clean up its quality...

I immediately started a search command on the current Creator source to see if we have any juicy comments I can share with you.... But we don't. I tried successively less "offensive" words, and the only hits I got were for "stupid" and "lame"...

xxx/Utilities.java:     \*  is really lame. The problem is that at the top level, I need
xxx/DnDSupport.java:   // insertTab is too stupid to notice that inserting a tab at the

This brought back some good (?) memories though. I used to work on Sun WorkShop, the C/C++ IDE for Solaris from Sun, and one of the really nice things about the IDE was that it integrated (not emulated) the XEmacs and vi editors. So we shipped XEmacs with the product. Well, XEmacs came with a bunch of supporting packages, such as Zippy -- which had a large database of insults copackaged with it, ready to be automatically attached as e-mail signatures etc. People actually complained about this, so we removed some of these, and we added a script to the emacs source tree integration process which scanned for a list of "offensive words" and yanked elisp packages containing them!

Friday Oct 15, 2004

Writing from my couch... finally....

I finally fixed my home wireless network. I work at home three days a week, and my home office is in the garage. The problem is the wireless router's signal only barely reaches into the house -- so when I try to sit on the couch with my laptop I can't actually be online. And thanks to Murphy's Law, if I'm not online I'll definitely run into some issue where I need online access - either to access a CVS repository to look at a file history, or perhaps googling some API.

So I finally went out and bought a wireless network Range Extender. You just place it near the edge of your current reception area, and it talks to your existing router, duplicates the id etc. and effectively extends the range of the network from the new location. Sounds easy in theory -- but it took three calls to tech support, one lasting nearly an hour as we kept resetting the router and range extenders. There were lots of snags - positioning of the devices during configuration, upgrading firmware - and then the biggest problem: some problem with the device they apparently know about (but didn't realize while helping me) where the "valid link" light doesn't turn on when it in fact -is- working...

Oh well, I'm happily blogging this from my couch!! And I'm noticing several Sun bloggers are posting many good political blog entries... Alec Muffett, Tim Bray, Geoff Arnold and others.


Tor Norbye


« April 2014