Sometime last week I happened upon a handy little shortcut when using the chown command. I mistakenly keyed in the command wrong and it turned out to work, so I investigated. Turns out that by leaving off the group name, but leaving the colon, chown will automatically use the default group of the specified user. That's so handy. What's surprising is how much I really use that trick. Why, I must save literally seconds every other day or so. That's gonna add up, baby.

Here's an example for you impatient, graphical learners:

chown tensai: file.txt


Cheese Experiment

For some time I have wanted to try my hand at making cheese. It's such a varied product and unfortunately, artisan cheesemaking isn't something you see much in the US. It'd be fun someday to create my own type of cheese and have a cheese cellar chock full of the stuff. But that isn't going to happen tomorrow.

Starting with David Fankhauser's wonderful cheese pages, I read a lot about the theory of cheesemaking. So far, so good. I decided to try labneh, which is a yogurt chese. To sum up the recipe, you salt some yogurt and hang it out until it turns cheesey.

The last part is where I had difficulty. Wanting to not waste food, I opted to use a 1/2 pint of yogurt rather than a full quart, as called for in the recipe. I think that's where I went wrong. Normally it should be set after 24 hours, but mine sat for 72 hours and was still pretty gloopy. There just wasn't enough weight to force the whey out.

I did get a bit of cheese out of it, though, and that little bit was good. Really good, actually. I tried it on some tortilla chips and that was delicious too. So I think I'll give it another try sometime soon.


Grudge Match: scp, tar+ssh, rsync+ssh

The question came up today about relative speeds of scp, tar and rsync (the latter two using ssh as a transport mechanism). While anecdotes and rumors are great for defining security policy (think TSA), I wanted some more concrete numbers so I ran a test.

I set up a script to copy a directory 5 times from my laptop to a server on the same subnet. I routinely pull 3MB/s from that server (over wifi), so bandwidth wasn't an issue. I used /var/lib/dpkg as my source directory. It weighed in a 57MB and contained 6896 files. Because rsync will compare changes between source and destination, I made sure to nuke the directory off the server after every run.

Method:            scp  rsync+ssh   tar+ssh
Average Time:  269.75s      33.6s    24.43s
Bandwidth (mbps): 1.69      13.57     18.66

The results are what I expected, at least as far as scp is concerned. It does not do well with large numbers of small files. It copied each file over completely before it started with the next one. Tar of course put the whole thing together and then shipped it off. Rsync read all the files first, then compared them to the server and then shipped them all in one go. Apparently there were some significant I/O savings to be had that way.

One other important item of note is that scp did not handle symlinks the way tar and rsync did. It dereferenced the symlink and copied the contents of that link rather than copying the link itself. That was a problem because I had picked some self-referential directories before I settled on /var/lib/dpkg.

For your reference, here are the commands I ran to test:

for i in 1 2 3 4 5; do time scp -qrp /var/lib/dpkg [server]:/tmp; ssh [server] rm -fr /tmp/dpkg; done
for i in 1 2 3 4 5; do time rsync -ae ssh /var/lib/dpkg [server]:/tmp; ssh [server] rm -fr /tmp/dpkg; done
for i in 1 2 3 4 5; do time tar -cf - /var/lib/dpkg |ssh [server] tar -C /tmp -xf - ; ssh [server] rm -fr /tmp/dpkg; done


Idaho Falls, Old School

I found some great pictures of Idaho Falls on the USGS' website. They didn't know when the pictures were taken, but based on the content it's been a while. I'm sure an avid historian could probably place the photos based on the content but I am not such a person. I can still appreciate them.

So without further ado, here are the pictures. I believe them to be in the public domain. They are about 2.5MB each.


Taste Test: Diet Lemon Lime

For a while, 7UP was running a promotion on their website wherein they would send you a free can of Diet 7UP, Sprite Zero and Sierra Mist Free, so I filled it out and it arrived a few days later. The box came with a cute little instruction card which I found to be a little humorous. Basically they said to chill the drinks, pour them into cups and drink the Diet 7UP last. Well, that's a little less scientific than we do things around here, so we made up our own strategy.

We labeled three cups and filled each with a separate drink, all at room temperature. Then I closed me eyes and mixed them up really good. We tasted each one a few times before making our decisions. Only after we had finished did we look to see which cup was which.

Of the three, we didn't really have a favorite. They were all excessively sweet. Now, let me preface that by saying that neither Karin nor I drink much soda, and in fact sugar products are pretty rare around our house. I'm sure we're not the target audience of these drinks.

The one thing we agreed on was which one we liked the least. Would you believe it was the Diet 7UP? It was the sweetest of the three and the taste was just a bit off balance. It was very hard to discern much difference. The bubbles contributed there. The other two weren't disagreeable, but as I said none of them particularly struck our palates.

After drinking so much pop, I ended up feeling rather sick. I'm not inclined to purchase any of these drinks.


Mindless Eating: Why We Eat More Than We Think

Title: Mindless Eating: Why We Eat More Than We Think
Author: Brian Wansink
Published: 2006 by Bantam Dell
ISBN: 0-553-80434-0

I've heard this guy on KCRW's Good Food before. He's a professor of marketing and nutritional science, and from the sounds of it he's a creative guy with an extremely fun job. He does research on why people eat the way they do and what influences them most. A lot of the time, it's not what you expect.

One of the best experiments he did was with a bottomless bowl of soup. His question was what makes a person decide to stop eating? What makes us stop eating? He rigged up a bowl of soup connected via a tube to a vat of soup. Without slurping down a lot of soup, basically it was impossible to empty the bowl. On average those with the endless bowl at 73% more soup than those with a normal bowl.

Most were still eating when we stopped them, 20 minutes after they began. The typical person at around 15 ounces, but others at more than a quart--more than a quart. When one of these people was asked to comment on the soup, his reply was, "It's pretty good, and it's pretty filling." Sure it is. He had eaten almost three times as much as the guy sitting next to him.

Another of my favorites is the story of a cook on a Navy ship in World War II. Due to some sort of error, the cook took on too much lemon Jell-o and no cherry. When you're out at sea for months at a time, little things like that can be a big deal. Fights were actually breaking out because of it. Well Billy, our fearless cook, thought quick on his feet and colored the lemon Jell-o red. The crew never even guessed what happened. Because they thought it was cherry, they imagined the taste of it.

But to the point of the book. Our body is quite capable of noticing changes in diet, such as eliminating all carbohydrates or eating half as many calories. That's why 90% of dieters regain their former weight. It's just not sustainable, and generally speaking the quicker you lose the weight the quicker you'll put it back on. But the human body can't detect slight changes, such as 100 calories a day. That amount of change over the course of a year works out to about 10 pounds. So if you drink an extra Mountain Dew every day, you'll gain 10 pounds. If you cut one out, you'll lose 10 pounds. In both cases, you won't notice any difference in your diet.

Dr. Wansink offers a number of ways to work 100-200 calories out of your diet, things like serving yourself 20% less (which will still leave you feeling just as full), fill your plate with fruits and veggies (less calorie dense, more vitamins), don't abandon your comfort foods instead rewire them (deprivation rarely works, but comfort foods are not written in stone).

There are plenty more suggestions, and more importantly, funny stories in this book. The author definitely has a good sense of humor and a good wit. It's an easy read that is still well supported by scientific research and more endnotes than you can shake a pastrami at.


Actiontec Packet Loss

I wish I could title this story "Actiontec Loss" due somehow to my replacing this Actiontec GT701 DSL modem with something better (say a Cisco). But alas, I'm stuck with it for the near future.

You see, my modem started dropping packets today. I can't figure out a rhyme or reason to it. Yesterday I added a pair of servers to my network. If I must be precise, I actually decommissioned one of them today so there's just the one now. It's only a temporary thing, which is good because them suckers is loud. Adding them involved adding two /24 networks to my little DSL modem. Yes, that is heavy over-kill, but it's due to historical reasons. Anyway, it ran just fine all day yesterday without incident but today the modem decided it had had enough.

I started getting packet loss on anything that touched the Actiontec. For example, here's a ping from my Linksys WRT54G which sits right behind the Actiontec.

--- ping statistics ---
45 packets transmitted, 17 packets received, 62% packet loss
round-trip min/avg/max = 1.3/1.4/2.4 ms

Even more curious, from the DSL modem I saw this error.

# ping
PING ( 56 data bytes
ping: sendto: Operation not permitted

I checked for loose cables or ethernet errors, but there were none. I checked system loads and free memory, all fine. I even tried re-arranging the network to eliminate the WRT54G, which incidentally is still how the system is set up, but that didn't help either. In desperation I even unplugged the server and tore the routes out of the Actiontec, but still the packet loss persisted. From the server to the WRT54G was fine. But from the upstream DSL router to the modem, or from my WRT54G to the modem both had large amounts of packet loss.

It finally occurred to me that I need to just reboot the modem, which had been up for about 90 days previously. Now that may seem like an obvious thing to some, and in the Windows world I suppose it is, but in general it's not a good answer and for Linux and Cisco systems most of the time you can find an actual solution. I guess deep down I still have hope that this modem, which is based on Linux, will grow up to be a real boy, er, router. That hope sunk further today as the reboot magically fixed everything.

I guess the question remaining is how long until the modem does it again. Who knows? At least I know what to do now and not to waste time debugging the network. It's so frustrating. It makes me wonder what Actiontec would say about their poor excuse for a router. Probably something like "we have leveraged enterprise technology to bring a workable product to market at a price point that consumers can afford". Maybe there would be more buzz words, I'm not really up on those at the moment. I don't think they would say anything about quality because I doubt they ever cared. Sell, sell, sell and screw the buyer. It's pathetic and the worst part is, they're not the only ones. It's a trend in this country and it makes me sick, especially when I find myself buying into it.


ISP Bandwidth Shaping

Is your Internet service being throttled down? This wasn't quite the doom and gloom story I was expecting, but it doesn't paint a negative picture. Personally I'm not so worried. Just so you know, I do work for an ISP, so take that into consideration. But keep in mind that I also use the Internet provided by my company, so I have a vested interest in it working well too.

What I think people overlook is that the only way affordable Internet access works is by sharing. You probably remember that concept from kindergarten, right? I dare you to acquire a dedicated line for the $40 a month you're paying now. It just won't happen at speeds that are worth using.

On the other side you see what Comcast has done to a Salt Lake area man. To sum up, he was cut off completely because he went over a monthly limit that Comcast didn't inform him of. Read more about it here.

So what's the compromise? Companies should be upfront about what sort of limits you will expect. Publishing them is good incentive to keep them competitive (you know, the whole capitalist thing?). In turn, consumers should be aware of the terms of use, and if they sign up for service should accept them. They should certainly be aware that just because their line is rated for up to X megabytes, doesn't mean they can use it all the time.

As a side note, if you want to use up some bandwidth, please use the upload. We consistently have upload bandwidth to spare. I've never quite understood why companies moan and complain about people running servers on their home connections. As if I have nothing better to do than police my users.

Drupal Upgrade

I have upgraded the site from 4.5.8 to 5.1. Really I just had 2 hours in the middle of the night to kill, so why not do a blog upgrade, right? I suppose I should have been sleeping.

The main reason for the upgrade was to install a captcha module to combat the increasing amount of comment spam I've been seeing. It's just annoying to have to delete comments every day. Well, Drupal doesn't have a captcha module built-in so the upgrade wasn't strictly necessary, but I was a few revisions behind so I figured why not.

There are a few things that have changed and I'll have to work on it further, like the missing post category menu from the left. And the archives disappeared. Definitely not cool. But it's late and I need some sleep. Some other time then. Please let me know if you find anything else broken though.


Test Test: Amano Chocolate

Who doesn't love chocolate, right? Well, my wife for one. She's sucrose intolerant (lacks the enzyme sucrase), so the sugar makes her sick. Can't say I blame her then. It's a good opportunity to try out some fancy chocolate when she's out of town. What can I say? I live on the edge.

I picked up some Amano chocolate over at Amazon. The shipping there was a dollar cheaper than direct from the site, so I went all cheapskate. I bought one each of the Madagascar and Ocumare. To my pleasant surprise it arrived the very next day (04/10). How's that for quality service!



Subscribe to RSS Subscribe to - All comments