Pikmin 2

Today I beat Pikmin 2. It took a long time.

The last boss is made of junk; 4 weapons that each correspond to a certain type resistant Pikmin.

weapon resistant Pikmin color range ease of avoision length of Pikmin death
electricity yellow play area+ very low! instant!
water bombs blue entire map ! moderate seconds
toxic gas white entire play area low seconds
flamethrower red part of play area moderate seconds

So, that’s the order I recommend taking them down. The reasons?

  1. First take the electricity thing off. The attack has no “cure” and will kill everyone instantaneously. It has the second largest range as well. Pull the component off the field so it doesn’t distract from the battle- by this I mean: when you throw Pikmin at the enemy and miss, they may gather around the component and try to lift it, making themselves sitting ducks. We can’t have that.
  2. Next take the water spigot. The reason is this thing can hit anywhere on the map, and with it still active, nothing is safe. If you can, pull the component off the field so it doesn’t distract from the battle. Note with these remaining “curable” attacks, the leading cause of Pikmin death is when the commander is downed while the Pikmin are suffering, so the commander cannot save them. Thus the water attack is probably the least deadly in this regard, but its range disables other strategies, so we are taking it off first.
  3. Now that the spigot is gone, you can stow vulnerable Pikmin (the yellow and blue) elsewhere. Split up the squad; let one of your commanders take them to a corner of the map.
  4. Next take the gas dispenser. It is unlikely you brought enough white to take down the gas dispenser by themselves, so your leaner squad composed solely of reds will have to be on their toes. After it is gone, remove all remaining non reds to your “hide in the corner” squad. The reds, assuming there are 30 or more of them, can carry the junk on the field off in peace, since they are invulnerable to the sole remaining attack (the flamethrower).
  5. Now take the flamethrower using your reds only. Remove the piece from the field if you like.
  6. When the piece is gone, bring back the “hide in the corner” squad and finish this thing off! Yay!

Fabric King

I’ve seen some pretty awesome custom-made clothing on people walking around Oakland… in true bling hip hop style, there have been some great examples of jackets and shoes made from bootlegged high-end designer fabrics, for example a jacket made from Coach purse fabric.

Now I see an online source of some of this fabric. Pretty cool!Web link of note: Fabric King
(At http://www.fabricking.com/)

Hufu

Soy-based human flesh alternative.

Hufu is designed to resemble, as humanly possible, the taste and texture of human flesh. If you’ve never had human flesh before, think of the taste and texture of beef, except a little sweeter in taste and a little softer in texture. Contrary to popular belief, people do not taste like pork or chicken.

Web link of note: Hufu
(At http://www.eathufu.com/)

SOAP::Lite Notes

Recently I’ve been playing with the perl implementation of SOAP, called SOAP::Lite.

  • Q: There is no place in the server code that describes the tags for the response!
    • A: The article at SOAP::Data describes how to put data into a complex type for a parameter for a method- I’m not yet certain if this works for the server side:

      A common question is how to do you created nested XML elements using SOAP::Lite. The following example demonstrates how:

          SOAP::Data->name('foo' => \SOAP::Data->value(
              SOAP::Data->name('bar' => '123')));

      The above code will produce the following XML:

          <foo>
            <bar>123</bar>
          </foo>
  • Q: How do I put complex types into a SOAP::Lite?
    • A: Again from SOAP::Data,

      The following code:

          $elem1 = SOAP::Data->name('item' => 123)->type('SomeObject');
          $elem2 = SOAP::Data->name('item' => 456)->type('SomeObject');
          push(@array,$elem1);
          push(@array,$elem2);
      
          my $client = SOAP::Lite
              ->readable(1)
              ->uri($NS)
              ->proxy($HOST);
      
          $temp_elements = SOAP::Data
              ->name("CallDetails" => \SOAP::Data->value(
                    SOAP::Data->name("elem1" => 'foo'),
                    SOAP::Data->name("elem2" => 'baz'),
                    SOAP::Data->name("someArray" => \SOAP::Data->value(
                        SOAP::Data->name("someArrayItem" => @array)
                                  ->type("SomeObject"))
                             )->type("ArrayOf_SomeObject") ))
      
              ->type("SomeObject");
      
          $response = $client->someMethod($temp_elements);

      Will produce the following XML:

          <?xml version="1.0" encoding="UTF-8"?>
          <SOAP-ENV:Envelope
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
              xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns:namesp2="http://namespaces.soaplite.com/perl"
              SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <SOAP-ENV:Body>
              <namesp1:someMethod xmlns:namesp1="urn:TemperatureService">
                <CallDetails xsi:type="namesp2:SomeObject">
                  <elem1 xsi:type="xsd:string">foo</elem1>
                  <elem2 xsi:type="xsd:string">baz</elem2>
                  <someArray xsi:type="namesp2:ArrayOf_SomeObject">
                    <item xsi:type="namesp2:SomeObject">123</bar>
                    <item xsi:type="namesp2:SomeObject">456</bar>
                  </someArray>
                </CallDetails>
              </namesp1:test>
            </SOAP-ENV:Body>
          </SOAP-ENV:Envelope>
  • Q: How do you force XML data into a response?
    • A: there is defeinitely a nicer way to do it- but the only way I found was to do it “manually” by force-feeding XML to SOAP::Data. Given the XML response
      <products>
        <product>tomatobomb</product>
        <product>fishgoo</product>
      </products>

      I used

      sub productsList {
        $xml_content = "<products>" .
                "<product>tomatobomb</product>" .
                "<product>fishgoo</product>" .
                "</products>";
        $response = SOAP::Data->type('xml' => $xml_content);
        return $response;
      }
  • Q: And how do you get THAT data out?
    • A: on the client:
      $result =  $soapclient->productsList();
        @array = $result->valueof('//products/product');
      for my $t ( @array ) {
              print "node: $t \n";
      } 
  • Q: How do I force XML from the client to hardcode a request?
    • A:
  • Q: What does the no-argument, “Hello World” SOAP::Lite client SOAP request look like?
    • A: with a method “hi()” in the namespace/service “Demo”, with no arguments:
      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
          xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
          xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
          xmlns:xsd="http://www.w3.org/1999/XMLSchema"
          SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <SOAP-ENV:Body>
          <namesp1:bye xmlns:namesp1="Demo"/>
        </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
  • Q: What does the “Hello World” SOAP::Lite server response look like?
    • A:
      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsd="http://www.w3.org/1999/XMLSchema"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <SOAP-ENV:Body>
          <namesp1:byeResponse xmlns:namesp1="Demo">
            <s-gensym3 xsi:type="xsd:string">goodbye, cruel world</s-gensym3>
          </namesp1:byeResponse>
        </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
  • Q: In SOAP::Lite, what is “namesp1”?
    • A:
  • Q: How do I get my simple data out of a SOAP response in SOAP::Lite?
    • A:
  • Q: How do I transport arrays through SOAP::Lite?
    • A:
  • Q: How do I transport hashes through SOAP::Lite?
    • A:
#!perl -w
use  SOAP::Lite;
my $s =  SOAP::Lite
       ->  uri('http://www.PerfectXML.com/NETWebSvcs/BookService')
       -> proxy('http://www.PerfectXML.NET/WebServices/SalesRankNPrice/BookService.asmx')
       -> on_action(sub{sprintf '%s/%s', @_  })
       ;
 
my $ISBN =  SOAP::Data->name('ISBN' =>  1861005466)->type('string')->uri('http://www.PerfectXML.com/NETWebSvcs/BookService');
$result =  $s->GetAll($ISBN)->result; # hash with elements
 
print  $result->{AmazonSalesRank}, "\n";
print  $result->{AmazonPrice}, "\n";
print  $result->{BNSalesRank}, "\n";
print  $result->{BNPrice}, "\n";
$result =  $s->GetRate(
   SOAP::Data->name('fromCurr')->type(string => $FromCode),
   SOAP::Data->name('ToCurr')->type(string => $ToCode)
)->result;

More links:

http://www.majordojo.com/archives/000042.php
http://www.xav.com/perl/site/lib/SOAP/Lite.html
http://builder.com.com/5100-6389-1045078-2.html
http://users.skynet.be/pascalbotte/rcx-ws-doc/soaplite.htm
http://www.majordojo.com/soaplite/docs/SOAP/Data.html

Botany of Desire

I haven’t read this yet- I was reading an interview with Michael Pollan in the December 2004 California Monthly (the University of California Alumni Magazine) and was intrigued by his analysis of our monoculture of corn.

0375760393

You’ll Love It At Levitz

Lauren was trying to explain to someone how Levitz traumatized her as a child and now she can’t even think about the place. She seemed relieved when I could describe what is horrible about the store… so here it is.

“Levitz” is a chain of furniture stores, and one of their locations is in San Leandro, across the freeway from my aunt and uncle’s house. There is a giant ellipsoid sign on a thin pole, the sign thick and imposing, like a giant wooden lollipop. From my the backyard I could see this sign, looming close by over the sound wall.

Levitz had a jingle- a small chorus of too-happy people singing “you’ll love it at LE-VTIZ!!!” in the same drug-induced perkiness you might associate with the It’s A Small World ride at Disneyland. I always imagined that all the original singers were dead, and when the jingle played, we were hearing their voices from beyond the grave. Sort of like the intense and emotionless undead lady who told you that your party had been disconnected on the old Pacific Bell analog phone system.

Anyway, I think this jingle would play on the radio, but it may have also had a local television spot, back when we had actual television stations based locally. I miss those local commercials. You damn kids.

The actual experience of going to a Levitz store is a classic example of what NOT to do in the interest of customer experience. The showroom itself is not so bad- giant, long, rooms of somewhat cheesey furniture, generally covered in scratchy synthetic fabrics… the only kind of furniture that was available to most Americans before there was Pottery Barn or IKEA. Ugly, but for the most part innocuous.

Where the Levitz store really stands out is the warehouse, where they keep all the furniture- you see, the Levitz location is laid out BACKWARDS- the warehouse is in the front. Visitors must walk through the warehouse to get to the showroom. And what a walk it is-

As opposed to the cheerfully-lit showroom, the warehouse is lit by tiny sodium lights affixed to the ceiling several stories up- giving visitors a sickly pallor in the eternal twilight. The ceiling is far overhead, and just as in a warehouse store like CostCo, the only walls visible are made of giant racks of stock, in this case ugly 1950s furniture. Something about the aisles between these walls is unsettling however… the aisles themselves are a little too wide. Not originally intended for human use.

The floor is a hard, museum-quality cement, slick and glazed. Walking down the center aisle towards the lit doorway leading to the showroom, the visitor’s footsteps echo like tapshoes. The center aisle is bordered by the giant towers of furniture, and walking towards the light is like going to see the Wizard of Oz.

In the distance a manic whirring can be heard, from something just out of sight- observant visitors might notice a metal rail running around all the furniture towers, a thin border about three inches away and six inches high. Occaisionally a huge robotic cart will burst out from behind one of the furniture towers with a roar, piloted by a hunched-over Levitz minion, skin sallow from living under sodium lamps, eyes squinting in the darkness.

The carts they drive are a combination forklift and furniture gurney, and are prevented from damaging the stock by the metal rails around the towers. They steer in a shifting pivot, I think because the entire engine complete with wheels rotates around, making their careening movement around the slick floors unsettlingly unpredictable.

The dichotomy of the warehouse and the showroom reminds me of the 1950’s adaptation of The Time Machine- perhaps itself a metaphor for the 1950’s. On the surface, brightly-lit, synthetically cheerful. On the underside, all the functional stuff- the ugly, sooty darkness that makes the cheerful world actually work. The Eloi and the Morlocks. Except at Levitz, it’s in reverse.

I think Levitz is on the verge of going out of business, or maybe just this location is closing down. While Lauren was freaking out, telling us about her horrible experiences there as a young child, our coworker Andrew (helpfully?) mentioned that his parents used to go shooting with the Levitz’s. Lauren somehow spun this into the Levitz’s as some kind of family of bloodsucking supervillains.

So let this be a lesson to all of us- store layout is an important part of brand-building.

UPDATE:

DIANE: you left out how you cannot turn a corner with some wanna be car salesman asking if he can help you and then following you through the maze. You not only feel trapped but also that you are about to be attacked.

In a cheery, perky, 1950s way I hope!

Don’t Panic

We saw the Hitchhiker’s Guide to the Galaxy today- it was so-so.

The director stepped on a lot of the funny lines, or maybe the actors were to blame- did they not understand what they were saying? I see this happen a lot with actors. Either they are bad actors or they have a skewed impression of what the significance of the line is.

The Trillian-Arthur romance was wholly unnecessary, as was the theme of “Arthur learns a lesson.” Arthur was funny being a boring person in the book/radio play/TV show! He just wants tea! Don’t try to make him a likeable person! And while Mos Def was great as Ford, he was robbed of some of that character’s traditional irrational mania by poor writing adaptation.

In case you think this was just the book to screen translation, let me point out that a lot of the same jokes were in the BBC version, and they were still funny there. Ford missed out on some of his funniest lines, including the description of what a “teaser” is, and one-liners like “the best way to get a drink out of a vogon- stick your finger down his throat” and “what’s the worst thing about being drunk? Ask a glass of water.”

John Malkovich’s segment was also weirdly unnecessary. There were a lot of opportunities for insane and fun exposition that were passed up, such as the description of who let them on the Vogon ship (BBC FORD: “The Dentrassi must really hate the Vogons”). Marvin was more self-pitying than his more arrogant and nihilistic BBC self. And the writer seemingly purposely misinterpreted the phrase “the Restaurant at the End of the Universe” – it’s not on one SIDE of the universe- it’s at the ENDING, when it ceases to exist- not a where, but a when. Like the credits of a movie, say.

On the other hand, the Heart of Gold was very very nice, inside and out. The Vogons were awesome. Magrathea was cool. My favorite part: the architects of Deep Thought, and the spectacle of the celebration surrounding the completion of Deep Thought’s calculation. Imagine Woodstock, except you have been waiting for it for 7.5 million years. It was pretty well done.

Other good points: Cameo by the BBC Marvin was pretty cool, as well as the old Arthur Dent playing the Magrathean security system. And was that Douglas Adams’ face at the very end? Plenty of inside jokes like that, including the jewelled crabs the Vogons crush for fun, and the Bugblatter Beast. Having the Vogons “beaten” (avoided?) by paperwork was pretty cool.