If you have water in your basement, the first thing to do is read The Original Basement Waterproofing Handbook. Do this before you shell out $10,000, or even $100 on any work. Basement water is one of those things that requires a bit of book larnin' before you go digging around (so to speak).
This book was the best gift I got last year for Christmas. I kept interrupting my wife's Mario Kart-a-thon with exclamations like "Oh! Sheet Drain!" and "Look at this diagram--this is how our foundation was built!"
In very heavy rains, especially so during the snow-melt season, our basement has some "minor puddling", as the previous owners told us prior to sale. It dries out pretty fast on its own. I shop-vac it up in about 20 minutes and it dries out in a few hours. Pretty minor. It's a nuisance because it renders a corner of the basement floor unuseable for long-term storage, so I went looking for a solution. Jack Master's wonderful book pointed out that yes, I could opt to tear out the tomato beds, destroy the lawn, put in a trench drain and coat the foundation for about $10,000. Or I could use my incredible powers of observation to notice that the roof downspout dumps water right onto the ground at the corner of the house where the basement gets wet.
The solution: about $100 worth of flexible downspout pipe. The downspout now connects to this "pipe" and delivers the roof runoff to the back of my lot, downgrade, away from the house.
Sunday, March 29, 2009
Tuesday, March 24, 2009
Hacking the Keurig
The good news: my office has a Keurig coffee machine. The bad news: all the free coffee is from Van Hout, which I find undrinkable. The happy medium? I buy my own Green Mountain Coffee pods on the cheap just for me.
This is my recession coffee plan. It doesn't come close to the tastiness of the $4.00 mocha from 1369, but I just can't afford those anymore.
This is my recession coffee plan. It doesn't come close to the tastiness of the $4.00 mocha from 1369, but I just can't afford those anymore.
Monday, March 23, 2009
Books: Combat Trauma and the Commando Life
I keep pestering my commando buddy about what the commando life is like. He declines to comment and instead suggests various books to read. Here are a few I've found really interesting:
Achilles in Vietnam reveals the astounding differences between society's attitudes towards warfighters and between warring nations in the days of Homer and in modern combat. In Homer's time, warriors respected each other and nations understood that returning warriors required and deserved support, sympathy, and respect. In our time, dehumanization of the enemy leads society to recoil from the warfighters, greatly exacerbating the warfighter's trauma, which can in turn inflict terrible violence on the domestic population.
On Killing informs us that lethality of warfighters has greatly expanded in modern combat, even since WWII. During WWII, soldiers tended to aim high and deliberately miss their targets, but by Vietnam, soldiers hit their targets with far greater frequency. The book discusses how this change has come about and what price it exacts on the survivors. There are many hard-to-read first-hand accounts of combat trauma here, and simply reading about them is disturbing. Anyone who dreams of war as glamorous needs to read this book to understand how gruesome war really is. An interesting psychological observation here is that in an abnormal environment, abnormal behavior is to be expected. The combat zone is inherently abnormal, and the appropriate response to it is often to act abnormally. Survivors of these situations may suffer terribly while they come to grips with their actions.
UDT /SEAL Operations in Vietnam blows away the Hollywood mythology of special operations commandos by examining SEAL/UDT operations throughout the Vietnam war. Small teams of highly trained soldiers, supplied with the right gear, good and timely intelligence, and the support of the traditional war machine proved extraordinarily successful against Communist forces. Note: it's out of print, but I got a copy used from Amazon and it was in great condition.
Spec Ops is a fascinating analysis of a number of the more spectacular declassified special operations over the last 50 years from a handful of different countries. It compares each of the operations along a few different dimensions to highlight the common elements to successful special operations missions (rehearse, rehearse, rehearse, for starters).
Blackhawk Down stands in contrast to these books by detailing how a seemingly straightforward kidnapping mission turned into a disaster over the course of about 24 hours in Somalia. The book includes many personal vignettes of the soldiers. Another good related book (also by Bowden) is Killing Pablo, which details the murkier (and I suspect more frequent) relationships between our special operations forces and "friendly" foreign governments.
Achilles in Vietnam reveals the astounding differences between society's attitudes towards warfighters and between warring nations in the days of Homer and in modern combat. In Homer's time, warriors respected each other and nations understood that returning warriors required and deserved support, sympathy, and respect. In our time, dehumanization of the enemy leads society to recoil from the warfighters, greatly exacerbating the warfighter's trauma, which can in turn inflict terrible violence on the domestic population.
On Killing informs us that lethality of warfighters has greatly expanded in modern combat, even since WWII. During WWII, soldiers tended to aim high and deliberately miss their targets, but by Vietnam, soldiers hit their targets with far greater frequency. The book discusses how this change has come about and what price it exacts on the survivors. There are many hard-to-read first-hand accounts of combat trauma here, and simply reading about them is disturbing. Anyone who dreams of war as glamorous needs to read this book to understand how gruesome war really is. An interesting psychological observation here is that in an abnormal environment, abnormal behavior is to be expected. The combat zone is inherently abnormal, and the appropriate response to it is often to act abnormally. Survivors of these situations may suffer terribly while they come to grips with their actions.
UDT /SEAL Operations in Vietnam blows away the Hollywood mythology of special operations commandos by examining SEAL/UDT operations throughout the Vietnam war. Small teams of highly trained soldiers, supplied with the right gear, good and timely intelligence, and the support of the traditional war machine proved extraordinarily successful against Communist forces. Note: it's out of print, but I got a copy used from Amazon and it was in great condition.
Spec Ops is a fascinating analysis of a number of the more spectacular declassified special operations over the last 50 years from a handful of different countries. It compares each of the operations along a few different dimensions to highlight the common elements to successful special operations missions (rehearse, rehearse, rehearse, for starters).
Blackhawk Down stands in contrast to these books by detailing how a seemingly straightforward kidnapping mission turned into a disaster over the course of about 24 hours in Somalia. The book includes many personal vignettes of the soldiers. Another good related book (also by Bowden) is Killing Pablo, which details the murkier (and I suspect more frequent) relationships between our special operations forces and "friendly" foreign governments.
Wednesday, March 11, 2009
Scripting the Southwest Checkin Page
I get kind of antsy flying Southwest. I sit by the computer counting the seconds before I can check in. I start wondering "Can't I just write a script to do this and run it at just the right moment?"
Yes I can. Someone tried it in Python, resulting in a 1,538 line nightmare and a lot of bug reports from users. It made me think about cost/benefit. How long does it take me to check in online like any other normal human? About 7 seconds. How long is typing 1,538 lines of anything? At 85 wpm, assuming 1 word per line, about 18 minutes. Just typing the script, if you had it in your head, takes 18 minutes. In reality, it probably took the developer about a week.
It's an interesting coding project, but it's just not worth the effort. I like being the one doing the clicking. If something goes wrong, I need to know immediately during checkin. I don't want an extra piece of software in the way. Using the web site directly is reassuring in this case.
Here's another option, though: use Selenium help you build a unit test. Execute the unit test to do the login. Here's what it looks like:
There--10 lines of code. Took about 30 seconds. I myself typed a whopping three lines of code for this (the three lines with "YOUR..." in them).
Please don't use this code. This should go without saying. If the southwest.com developers feel like it, they can change the name, labels, or css IDs of anything on the page and then you're hosed. By the time you figure this out, you'll be stuck with "Group C" boarding passes.
Yes I can. Someone tried it in Python, resulting in a 1,538 line nightmare and a lot of bug reports from users. It made me think about cost/benefit. How long does it take me to check in online like any other normal human? About 7 seconds. How long is typing 1,538 lines of anything? At 85 wpm, assuming 1 word per line, about 18 minutes. Just typing the script, if you had it in your head, takes 18 minutes. In reality, it probably took the developer about a week.
It's an interesting coding project, but it's just not worth the effort. I like being the one doing the clicking. If something goes wrong, I need to know immediately during checkin. I don't want an extra piece of software in the way. Using the web site directly is reassuring in this case.
Here's another option, though: use Selenium help you build a unit test. Execute the unit test to do the login. Here's what it looks like:
public void testNew() throws Exception {
selenium.open("http://www.southwest.com");
selenium.click("//img[@alt='Check In Online']");
selenium.type("txtConfirmNum", "YOUR CONFIRMATION NUMBER HERE");
selenium.type("txtLname", "YOUR FIRST NAME HERE");
selenium.type("lastName", "YOUR LAST NAME HERE");
selenium.click("submitCheckIn");
selenium.waitForPageToLoad("30000");
selenium.click("link=(CHECK ALL)");
selenium.click("submit");
selenium.waitForPageToLoad("30000");
}
There--10 lines of code. Took about 30 seconds. I myself typed a whopping three lines of code for this (the three lines with "YOUR..." in them).
Please don't use this code. This should go without saying. If the southwest.com developers feel like it, they can change the name, labels, or css IDs of anything on the page and then you're hosed. By the time you figure this out, you'll be stuck with "Group C" boarding passes.
Tuesday, March 10, 2009
Do your unit tests even get to assertFoo?
Lots of my unit tests involve looking up data in a database. My tests often look something like this:
Now what happens if
public void crazyDatabaseTest() {
if (...) {
if (...) {
}
else {
for (SomeThing doodad: things) {
assertFuz(...)
}
}
}
}
Now what happens if
things is empty, or if by some chance my conditional logic breaks down and no asserts even get executed? To catch myself from this blunder, I often set a testAnything boolean like so:
public void crazyDatabaseTest() {
boolean testedAnything = false;
if (...) {
if (...) {
}
else {
for (SomeThing doodad: things) {
testedAnything = true;
assertFuz(...)
}
}
}
if (!testedAnything) {
fail("Nothing got tested!");
}
}
Friday, March 6, 2009
Girl Scout Cookies Good. Boy Scout Fudge...nasty.
It's Girl Scout Cookie season. I love Girl Scout Cookies. On one of the days that the Girl Scouts weren't at Alewife station, a small troop of Boy Scouts showed up pushing...Boy Scout...ahem...Fudge.
Girl Scout Cookies sound sweet, wholesome, and tasty. Boy Scout Fudge sounds totally gross. Boy Scouts, stick to popcorn please.
Girl Scout Cookies sound sweet, wholesome, and tasty. Boy Scout Fudge sounds totally gross. Boy Scouts, stick to popcorn please.
WiFiTrak is an interesting tool to see WiFi networks on your iPhone/IPT.
WiFiTrak does a great job showing you the WiFi networks in range of your IPT or iPhone. It does a terrible job connecting to them, however. I've bounced around Arlington and Cambridge and I can't connect to the vast majority of the "open" networks. How is a network "open" if I can't join it? I find it unlikely that every "open" network has MAC address filtering. If they did, I'd argue that the network shouldn't be considered "open".
Nonetheless, it's fun to see all the networks.
The app is pretty unresponsive when you attempt to connect to a network. The "back" button becomes totally unresponsive and I have to hit the home button and restart the app almost every time it fails to connect to a network. And check out this screenshot.
I went from waiting for 30s for a timeout to 29, 28, 27,...,3, 2, 1, 0, -1, -2. I'm not sure what it means when I have -7 seconds to wait for a timeout.
Nonetheless, it's fun to see all the networks.
The app is pretty unresponsive when you attempt to connect to a network. The "back" button becomes totally unresponsive and I have to hit the home button and restart the app almost every time it fails to connect to a network. And check out this screenshot.

I went from waiting for 30s for a timeout to 29, 28, 27,...,3, 2, 1, 0, -1, -2. I'm not sure what it means when I have -7 seconds to wait for a timeout.
Subscribe to:
Posts (Atom)