Yearly Archives: 2007

Eat, drink, and be merry

Last night, I got back from a nice vacation to Europe.  Had I not donated my camera to Germany, I would post some pictures, but what can ya do…

I spent the first 4 days in Varna, Bulgaria.  Actually, it was Golden Sands which is a small town outside of Varna.  It’s located on the Black Sea and has become quite a nice European resort town in the last few years.   I stayed in a nice hotel along the sea and can definitely see myself going there again.  Unfortunately, it was out of season by about two weeks, so next time I’ll probably go in July or August.  As far as I know, I was the only American in Golden Sands.  It seemed that Germans tend to holiday there the most.  As far as the food goes, it was pretty amazing in my opinion.  They serve a lot of fire roasted meats (pork, chicken, etc) and use earthenware to keep the meals nice and toasty.

After Golden Sands, I took a short one hour flight to Sofia.  Sofia is Bulgaria’s capital and is a nice sized city.   After checking into my room and taking a short nap, I was ready to just hang out in my room with my book.  I headed down to the hotel restaurant for a pretty tasty dinner and afterward went to the hotel bar for a drink.  While I was there, I was overheard talking with the bartender a little by a guy from the States.  Turns out that he is a director who was in town doing a feature film for the sci-fi channel.  I have to admit that it was pretty nice to speak English with someone and we ended up hanging out that night.  So instead of chilling out in my room, I ended up going out till 4am.  The next night, I had a traditional Bulgarian meal and followed it up by going out to different bars & clubs…  yet another late night, this time I got home around 6am.

A short rest later, and I found myself on a 2 hour flight to Munich.   I got into the hotel after a quick detour to a small town outside of Munich (a bit of a miscommunication between the cabby and myself) and shortly met with Kevin and Jason.  Little did I know that they were coming from a stadium where they had purchased 3 tickets to a game that night.  So, I had just enough time to put some shorts on before heading out to the Allianz Arena for a soccer match (between 1860 and FC St Pauli).  The game was awesome… the energy level at soccer games far exceeds what I’ve experienced at football and baseball combined.  Later that night, we went to Hofbrau House for a couple beers and some excellent food.  We got to the grounds around 8am on Saturday, but weren’t prepared for how busy it was going to be.  After watching the opening day Oktoberfest parade, we got into the Hippodrome tent.  Note to self… it’s considered an insult to try to pay a guard to get in.  We hung out in the Hippo for around an hour and even ran into the old servers that we met the last time.  But they were unable to help us find a seat for all 5 of us (Phil, Whitney, Kevin, Fox and myself).  So, we all left the grounds and headed to the  Viktualienmarkt beer garden.  The Viktualienmarkt beer garden serves beer from all 6 of Munich’s largest breweries, whereas other beer gardens only serve one type of beer.  Unfortunately, the night’s festivities resulted in me losing my camera… For the last day, we got up early again and headed to the Hacker Pschorr tent.  We easily got into it without a bracelet, and shared a nice table with some Germans.  Phil and I ended up being the last people to hang out, and decided to ride a coaster before leaving the grounds around midnight. 

Anyway… that’s the gist of the trip.  I was pretty wrecked from Oktoberfest, and am just feeling better today.   

Welcome Cayden

Around 6:12pm on August 14th, Cayden William Geurts was born and I became an uncle.  I’m looking forward to watching the changes as he grows and helping him with anything he needs along the way.  I took some pictures with my new camera when I was over there.  I got a Canon SD850 IS and couldn’t be happier with the small camera.  I wanted something that was small enough for me to take anywhere, and the picture quality seems pretty good.

Anyway, have a look at some of the pictures that I took while visiting Cayden, Bill, and Kari

Cayden GeurtsCayden Geurts 

My fix for “Validation of viewstate MAC failed” error in IE

Once again, I have cursed the IE team repeatedly… I am ashamed to work on web applications knowing that I have to support such a pile of shit. 

Ranting aside, I ran into an IE only issue with asp.net.  Specifically, I was getting “Validation of viewstate MAC failed” that has randomly plagued developers for years.  My issue arose for a page that has an asp.net gridview and some other controls that do an autopostback.  My page would completely load, but whenever I posted back (form submits worked, however), the app would crash in IE.  Searching the internet didn’t really yield much information and all the “solutions” didn’t fix my problem.  Well, it turns out that I had a nested form within my asp.net form (the main one with runat=”server”).  Removing the nested form fixed the issue.  I’d suggest that if you’re running into the same error, examine your markup, as firefox tends to be more lenient.

Caching for SubSonic

I’ve had some time recently to get more comfortable with SubSonic and I’m really enjoying using it.  When they add support for joins, it should rock…  and hopefully they find a way to have it co-exist and complement linq when that is released.  One thing that SubSonic seems to lack is support for caching objects.  I looked around the web, but couldn’t find a helper class/method that did what I wanted, so I whipped one up that you can use as a starting point if you’re looking for some way to cache your objects:

using System.Web;

using SubSonic;

 

namespace Util

{

    public class CacheUtil

    {

        public static ListType FetchAll<T, ListType>()

            where T : AbstractRecord<T>, new()

            where ListType : AbstractList<T, ListType>, new()

        {

            string key = typeof(T).ToString();

            object item = HttpContext.Current.Cache[key];
 

            if (item == null)

            {

                ListType collection = new ListType();

                collection.LoadAndCloseReader(AbstractRecord<T>.FetchAll());

 

                HttpContext.Current.Cache.Insert(key, collection);

                return collection;

            }

            return (ListType)item;

        }

 

        public static void ClearCache<T>()

        {

            string key = typeof(T).ToString();

            if (HttpContext.Current.Cache[key] != null)

            {

                HttpContext.Current.Cache.Remove(key);

            }

        }

    }

}

Mean Fiddler – REST services for nHibernate

I came across the Mean Fiddler project lately, and will definitely take a look at the source when I free up.  It is a replication of Microsoft’s Astoria project, but it uses nHibernate.  The new version supports XML, JSON, and HTML formatting, all http verbs (GET, PUT, POST, DELETE), and much more…

I’ve been hard at work on a pretty significant update to Property Center and haven’t really felt that I could blog about it.  The update will be released in a few weeks and I’ll continue to blog on a more normal basis again.

Upgrade to Windows XP

Well, now I’ve gone and done it… I formatted my laptop last night in order to revert back to Windows XP.  Vista was just running like a pile and really didn’t give me any added joy or features.  The laptop hasn’t run better (except possibly with my Ubuntu install) and I couldn’t be happier with this setup.  Everything feels a little snappier now.  Perhaps Vista is neat and performs well with a top of the line dual core system, but for my entry level laptop, it just wasn’t practical. 

Protoculous

I just became aware of Protoculous, a compressed version of Prototype and Script.aculo.us.  It works the same as the uncompressed version, but reduces the size of both from 215k to 131k.  Using gzip compression seems to bring it down to around 32k.  It’s currently in my development branch and I plan on using it with the next major update for Property Center.  If you’re using Prototype but not Script.aculo.us, I’d suggest having a look at Protoculous anyway.  He includes a compressed version of just Prototype that reduces the size from 96k to 59k.  Gzip compression continues to reduce that to around 16k.
 

Firefox and XML Parsing Error: no element found

I was receiving the following error with only Firefox: XML Parsing Error: no element found.  Basically, I was trying to visit a page that has no content, with Ajax.Request.  The requested page performs a passive operation on the server, using just query string parameters, and it is not meant to return content.  Since my doc type is xhtml, Firefox thinks that the document is an xml document and throws an error because it contains no data.  So, as a quick fix, I just added this as the content of the page.

<html xmlns=”http://www.w3.org/1999/xhtml”>

    <head><title></title></head>

    <body></body>

</html>

 

That fixes things, and since I don’t expect a return value, it’s ignored by my app.  Hope it helps someone tracking down the same issue.

First impression of Windows Live gadgets…

In the tradition of giving our users choices, I was going to add Property Center gadgets for Microsoft Live.  

As always, MS takes the course of the c/c++ developer.  Their gadget api is needlessly complex, imo.  Whereas Google allows a nice mix of html and javascript, Microsoft gadgets are pure javascript.  Not only that, they require that you implement methods such as Dispose and initialize… those should be abstracted away and automatically handled by the widget framework, imo.  Basically they require knowledge of the atlas framework when writing gadgets…

Next… settings/preferences… Google provides a nice easy way of allowing users
to change settings.  The end user experience is consistent across all gadgets and dead simple to implement as a developer.  This is sort of the time that I decided to scrap Property Center Live.com gadgets for the time being.

Another thing that bugs me is that there is no way to view the source of existing gadgets.  I personally think that’s a major mistake, since the majority of people create their gadgets by using someone else’s as a starting point.  Perhaps they do this, though, so that people don’t see how complex creating a gadget for live.com is.

Honestly, how do they expect mass gadget/widget production like Google
and Yahoo have seen, when creating a gadget is such a pain in the ass?

So for right now. I’m going to hold off on Live.com widgets.  When they update their framework to support basic widget requirements, I’ll take another look.  See you in a year or two live.com.