This is what Gates McFadden (the actress who played Dr. Beverley Crusher on Star Trek: The Next Generation) does:

Here’s one more, but really, just head over to Ensemble Studio Theatre LA (where she is the artistic director) to see more. Also you can follow her on Twitter.

Also, I just saw that, quite surprising to me, the two-part cliffhanger “The Best of Both Worlds” (in which Picard is assimilated) will be released as a single 2-hour remastered, re-CGed event and shown in theaters on April 25! It — as well as the entirety of Season 3 — will be released to Blu-Ray on April 30.

Anyway, here’s another cool picture. Now go check out the full set.

In our office, we have an old Robotron:2084 machine. For those not old enough (or too old) to remember it, this is it here:


It featured 2 joysticks (one to move, one to shoot) and about a billion enemies on screen at the start of each level. It’s not uncommon for a single life to last only a second or two. It’s an intense and surprisingly physical game (which turns out to have been part of the plan).

The machine itself was non-functional for pretty much the entire time I’ve worked here, but it was brought back to life recently and the entire company has been competing to see who is the Robotronyist — for the record, it’s Eric. But he’s stopped playing since the right (shoot) joystick has started acting flaky, which is giving me my opening to improve. I don’t let mechanical issues stop me (just ask anyone who saw me playing Galaga after the screen died… that certainly made it more challenging).

6809 processor running at 1Mhz and it’s killer fast. There’s a lesson in there somewhere.

A few years back, I spent a bunch of time playing around with Arduino microcontroller development projects, spending some time getting into hardware & embedded software development. It was a lot of fun and I wrote a number of blog posts and pages on my projects.

I lost all that blog posts in a database incident, and I just kind of left the site sitting dead for a while. But then I ended up on my Google Analytics account and discovered that I had one page that was receiving a fair amount of traffic, 100+ visits a day!

It was a simple calculator that I put together to determine the right components to use for a timing circuit with the 555 Timer IC. It approaches things a little different from other web resources in that it starts with what most people want (the timing that you want) and gives you what you need (the right components). Most online calculators just implement a simple equation and take the parts you have and tell you what the timing would be. I always felt that I was solving a problem that those other tools weren’t, and it seems like hundreds of people a week feel the same way.

So, when I started this new blog, I wanted to get the calculator ported over and updated. Moving to this new site also let me turn on comments, and I’ve already received several very nice comments from people. I’ve even had a couple of suggestions for ways to extend the tool and I’ve started making changes. It’s really nice to see people finding it and using it — and seeing them visit the blog in general once they are here.

Who’d have thought that a throw-away project from a phase I went through a few years ago would be the thing that brings the most people to my new blog? Love it.

I’m honestly not much of a web comic guy. I read xkcd like everyone else, of course, and I had a brief infatuation with FreakAngels (though I have to go back and finish it sometime).

But nothing has quite caught my attention like Questionable Content. Jeph is at 2400 strips now, spanning the last 9-10 years, and I’ve spent hours at night in the last couple weeks getting caught up.

It’s been fun watching his drawing mature, but even if it were stick figures it wouldn’t matter. He’s built a cast of characters that — cliche though it might sound — you really care about. “Yay Hannelore!” I’ve said out loud, to my wife’s confusion.


Oh, also he has great taste in music and I’ve gone looking for a number of bands he has mentioned in his comics and ended up enjoying most of them.

Good work, Jeph. Keep it up, and I’ll be reading eagerly.

To inaugurate my latest attempt at a blog, I want to talk about something cool I’ve read about lately. I’ve received this question a couple times at interviews, and I think it was just to demonstrate that I could work with bitwise values.

For instance, take the number 57:

57 = 00111001

It’s easy enough to see that 57 has 4 bits set to 1. How do you check that in code? My answer has always been to loop through the number of bits (in this case 8, but usually 32), shifting to the right each time and then count how often the lowest bit comes up as a 1.

value = 57
count = 0
for i in xrange(8):
    count += (value >> i) & 1

Effectively what I’m doing here is just looping through the 8 bits, rotating the value to the right and stripping off the least significant bit and adding it to the total (if it’s 1, then it adds to the total).

Since I’m using python for the example, I can abbreviate it a bit like this:

count1s = lambda x: sum( (x >> i) & 1 for i in xrange(32) )

print count1s(57)
> 4

That’s more compact, certainly, but it’s still linear time with respect to the number of bits that you are examining, and that’s where today’s coolness comes into play. It turns out there’s a log time algorithm for doing this.

Because it can get a bit long when I show all my work long-hand, let me jump straight to the code that will give the results for an 8 bit integer in 3 steps (and could be extended to do 32 bits in 5 steps, and so on):

x = 57
y = (x & 0x55) + ((x & 0xaa) >> 1)
y = (y & 0x33) + ((y & 0xcc) >> 2)
y = (y & 0x0f) + ((y & 0xf0) >> 4)

print y
> 4

Follow through the link if you want the nitty gritty.
Continue reading