Monday, October 12, 2009
Kettlebells and push mowers
For our small yard I use an old fashioned, completely manual push mower. After working out with kettle bells for a few weeks, the push mower is actually very easy to use. The ballistic kettle bell drills seem to work the same muscles as the push mower.
Saturday, October 10, 2009
My Pavoni died, but I brought it back to life
When I got married, I bought my wife a diamond ring. She bought me a Pavoni. I got the better end of the deal, although she insists that because she gets labor-free espresso, she actually got the better end of the deal.
I pull 1-2 shots each day, almost religiously. For years the Pavoni worked great. The first parts that crapped out were the plastic nuts in the water sight tube. A quick call to Thomas E Cara, whom I met entirely by accident while wandering around San Francisco years before, helped solve the problem. Christopher Cara knew immediately what the problem was and shipped me some brass replacement nuts. Since then the Pavoni had no problems.
A few more years passed until my Pavoni hit the skids again. It started crapping out slowly at first. One day I could only pull one shot; any subsequent shot was dry. No water was coming out. The next day it would be fine. This went on until eventually I couldn't get anything out of the pull. The group head wasn't getting any water.
I took the group head apart and found my problem: the "Group to Boiler Insert", which should be a firm yet supple piece of rubber, had hardened into brittle plastic nastiness. When I went to screw the feed tube back into it, the threads got completely stripped (through no fault of my own). The fact that the makers of a $700 espresso machine saw fit to screw a brass pipe into a cheap piece of plastic that is routinely under 185 degree temperatures is somewhat alarming. Piss poor design if you ask me.
I thus attempted to remove the insert, but because it had become so brittle, it just got shredded. It wasn't coming out.
First I tried to bore my own holes to attempt to re-anchor the removal tool, but these holes too were shredded. Then I just started shredding the whole thing deliberately, piercing it with a drill, turning it into swiss cheese. After enough of that, I could finally chisel the thing out with a flathead screwdriver. Don't chisel it out with a chisel, and if you do chisel it out with a screwdriver, be extremely careful. One slip and you can shred the threads on the inside of the group, which will effectively destroy the entire group head.

Slowly slowly, very slowly, I chipped off all the pieces of the crusted insert. I didn't ding up the threads inside the group too much. Another call to Christopher Cara at Thomas E. Cara and the replacement parts went in the mail. A week later, I screwed the insert back into the group head and very, very carefully screwed the feed pipe back into the insert and voila, good espresso again. Christopher actually sent me two replacements with a hand written note telling me that the plastic threads strip really easily. It took me a good long time before I actually got the feed tube screwed in properly. Shame on Pavoni for not fabricating this piece in brass!
Friday, October 2, 2009
I'm the database guy and I don't know where to find that value in the schema.
Here's an embarrasing story which illustrates just how ridiculously and unnecessarily complicated JPA/Hibernate makes your life. One of my teammates walked into my office with a printout of a web page and asked "Where do I find this value in the schema?" It was a simple concentration value attached to some library in the lab. The person who asked the question is very familiar with our schema. But she couldn't find the value. I looked in the two places I knew of where we store liquid concentration values, both turned up nothing.
No problem, I thought, I'll just look at the code to figure it out. Uh oh.
First I loaded up the HTML for Tapestry 4.0 (which, by the way, I loathe). Here's what it says:
Okay, so I know
Okay, drill into the
Oh shit:
What the hell does this mean? This is why I hate JPA/Hibernate: it takes a simple, well understood area of software engineering (mapping SQL queries and result sets to java types) and shits all over it. There's some dead-simple
At this point I thought it might actually be faster to just start guessing at table and column names by inspecting Oracle's table metadata like so:
Eventually I gave up the code analysis route and said fuck it, I'll just turn on hibernate SQL logging like so:
in
in the webapp's log4j.properties.
This drowned me in SQL, and grepping that much SQL is incredibly tedious, so I set a few breakpoints around the methods that retrieve the data. Only by stepping through the debugger and watching the SQL go by was I able to pinpoint what the actual table and column was. Bleah.
No problem, I thought, I'll just look at the code to figure it out. Uh oh.
First I loaded up the HTML for Tapestry 4.0 (which, by the way, I loathe). Here's what it says:
<td align="right">
Concentration (nM):
</td>
<td align="left">
<span jwcid="@Insert" value="ognl:library.quantity.concentration" />
</td>
Okay, so I know
ognl:library
maps to some method called getLibrary()
in the tapestry page, and I know (although the IDE doesn't) that the Library.html file talks to, by convention, LibraryPage.java
. So I'll go look in that source code. Lo and behold, here's what I find there:public abstract Library getLibrary();
Okay, drill into the
Library
class to find some sort of getQuantity()
method.Oh shit:
@Embedded
public SeqContentQuantity getQuantity()
What the hell does this mean? This is why I hate JPA/Hibernate: it takes a simple, well understood area of software engineering (mapping SQL queries and result sets to java types) and shits all over it. There's some dead-simple
SELECT
statement running somewhere, and all I want to know is what it is.At this point I thought it might actually be faster to just start guessing at table and column names by inspecting Oracle's table metadata like so:
select
c.table_name,
c.column_name
from USER_TAB_COLUMNS c
where
c.column_name like '%CONC%'
Eventually I gave up the code analysis route and said fuck it, I'll just turn on hibernate SQL logging like so:
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true" />
in
persistence.xml
, along withlog4j.logger.org.hibernate=DEBUG
in the webapp's log4j.properties.
This drowned me in SQL, and grepping that much SQL is incredibly tedious, so I set a few breakpoints around the methods that retrieve the data. Only by stepping through the debugger and watching the SQL go by was I able to pinpoint what the actual table and column was. Bleah.
Thursday, October 1, 2009
Random Selenium test failures when using Tapestry 4.0
If you're unlucky/crazy enough to still be using Tapestry 4.0 and you see random flameouts from Selenium with messages like
Then make sure that Tomcat isn't running with
Turning off Tapestry's caching, although essential for doing rapid in-place changes to .html files, causes huge flakiness. I've seem PermGen space randomly blow out after a few dozen pages get loaded in a Selenium test. I've also seen random internal Tapestry errors if you attempt concurrent page views while
For rapid development, you want
com.thoughtworks.selenium.SeleniumException: Timed out after ...
Then make sure that Tomcat isn't running with
-Dorg.apache.tapestry.disable-caching=true
Turning off Tapestry's caching, although essential for doing rapid in-place changes to .html files, causes huge flakiness. I've seem PermGen space randomly blow out after a few dozen pages get loaded in a Selenium test. I've also seen random internal Tapestry errors if you attempt concurrent page views while
disable-caching=true
.For rapid development, you want
disable-caching=true
, but to speed up your testing you want disable-caching=false
. But waitaminute, when you're testing and your tests fail, you often want to make rapid changes to .html files. That sound you hear? It's me slamming my head against my desk.
Subscribe to:
Posts (Atom)