Elias presents ... a worm!    Thoughts on family, philosophy,
and technology


Tuesday, July 31, 2007


A few years ago I picked up a Commodore Vic-20 off of ebay for $20. Such was my first computer when I was 11, and I really programmed the snot out of mine. This one I planned to be Elias's first computer too. Every now and then we put the box on the floor and he takes all the components out and we talk about what they are.

The other day I decided to actually fire the thing up, which required one trip to Radio Shack for a part they don't make anymore that hooks to the inputs which aren't on TV's anymore. The guy at Radio Shack said the Vic-20 had been his first computer too, but then he got a Commodore 64, and those were his "gaming glory days." Whatever! Eventually I also got a C-64, but I seem to be the only guy who didn't just play games on these things, I did much much more programming.

On the Vic-20 I made a flight combat game, an Indiana Jones'-inspired multi-level game, and I got to where I could write a spaceship game in three (or was it four?) lines of BASIC on any Vic-20 on display at any mall. On the C-64 I learned assembly language and wrote the graphic engine for an Ultima-style game, but didn't write the game itself. I think I wrote a C-64 version of Jupiter Lander too, which had been a cool game on the Vic-20. But my ultimate project was installing a second sound chip in a C-64 and then writing a drum machine app with an assembly-language execution engine. Then I'd program in some Jesus and Mary Chain drums and play along with my electric guitar. I don't imagine anyone is possibly still reading this (least of all my wife), but if you are I hope it is now obvious just how cool I was as a teenager.

Anywho, it turned out that with a $1.99 part from Radio Shack we were in business. Except that as soon as I tried to plug it in, the connector broke, so I had to rummage around for a soldering iron, thus the crazy wires in this picture. The funniest thing was how Dahlia wanted to press the buttons too and watch what happened on the screen. She would bounce from one side of Elias to the other, trying to strain and get a few key pokes in. Elias figured out how to clear the Vic-20 screen off and put a number '5' right where he wanted it.

After the kids went to bed, I plugged in the Jupiter Lander cartridge. Check out that awesome high score! Okay I think this may be the most pathetic blog post I've written, although there's a lot of competition.

Labels: ,

Monday, July 30, 2007

db4o ASP.NET Providers

My open-source project of db4objects-backed Membership, Role, and Profile ASP.NET Providers is up on CodePlex here.


db4objects is an object database that I'm fairly enamored with these days. Whereas with a relational database I'd have to write lots of SQL and plumbing to read and write objects, with db4objects in .NET 2.0 I can store an object by calling Set(object), and load an object by calling the Query<>() method with an anonymous delegate that simply expresses the identity of the target, like this:

IList<EnrolledUser> results =
delegate(EnrolledUser u)
return u.Username == username &&
u.ApplicationName ==

The Achilles' heel (to be dramatic) of db4objects for .NET is that it requires Full Security CAS privileges, since it uses reflection and Win32. That's a problem for hosted web applications which are constrained to the Medium Security model -- which is very common and proper. I've thought 'round and 'round this problem, and there's no readily plausible solution other than finding a host which is willing to run your web app with Full Security -- which is, of course, in general a very bad idea!

The Providers

My project contains implementations for three core ASP.NET providers so far. They are based on MSDN sample code, and they are "well" unit-tested, meaning: I tried to retroactively "drive" most of the behavior with tests, but there are some holes.

There was an older, similar project on SourceForge here, but that one was not based on the MSDN sample code, was not unit-tested, hadn't been touched in 18 months, did not include a Profile provider, and used an older version of db4objects and the older method of querying. So I wrote this one. And let me tell you, it is not easy to unit test a Membership Provider; I never could have done it had I not found an archived post of a blog that doesn't exist anymore which explained how to hack it!

I'm curious myself about what bugs I'll find once I (or others) start using this project more. It's been downloaded more than 40 times already, so I hope -- and fear -- some bug reports sometime soon.


Sunday, July 15, 2007

Weekend pics

Amy left on Saturday to get a haircut and color, and I haven't seen her since. However, the woman pictured here showed up at our house, and the kids immediately took to her.

We celebrated our seven-year anniversary today, but forgot to ask the waitress to take a picture during our date. So instead Elias got to do the honors when we got home, and he did well for a two-year-old. Since we were nearly naked (it's hot here) the pic has been color distorted to preserve us some shred of dignity. Notice that Dahlia is in our official anniversary picture, yet clearly she did not want to be.


Saturday, July 14, 2007

4th, belated

At the park on July 4th. Judging from this and the previous post, you might think this is the only shirt I ever wear.