<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-22402617</id><updated>2009-02-20T17:42:49.826-08:00</updated><title type='text'>ambient reality</title><subtitle type='html'>pimping code and tech crap</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-22402617.post-114287508829068599</id><published>2006-03-20T09:09:00.000-08:00</published><updated>2006-03-21T00:03:41.860-08:00</updated><title type='text'>Creative: Makers of the Best and Worst Sound Cards</title><content type='html'>I set out to build a home theater PC and when it came time to select a sound card, the choice was simple: Creative SoundBlaster.  I wanted it to have several outputs such as optical and coax, so there was really one option, the &lt;a href="http://www.creative.com/products/product.asp?category=1&amp;subcategory=204&amp;amp;product=9103"&gt;SoundBlaster Audigy 2 NX&lt;/a&gt;.&lt;br&gt;&lt;br&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.creative.com/products/product.asp?category=1&amp;subcategory=204&amp;amp;product=9103"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 302px; height: 225px;" src="http://images.creative.com/iss/images/corporate/artwork/art_Audigy2nx_Prod.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br&gt;

After hooking it up to a Windows XP Media Center Edition PC, I noticed that it started to distort the sound and cause videos to be jerky.&lt;br&gt;&lt;br&gt;

I finally got fed up and went and bought a &lt;a href="http://www.creative.com/products/product.asp?category=1&amp;subcategory=208&amp;amp;product=14066"&gt;SoundBlaster X-Fi XtremeMusic&lt;/a&gt; and let me tell you, this card kicks ass!&lt;br&gt;&lt;br&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.creative.com/products/product.asp?category=1&amp;subcategory=208&amp;amp;product=14066"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 298px; height: 242px;" src="http://images.creative.com/iss/images/corporate/artwork/xtrememusic_pdt_lo.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br&gt;

It only has digital out, front, rear, and center/sub outputs, plus a gameport.  There's no mic or line in.  The surround sound is amazing and clear.  I highly recommend the X-Fi, so &lt;a href="http://www.newegg.com/Product/Product.asp?Item=N82E16829102188"&gt;go buy one right now&lt;/a&gt;.  I can't wait to play a little Doom3 with the lights out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114287508829068599?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114287508829068599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114287508829068599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114287508829068599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114287508829068599'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/03/creative-makers-of-best-and-worst.html' title='Creative: Makers of the Best and Worst Sound Cards'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114240281838655982</id><published>2006-03-14T21:52:00.000-08:00</published><updated>2006-03-14T23:07:52.843-08:00</updated><title type='text'>Adventures in BIOS Flashing &amp; Live CDs</title><content type='html'>Last October I went on a shopping spree and bought a bunch of crap including a server that I was going to turn into a firewall.  Well, I finally assembled this server and fired it up.  Immediately the BIOS starts beeping at me.  After Google'ing the error message "Unknown BIOS error" with the error code 0163, I discovered it was because my Sempron 2800+ CPU was too new for the BIOS.&lt;br&gt;&lt;br&gt;

So begins the fun.  Updating the BIOS on an ASUS motherboard sucks ass.  Finding the latest BIOS update was easy.  Installing it is a whole other issue.&lt;br&gt;&lt;br&gt;

There's two ways to update the BIOS: a program called AsusUpdate that only runs in Windows and another program called AFUDOS that only runs in DOS.  Simple, if you have Windows installed, but I didn't have an OS installed.  I also didn't bother to install a floppy drive in this server, so...&lt;br&gt;&lt;br&gt;

Enter the Live CD.  I started by downloading &lt;a href="http://www.nu2.nu/pebuilder/"&gt;Bart's Preinstalled Environment&lt;/a&gt;.  After installing it, run the PEBuilder, insert your Windows XP SP2 disc, pick a custom folder to dump onto the Live CD (i.e. the AsusUpdate and the update ROM) and specify the output ISO file.  From there burn the ISO, slap it in the server, boot up a &lt;span style="font-style: italic;"&gt;very&lt;/span&gt; watered down version of Windows, run the AsusUpdate program and smile as you stare at a dialog box that doesn't say shit.  Clicking OK caused the installer to exit and leave a bunch of crap in the temp folder.&lt;br&gt;&lt;br&gt;

Ok, no problem, lets try &lt;a href="http://www.nu2.nu/bootcd/cdromsi/"&gt;Bart's DOS live cd&lt;/a&gt;.  First you need to download like 4 seperate files, decompress and assemble them.  After totally messing up the first CD, I figured out how to hack the files together.  I added the AFUDOS program and the ROM and finally burned a cute little CD from the generated ISO file.   I slapped this disc in the server and booted it up.  Finally got the updater to work and I needed to reboot.&lt;br&gt;&lt;br&gt;

After the system booted up and hitting F1 to confirm the BIOS message that the CMOS is messed up, somehow everything started working.  The BIOS now recognized my CPU and finally I could install my firewall, but that another story.&lt;br&gt;&lt;br&gt;

In short, Asus BIOS are a huge pain to flash if you don't use Windows and &lt;a href="http://www.nu2.nu/"&gt;Bart&lt;/a&gt; has really kick ass and super handy bootable CDs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114240281838655982?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114240281838655982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114240281838655982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114240281838655982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114240281838655982'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/03/adventures-in-bios-flashing-live-cds.html' title='Adventures in BIOS Flashing &amp; Live CDs'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114171008460959042</id><published>2006-03-06T21:39:00.000-08:00</published><updated>2006-03-06T22:11:31.800-08:00</updated><title type='text'>Javascript Inheritance</title><content type='html'>Igor, I've done it!  I've come up with the most pimp way, IMHO, to do inheritance in Javascript.
After doing some research, I found lots of interesting approaches, but I didn't particularily
like any of them.&lt;br&gt;&lt;br&gt;
&lt;a href="http://www.crockford.com/javascript/inheritance.html"&gt;Douglas Crockford&lt;/a&gt; and
&lt;a href="http://prototype.conio.net/"&gt;Prototype&lt;/a&gt; extend the built classes with helper functions
which is can be dangerous.  &lt;a href="http://www.kevlindev.com/tutorials/javascript/inheritance/"&gt;Kevin Lindsey's&lt;/a&gt; uses
the more common method of setting the object's prototype to a new instance of the extended object, but incorporates a
superclass for accessing the base class.  &lt;a href="http://www.sitepoint.com/blogs/2006/01/17/javascript-inheritance/"&gt;Harry Fuecks&lt;/a&gt;
seems to agree that this technique is not the best.  Harry seems to like &lt;a href="http://www.kyberfabrikken.dk/"&gt;Troels Knak-Nielsen's&lt;/a&gt;
technique, but I wanted something even cleaner, easier and self contained.&lt;br&gt;&lt;br&gt;

So, after some lots of thinking and coding, here's what I came up with:&lt;br&gt;&lt;br&gt;
&lt;div class="CB_Code" style="width:100%;height:40px;"&gt;function Class(obj){var f=function(){for(i in this._bi)this._bi[i]=0;if(typeof(this.construct)=='function')this.construct.apply(this,arguments);};f.prototype=obj;var fp=f.prototype;fp._bi=[];fp._bo=[];fp.base=function(fn){if(fn){var args=[];for(var i=1;i&amp;lt;arguments.length;i++)args[i-1]=arguments[i];for(var b=this._bo;this._bi['_'+fn]&amp;lt;b.length;this._bi['_'+fn]++)if(typeof(b[this._bi['_'+fn]][fn])=='function')return b[this._bi['_'+fn]++][fn].apply(this,args);}};if(arguments.length&amp;gt;1){for(var i=1;i&amp;lt;arguments.length;i++){var e=arguments[i].prototype,b=fp._bo.length;fp._bo[b]={};for(p in e){if(p!="base"&amp;&amp;p!="_bi"){if(fp[p]){if(p!="_bo"){fp._bo[b][p]=e[p];fp._bi['_'+p]=0;}else fp._bo=fp._bo.concat(e[p]);}else fp[p]=e[p];}}}}return f;}&lt;/div&gt;&lt;br&gt;

Here it is expanded:&lt;br&gt;&lt;br&gt;

&lt;div class="CB_Code" style="width:100%;height:640px;"&gt;
function Class(obj){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var f=function(){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i in this._bi)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this._bi[i]=0;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(typeof(this.construct)=='function')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.construct.apply(this,arguments);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.prototype=obj;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var fp=f.prototype;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp._bi=[];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp._bo=[];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp.base=function(fn){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(fn){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var args=[];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(var i=1;i&amp;lt;arguments.length;i++)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;args[i-1]=arguments[i];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(var b=this._bo;this._bi['_'+fn]&amp;lt;b.length;this._bi['_'+fn]++)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(typeof(b[this._bi['_'+fn]][fn])=='function')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return b[this._bi['_'+fn]++][fn].apply(this,args);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(arguments.length&amp;gt;1){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(var i=1;i&amp;lt;arguments.length;i++){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var e=arguments[i].prototype,b=fp._bo.length;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp._bo[b]={};&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(p in e){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(p!="base"&amp;&amp;p!="_bi"){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(fp[p]){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(p!="_bo"){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp._bo[b][p]=e[p];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp._bi['_'+p]=0;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}else&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp._bo=fp._bo.concat(e[p]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}else&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fp[p]=e[p];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return f;&lt;br&gt;
}&lt;/div&gt;&lt;br&gt;
Basically, it's a function that build's your neato class.  The first argument is an object for this class,
then you can optionally pass in as many other objects which will be extended.&lt;br&gt;&lt;br&gt;

When this function is called, it creates a new anonymous function and then sets the function's
prototype to the object defined by the first argument.  Then it needs to create two arrays for dealing
with base objects and the method to invoke the base method.  Finally the class is extended with
each additional object passed in.&lt;br&gt;&lt;br&gt;

I used Kevin Lindsey's example as the base for my examples.  We first start by defining our base
Person class.  You'll notice the first argument I'm passing an inline
&lt;a href="http://json.org"&gt;JSON&lt;/a&gt; object.  I prefer this
because it looks clean and you could also eval() an XMLHttpRequest response inline.  Ooh, sexy!&lt;br&gt;&lt;br&gt;

&lt;div class="CB_Code" style="width:100%;height:260px;"&gt;
var Person=new Class(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;construct:function(first, last){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (arguments.length &gt; 0)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.init(first, last);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;init:function(first, last){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.first=first;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.last=last;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print:function(){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return this.first + "," + this.last;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
);&lt;br&gt;
&lt;br&gt;
var p=new Person("Chris", "Barber");&lt;br&gt;
alert(p.print());&lt;/div&gt;&lt;br&gt;

So far this will alert "Chris,Barber".  Cool, so next extend the Person class and create the
Employee class.&lt;br&gt;&lt;br&gt;
&lt;div class="CB_Code" style="width:100%;height:285px;"&gt;
var Employee=new Class(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;construct:function(first, last, id){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (arguments.length &gt; 0)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.init(first, last, id);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;init:function(first, last, id){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.base("init", first, last);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.id = id;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print:function(){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var name = this.base("print");&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return this.id + ":" + name;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Person&lt;br&gt;
);&lt;br&gt;
&lt;br&gt;
var e=new Employee("Chris", "Barber", 13);&lt;br&gt;
alert(e.print());&lt;/div&gt;&lt;br&gt;

Now we get "13:Barber,Chris.  Finally we create the Manager class.&lt;br&gt;&lt;br&gt;

&lt;div class="CB_Code" style="width:100%;height:290px;"&gt;
var Manager=new Class(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;construct:function(first, last, id, department){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (arguments.length &gt; 0)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.init(first, last, id, department);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;init:function(first, last, id, department){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.base("init", first, last, id);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.department = department;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print:function(){&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var employee = this.base("print");&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return employee + " manages " + this.department;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Employee&lt;br&gt;
);&lt;br&gt;
&lt;br&gt;
var m=new Manager("Chris", "Barber", 13, "Engineering");&lt;br&gt;
alert(m.print());&lt;/div&gt;&lt;br&gt;

Lastly we are alerted "13:Chris,Barber manages Engineering".&lt;br&gt;&lt;br&gt;

You can easily extend more than one class by just passing in more objects.&lt;br&gt;&lt;br&gt;

&lt;div class="CB_Code" style="width:100%;height:135px;"&gt;
var myObj=new Object();&lt;br&gt;
myObj.mystuff="goes here";&lt;br&gt;
&lt;br&gt;
var MyShibbyClass=new Class(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myObj,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Widget,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Gizmo,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Something&lt;br&gt;
);&lt;/div&gt;&lt;br&gt;&lt;br&gt;

I ran this through a bunch of tests and everything worked pretty good, but there are a few rules:
&lt;ul style="list-style:decimal;"&gt;
 &lt;li&gt;To call the super method, you must use this.base() and pass in at a minimum the mehod name&lt;/li&gt;
 &lt;li&gt;You must not call the this.base() more than once per method (like you'd do that anyway)&lt;/li&gt;
 &lt;li&gt;The constructor must be called "construct" (I wanted to call it "constructor", but it was a reserved word or something)&lt;/li&gt;
 &lt;li&gt;You should not name your methods using reserved words (i.e. tostring, constructor, class, etc.)&lt;/li&gt;
&lt;/ul&gt;

I've tested this in Firefox 1.5, Mozilla 1.7.5, Opera 9 and IE6 all on Windows XP and they all work.
I'm curious how Safari or Konqueror handles this method.&lt;br&gt;&lt;br&gt;

As for performance, I haven't benchmarked it, but I have to believe this is pretty damn efficient as far
as bandwidth and memory is concerned.&lt;br&gt;&lt;br&gt;

I don't know if this method has been done before, so let me know if this something new or old.
Feel free to use it for whatever.  Don't be evil!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114171008460959042?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114171008460959042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114171008460959042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114171008460959042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114171008460959042'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/03/javascript-inheritance.html' title='Javascript Inheritance'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114151565901802195</id><published>2006-03-04T15:28:00.000-08:00</published><updated>2006-03-04T15:40:59.030-08:00</updated><title type='text'>The AJAX Experience Conference</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://theajaxexperience.com/"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 53px;" src="http://theajaxexperience.com/images/ajaxexp3.gif" alt="" border="0" /&gt;&lt;/a&gt;
I just registered for The AJAX Experience yesterday.  Friday was the cutoff for the early bird special price of $1095.  I don't know what I'm looking forward to more: the conference or the weather.  I haven't been to San Francisco since I was a kid, so it will be fun.

There's a great line up of speakers and the topics sound very interesting.  My day job requires me to code in .NET/C#, but at night, I've been brushing up on my JSP/Servlets.  I was kind of surprised to see that a lot of the sessions use Java for the server side.  I actually prefer Java over .NET.

The conference isn't for another 2 months.  I'm paying the whole trip out of my own pocket and I estimate that it'll cost me close to $2,500, so this better be worth it.  So in the meantime, I get to do extremely shibby stuff with Javascript.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114151565901802195?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114151565901802195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114151565901802195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114151565901802195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114151565901802195'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/03/ajax-experience-conference.html' title='The AJAX Experience Conference'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114110833572895650</id><published>2006-02-27T22:31:00.000-08:00</published><updated>2006-02-27T22:57:59.650-08:00</updated><title type='text'>PSP Web Development Part 2</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://fp.scea.com/Content/PSPOther/aboutinteractive/img/interactiveview_default_392.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://fp.scea.com/Content/PSPOther/aboutinteractive/img/interactiveview_default_392.jpg" alt="" border="0" /&gt;&lt;/a&gt;
I spent sometime over the weekend doing some more PSP web stuff and found more issues.  First off, you can't do any DOM stuff like createElement and appendChild.  Second, you can't do XMLHttpRequest, so that rules out any AJAX stuff.  I tried scrollTop on a textarea and that didn't work.  No idea if it works for the window, div's with overflow or iframes.

On the bright side, it seems to have good CSS support.  I spoofed my Firefox's user agent using the PSP user agent "Mozilla/4.0 (PSP (PlayStation Portable); 2.00)" and hit the official Sony PSP site &lt;a href="http://psp.us.playstation.com"&gt;http://psp.us.playstation.com&lt;/a&gt;.  There site is not what I would consider lightweight.  It's got a lot of code.  That might explain why it felt a little sluggish.  Hover events lagged a second behind the pointer movement.

Another issue that may limit the imagination is the amount of memory.  The PSP has 32MB of RAM.  I don't know how much RAM the browser eats up, but if you have the cache set to 2MB and all 3 tabs open, I can definitely see the device running out of memory.

As far as input is concerned, I know onclick events work.  I've read that onmouseover, onmousemove and onmouseout work too, but I haven't tested it yet.

Texting is still a problem.  The keypad entry screen is pretty horrible if you wanted to type an email.  A company called &lt;span style="font-style: italic;"&gt;Logic 3&lt;/span&gt; was working on a keyboard for the PSP, but was &lt;a href="http://gear.ign.com/articles/691/691760p1.html"&gt;recently axed&lt;/a&gt;.  Hopefully Sony will come out with some sort of keyboard because the keypad sucks.  I'd like to play around with building an on screen keyboard similar to how old Nintendo games worked.  I've seen a couple PSP websites use this method, but I think it could be improved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114110833572895650?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114110833572895650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114110833572895650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114110833572895650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114110833572895650'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/psp-web-development-part-2.html' title='PSP Web Development Part 2'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114075911493021458</id><published>2006-02-23T21:14:00.000-08:00</published><updated>2006-02-23T21:31:54.943-08:00</updated><title type='text'>PSP Web Development Part 1</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://fp.scea.com/Content/PSPOther/aboutinteractive/img/interactiveview_default_392.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://fp.scea.com/Content/PSPOther/aboutinteractive/img/interactiveview_default_392.jpg" alt="" border="0" /&gt;&lt;/a&gt;
Tonight I had the opportunity to do a little web programming for my Sony PSP.  Ever since the 2.0 firmware update (I think), they've had a web browser built in.  After running a bunch of tests, I've concluded that it's actually a decent browser.  Heck, I'd go as far as to say it's better than IE6.

These are the tests that passed with flying colors:
&lt;ul&gt;&lt;li&gt;CSS positional elements&lt;/li&gt;&lt;li&gt;GIF, JPG and PNG support&lt;/li&gt;&lt;li&gt;PNG's with opacity&lt;/li&gt;&lt;li&gt;Javascript related&lt;/li&gt;&lt;ul&gt;&lt;li&gt;document.onload&lt;/li&gt;&lt;li&gt;document.getElementById&lt;/li&gt;&lt;li&gt;Setting innerHTML of a non-empty div&lt;/li&gt;&lt;li&gt;alert dialogs&lt;/li&gt;&lt;li&gt;setTimeout animations
&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;The following did not work as expected:
&lt;ul&gt;&lt;li&gt;Overlapping divs with opacity&lt;/li&gt;&lt;li&gt;Setting innerHTML of empty div
&lt;/li&gt;&lt;/ul&gt;I'm hoping to do some more advanced stuff with DHTML, DOM, input capture (d-pad, buttons) and CSS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114075911493021458?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114075911493021458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114075911493021458' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114075911493021458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114075911493021458'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/psp-web-development-part-1.html' title='PSP Web Development Part 1'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114050445219236461</id><published>2006-02-20T22:05:00.000-08:00</published><updated>2006-02-20T22:47:32.230-08:00</updated><title type='text'>Developing Java web apps</title><content type='html'>It's been years since I last did a web application in Java.  In the past, developing Java web apps was simple and painful.  You had to roll your own library to do almost everything.

Fast forward to today.  Java grew up... bigtime.  It's amazing how much .NET and Java are alike.  Both have abstracted controls, code behinds, interactive debuggers, blah, blah, blah.

So, I set out to build a simple JSP website with some Servlets.  The first thing I needed to do is find an IDE worth a crap.

I tried NetBeans 4.1.  Just creating a project is problematic.  The stupid project wizard kept messing up when I specified a folder off the root.

Next I tried Eclipse 3.1.  I was able to create my project, but then I got pissed off for some reason that I can't recall and decided to see what else was out there.

Then I tried Sun Java Studio Creator 2, which is based on NetBeans.  I created my project and unlike NetBeans, it actually worked.  It kindly creates a directory structure to help organize your files and adds a bunch of crap to the project.

To get Tomcat to serve the files, I pointed the document root to C:\myproject\web.  I had serious problems.  Libraries weren't found, nothing worked.  Then I noticed that there was a directory C:\myproject\build\www.  Point Tomcat's / context to that path and bingo!

So far so good.  Now I needed to create a &lt;span style="font-weight: bold;"&gt;simple&lt;/span&gt; JSP file called index.jsp.  Adding a file will automatically generate this JavaBean code behind file that is used for JSF stuff.  I don't want that crap.  If you delete the index.java file, it kills the JSP file.  WTF?

Stay tuned... I'll figure this crap out eventually.&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114050445219236461?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114050445219236461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114050445219236461' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114050445219236461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114050445219236461'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/developing-java-web-apps.html' title='Developing Java web apps'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114046182685289016</id><published>2006-02-20T10:53:00.000-08:00</published><updated>2006-02-20T10:57:06.866-08:00</updated><title type='text'>How to print an iframe</title><content type='html'>To print the contents of an iframe, use this code:

&lt;span style="font-family:courier new;"&gt;&amp;lt;iframe name="myiframe" src="myurl"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;if (!/MSIE 7\./.test(navigator.userAgent)) {&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var f = document.all ? window.frames["myiframe"] : myiframe;&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.focus();&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.print();&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;} else {&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alert("IE7 sucks and so do you for using it.");&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114046182685289016?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114046182685289016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114046182685289016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114046182685289016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114046182685289016'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/how-to-print-iframe.html' title='How to print an iframe'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114040151398712096</id><published>2006-02-19T18:05:00.000-08:00</published><updated>2006-02-19T18:12:32.116-08:00</updated><title type='text'>Indent or Die</title><content type='html'>Ok, I don't understand why people that code can't indent.  Whoever writes code like this should be fired, then re-hired, then fired.
&lt;span style="font-family:courier new;"&gt;
if (something) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DoStuff();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DoOtherStuff();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114040151398712096?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114040151398712096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114040151398712096' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114040151398712096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114040151398712096'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/indent-or-die.html' title='Indent or Die'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114011969533757883</id><published>2006-02-16T11:44:00.000-08:00</published><updated>2006-02-16T21:25:16.946-08:00</updated><title type='text'>IE7's not so awesome zoom feature</title><content type='html'>As everyone knows, IE7 is still very much in beta.  Well, they have added a zoom feature that allows you to, well, zoom.  The new &lt;a href="http://www.microsoft.com/hardware/mouseandkeyboard/ProductDetails.aspx?pid=043"&gt;Microsoft Natural Ergonomic Keyboard 4000&lt;/a&gt; even has a zoom slider that works with this zoom feature.

When you zoom in, it doesn't just increase the text size, it essentially stretches the entire page including all graphics and form elements.  Now, imagine you're a designer and you're thinking "awesome, now I can quickly zoom in to makes sure everything is pixel perfect."  Guess again.  When it stretches images, it runs a Gaussian filter or something that interpolates the pixels which causing nasty visual artifacts.

What's even worse is you zoom in or out, the rendering of the page slows down big time.  Scrolling or resizing the browser window is jerky.  For me, select text when zoomed in didn't work.  However, drop downs were quite fast and crisp.

And the biggest problem that the new zoom feature causes issues with element positions.  Say you have a web page with an image positioned centered, but relative, within some tables or divs.  To compute the distance from the left edge of the screen to the left edge of the image, you'd do something like this in Javascript:

&lt;span style="font-family:courier new;"&gt;    var x=0,e=document.getElementById("myimage");
do{
    x+=e.offsetLeft;
}while(e=e.offsetParent);
&lt;/span&gt;
For my test page, I computed the distance with a  zoom level of 100% to be 479 pixels.  When I zoomed out to 10%, the distance grew to 488.  Zooming in caused the distance to shrink to 387 pixels.

You cannot reliably get the distance unless the zoom level is set to 100%.  So, who cares?  All the developers who use mouse capture and do cool drag and drop stuff.  Now some things won't work as designed and usability goes to crap.

Perhaps these flaws are due to it's beta status, but I'm willing to bet a quarter-pounder with cheese that the final release will behave the same way.

So in short, don't use IE7's zoom feature.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114011969533757883?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114011969533757883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114011969533757883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114011969533757883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114011969533757883'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/ie7s-not-so-awesome-zoom-feature.html' title='IE7&apos;s not so awesome zoom feature'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-114004182137830612</id><published>2006-02-15T14:10:00.000-08:00</published><updated>2006-02-15T14:17:01.390-08:00</updated><title type='text'>Definitely one of the worst books ever</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://images.amazon.com/images/P/061901525X.01._AA240_SCLZZZZZZZ_.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://images.amazon.com/images/P/061901525X.01._AA240_SCLZZZZZZZ_.jpg" alt="" border="0" /&gt;&lt;/a&gt;
Every now and then you accidently fuck up and buy a shitty book.  Allow me to introduce the book Active Server Pages.  This book is perfect for starting a fire to keep you hands warm.  You could even use it to wipe your ass if you should happen to be lost in a forest for days with this book.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-114004182137830612?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/114004182137830612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=114004182137830612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114004182137830612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/114004182137830612'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/definitely-one-of-worst-books-ever.html' title='Definitely one of the worst books ever'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22402617.post-113985484412638854</id><published>2006-02-13T10:15:00.000-08:00</published><updated>2006-02-13T10:23:48.340-08:00</updated><title type='text'>Wint O Green vs. Pep O Mint</title><content type='html'>Often a debated topic: Wint O Green vs. Pep O Mint.

Survey says?  Pep O Mint!   What did you think, gosh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22402617-113985484412638854?l=ambientreality.blogspot.com'/&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ambientreality.blogspot.com/feeds/113985484412638854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=22402617&amp;postID=113985484412638854' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/113985484412638854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22402617/posts/default/113985484412638854'/><link rel='alternate' type='text/html' href='http://ambientreality.blogspot.com/2006/02/wint-o-green-vs-pep-o-mint.html' title='Wint O Green vs. Pep O Mint'/><author><name>Chris Barber</name><uri>http://www.blogger.com/profile/18347883584363809624</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07753905467176827090'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry></feed>