Sunday, July 31, 2005

Game Coding Complete - 2nd Ed

Well my copy of Game Coding Complete, 2nd Edition arrived on Friday.  I knew it was going to be good after a good recommendation by Jason Olson.

It is now Sunday afternoon and I am about 200 pages into it.  I am really enjoying his attention to detail on topics that are often ignored in most online resources and even other game programming books!

This book really DOES belong on your bookshelf if you enjoy game programming at all.

Thursday, July 28, 2005

Accessing Session from an HttpModule

Today I wanted to extend my NHibernate implementation to allow for multi-page transactions for certain operations (that I control) and keep with the cleaner ISession-per-HttpRequest pattern for everything else.

To do that I had to modify my HttpModule to allow for this check, but I had no access to the SessionState here.  Why is that?

Here’s what I was doing in my HttpModule:

public void Init(HttpApplication application)

{
//add event handlers
 application.BeginRequest += new EventHandler(context_BeginRequest);
 application.EndRequest += new EventHandler(context_EndRequest);
}

I was creating and disconnecting my ISession object inside of those methods. The problem is that SessionState is not loaded until after the BeginRequest had fired and before the EndRequest had fired. (specifically it is accessibly after the AcquireRequestState event). So, changing my code to this worked:

public void Init(HttpApplication application) 
{
application.PreRequestHandlerExecute += new EventHandler(application_PreRequestHandlerExecute);
application.PostRequestHandlerExecute += new EventHandler(application_PostRequestHandlerExecute);
}

Also, I saw some people online incorrectly suggesting that one implement the IRequiresSessionState or IReadOnlySessionState interfaces, but if you read the docs, those are marker interfaces for HttpHandlers only.

Tuesday, July 26, 2005

Blog Design

I had my blog redesigned by Bob Yu, our lead designer at LyntonWeb.  He’s really sharp, and a whiz with just about any design program he gets his hands on.  He also helped me get the css to play nice in both browsers, but we’re still ironing out wrinkles.

You can check his work out at http://bpd.plantedtank.net.  Shoot him an email if you’d like to hire him.  He’s a good guy.

So, what do you think of my new look?

Wednesday, July 20, 2005

Congratulations, you've installed DasBlog!

Be sure to visit all the options under "Configuration" in the Admin Menu Bar above. There are 16 themes to choose from, and you can also create your own.

 

Wednesday, July 06, 2005

Chinese translations

Sometimes for fun I will read a google-translated, chinese blog and giggle at the funny things that it translates. 
My favorite is “My Guestbook” becomes “Abundant Guest Garden.”

Even funnier is Star Wars: Episode III with chinese translated subtitles…

winterson.com: episode iii, the backstroke of the west

This is hilarious!

Friday, July 01, 2005

ControlInjector article updated

I updated my article on Code Project, the new Control Injector is much better and more useful than before.  If you haven’t yet read it, please do so and rate the article.

The link is on the right under My Articles.

Personal Loans - Loans - Debt Consolidation - Debt