Everything Else

5/18/2010: 9:16 pm: Everything Else
During a fun debug session at work, Drew and I tracked down the cause of a misbehaving web app. The problem related to how Apache Tomcat decides to recompile JSPs and how some of our source code was branched and modified. Beware of modified JSPs in branches when you move to newer branches. The problem appeared after a new version was deployed in production. The symptom was that a chunk of HTML on a page in a web app displayed on the QA servers, but not on the production servers. We confirmed it was the same warfile, the same 6.0.16 version of Tomcat and the same 1.5.14 version of the JDK. There were no errors in the app log or in catalina.out. Having seen errors in other apps recently in the localhost log file, I decided to look there. We found a message logged at SEVERE regarding a JspException from not finding a value on an object using operator “.”. So, this obviously indicated  a JSP couldn’t be compiled because it referred to a non-existing field on a Java class. So, then we hunted down the Java class that the Jasper compiler generated from the JSP and compared it between production and QA. We found that the Java code on production had an extra method that related to this missing property. So, even though we deployed the same warfile, the Java code for the JSP on the file system was different. By default, the code generated from JSPs ends up in tomcat/work/Catalina/localhost/{context}/org/apache/jsp/WEB_002dINF/jsp. Reverse engineering it to correlate the Java with the JSP code wasn’t as bad as I expected. Next, we looked at the dependencies of the previous version and found that the class in question contained the field mentioned in the error message. Drew had switched to a newer branch for the new build, so the new file wasn’t strictly newer. And there’s the rub. The timestamp of the class file in the older branch was newer than the timestamp of the class file in the newer branch, because it had been modified after it was branched. When the app was deployed on the QA servers, the previous version had been undeployed. this caused the context directory for this app in the work directory to be deleted. When the app was deployed, Jasper compiled Java from all the JSPs as they were accessed. However, on production, the new version was deployed as a replacement for the previous version. So, the context directory wasn’t deleted. When the JSP was accessed, Jasper saw that the timestamp for the previous version was newer, so it didn’t generate new Java code for the JSP file. However, the Java class the JSP page depended on had changed and the code no longer worked. The quick fix was to undeploy the web app to let Tomcat clean up the work directory, and then to deploy it again. However, it turned out that the change in the older branch was important. So, be sure to also diff the JSPs before moving to a new branch.
3/14/2010: 12:10 am: Everything Else

This week I attended a showing of beer-related films at the Hearst Museum of Anthropology at Cal. Research anthropologist Ira Jaknis, curator of the ongoing exhibit 99 Bottles of Beer: Global Brewing Traditions 2500 B.C. — Present was our host for the films. Sadly, only three other people were attendance. But, because the Prelinger Archives are 99.9% awesomesauce, you can watch them, too.

The original event title was “Two Short Films About Traditional Beers”, but Ira wasn’t able to obtain the copy of “Caxiri or Manioc Beer” that is at the Moffitt Library on campus. That short was filmed of the Waiãpi Indians of Brazil by Victor Fuks in 1988. I was bit bummed, because I had tried to brew manioc beer last week. I got no fermentation action, so I was hoping to pick up some video tips on proper chewing and spitting of the manioc. It appears one key step is to mix in a bit of still fermenting brew from the previous batch, which is a bit problematic for me.

However, we did get to see the fascinating “Brewing Millet Beer in Africa” by Christopher D. Roy (2006). You can watch a trailer for the film via a link on that page. However, the trailer gives you only a hint of how interesting and well-composed the film is. The opening shot of the women grinding the millet is pretty great, though. The film was shot in Burkina Faso.

As in a few other cultures, the women brew and sell the beer. Apparently, some of the more successful African women are able to develop a relatively large scale business and purchase trucks to ship the beer outside of their village.

In the film we get to watch and listen to Zenabu Bamogo as she sprouts the millet, dries it, grinds it, boils it, filters out the wort (albeit with only a woven basket), ferments it overnight, cleans clay pots, pours out the beer and sells it. It’s fun to listen to her as she probably sees the action of the yeast at night for the very first time, since she wouldn’t normally have access to a bright flashlight. I’m not sure exactly which language she is speaking, but you can hear a man translating in French in the background. The film is subtitled in English.

In place of “Caxiri or Manioc Beer”, Ira showed us 4 of the 6 shorts on a DVD he personally owns. I believed the DVD was named something like Historic Beer Film in America. Anyway, that describes the content pretty well.

First, we watched “For Good Living“, a hysterically poorly produced silent film from 1937 made as a promo by Safeway for their Brown Derby beer, which they declared to be “Imported’s Equal”. The West Coast Grocery company actually contracted with Humboldt Malt and Brewing Company in Eureka, California, and later many other breweries, to produce this pilsner-style beer with “the genuine Pilsner tang!” West Coast Grocery distributed the beer to Safeway and at least one other grocer, though it later became solely Safeway’s house brand. According to rustycans.com (an awesomely informative website), the Brown Derby restaurant in LA sued them for copyright infringement and forced them to redesign the label.

The captions are scrolled into view at times by someone lowering a black piece of paper at glacial places, and other times by turning a large roller on which they are printed. The scene about 3.5 minutes in of entering the Office of the Brewmaster feels like a scene from Psycho. Any second, I was expecting to see him tossed head first into a lauter tun.

We also get to see malt that is “finely ground and cleaned” before apparently being quality checked by being sifted through by hand by a guy in suspenders with greasy fingers. There is more quality checking on the assembly line, which appears to consist of removing every 10th bottle.

Thanks to the Prelinger Archives, you can watch all 19 wacky minutes of “For Good Living“.

After the film ended, I commented to Ira that film editing was apparently not invented until after 1937.

This was in sharp contrast with “Help Yourself” by Pabst, which reminded me of the old newsreels that were popular in theaters back in the 1940’s and 50’s (not that I was around to know). More than a little heavy-handed, this film attempts to browbeat and guilt trip distributors into putting all their efforts into getting retailers to sell more Pabst beer.

While the first film muddles up the picture of the three-tier system (the US system where breweries sell to distributors who sell to retailers who sell to customers), the Pabst promo film makes the picture clearer. The third film mentioned below lobbies hard for the three-tier system.

Next up was “As We Like It“, a not even remotely Shakespearian tale produced on behalf of the United States Brewers Foundation. Starting off with the ancient history of beer and quickly moving through the pilgrims up to the modern science of food, we get a full on lobbying press for the status quo. And did we mention brewers pay lots of taxes?

As shown in the mirror of our friendly bartender, the five principles that will keep the prohibitionist bogey man away are:

  • Quality of product
  • Cleanliness
  • Friendliness
  • Observance of the law
  • Good citizenship

You can watch this video at the Internet Archive, or on the Beer In Food blog/YouTube.

There was also a 20-second Labatts commercial that was only slightly creepy.

10/22/2009: 9:21 am: Everything Else

Wombat Day badgeThanks to my ever alert colleague, Rob, I’m celebrating Wombat Day today. I’ll be taking in my stuffed wombat that was handmade in Australia with what almost appears to be actual wombat hair, but I’m thinking is actually dyed wool.

11/21/2008: 12:27 am: Everything Else, Hurricane Katrina

For the last month or so I’ve been playing around with Arduino (“open-source electronics prototyping platform “) and Processing (“open source programming language and environment for people who want to program images, animation, and interactions”). Both are very, very cool. The Arduino programming environment is based on Processing, so learning both isn’t much extra effort.

Processing book cover

So far with Processing I’ve mostly been working with existing code examples to talk to code I’ve written that runs on the Atmel microcontroller on the Arduino board. I’ve lately been hacking with the Minim library for working with audio, inspired by a link on someone’s Twitter feed to someone else’s experiment with Minim and an Arduino. I’ve cleaned up and reformatted his code in my own fetishistic manner, and now I’m looking to extend it. After all, I’ve got a pile of LEDs begging to be soldered to something.

Arduino Diecimila board

On the Arduino front, I’ve been working my way through Ladyada’s tutorial and the first couple of chapters of Tom Igoe’s book, Making Things Talk. At first I was kind of annoyed when I realized how incomplete the explanations where for some of the projects. But then I decided that that just motivated me more to figure things out for myself. And they’re really not that incomplete, anyway.

Arduinos are quite inexpensive, so if you’re the least bit motivated to combine your programming experience with some basic electronic hardware hacking, I highly recommend checking them out. I bought most of my gear from Adafruit and Spark Fun.

9/6/2008: 12:24 am: Everything Else

The Daily Show on Wednesday was brilliant. Jon Stewart and his team did a fantastic job of letting Karl Rove, Bill O’Reilly, Dick Morris, and Nancy Pfotenhauer demonstrate their extreme hypocrisy by playing recent videos of them completely contradicting videos of them from the last few months to a year ago. Palin provides a message for Clinton on sexism that she should take to heart herself.

Rove gushes about Palin’s great experience as being the mayor of the second largest city in Alaska. But when Obama was considering Tom Kaine, Rove ridiculed Kaine’s experience as the mayor of such a small city. Let’s see, Richmond, Virginia, has a population of over 200,000. Wasilla, Alaska, comes in at 9,000. Hmmm, so being the mayor of a city of 200,000 counts for almost nothing, but being mayor of a tiny remote village makes you ready to be Vice President. Rove belittles Kaine’s having only been Lieutenant Governor followed by three years as Governor, but lauds Palin’s two years as Governor. He claims a selection of a person with only Kaine’s experience would mean Obama isn’t concerned about whether his VP is capable of being the President. Somebody send that man a calculator, because Rove needs to run the numbers to find out that by his own standards, McCain made a far worse selection than the person Obama passed over.

Bill O’Reilly gets all sensitive saying that Bristol’s pregnancy, like any other teen pregnancy, should remain a private issue as long as American taxpayers don’t have to support the cost. But then here’s some video of him ripping into Jamie Lynn Spear’s parents and calling them pinheads for letting her get pregnant. No way American taxpayers paid for that pregnancy. Wow, double standards from O’Reilly? Never expected to see that happen.

Next up, Dick Morris claims that criticism of Palin is “deep sexism” and shouldn’t be tolerated. But what about when Hillary Clinton was under attack? Hmm, I think I transcribed it right when he said, “When a woman wants to be President, she shouldn’t complain based on gender.” He says a lot worse, too. Maybe there are special rules for VPs. Jon nails it on the head when describing Morris, though.

Nancy Pfotenhauer, McCain’s senior policy advisor, attacks Clinton for “playing the gender card”, acting like it is an affront to all women. But, then Palin shows up and suddenly Pfotenhauer is pulling a gender card out of every sleeve. Her Palin message seems to be 1) Play the gender card 2) Whine about sexist attacks. Pfotenhauer claims the attacks on Palin are one of the most outrageous examples of double standards she’s ever seen. Jon’s got some footage she needs to see.

Then we get some nice video of Palin attacking Clinton for complaining about sexist attacks, saying “work harder, prove yourself to an even greater degree, …” Hey, before you complain any more about sexist treatment of yourself, listen to your own recorded statements. And while you’re at it, make sure Nancy and Dick listen in, too. And stop flip-flopping on the bridge issue. Just admit you once supported it, but reserve the right to get smarter and change your mind. Unlike the current President who reserves the right to stick to stupid decisions, no matter how overwhelmingly the arguments build against them. Except, of course, when he regularly switches to worse decisions, cutting off his nose to spite his face.

9/5/2008: 6:38 pm: Everything Else

The University announced they were trimming some of the contested oaks this morning. Well, I’ve heard from someone on site that they’ve “trimmed” seven of them to the ground. They’re now trying to get the rest of the tree squatters out of the trees.

While I consider myself an environmentalist, I’m with the University on this one. Most of the faculty, staff and students also seem to have had more than enough of the squatters and are looking forward to them finally being gone. Not that the squatters are going to disappear tomorrow, though, just because the University cuts down the trees they planted and have legal permission to remove.

10/31/2007: 11:58 pm: Everything Else

My favorite real conversation from tonight:

  • Child: Do you kave Kit-Kats?
  • Me: No
  • Child: Then I’ll take a handful of whatever.

She’s lucky the broccoli was in the kitchen and not close at hand. Instead, I gave her more candy than anyone else.

5/29/2007: 10:00 pm: Everything Else

A thief recently scraped the registration sticker off the license plate on my car. The California DMV charges $17 for replacement stickers.

I just hope whomever stole it puts it on their plates and then gets pulled over by the police for some other infraction. Then they will get to explain how the DMV’s computer system shows their license registration is not update, but they somehow happen to have a current sticker. Hopefully, that will get them a trip to jail.

Update 6/14/2007: After another quick visit to the DMV office at the Oakland Coliseum, I picked up a replacement sticker for $17. I also took the opportunity to get a clear title for my wife’s car. Even though we paid off the loan about nine years ago, the financing company’s name was still listed as a lienholder on the title. Getting the title correctly reissued cost $15. Altogether, I was in the DMV building for only 15 minutes. Of course that was possible only because I had already downloaded and filled out the replacement sticker form.

1/31/2007: 1:06 am: Cats, Everything Else

I just upgraded to WordPress 2.1 (improvements to the editor on the “Write Post” page alone are worth the time spent on the upgrade) and have run into an issue with get_links(). The first argument to get_links is the category id. If you don’t specify an argument or pass in -1, all links are returned.

I manage the Tutorials, Friends, and Blogroll sections of my sidebar using get_links() to return link info. After upgrading, this stopped working. If I pass in -1, all links are returned, so the functionality isn’t totally broken. But, specify the integer value for the category id no longer seems to work.

1/24/2007: 1:27 am: Everything Else

It embarrasses me to know that US Attorney General Alberto Gonzales not only attended my alma mater, Rice University, but was actually granted a degree. Throughout his reign of cluelessness in the Attorney General’s office, he has made many statements that have left me cringing and wondering how he can say these things with a straight face.

Robert Parry of the Baltimore Chronicle & Sentinel recently reported that in a Senate Judiciary Committee hearing on January 18th, Gonzales made the claim that US citizens accused of a crime do not have the right to due process and a fair trial. He made the rather audacious claim that “There is no expressed grant of habeas in the Constitution; there’s a prohibition against taking it away”. I don’t know what you’re thinking Alberto, but Article I, Section 9, of the Constitution states that “the privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it.” You’re splitting some pretty fine hairs if you’re trying to claim that something the Constitution specifically calls out as not being suspended cannot be assumed to be granted.

Committee member Republican Senator Arlen Specter was shocked by the outlandishness of Gonzales’s remarks. Or as Specter put it, “You may be treading on your interdiction of violating common sense.”

But Gonzales’s weasel words are not only rivaling Clinton’s alleged statement about how one defines “is”. Parry points out that Gonzales is probably just wrong. The sixth amendment makes postive statements about granting many of the legal features expressed by habeas corpus.

But then this shouldn’t be a surprise from a man who described the Geneva Convention as “quaint” and “obsolete”, before flip-flopping on his statements when attention was drawn to them. Even then, he suggested that it was fair for the US to choose to make exemptions to this international law.

Next Page »

Fork me on GitHub