Grabbing Single Frames From the WVC54GC

One of the slightly annoying things about the video camera I mentioned is that it doesn’t actually have a “just return me a single frame of what the camera sees” mode. Well, someone else figured out how to do this with mplayer, and it appears to work. I’ll code up a simple demo here pretty soon.

Addendum: here is a picture snapped from the camera. A cron script runs once every two minutes to update the file on my webserver.

Latest Picture from the Front Door

Visitor to the Front Door, Caught on Webcam

In a previous posting, I mentioned that I bought a Linksys WVC54GC wireless webcam. I can’t say that I really think it’s a good camera, but I didn’t hate it so much that I returned it. It does have a kind of cool feature that it detects motion and can email you a small five second clip to any email address you like.

Today, at 10:55, it tripped, and mailed me the following shot of my front door.

Rats. Youtube hasn’t finished processing this quite yet. Check back in a few minutes. It’s alive now.

Technorati Tags: , ,

Why Haskell? Indeed…

I’ve been fascinated by functional programming languages for at least twenty years, but I must admit, despite my rather academic interest, I’ve simply not found them to be very pleasant or useful. Nevertheless, I keep thinking that I haven’t really dedicated myself to resolving this issue fully, and I keep thinking that someday I should get around it it.

Mark Chu-Carroll, over at the Good Math Bad Math blog has decided to try to write a series which will serve as an intermediate tutorial that might convince you that writing programs in the functional programming language Haskell might just be a good idea. His first installment actually fills me with a sense of uneasy foreboding, because it reuses the tired chestnut that we always see in intro to functional programming languages: namely qsort.

Yes, qsort is easy to write in functional programming languages. But the simple fact is: it’s pretty damned simple to write in any language, particular if the language has some kind of list datatype. Consider this version in Python:

def split(x, l):
        lo, hi = [], []
        for y in l:
            if y < x:
        return (lo, hi)

def qsort(l):
        if l == []:
                return l
                lo, hi = split(l[0], l[1:])
                return qsort(lo) + [l[0]] + qsort(hi)

Is this version harder to understand than the Haskell version? I can’t see how it is. Is it less efficient? Well, it’s hard to say actually, at least from principles. Python doesn’t really guarantee much about the efficiency of recursion, and combined with the its applicative order evaluation, it builds a lot of temporary lists that the Haskell version could avoid. But Haskell isn’t exactly a free ride either. Sometimes lazy evaluation can turn around and bite you as well. But the real point is simply this: that this particular example does really very little to justify Haskell as a choice for programming.

Most books on functional programming suffer from this fault. They are demonstrations of trivial or near trivial programs carefully chosen by people who like functional programming because they demonstrate the conciseness of functional programming. The problem is that these examples are convincing only to the converted: they don’t generate any new converts.

Real programming is messy. Efficiency matters. Clarity matters, but cleverness probably does not matter. Handling exceptions reasonably matters. Code reuse matters.

I’m skeptical, but I am still looking forward to the rest of the series.

Technorati Tags: ,

Gutenberg Gem: Manual of Egyptian Archaeology and Guide to the Study of Antiquities in Egypt

I was persusing the top 100 downloads on Project Gutenberg, and noted that they had a fairly nice illustrated book about one of my interests: Egyptology. Even if you aren’t interested in Egypt, it’s got some fairly nice clip art.

Manual of Egyptian Archaeology and Guide to the Study of Antiquities in Egypt – Project Gutenberg
The Temple At Karnak

Technorati Tags: ,

Rockin’ Meteor Video

I mentioned on my blog that the Leonids were peaking a few days ago, but it was cloudy and rainy here, so I didn’t get a chance to see any. Neither did Bad Astronomy blogger Phil Plait, but he has an excellent post with a link to a great all sky video. The astronomers had a fisheye lens connected to a video camera which ran all night, and shows some really incredible meteors, mostly before dawn. It included one that obviously left a luminous trail that took over an hour to dissipate. Good stuff.

Technorati Tags: , ,

Dodge Tomahawk @ the SF Auto Show

In what has become a bit of a minor tradition for us, we carted our bodies into San Franscisco this afternoon to attend the SF Auto Show. It’s an opportunity to ooh and ah over some of the more expensive cars, and to sit in a bunch of cars and decide if they have enough head room without having to endure the pitches of sales people. I’ve been thinking about a more economical replacement for my gas guzzling Expedition, and the front runner would probably be a Honda Element, which has lots of room and seems really comfortable for me to drive.

There were two semi-crazy things at the show that I liked. The first was the all-electric sportscar by Tesla Motors. You can read about it on Wikipedia: does 0-60 in under four seconds. It’s pretty sweet looking too. At around $80K, it’s a bit too expensive for this humble blogger, but it looks like fun, and it would be great to kick sand on all those Prius owners.

The other crazy thing was the Dodge Tomahawk. It’s basically a motorcycle (but with four tires, two mounted closely side by side in the front and the back) and a Dodge Viper V10 engine that makes 500bhp. Apparently they’ve shown them at other events before, and sold 10 of them from Neiman-Marcus at $550,000 each, but they are really just for show. They look like something right out of a Japanese anime comic. Dodge Tomahawk – Wikipedia, the free encyclopedia I even snapped a picture with my camera phone:

Dodge Tomahawk Concept 'Car'

Technorati Tags:

Email from Jack the Ripper…

I was listening to the classic The Hounds of the Baskervilles for the last few days as I ran around doing shopping for my Thanksgiving dinner. I hadn’t read it in quite some time (despite my oft-mentioned fondness for the world’s greatest fictional detective), and it was a lot of fun. For some reason, my mind shifted to the most famous actual crime of the period, which was of course Jack the Ripper. I actually didn’t know much about the subject, so I turned where every good geek would turn: to Wikipedia.

The Wikipedia page lists three letters that were sent to the press and/or police that the police thought were of interest, and provided links to the “Dear Boss” letter which you can view as an image on the British National Archives. If you surf over to their site, you get one of those truly annoying image viewers, but you also get treated to this:

Ripper Letter, which you can send as an e-card

Yep, you can send the Jack the Ripper letter as an e-card to all your potential victims friends! Okay, maybe I’m a bit strange, but for some reason, that made me laugh out loud this morning.

The National Archives | Research, education & online exhibitions | Treasures from The National Archives | Jack the Ripper

Technorati Tags:

Happy Thanksgiving, with Video

Here at brainwagon central, I’m about to put a turkey and a ham in the oven, I’ve got the potatoes ready to go, I’ve made homemade cranberry sauce, and Carmen’s whipped up her favorite sweet potatoes. I’d like to extend my best wishes to all my readers and to your familes, and wish you a great holiday.

Okay, that’s too boring. How ’bout a video involving gallons of flaming oil?

YouTube – Turkey Fryer Gone Wrong

Fox News Preps News Satire Show

Fox News Preps News Satire Show

“The way I look at it, almost every comedy show or satire show I see uses the same talking points against George W. Bush and Dick Cheney,” Surnow said. “The other side hasn’t been skewered in a fair and balanced way.”

I sense one small problem with this idea: conservatives aren’t really very funny. Besides, Fox News already has plenty of failed attempts at comedy. How else can you explain “Hannity and Colmes” or “The O’Reilly Factor”?

Playstation 3 Seller Attacked, Robbed In La Palma

Yeah, I know, I said this kind of story didn’t appeal to me. I’m a hypocrite, just rubbernecking my way through life. Let’s move on.

Now appearing in the “how retarded could you possibly be” department, is the following story. Some yutz had two Playstation 3s which he advertised for sale via Craigslist for $5000. He agreed to meet a buyer at one in the morning at a McDonalds in La Palma. He arrived, only to be pepper sprayed in the face and both his PS3s were stolen. – Playstation 3 Seller Attacked, Robbed In La Palma

Imagine that, a scalper getting robbed. Who would have thought that could have happened?

Stories I don’t care about…

The news over the last few days has been obsessed with a number of stories that I care very little about. I thought I’d get them off my chest.

  • O.J. Simpson’s is going to tell how “hypothetically” he would have murdered his wife Nicole and Ron Goldman. If you are a murderer, I guess that poor taste isn’t exactly going to weigh in on your conscience, but if you are one of the people at Fox who greenlighted this, you should be more ashamed of yourself than usual.
  • Borat. Saw the movie. I laughed in bits, but it is the particularly low form of comedy where the comedian achieves his end by simply being willing to do or say anything to shock the sensibilities of his audience. I like my comedy to be a tad more subtle than someone shitting in a bag and bringing it to the dinner table.
  • Tales of PS3 mayhem. For crying out loud folks, it’s a video game. Get real. If I was going to buy one, I think I’d wait until I’m not in danger of a driveby shooting.
  • The Cruise/Holmes wedding. I don’t care. Really. I mean I really don’t care.
  • In fact, i don’t care about pretty much anything that any actor or media “personality” is doing. Does anyone really care what K-Fed does? Paris Hilton? Lindsay Lohan? Madonna? I mean seriously, don’t you people have something better to do with your time?

Technorati Tags:

Gutenberg Gem: The Encyclopædia Britannica,Volume IV – Part 04 of 04

Well, Project Gutenberg has another installation in their Encyclopaedia Britannica digitization effort. This one includes a number of cool (well, I think they are cool subjects) including Calculating Machines and Calendars. There are also nice maps of Bulgaria, Burma and Cairo. Check ’em out.

The Encyclopædia Britannica,Volume IV – Part 04 of 04

Technorati Tags: ,

Slide Rule Illustration from Encyclopedia Britannica

Not happy with the Linksys WVC54GC

Well, I decided somewhat on the spur of the moment to get a wireless webcam for a monitoring application, and I must say, I’m overall pretty disappointed with the Linksys WVC54GC. First of all, it’s a sucky webcam. It is simply nightblind: it can’t take a decent picture in illumination which is even slightly dim. My home office is virtually invisible. It’s like those old first generation camera phones that are thankfully becoming a thing of the past. The idea that this could be a security device is laughable, unless the crooks trying to gain entry are careful enough to bring a couple of flood lights to illuminate their faces.

But the really disappointing thing is the software: it’s simply not designed to interface with anything except a Windows PC. It downloads an ActiveX control to watch the video. Bleh. No, more than bleh. BLEH. Luckily, I found out that you can actually watch the video stream using VLC. Down below is an image capture from VLC running on my MacBook.

The WVC54GC Basically Sucks.

Save your money. Don’t buy this webcam. There must be better ones out there. I’m gonna sleep on whether to return this camera tomorrow. It’s simply that bad.