The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

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).

(Bunny's account of the day)

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 …

[Yorick looks over the volumes we just aquired]

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:

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.

[Remove the battery, remove the drive mechanism, what could possibly go wrong?]

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.

[Sproing!]

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

[Yorick's world is turned upside down]

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.

[Just hoping I avoid a shocking experience]

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.

[Hey!  Who turned out the lights?]

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:

[Zzzzzzap!  K-pow!]

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:

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.

Official Google Research Blog: Extra, Extra—Read All About It: Nearly All Binary Searches and Mergesorts are Broken

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.

Obligatory Picture

Trying to get into the festive mood this year

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

Obligatory AI Disclaimer

No AI was used in the making of this site, unless otherwise noted.

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.