Skip to content

Iloggable

PageFlakes

I was digging around atlas.asp.net today and looked at one of their Showcases called Pageflakes. Cool entry in the start-page space.

I've been using Sage to handle my RSS needs, but it doesn't stay in sync between home and my two offices, never mind my laptop. So, I've migrated all my feed needs to Pageflakes to see how well it fills my needs.

Of course I couldn't just use a new tool. I had to figure out how to expand on it. First i just created a web page flake and pointed it at one of my webapps. Kinda the lotek way to get an app onto the grid. I figured there had to be a way to create proper flakes and clicking on the Developers link I was rewarded with step-by-step instructions on how to create custom flakes. Very cool.

What I really need to make this my main page is a way to sync my Palm Desktop to its address book and To do list. Now that would be useful.

ThreadSingleton revisited

I've been using the CallContext for a while now to create thread singletons, especially under ASP.NET since it's a single process and you need to work in a thread context when dealing with per request singletons.

Today a co-worker pointed out this post. Apparently you can't trust CallContext under ASP.NET. You really should stuff your singletons into HttpContext when running under ASP.NET, just to be sure. It's a good read.

LFSLib 0.11b

Two bug fixes.

  • OutSim was broken.. missing the Roll member
  • OutGauge and OutSim would not work right if there was no ID defined in the LFS config, since the packets would be 4 bytes smaller each.

Also added an OutSim form to the Tester app.

As usual, docs, sources, etc. can be found here

New LiveForSpeed Lib v0.10b, refactored

Ok, 0.10b of my lib for Live For Speed is out, but it was refactored quite a bit, so it's not a drop-in replacement.

The refactoring was done in order to let the InSim library receive and handle OutSim and OutGauge events. InSim, OutSim and OutGauge are now all part of one library. The OutSim and OutGauge protocols can be used either via their own standalone handlers or received directly via the InSimHandler.

Here are the breaking changes when switching to this revsion:

  • Renamed namespace LiveForSpeed.* to FullMotion.LiveForSpeed.* so as to not monopolize the LiveForSpeed root namespace.
  • Moved LibVersion to FullMotion.LiveForSpeed.LibVersion
  • Renamed LibVersion.SERIAL to LibVersion.INSIM_SERIAL

As usual, docs, sources, etc. can be found here

New Company: Full Motion Racing

After over a year of working silently on this, finally my new company is coming out of stealth mode.

Introducing: Full Motion Racing

Video Hosting courtesy of vMix

Full Motion Racing is building a Racing Simulations Center in San Diego, CA. Our facility will offer guests networked racing on 3DOF motion platforms. We're still a bit out from the official opening, so check out one of our upcoming public exhibitions

Second Life Tech talk @ Google

Saw this incredible video over at Zac Bowling's site. It's a tech talk by the creators of Second Life about their systems. Very high geek content, especially with the prospect of SL switching over to Mono.

I've been staying away from MMORPG's because I just don't need that kind of time-suck in my life, but once you add a compelling programming model on top of that, the temptation is just getting way too strong. So far I resist, but once they have mono integrated, I may have to poke around a bit.

Last time I got sucked into something like this was back in the early 90s, when I started playing around with LambdaMOO which was completely object oriented and user editable. The language I always thought was a variation on Scheme, but Wikipedia claims it a derivative of Algol. Either way, it was a lot of fun to program in and create the world around yourself. But it was addictive. My roommates all got sucked in and at some point you couldn't call our house because someone was always on LambdaMoo (yes, the day of modems... 2400bps modems).

The only thing that makes Second Life less dangerous is that it's build around a thriving economy. So, it's not only conceivable, but an actual reality that you can finance this habit by having the habit and sitting in there coding. I think i'm still going to stay far away for my own sanity.

configSource attribute

I've been using the new tag for .NET 2.0 to store my DB config. I used to just have a custom handler for it before. But hey, it's built in, let's use it. Now i'm putting NUnit in a bunch of projects so they all need to have app.config files. But i don't want them to each have a copy of the strings. Just means sooner or later things get screwed up. Not to mention that having the config file in the source control tree means that my local config gets checked in and i have to modify them on every machine to match environments.

For and my own config handlers, I always had a file attribute to externalize them into a central configuration space. Except doesn't have file, only configSource. At first glimpse it looks like the same thing. Sure, it adds some cool stuff, like being able to reload on change, which file couldn't. But the price you pay is that the new file has to be in the same directory or a subdirectory. So much for using one config for multiple apps. I may be overlooking something, but I can't really find any good reference on the subject.

Fraps, scriptable encoding, multi-angle DVDs

I came up for a non-porn use for the multi-angle feature of DVD. Unfortunately, the lack of adoption of this feature by the major DVD community means that documentation on this is rather sparse. Plus I ran into some other issues that I also found no answers to. Figured I'd post them here, see what comes of it.

Fraps captures w/ anti-aliasing

I'm running P4 3Ghz, nvidia 6600GT and that produces about 92fps for LiveForSpeed. Drops maybe 10 frames if i turn on anti-aliasing. If i use Fraps to capture w/o anti-aliasing it records at the requested FPS, but the moment I turn on any anti-aliasing, the fps drops to about 10-15fps. Is it my card, LFS, fraps? Anything I can do?

Automating encoding from Fraps to DVD

Once captured, I have an avi in the FPS1 codec. I can transcode it with VirtualDub or TsunamMPEG, but both of those tools are GUI and can't be scripted. I tried using ffmpeg, but that doesn't seem to support the current Fraps codec. I was unable to find any scriptable transcoders that can use the codec DLL provided by Fraps.

Automating multi-angle DVD burning

Best tool for automating DVD burning I found was dvdauthor. However it does not support multi-angle burning. Only tools I found that do, are high end DVD authoring packages, all of which are GUI applications.

And even if i found one, i can't even find out what the requirements are for multi-angle. I saw some comments that made it sound like that all angles have to share a single audio track. Is that correct? How about getting the video synced? Got the impresssion that there was some nasty timecode stuff, beyond just getting a couple of video tracks of the same frame count.

Ah, more questions than answers..

Exposing child objects

Consider a business object that has a list of child objects. Let's assume that the parent has to do some housekeeping operations when children are added or removed, and also has some rules what children are legal to add.

Before delving into various solutions using collections, let's consider the problem of ownership of the data returned from an object.

While the access scenario of

foreach( FooChild child in Foo.Children)
{
}

is the desirable one, there is no stopping someone from doing

FooChildren[] children = Foo.Children;

and then carrying the collection around. Of course, the moment the collection changes inside Foo, the child collection retrieved is invalid, since it was an array and not re-sizable. Would that violate your expectations? I generally consider Properties to be Accessors, i.e. you get the value used by the object, not some clone for you to manipulate without affecting the originating data. And the above scenario would violate that expectation.

So are Properties really an object's data and results retrieved from a method such as GetChildren data for you to manipulate without an expectation of changing the data in the originating object? If not, can the rules governing retrieved data be expressed in code, or is this type of contract something that is only going to be communicated through documentation?

If we proceed that the expectation is that once you get a collection back from a property it's still associated with the parent we get behavior similar to Xml Nodes. That solution would look something like this:

foo.Children.Add(new FooChild());

Pre-C# 2.0, you'd have to create your own strong-typed collection object for the children. If you do this more than a couple times, that's a lot of repeated code, what with all IEnumerable requirements. But it does provide you the added benefit that you could define events for the parent to be notified when things happened, so it could execute its constraint logic, which an untyped arraylist would not.

In 2.0, the whole thing could be done with an ICollection or, even better, an IList. But you'd still have to write that generic class yourself because (AFAIK) there are no implementations that have events to notify you when the collection changes. All things considered, though, this promotes much better re-use and a cleaner interface.

Or is there a better pattern to follow that i've not touched on?