<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Lance Good</title>
    <link>http://goodle.org/blog/</link>
    <description>The ramblings of Lance Good.</description>
    <!-- optional tags -->
    <language>en-us</language>           <!-- valid langugae goes here -->
    <generator>Nucleus CMS v3.21</generator>
    <copyright></copyright>             <!-- Copyright notice -->
    <category>Weblog</category>
    <docs>http://backend.userland.com/rss</docs>
    <image>
      <url>http://goodle.org/blog//nucleus/nucleus2.gif</url>
      <title>Lance Good</title>
      <link>http://goodle.org/blog/</link>
    </image>
    <item>
 <title><![CDATA[BunBun, the middle one]]></title>
 <link>http://goodle.org/blog/index.php?itemid=84</link>
<description><![CDATA[I discovered a nest of bunnies in our yard.  Not quite big enough to be <A HREF="http://icanhascheezburger.com/tag/bunny/">lol bunnies</A> yet.  But they are on their way.  Some of you may recall our adventures with the semi-disabled bunny in our back yard last year.  Unfortunately, he met a tragic end at the paws of some late night predator.  But I'm sure these bunnies will turn out fine.<br />
<BR><br />
Anyway, here are some action shots.  Those bunnies are tricksy.  See if you spot the nest in this photo.<br />
<BR><br />
<br />
<BR><br />
*Spoiler* :: it's under the rubber cord holding up the tree.  <br />
<BR><br />
Anywho, now we'll get a little closer:<br />
<BR><br />
<br />
<BR><br />
Closer... Closer... And now you can see a jumble of bunny limbs and ears:<br />
<BR><br />
<br />
<BR><br />
<BR><br />
And just when you least expect it...<br />
<BR><br />
<IMG SRC="http://icanhascheezburger.files.wordpress.com/2008/09/funny-pictures-your-lettuce-may-contain-traces-of-bunny.jpg" WIDTH="400" HEIGHT="315"><br />
]]></description>
 <category>General</category>
<comments>http://goodle.org/blog/index.php?itemid=84</comments>
 <pubDate>Fri, 08 May 2009 18:30:25 -0700</pubDate>
</item><item>
 <title><![CDATA[Skip auto alignment on hp officejet k series]]></title>
 <link>http://goodle.org/blog/index.php?itemid=83</link>
<description><![CDATA[This is just as a reminder to myself and anyone else on how to fix an OfficeJet K60  (and probably the k80) when it says "Press Enter to Align Cartidges ... blah blah".<br />
<br />
The way to bypass this screen is to press and hold "Enter" then press "Menu".  You'll also get special prizes if you press up-up-down-down-left-right-left-right-b-a-start.<br />
<br />
]]></description>
 <category>Technical Support</category>
<comments>http://goodle.org/blog/index.php?itemid=83</comments>
 <pubDate>Mon, 04 May 2009 07:36:31 -0700</pubDate>
</item><item>
 <title><![CDATA[News Flash: Public Service Announcements]]></title>
 <link>http://goodle.org/blog/index.php?itemid=82</link>
<description><![CDATA[I recently switched a fairly complex Ajax application that I had built to use Flex.  For those that don't know, Flex Builder is a programming tool to build flash applications.  I have to say that I love programming in ActionScript, which is the main language you use in Flex.  One thing to know about Adobe and Flash; there are lots of confusing names here.  ActionScript, Flex, Flex Builder, Air, Flash Player, Flash IDE, yada yada yada.<br />
<br />
Anyway, the latest ActionScript fits a little better with my work flow than programming in Java, mainly because of function pointers and closures.  For example, when I need to create a small event callback, I just write a little function.  To do the same thing in Java I usually make a little anonymous class.  I also have to make sure that any variables I need to reference in the anonymous class' containing scope are private.  These aren't huge deals but they are just enough extra overhead that they interrupt my flow.  Of course, there are a couple annoying things about ActionScript too.  The biggest is that there is no block scope.  So variables inside an "if" block are visible outside that "if" block.  And the counter declared in a "for" loop is visible everywhere inside the containing function.  This can cause errors if you're not careful, but it is mostly just an annoyance.<br />
<br />
Anyway, the point of this post is to report on a couple flex related issues in case the solutions help anyone else.  My naive assumption was that I could get rid of cross-browser weirdnesses like these by writing a Flash app instead of an HTML based app.  This is definitely more true than with the Ajax library I was using, but it's not totally true.  So here goes.<br />
<br />
The first bug: I wanted my Flash app to fill 100% of the browser height minus a fixed height header.  You'd think this would be really common and easy.  But I had a hard time finding examples on the web.  I finally found <a href="http://groups.google.com/group/swfobject/browse_thread/thread/232eb566b1a636e5?pli=1">this</a> email thread which pointed me to <a href="http://www.alistapart.com/articles/conflictingabsolutepositions/">this</a> general technique to fill 100% height.  The idea is that you specify the top and bottom in the CSS but you leave the height unspecified.  Surprisingly, this worked out of the box for IE7 and Firefox.  But it didn't work on Safari or Google Chrome, despite what the email thread above suggested.  I guess nothing across browsers is ever simple.  Luckily, Chrome has a nice feature where if you right click on an element you can select "Inspect Element" and it pops up a box that has some of the functionality you get with the Firefox Firebug plugin.  After playing around in here for a while I finally found the magic invocation to make things work.  The DIV that I fed to swfobject needed to have "display: block;" set on it in the CSS.  Fortunately, this setting doesn't break IE7 and Firefox so it worked for all the browsers I care about for now (I'm delaying old IE and Opera support until the site is more stable).<br />
<br />
So now my app laid out fine in the browsers and it actually functioned in Firefox, Chrome, and Safari.  But it just did not work in IE.  HTTP requests to my server just seemed to get lost after the server sent back a response.  The app would just sit there.  What the heck?  I thought it was the same player in all the browsers?  I did some quick google searching and got totally diverted by <a href="http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=2901&productId=2">this</a> set of bug reports related to IE caching.  This didn't quite smell right but I was going for the quick fix rather than really thinking the problem through.  Anyway, after messing with my server for a little bit, I finally remembered that I needed to separately install the debug flash player for IE.  The debug version I had installed for the other browsers didn't show up for IE.  After I did this, I found out that IE was parsing my HTTP POST request as form arguments.  The flash player was not doing this on the other browsers.  Anyway, easy to fix, I changed the content type to CONTENT_TYPE_FORM and passed in a dictionary of arguments instead of a preformatted form string.  OK, things should be working great now, right?  NO! Turns out IE also returns the real HTTP status codes.  The other browser seem to return more process-like status codes with 0 for success and 1 for failure (Edit: Actually, I think these other browsers just don't fill in the status code, so it defaults to 0).  So my success check now looks for status codes 0 or 200.  I guess technically I may not need to check the status code's at all, since network errors usually get sent to a fault handler.  However,  I couldn't find clear documentation on what it was going to do, so I thought better safe than sorry.<br />
<br />
The last bug is not a bug at all but an annoyance with Flex.  In Flex, you can add "trace()" statements to your code and it will print the output to an error console.  Well, I could not get this to work.  I looked through all the Flex settings and couldn't find anything to enable this.  Plus, I thought that a tool for debugging applications would surely have the debug console enabled by default.  So I suspected a bug.  I did some more google searching and found <a href="http://bugs.adobe.com/jira/browse/FB-13064">this line</a> of bug reports.  This didn't sound quite right and I actually had a version of Firefox that was supposed to be fixed.  Plus, breakpoints seemed to work so the debugging sessions were clearly connecting correctly.  I couldn't understand why it still wasn't working.  Finally, I looked on the settings for the individual launcher entries in the Debug dialog in Eclipse.  It turns out that there is an obscure checkbox under the third tab labeled "Common" that says "Allocate Console (necessary for input)."   So you have to manually enable the debug console for every application that you want to debug.  Unbelievable.]]></description>
 <category>Programming</category>
<comments>http://goodle.org/blog/index.php?itemid=82</comments>
 <pubDate>Mon, 02 Mar 2009 12:50:08 -0800</pubDate>
</item><item>
 <title><![CDATA[Flex Bug]]></title>
 <link>http://goodle.org/blog/index.php?itemid=81</link>
<description><![CDATA[I just wanted to post this in case it helps anyone diagnose this problem.  I was getting this helpful error message in Flex:<br />
<br />
    "An internal build error has occurred. Right-click for more information."<br />
<br />
Googling did not help.  I found a bunch of things that could cause the problem: empty switch statements, missing semicolons, double imports, etc.  However, none of those seemed to apply to me.  The most common suggestion I found was to look in the log file.  I checked the logged file and found this exception:<br />
<br />
    java.lang.NullPointerException<br />
	    at macromedia.asc.semantics.InterfaceWalker.<init>(InterfaceWalker.java:35)<br />
<br />
Still not helpful.  I finally started commenting code and eventually narrowed it down to this statement:<br />
<br />
    var aCursor:IViewCursor = anArray_.createCursor();<br />
<br />
The variable "anArray" is type ArrayCollection.  The IViewCursor that I was trying to create is kind of like a Java iterator.  The "I" in the type name is Adobe's convention for interfaces.  So the problem with this code is apparently that I'm declaring a variable whose type is an interface rather than a concrete class.  Indeed, I still get the internal error if I change the code to:<br />
<br />
    var aCursor:IViewCursor;<br />
<br />
The odd thing is that this line is actually used in the example code that shows up on the ArrayCollection class itself.  In any case, this error seems to explain the null pointer in "InterfaceWalker" above.   For now, I'm changing the code to:<br />
<br />
    var aCursor:Object = anArray_.createCursor();<br />
<br />
which, though not as convenient, seems to avoid the compiler crash.<br />
<br />
---<br />
<br />
Incidentally, I figured out that this declaration only causes a problem in very specific circumstances.  I just created a bug in Adobe's Jira for Flex with a very simple example.  The bug number is <a href="http://bugs.adobe.com/jira/browse/FB-17353">FB-17353</a>.]]></description>
 <category>Programming</category>
<comments>http://goodle.org/blog/index.php?itemid=81</comments>
 <pubDate>Wed, 25 Feb 2009 14:29:33 -0800</pubDate>
</item><item>
 <title><![CDATA[Ye Good Ole Days]]></title>
 <link>http://goodle.org/blog/index.php?itemid=67</link>
<description><![CDATA[Check out <a href="http://blog.guykawasaki.com/2007/12/a-tour-of-xerox.html">these</a> pictures from where I used to work.  They were posted by Guy Kawasaki.  He's some guy who worked at Apple, wrote some books, and did some stuff.  The one thing that's a little confusing from this blog post is that it's not <b>Xerox</b> PARC anymore.  It's just PARC.<br />
<br />
<br />
<br />
Above is the view from my old office at PARC.  I have this image backed up somewhere but it would take forever to find it.  So I resorted to good old <a href="http://web.archive.org/web/*/http://www.cs.umd.edu/~goodness/">archive.org</a> for a backup copy.  For some reason they didn't store a lot of the pictures, but they did keep this one.]]></description>
 <category>General</category>
<comments>http://goodle.org/blog/index.php?itemid=67</comments>
 <pubDate>Fri, 21 Dec 2007 06:41:36 -0800</pubDate>
</item><item>
 <title><![CDATA[The antepenultimate word on universal randomness]]></title>
 <link>http://goodle.org/blog/index.php?itemid=30</link>
<description><![CDATA[If you read <a href="http://goodle.org/blog/index.php?itemid=20">this post</a> or <a href="http://goodle.org/blog/index.php?itemid=18">the one before it</a> then you're probably pretty well acquainted with my lunacy.  In any case, I have been keeping an eye out for pictures of balls in books.  I have definitely noticed a higher than random probability of finding red stars on balls.  So maybe there really is a strong prototype for balls with stars.  That could definitely explain the particular event that I wrote about.<br />
<br />
That's really the interesting thing about it though.  It's hard to <b>prove</b> that this is the explanation.  I know there has been much ink spilled on both sides of issues like this (luckily, no ink was shed in the writing of this blog).  Many have said outright that research into topics like this is a waste of time.  The thing I like about it though is the unresolved ambiguity.  It leaves open the possibility for unknown phenomena.  Is it all the usual science that we're comfortable with?  Or is it something weird that's still unknown?  Given that <a href="http://www.sciencedaily.com/releases/2001/03/010312071729.htm">elephants probably communicate through their feet</a>, I don't find it too hard to believe that humans, who are more subtle than elephants (apologies to Doug Adams), can communicate more than we thought with facial expressions or some other mechanism we haven't discovered yet.<br />
]]></description>
 <category>Religiosity</category>
<comments>http://goodle.org/blog/index.php?itemid=30</comments>
 <pubDate>Fri, 24 Aug 2007 07:05:22 -0700</pubDate>
</item><item>
 <title><![CDATA[Putting it all together]]></title>
 <link>http://goodle.org/blog/index.php?itemid=32</link>
<description><![CDATA[I am just on the verge of submitting this to Science and Nature so you're really getting a sneak peek here.  This is huge.  If you've got an infant in your life (or anyone else in diapers, for that matter) then you'll want to listen closely.  I have discovered the secret to optimal wiping.  Feel free to just refer to it as "the secret".  <br />
<br />
Why might you be interested in optimal wiping, you ask?  It could just save the world as we know it, by reducing deforestation and global warming and the real estate bubble and who knows what else.  OK smart guy, I hear you saying you don't care about any of those things.  So let's just say you're stranded on a deserted island with one baby wipe left and your kid is covered in a gigantic turd.  Got your attention now, don't I?  I thought so.<br />
<br />
OK, so here it is.  Instructions on optimal wiping.  First, make one good pass with the wipe.  You want to use up all of one side.   Now, carefully fold it in half so that the two, erm, soiled sides fold together.  The trick here is that you've often only got one hand, since the other hand is often suspending or restraining various baby appendages.  So folding with one hand takes some practice.  You'll probably want to get a doll and some wipes and block off a weekend to really master it.  Once you've got that step, it's all blue skies and green lights.  Just repeat the process - wiping and folding in half.  Wipe and fold.  Take a look at the fancy-pants figure:<br />
<br />
<br />
<br />
I know what you're asking yourself now, heady with your new found power and feeling like maybe you could go on folding in half forever.  You're asking yourself, "Is there no limit to all this wiping"?  Well, let me just reign in that optimism there, Mr. Zeno.  Your good friend, Mr. Mathematics, just happens to have something to say about this.  Let's take a look at the theoretical limit:<br />
<br />
<br />
<br />
OK, so doubling your wiping power ain't so shabby either, now is it.  But not so fast, smart guy.  That was the theoretical limit.  For the actual limit, we have to reference the super duper expert scientists <a href="http://pomonahistorical.org/12times.htm">here</a>.  So the actual wiping area is AT MOST:<br />
<br />
<br />
<br />
I think that should set a few things straight around here.  I actually haven't calculated the exact folding limit of your standard huggies/Costco wipe.  I'm guessing it's more like 8 rather than 12.  But I leave that as an exercise for the reader.  Bonus points for calculating the limits of Tucks medicated pads.  Now go out into the world and start folding your wipes into microscopic proportions!<br />
<br />
Oh, and thanks to David Tucker for suggesting a formula.]]></description>
 <category>General</category>
<comments>http://goodle.org/blog/index.php?itemid=32</comments>
 <pubDate>Sun, 05 Aug 2007 20:44:36 -0700</pubDate>
</item><item>
 <title><![CDATA[Spin]]></title>
 <link>http://goodle.org/blog/index.php?itemid=31</link>
<description><![CDATA[A while back I read the science fiction book 'Spin'.  It won a Hugo award, which is kinda like the Oscars for science fiction literature.  I'm sure these awards are tainted with politics just like the Oscars and everything else.  But I still find them to be helpful in choosing books to read since I don't follow Science Fiction <i>that</i> closely.   It also helped that my cube neighbor, Charles, recommended and let me borrow the book.<br />
<br />
If you read a little bit of science fiction, you'll probably start to see variants on the same ideas reused across many books.  That's, of course, because it's hard to think of new ideas.  One of the things I liked about <i>Spin</i> is that it has a couple great science fiction premises that I hadn't read about anywhere else.  That by itself was worth reading the book for me.  I also wasn't able to guess what was behind the <b>spin</b>, almost right up to the point where it was spelled out for me.  Even better, the premise has a certain logical purity to it that was pretty satisfying once I got it.  Now, I'm not saying that I think the ideas in the book are actually feasible.  In fact, it seems exceedingly far fetched to me at this point.  But what good is science fiction without a heavy dose of speculation.<br />
<br />
Although I liked the plot devices by themselves, I thought they also gave the book an interesting perspective on the universe.  I don't want to spoil the plot so I won't say much more about this.  I just found it cool to put myself in the mindset of the <i>Spin</i> world, thinking outside the usual constraints.<br />
<br />
Alas, my review is not all positive.  I thought the book's biggest weaknesses were some of the clichéd interactions between the characters.  At one point towards the end of the book, one of the characters actually says something like, "you always were the strong one".  That's a line straight out of a Lifetime channel movie if I've ever heard one.  Of course, real life people do talk in clichés like this, since people are often not very creative.  But if I wanted to hear that kind of dialog, I'd go watch some Oprah or eavesdrop at Starbucks.  <br />
<br />
On a related note, a couple characters had ridiculous catharses towards the end of the book that I found to be a distraction from the main storyline.  I guess these were included to give the book some extra literary weight.  Obviously I don't think they were successful and wouldn't add anything even if they weren't so contrived.<br />
<br />
Overall though, I'd recommend the book.  It may start you thinking.<br />
<br />
]]></description>
 <category>Fiction</category>
<comments>http://goodle.org/blog/index.php?itemid=31</comments>
 <pubDate>Fri, 04 May 2007 05:23:05 -0700</pubDate>
</item><item>
 <title><![CDATA[The smoking colonel mustard man]]></title>
 <link>http://goodle.org/blog/index.php?itemid=29</link>
<description><![CDATA[It's probably not too surprising that kid's books are gimmicky.  You've got your <a href="http://www.amazon.com/gp/product/0399226907/">tissue paper guy</a>.  And the <a href="http://www.amazon.com/gp/product/0670241334/">lithograph guy</a>.  And then you've got the authors with story gimmicks.  Like <a href="http://www.amazon.com/gp/product/0060244054/">If You Give a Moose a Muffin</a> or <a href="http://www.amazon.com/gp/product/0060245867/">If You Give a Mouse a Cookie</a> or the soon to be released "If You Give a Rat Some Poison".<br />
<br />
The gimmick I've been reading a lot of recently is Curious George.  If you haven't read the books, I'll give you a summary of every single one.  George is curious causing him to get in trouble.  After a stern lecture, George is back in action to save the day.  Everyone forgets about the trouble he caused earlier and he ends up a hero.<br />
<br />
First of all, is that really a good lesson to teach kids?  The implication is that if you screw up, you better walk on water soon.  I guess it's not too big a deal.  It is just a monkey.<br />
<br />
Anyway, my real issue is with this man with the yellow hat.  Has there ever been a less responsible pet owner?  This guy leaves George unattended in some stellar situations.  You can imagine the hilarity that ensues when the yellow hatted one leaves George alone in his friend's pharmacy ... with a loaded handgun.  That George is a rascal.]]></description>
 <category>Fiction</category>
<comments>http://goodle.org/blog/index.php?itemid=29</comments>
 <pubDate>Sat, 22 Jul 2006 18:28:33 -0700</pubDate>
</item><item>
 <title><![CDATA[Time Travelers Wife]]></title>
 <link>http://goodle.org/blog/index.php?itemid=28</link>
<description><![CDATA[I recently finished reading a book called "The Time Traveler's Wife".  It was one of the few books I've bought on a whim at the store.  The last one I bought on a whim was "The Kiterunner" which I'd recommend if you haven't read it.  The Time Traveler's Wife took me about a year to read.  I can't ever remember taking even half that long to finish a fiction book.  Having said that, you might think I hated it.  I definintely didn't.  It had some great insights into human relationships.  The writing was also very well done in places.<br />
<br />
For the first half of the book, the premise seemed really goofy to me.  Basically it is a time travel romance novel. I wasn't really used to the introduction of a classic science fiction mainstay in such an otherwise mundane love story.  I was also really worried starting out that the time travel would be totally ridiculous and filled with classic logical flaws.  However, I think the book effectively avoided these pitfalls.  By the end of the book, I was pretty comfortable with the time travel and I thought it gave the book a real tragic edge.<br />
<br />
One complaint about the story in general was that it projected a sense of intellectual snobbery.  I got the distinct impression that the author is one of those people who carries a library tote bag and needs to tell everyone how she doesn't own a TV (insert obligatory Onion ref).  I'm sure the author giggled with delight when she thought of a plausible reason for one of the main characters to have an aversion to TV.<br />
<br />
My biggest problem with the book was that it poorly developed the conflict.  That is why it took me so long to read.  The "reading group" questions at the end suggest that various events in the book were subtly foreshadowed.  I guess maybe that is what is supposed to keep you interested.  But for me it was way too subtle.  There was absolutely no conflict for the first 80% of the book.  It was like a breathless kid telling you a story that ends up being a series of events with no real point.  "This happened.  Then this happened.  Oh, and then this crazy thing happened."<br />
<br />
I think the book could be altered in very minor ways to introduce the conflict much earlier and make the story much more compelling.  An example that comes to mind is one of my favorites, "A Prayer for Owen Meany". In this book, the main character also has visions of his future.  However, these visions are revealed much earlier and the story has a great sense of building towards a climax.  The Time Traveler's Wife develops this same sense but not until about the last 20% of the book.]]></description>
 <category>Fiction</category>
<comments>http://goodle.org/blog/index.php?itemid=28</comments>
 <pubDate>Sat, 22 Jul 2006 17:50:10 -0700</pubDate>
</item>
  </channel>
</rss>
