Tuesday, July 13, 2004

Well, we made it to Florida.  We're here in Tampa for Becky's brother's wedding.  We decided to get here a few days early and go to Busch Gardens and so forth.  So far, it's the smoothest vacation I've ever planned.  Flights, rental car, and hotel have all gone off without a hitch.

I don't know how fast/consistent my internet access will be, so I may not get pictures up till we get back.  But I'll try to keep everyone informed.

There's an Olive Garden about a block down the street, so we'll probably eat there this evening.  I like the Olive Garden pretty good.

posted on Tuesday, July 13, 2004 1:56:53 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]
 Thursday, July 08, 2004

Jen recently blogged about her blog's birthday.  Out of curiosity, I wanted to see when I started.  Turns out I missed it.  My first post was on June 5, 2003.

Looks like my old permalinks don't work.  I'll have to check that out.

posted on Thursday, July 08, 2004 2:08:42 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]

I've mentioned the thumnail generator, “Thumbo”, several times.  I wrote it about a year ago while I was on vacation wanting to upload pictures to my blog over dial-up.  All you had to do was drag images onto it and it would spit out thumnails sized to your specification.  I had a “duh” moment the other day when I right-clicked on an image in explorer and was surprised to see “Resize Image” in the context menu.

Turns out, I had installed the Image Resizer powertoy for XP, which provides basically the exact same functionality integrated into the shell.

Anyway, I know a few of my readers are using Thumbo to generate thumbnails.  In the interest of not having to support it anymore, I would recommend using the powertoy instead.

posted on Thursday, July 08, 2004 2:04:12 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]

After my photography spree over the weekend, I needed a more dedicated outlet than the blog.  I'm running nGallery here.  It automatically manages picture sizes and such, and supports ratings and comments. If you're running an aggregator, it supports RSS!  I just hope I have the bandwidth.  I've put a password on it to keep Googlebot and others from crawling it.  The password is “marklio” (without the quotes).  Enjoy!

I still need to mess with captions and titles, but in the interest of letting people see the pictures, I decided to go ahead and let you look at it.

It has an interesting album structure that I'm still getting used to.  Some albums that may be of interest are:

[UPDATE: I'm working on the problem with the above links.  For now, go to the gallery and log in first (password: marklio), then the links will work)

[UPDATE: I'm also working on the password issue.  If you're having trouble, resist the urge to hit enter after putting in the password. Click the submit button instead. That seems to work most of the time. If not, keep trying. Obviously, the password feature was added late in the game.]

posted on Thursday, July 08, 2004 7:21:24 AM (Pacific Standard Time, UTC-08:00)  #    Comments [7]
 Tuesday, July 06, 2004

Wow, finally another post to put in my “4th of July” category! Man, what a weekend!  We spent some time in Belton with family to hang out, watch the annual 4th of July parade, and shoot some fireworks.  We got VIP-type seats at the parade because we were “in-the-know“.  We shot a great bounty of fireworks.  It was a blast.

It was the first weekend and major event for my new Canon Digital Rebel, so I have TONS of pictures.  I'm working on a gallery.  I'm having to sort through hundreds of pictures.  I may just give up and put them all up there.

We also went to Dave and Jen's parent's place.  Well, more precisely Jen's parents.  There we shot fireworks, camped and played with cameras.  Jen's brother Jerry also has a rebel and was kind enough to let me play with some of his accessories. He has some pictures of the weekend already up.  We couldn't have asked for better weather.

I'll post when I get the pictures up somewhere.  I have some fantastic fireworks photos.

[UPDATE: My new gallery is available]

posted on Tuesday, July 06, 2004 7:48:37 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Monday, June 28, 2004

Here's a non-technical post.

This weekend, I drove a van to Dallas for the Youth Evangelism Conference.  It was really fun.  I hadn't planned on going, but so many kids signed up that they needed some extra drivers.  In short, it was a blast.

Among the highlights were:

  • Audio Adrenaline - The last time I saw Audio A in concert, I had much more appropriate, shoulder-length hair to rock with.  It was a fantastic show.
  • Kirk Cameron (link to a pretty impressive flash site that I just stumbled across) - He had an incredible amount of insight.  Much more than I expected.  He ended up being a very impressive speaker.
  • Red Cloud (link to the only google hit with pictures) - He and his skinny white assistant (who looked an awful lot like Screech from “Saved by the Bell“) did some “freestyle“ rap which was pretty entertaining.  After a few songs, he had the crowd approach the stage and pull things out of their pockets.  He then made up a rap about all the things.  It would have been more impressive if it wasn't so easy to anticipate what was in people's pockets.  He became a favorite of mine just because it was fun to imitate him.
  • Grits - I had only heard of them because of a cameo on the first Out Of Eden album I got at the above mentioned previously attended AudioA concert.  It was a fun concert, but that's not really the style of music I'm into much anymore.
  • The van ride to and from - We had an absolute blast on the way and back. Lots of Homestar Runner references and impersonations and walkie-talkie fun.  It really took me back.  My parents got on one of the overpasses in Belton and waved as we drove past.  They are crazy.
  • Stephen Baldwin (link to a related article) - He was a very sincere goofball.  He definitely has a heart for youth.

There's so much more to write about this, but if I don't stop, I'll never finish this entry. Again, it was fun.

posted on Monday, June 28, 2004 5:41:19 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Thursday, June 24, 2004

A few months ago, a co-worker and I recieved an email from an overseas counterpart in another language.  We used Babelfish to translate it and also to translate our response.  This was an extremely handy tool.  While exploring it in more detail we found that some translations, especially to and from oriental languages whose sentence constructs are drastically different from English, can produce hilarious results when the results are “round-tripped” from English and then back again several times. For instance, the two round trip translation of this paragraph is:

In regard to the overseas equality of the E-mail of the sky of cooperator several months ago, recieved of another language. That translated that Babelfish is used in addition to the translation of our responses in regard to us. This was the device of convenience very. From the place where you understand the fact that decodement we insert the oriental language to in regard, go away in detail, having gotten together having explored while, the especially result and with this two time English " Empty the next; " of circle; You stumble or, either one; The fact that it differs from time English completely is in order to withstand the possible cheerful result. For example, as for translation of this paragraph as follows there is a thing:

Along those same lines, another co-worker ran across this little beauty today.  The results of a hotel's internet setup instructions English translation gone horribly wrong.

posted on Thursday, June 24, 2004 10:22:26 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Wednesday, June 23, 2004

I had a request from Scott Hanselman (who has been vocal on the subject of ViewState on many occasions) to share my approach to file-based ViewState persistence that I mentioned in my previous post.  Feel free to comment on my approach.  I need to get code formatting set up.  Pasting from Visual Studio is a pain.

Here's my overrides of my base class page's LoadPageStateFromPersistenceMedium and SavePageStateToPersistenceMedium:


protected override object LoadPageStateFromPersistenceMedium() {
     return _viewStatePersister.LoadViewState();
}

protected override void SavePageStateToPersistenceMedium(object viewState) {
     _viewStatePersister.SaveViewState(viewState);
}


Doesn't tell you much, except I'm delegating persistence to a ViewStatePersister, which looks like (with some things renamed to protect the innocent):


public abstract class ViewStatePersister {
     public ViewStatePersister(BasePage page) {
          _page = page;
     }
     protected BasePage Page {
          get {return _page;}
     }
     BasePage _page;
     public abstract object LoadViewState();
     public abstract void SaveViewState(object viewState);
}


Delegating this responsibility to a separate class gives me finer control over how the persistence happens, as well as modularizing that functionality.  Naturally, I have a class that wraps the default ViewState persistence functionality (which is fairly uninteresting), as well as a FileBasedViewStatePersister.  It extends the DefaultViewStatePersister and harnesses that existing behavior to store a single Guid in the __VIEWSTATE field used to uniquely identify the request.  It's methods of interest look like: (You might look at SaveViewState first so Load makes more sense.  I'm not about to screw with the formatting again to re-order them.)


public override object LoadViewState() {
     object viewState = base.LoadViewState();
     if (viewState != null) {
          Guid guid = (Guid)viewState;
          LosFormatter formatter =
new LosFormatter();
          using (FileStream fileStream = new FileStream(CreateOfflineViewStateFilePath(guid), FileMode.Open, FileAccess.Read, FileShare.None)) {
               viewState = formatter.Deserialize(fileStream);
          }
     }
     return viewState;
}
public override void SaveViewState(object viewState) {
     //create a guid for this viewstate
     Guid guid = Guid.NewGuid();
     LosFormatter formatter =
new LosFormatter();
     using (FileStream fileStream = new FileStream(CreateOfflineViewStateFilePath(guid), FileMode.CreateNew, FileAccess.Write, FileShare.None)) {
          formatter.Serialize(fileStream, viewState);
     }
     //trick the regular system into thinking all it needs to save is the guid
     base.SaveViewState(guid);
}


The appropriate persister is created with a call to a virtual CreateViewStatePersister() method, which a page can use to create the persister of its choice.  As I said in my previous post, I was dissapointed that I had to use the LosFormatter rather than the BinaryFormatter.  The downside of this approach is the possibility for creating LOTS of files, as opposed to creating a single file per session.  But I already have a file cleaning mechanism in place that cleans up files created by my graphing library, which creates more files.

posted on Wednesday, June 23, 2004 10:02:08 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]

On a recent iteration of a project at work, we were analyzing our cache usage for several data analysis pages we have using ASP.net.  The usage of these pages evolved as we updated them with features, and in a pinch we were forced to turn off caching because of the hit to memory we were taking.  As we loaded more and more data into our database, and we had more and more users, more stuff was being cached, but we were not seeing benefits from the caching across users because each user was looking at different data.  Turning off the cache caused individual users to take a big performance hit when reloading the same report twice or making minor adjustments to the options, but we just couldn't justify the memory usage for that small percentage.

I decided the solution was a multi-level cache, where objects expired to lower levels, like from memory to high-speed disk, to slower disk, to db (really, I only want the memory and disk levels, but there's no need to limit it to that).  Unfortunately, there is no mechanism for injecting new behavior into the System.Web.Caching classes to accomplish that, which is a shame because they have already implemented the expiration and dependency code that would be the most complex part.

So, I'm faced with the possibility of creating my own caching framework, or tricking the System.Web.Caching classes to do my bidding using the existing mechanisms like dependencies (which is a possibility).

On another note, I implemented file-based ViewState quite successfully.  It was much more simple and straightforward to address issues like a user with multiple windows than any article led me to believe.  In doing so, I noticed some VERY annoying things about that ViewState persistence mechanism.  The normal behavior uses the LosFormatter to serialize the ViewState to base64 to be put inline with the html.  This is fine for storing ViewState inline, but if I'm serializing to files, I'd rather have the speed and efficiency of the BinaryFormatter.  The problem is that LosFormatter is special and doesn't play by the same rules as the other formatters in the framework (BinaryFormatter, etc).  Most of the built-in controls use Pair and Triplet to store their data in ViewState, but they aren't marked with SerializableAttribute which means that BinaryFormatter can't serialize them!  So I had to continue to use the LosFormatter, which bloats data horrendously.  I hope some of this is cleaned up for ASP.net 2.0.

posted on Wednesday, June 23, 2004 9:02:47 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]
 Monday, June 21, 2004

OK, I suppose it's time to jump on the bandwagon. I've avoided publicly giving out Gmail invitations for a while, but I've given out about 10 of them and they keep giving me more.  I've run out of people I think would be interested in them.  If you would like one, leave a comment with your email address and I'll see about getting you one.  If you're using Hotmail or Yahoo, I'd highly recommend it as a much better alternative (having used them both at one time or another).  I'd also recommend it if you use multiple computers and don't have a way to keep your email synced up.

If you're gonna leave your email in a comment, you probably ought to obfuscate your email address to avoid spam.  I suggest doing things like spelling it out (bob at bob dot com) or something that requires a bit of human intervention to figure it out.  I do get alot of crawler traffic.

posted on Monday, June 21, 2004 8:53:18 AM (Pacific Standard Time, UTC-08:00)  #    Comments [4]
 Friday, June 18, 2004

I mentioned rafting in my last post. After calling to confirm my reservations, I was informed the Guadalupe river was running at 5000 cfs (cubic feet per second) with all the rain we've had and no one is renting out rafts.  I've been on the river at about 2000, which was pretty insane.  I've been on it as low as ~200, which was ridiculously slow.  In my opinion, optimum conditions for rafting are around 800-1200.

So, no rafting, and it looks like I won't be in such a hurry to get my hair cut.  Hopefully, the levels are a sign of plenty of water, so we'll be able to go later in the summer without it being too low.

posted on Friday, June 18, 2004 9:39:22 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]

Been too long.  I apologize.

I've needed a haircut for weeks now. Ever since college I've cut my own hair. I also used to cut Peter's hair (even when it was green) until he decided to grow dreadlocks. Anyway, since I cut my own, I really have to be in the right mood to cut it. I don't have the motivation of an impending appointment to push me. We're rafting down the Guadalupe river this weekend (wow, that's tomorrow), so I need it done by then. I'm also going to Dave's tonight to play James Bond on his GameCube, so I have to do it right after work.

I asked Becky to help me make sure to remember to do it right when I get home.  Ever since then, I've started seeing reminders everywhere.  She has one taped to the wall in the bathroom (which is usually the first place I go after sitting in rush hour traffic), and I just opened up my lunch to find a reminder in with my lunch.  It's pretty hilarious, it's written on some stationary with a big fat cat, and she drew it in a cartoon voice bubble so it looks like the cat is saying it.  Hey, I've got a camera phone.  I'll just put it up here!

Here you go, enjoy.

[Updated (6/24/2004): links changed from RSS to blog main pages, sorry]

posted on Friday, June 18, 2004 9:08:33 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]