Archive for August, 2006

One more thing finally off the project stack (for now)…

Terrarium for hot, humid, picky little plants

Keeping my Boston-intolerant carnivores in cut-up 3-liter Coke bottles was a, so I built this.

humidity-controlled terrarium for carnivorous plants

The box

It’s basically a regular off-the-shelf 10-gallon aquarium with a few extras thrown in. The lid is a seamless piece of Lexan from the hardware store. Lexan can be somewhat of a bitch to cut cleanly (splinters, shatters, etc.); one approach is to score it with a good knife and then snap it along the score lines. I took it to the lab, but all I could find on-hand was a little X-Acto knife, which after plenty of blood, sweat, tears etc. still hadn’t cut deep enough lines to snap the piece along. What I ended up doing was digging up some heavy-duty tin snips and cutting along the score lines. “Good ’nuff for guvmint work!” This left a bit of a rough edge, but it filed down nicely.

Climate control

Currently the terrarium holds a sprawling Venus flytrap, a pair of sundews and the Nepenthes that recently outgrew its soda bottle. These enjoy warm (but not baking) temperatures and require high humidity. In order to tell what’s going on inside the tank climate-wise, I rigged up a SHT11 sensor from work to a leftover prototype board. A simple microcontroller program converts digital values from the SHT11 to degrees and percent relative humidity, and displays it on the screen from my old phone. Values were also logged to a PC serial port for the first few days so I could find out how hot it was getting while I wasn’t home.

temperature and humidity readout
The vital stats reading out on the ouchbrick LCD

Humidifying a tank like this turns out to be less straightforward than it sounds. My first thought was that a small dish of water sitting inside would do the trick, but no such luck. Adding a sponge for added evaporation helped a bit, but still not enough. My next thought for humidity on-the-cheap was to pick up a small aquarium pump, and bubble air through a bottle of water. The bottle I originally tried was an intact soda bottle, on the theory that the narrow neck would prevent the bursting bubbles from splattering water everywhere. After 2 days I was able to conclude the bubbler approach did approximately jack squat for humidity, even when the pump itself was placed inside the tank (to recirculate rather than pumping in dry outside air). As a last ditch before relegating the air pump to my junk closet, I hastily cut the top off the soda bottle. Viola! Instant humidity – little drops of water get splattered all over the tank, giving plenty of surface area to evaporate from. With this in place, humidity hovers in the range of 78-90%.

On the right, a small CPU fan sits near the bottom and circulates the air around. For now it’s just fixed to the glass with a bit of poster putty.

Finally (for now), polished aquarium rocks were added to the floor of the tank – this not only looks nice and keeps the plants from falling over, it also covers over the wires and air hose and holds them in place. Hopefully the smoothness of the rocks will discourage algae growing all over them in the humid tank (or at least make it easier to clean off).

Next steps

Waiting to be added is a Peltier cooler bonded to a heatsink + fan on either side. This will allow the temperature inside the tank to be controlled by the micro, independent of air exchange (especially important in the dry winter) – the Peltier can heat or chill the tank depending on the polarity of voltage across it. By adding two switched 120V outlets, the humidity and photoperiod could also be controlled to some degree (grow lamp and the bubbler). It would probably look nicer to replace the aquarium bubbler with one of those little ultrasonic fog generators.

Peltier thermoelectric cooler - future addition
Peltier thermoelectric cooler – future addition

happy plants :)
Happy plants – no more Coke bottles!

I Did Not Write This Firmware!

The parking lot at JR’s building is guarded by a formidible adversary, an automated parking system that doles out timestamped magnetic tickets. When ready to leave, you (hopefully get the ticket validated inside and) pop it into a machine along with your credit card*, and now feeding the magnetic ticket back in at the exit gate will let you out again.

The firmware on the system leaves a bit to be desired. I got a bit of a shock once when it asked for $192 in parking fees for a few hours’ stay. Turns out the system’s internal clock got corrupted somehow and, without any sort of bounds-checking, recorded my entry time as sometime on January 117th, 1980. (Building security came out and overrode the gate when I showed them the date printed on the card.)

Just recently I found a much more friendly glitch. For validated guests, parking is nominally $12 a day. However, on weekdays there is a discounted “evening” rate, where evening is defined as between 6pm and 1am, of a paltry (for downtown asphalt rental) $3. (After 1am it rolls over to the next logical day and charges the full rate.) However, it calculates whether or not it’s a weekday relative to midnight, creating a 1-hr window on sunday evenings where the parking fee is decreased by staying longer.

Not that I’m a paragon of godlike infallibility**, but it’s amusing to run across sloppy little goofs like that, as long as they aren’t mine.

* or carefully de-crinkled dollar bills; the credit card stripe reader hasn’t worked for months.

** Freshman year of college, I threw together a program in Qbasic (bleh) that used the computer’s modem to call other rooms and act as sort of a morning wake-up-call service. Mostly because Kristoff was a cheap bastid and didn’t have a working alarm clock. He was the first user / beta tester, in the call list for 8:00 AM. Unfortunately, a small math bug in the program caused it to instead call every hour on the hour starting around midnight. I found this out when I woke up to find a very haggard-looking Kristoff at the door, ranting that “some fucker’s been pranking me all night, every hour on the hour…”

Protected: All I can do is close my eyes…close my eyes and watch.

This content is password protected. To view it please enter your password below:


Yeah, I have one. Over 70% of people do, even though the vast majority of these despise them. It’s one of those discount cards from a major east-coast grocery chain.

“And he causeth all, both small and great, rich and poor, free and bond, to receive a MARK in their right hand, or in their foreheads: And that no man might buy or sell, save he that had the MARK, or the name of the beast, or the number of his name.” – Rev. 13:16-18

I can’t talk about any specific disruptive technologies I may or may not be developing at work right now (grr, stupid NDAs), so today I’m going to talk generically about discount cards.

Every office, PTA meeting, and other suitably large public gathering should have the following: a little dish where everyone throws in their Shaw’s cards (or Dominick’s or Kroger or Jewel-Osco or Piggly Wiggly or whatever the local mon/duopoly is), swirls them around and picks one at random. It’s no secret what they’re for–linking a longterm purchase history with a specific individual using a GUID–but this mass data-collection’s ultimate impact on the consumer, beyond the halcyon hype of the card purveyor, is often less explored.

There is of course the worry that if said history data is already there, sitting at the ready, it’s only a matter of time before someone uses it for other than its intended purposes. Sadly, it already happens: there are already known instances of shoppers being investigated as terrorists as a result of having statistically anomalous buying habits, as well as Drug Enforcement Agency requests for information about consumers suspected, for example, of buying large numbers of plastic bags. Last year, a firefighter was charged with arson when his house caught on fire, based in part on Safeway card purchase records indicating that he had previously purchased the same type of camp firestarter found at the scene. (The charges were dropped after another person confessed to the crime.) This August, three men with Arab names were arrested on terrorism charges for making a bulk purchase of 80 cell phones from a Wal-Mart. (Pay-as-you-go phones are often sold below-cost by US carriers to drive usage, with the side effect that they can be profitably resold across the border. According to Caro Police Chief Ben Page, though, people with Arab names use them as bomb detonators and–I shit you not–make methamphetamines from the batteries.)

Ignoring the real, but unlikely prospect of anomalous purchases resulting in FBI investigations and gloved fingers where they don’t belong, such card data is used internally for various less-than-friendly purposes, such as charging higher prices to consumers the statistical model determines are willing to bear them. This is often rephrased to say that tiered discounts are selectively offered by the computer to specific classes of customers. To the cynical observer, it should come as no surprise that research performed by CASPIAN found everyday pricing at stores with card programs to be 28-71% higher than non-card stores in the same area. All of you behaviorists in the audience will also note that the way to influence consumer behavior is by offering incentives and punishments that drive responses toward a desired goal, not by giving out free rewards for what they’re already doing. (A temporary loss leader might be a good way to hook a normally steadfast customer on a new, more lucrative brand, but giving them a buck off that store-brand milk they buy every Monday isn’t doing you any favors.)

The full scope and discussion of all the ways discount cards screw the average Joe is beyond the scope of this rant, but CASPIAN has a well-researched overview.

Naturally, the real long-term solution to customer-specific pricing is to do away with loyalty card programs entirely. Which, as long as stores believe they are making money from them, izzngunnahappen. In an ideal world, consumers would vote with their feet and wallets, and either resign themselves to paying ridiculous markups on groceries (subsidizing the cardholders), or go out of their ways to shop at non-card stores. Some believe that this is the only way to go, and in that ideal world, they’d be right.

However, most people, myself included, don’t care that much. Even if they disagree with the premise of loyalty cards, it might still beat paying time and a half for groceries (still feeding said system), or driving several towns over to find the nearest non-card store (wasting time and gas, feeding an oil baron or two) in a purist pursuit of their ideals. For these, the least-effort approach is to simply poison the databases until stores notice that their card program is costing more to maintain than it brings in*, and drop the programs. Make this data appear so arbitrary and useless that it doesn’t have value to the Pavlovian marketing douches that perpetuate such things.**

Of course this process is not currently automatic; you still have to find people who give enough of a shit to trade cards with you, and in a convenient manner. Who has time for all that? It would be much more disruptive if this process were automatic. Presented is the means to seamlessly and automatically swap valid card IDs with another user in the area, presenting a different GUID at every purchase. The backend enforcement of a “swap” rather than a “copy”, together with the zip-code rule, may limit efficient heuristic detection of the swap arising from simultaneous hits or geographically impossible usage patterns, etc.*** Alright, it’s certainly no solution, but it’s better than nothing. And it doubles as an LED flashlight.

* Running a loyalty card program, and the infrastructure thereof, is bloody expensive. Stores are not exactly forthcoming with an exact figure, but let’s call this value $k. Installing a card program raises the store’s operating costs from $x to $x+k. Where is that money coming from?

** Sadly(?), the head marketing douches are not stores themselves, but the purveyors of card-loyalty program infrastructure. “You need this. You want this. This’ll help you compete with Wal-Mart.” But the buyer often doesn’t fully understand what it’s doing or why, as evidenced by the number of cashiers who will cheerfully swipe a “house card” if a customer doesn’t have one.

*** As for the DEA/DHS issue, cardswapping may also add plausible deniability to your purchase history, much the same way as having an unsecured wireless connection has gotten the occasional downloader off the hook for allegedly illegal downloads. Possibly a very good thing if the person before you bought 1000 cellphones, and 1000 Ziplock bags to put them in.

Why you can’t charge your Ipod* while downloading songs

Ever wondered why so few portable USB devices can be recharged from the USB port, even though it provides half an amp of relatively clean power at 5V?

Here’s why.

* Technically, now Ipods can be charged with USB power, avoiding the patent by using the docking cradle as sort of an electron-laundering middleman so that it’s no longer technically charging from “USB power”, but rather “dock power” from a dock which happens to be powered from USB…

Scotland pics

Ok, getting them online took a wee bit longer than expected. But there are sheep, castles, and McCondoms galore.

The entire big photo album!

Funny story: On our 2nd night in Stornoway, I ran into our driver*, F, having a smoke outside a pub. We went in, had a few drinks and met some people**, then the crowd we’d assembled moved on to another place, and had a few more. I got hit on by an older woman…older meaning damn near 50. So we danced a bit (hey, any port in a storm, right?), then I went back to our tanked-up bull session already in progress. About 2am, F and I decide to call it a night…apparently F had had a few before I met up with him too; I ended up pretty much leading/carrying because he was falling-over drunk and didn’t know the way back to the hotel. Anyway, we get there and there are these girls kind of half crashed-out in the lobby. F starts chatting with them (leaning on a couch for balance, heh) and they ask if we got to see the concert that day… F says no, but he was really looking forward to seeing this one band that he loves, and just starts going on and on about them. Meanwhile I’m noticing these funny backstage pass type things around all their necks, and a couple guys hauling equipment up the stairs. As a heavily inebriated F continues to gush about this band he wanted to see, one of the girls comes over, leans in and whispers in my ear: “Hey…when your friend wakes up tomorrow morning, tell him that he met us…”

Meanwhile, this same night, my bro was out on the town and fell in with a drunken local, and together they decided to try to sneak into the concert–an open-air Big Top tent-thing with a huge fence all the way around– “hey, I know all these trails back in the woods! They might be a little overgrown though; it’s been years since I’ve been back there…” A little overgrown was an understatement – the “woods” apparently consisted of solid bramble and sticker bushes. Anyway, they fight and claw their way through the woods and make their way to the fence, at what looks like an unguarded little section. Kind of half-crawl, half-dig their way underneath, come out the other side, and…hey, it’s the secure backstage area. All of the sudden about four security guards are coming at them, so they turn tail, dive back under the fence and take off running. One unforgettable story, and one torn-up pair of pants that can never be worn again.

Some random stuff:
Like probably many Americans who watched cartoons when they were little, I thought castle moats were filled with water, alligators, piranhas and all sorts of other vile man-eating stuff to keep people the hell out of the castle. Inquiring at the Campbell castle however (“how long since the moat was functional? And how did they keep the water from seeping in?”), I was told that it was actually an architectural feature to get sunlight and fresh air to the lower level. (Since the basement level also held a full kitchen with four blazing ovens in the days before air conditioning, this seems pretty reasonable.)

The sheep with colored dye on their backs: Occasionally an owner will mark his flock with a pattern or color to help identify them when they get loose, but there is another reason: A dye pack is strapped to the underside of a ram before he’s released into a bunch of ewes. When he “covers” a ewe (i.e. does his ram thing), it leaves easily-readable signs that he’s doing his job…and which of the ewes are knocked up.

When Earl Patrick Stewart (no relation to the starship captain) had his castle built, he designed in a secret room, accessible only by climbing up the chimney of the fireplace in the porter’s room. Only one builder knew about it, and he was killed after construction was finished to keep it a secret. Anyway, some shit went down, he was a wanted man, everyone and his brother was after him, so he went into hiding up in the room. The castle was scoured top to bottom, but he wasn’t to be found. After three days though, he decided he had to pull out his pipe and have a smoke (either deep into the nic fits, or just getting overconfident about not getting found out). Some people laying out on the castle grounds noticed little wisps of smoke coming from a tiny slit in the side of the castle, and figured out that there must still be someone in there. The castle was re-scoured; this time he was found and (eventually, after a bunch of additional shenanigans) executed. Let that be a lesson – smoking is bad for your health!

* because I don’t want to get anyone in trouble, I won’t name any names (F or the tour company…although ironically, their name is an anagram for “blog us”)

** yeah, in that area it’s perfectly normal and expected to randomly walk up to someone at the bar and strike up a conversation with them. Kinda cool. I think if you did it in Boston (unless, possibly, you’re hot and too-obviously attempting to hit on them) they’d just look at you with that “do I know you” look.