Duck Typing 2

I’m in fairly creative mood tonight, as evidenced by one (now two) blog postings, the PHP coding I did earlier, and the upload of some 75 random pictures to Facebook. I guess that’s what happens when I avoid the work I really should be doing. (Blech, JavaScript.)

Anyways, a few days ago a coworker mentioned something to me about duck typing, and I again decided to shirk my responsibilities and experiment. The basic idea is to stand typing on its head and have an imperative system rather than declarative — as they say, “if it walks like a duck, and quacks like a duck, it must be a duck.”

Read more »

Smaller, Better, Faster. 3

Well, perhaps not the second two, but the first for sure — Olympus and Panasonic have jointly announced the new Micro Four-Thirds format. Basically, they took a standard Four-Thirds sized sensor, shrunk the lens mount, removed some old mechanical fluff holdovers from the film days (mirror and prism), and left with a small, interchangeable lens camera design that seems poised to make us rethink our digital SLRs.

You may not remember or be familiar with the Sigma DP-1, announced way back in 2006 (though it didn’t make it to market until this year), but it met with considerable excitement and was heralded as the first pocketable camera with the image quality of a DSLR. That’s because the largest contributing factor to the difference in image quality between that monster hanging around your neck and the sleek compact in your pocket is the physical size of the sensor: bigger pixels make better pictures. Unfortunately, while the DP-1 did feature a large sensor, many found it lacking in just about every other area — it was slow, focused poorly, and for all the sensor hype, the images really didn’t pop. Widespread disappointment ensued.

But now we have a second chance at the holy grail — and that alone is exciting — but Olympus has already upped the ante before they’re even out of the gate. Not only will the cameras be small, but they’ll feature interchangeable lenses, and you can even use your existing Four-Thirds lenses (if you have any; with an adapter). In addition, they’ve hinted at a movie mode in future models, which will put them a step beyond current DSLRs and level the playing field with existing compact digital cameras. (Personally, I know of people who have staved off a DSLR purchase for that very reason.)

And while the camera is all theory for now, what’s not is that Olympus, with their existing Four-Thirds lineup, has proven themselves a competent digital camera manufacturer, was the first to bring “Live View” to the DSLR market (which these new cameras are sure to rely on), and has shown that they can get good, if not great, image quality from their sensor format. Looks to me like the Micro version has a lot more than a fighting chance.

Doin’ it Right 0

Anyone attempting to do RAW conversion under Linux (in GIMP, specifically) is probably using DCRaw, as it appears to be the only guy in town. In which case, you owe it to yourself to check out UFRaw — it’s another GIMP plugin that’s a much better front-end for DCRaw (read: one that actually has options).

Fries With That? 6

So we just got word that our offer on a house was accepted by the bank. Now it’s time for all the fun stuff! Hopefully it all works out.

“High-Def” Webcams 3

(The term High-Definition appears to be able to be applied to anything these days, so why not webcams?)

For the past few days I’ve been obsessing watching this webcam over at the Red Rock visitor center, and just now I wrote a quick script to fetch the latest image and update my desktop background with it. It’s almost like having my desk near the window back. (OK, not even close.) But, truth is, it makes a pretty crappy background at 1920×1200. Look at this other one in comparison — now that’s a webcam.

Then I remembered. Since buying a used 20D, I have an old D30 just sitting around. With a bit of Canon software magic, that can easily be setup to take a shot at any interval and automatically transfer it to the PC. I just have to write a little plumbing to get it up on the web.

I want to do this!

Tunnel to the World 0

A lot of people know that OpenSSH’s client supports tunneling out of the box. But some don’t realize that it also supports tunneled SOCKS out of the box. Here’s how to set up a quick SOCKS proxy across an encrypted tunnel:

ssh -NfD 8888 user@host

The proxy will be on port 8888. The other flags just tell ssh to go immediately to the background (after getting your password, if needed) without running a command.

Willfull Ignorance 2

Sometimes, writing good code is really hard. But other times, writing good code is so darn easy you shouldn’t even have to think about it. In fact, it shouldn’t even be called “good code” — in these cases there should never be anything else, so we’ll just call it “code”.

For instance, if I see another line of code that does this:

$foo = isset($foo) ? $foo : 'default value';

I think I’ll kill someone.

Let me clear something up for you: using the ternary operator does not make you cool. However, assigning a variable to itself makes you very uncool.

if (!isset($foo)) $foo = 'default value';

Now why is that so hard to write?

Disappearing Act 1

I’ve started trying to train myself to use Google Reader: rather than trying to remember all of the sites that I want to visit each day, and having to visit each one independently, I can go to one place and view them all. Sure, these are all benefits of RSS readers, and everybody else discovered them years ago. What can I say, I’m slow.

Anyways, Google Reader caches things on its own (which makes sense), and that has a peculiar effect: if Reader hits up the RSS feed while an article exists, and then the author decides to delete said article, said article will appear in Reader, but not on the site.

Which is where I find myself right now: I have an entry from Matt entitled, “A More Perfect Blog,” that shows nowhere on the site. So… where’d it go, Matt? ;)

Jack & Jill 3

Not too long ago I was dragged into trying out Twitter. It’s interesting — like a glorified Facebook status; I’m sure they cringe every time someone makes that comparison — but I didn’t really catch on to it.

Now I’ve decided to give Tumblr a try. So far, I like it: it has the main component of Twitter — quick, short blogish entries — but also lets you easily post pictures, videos, quotes, chat transcripts, etc. The icing on the cake would have been posting code snippets complete with syntax highlighting. Ah, one can dream.

Recycle Bin FTW 2

(The title rhymes, if you didn’t notice, assuming you expand the acronym.)

Last night I decided that I should finally scrape all of my pictures off my two 4GB cards — I still don’t have my final photo storage solution worked out, so in the meantime I’m never really quite sure where I want to put things — since I had some 971 pictures in the mix. I put them on the largest drive I have; the one I record TV to, the one hooked up to my TV, the one low enough to be within arm range of toddlers and cruising infants alike.

As always, I used Ctrl+A to select everything on the card, then dragged it over, repeating for the other card. Then I turned off the TV and walked away. If you aren’t familiar with this process, it’s worth noting that after the copy operating finishes, all the copied files remain selected. That will be vital information.

This morning, Izzie (our youngest) was playing around on the keyboard connected to said machine, and although I heard a few dings and such, I didn’t worry about it.

Just now, I turned on the LCD and immediately noticed a warning about trying to delete a read only file. Sure enough, Izzie had managed to hit the delete button — with an entire card’s worth of copied files still selected — and sent that entire card’s worth of pictures to purgatory.

So, today, I’m thankful for the recycle bin.

Next Page »