Rants, rambles, news and notes from another geek

.TEXT Code Ships

Scott Watermasysk has finally posted the code for his N-Tiered .TEXT blog engine to a workspace on GDN.

Wow!

Two excellent open source blog engines in less than a month (the other is dasBlog&nbsp_place_holder;of course).

Nice work guys.

&nbsp_place_holder;

I Need a New Digital Camera

My wife and I have been saying this for a while, but now I’m really convinced. With a little bit of photoshop wizardry and camera that knows how to take bracketed exposures, you can make photos that are unbelievable.

I just have to try this out. Thanks to John Lam for pointing out this cool technique.

Anyone want to recommend a camera? I’ve been told to get a Canon PowerShot G3 but it is a bit expensive. John Lam uses a Nikon CoolPix 5700 but it is even more expensive that the G3. Isn’t there something in the $300-$400 range that is good?

FrontPage Still Sucks

I already hear you asking, “Why are you using FrontPage?”

Well, honestly, because SharePoint Portal Server 2003 likes it. Seriously, there are things that you can only do in FP2003. Don’t ask me why. I think it is stupid, but its true.

Now I will say, FP2003 is better than any version I’ve ever tried before. It doesn’t seem to rearrange your formatting. It doesn’t seem to remove your scripts (with one exception noted below). The design mode is pretty good. And it has intellisense for HTML tags. Not bad.

What pissed me off today more than once is that it likes to clean up <%@ Register %> tags when it thinks you don’t need them. I said, “When it thinks you don’t need them.” It thinks wrong.

I see how the developers of FP2003 made this mistake, but since the product is shipping in a few weeks, I’m going to guess that it won’t be fixed. It took me a while to figure out why this was happening, but I think I’ve finally figured it out. I think FP2003 scans the body of your page looking to see if the registered prefix is used anywhere. If it isn’t, it removes the register directive. Otherwise it leaves it alone.

The problem is that it only scans the contents of the <body> tag. In the page I was working on today, I was using it in the <head> section of the page. Every time I used FP2003 to ass a webpart to the page it would remove the register.

Aargh!

I Love dasBlog!

There are a number of things that I really like about dasBlog, but the one that really made me happy today is that it will email you when someone comments on an entry. I’ve been asking for that since I first started using Radio. Now I get it for free.

Thanks again Clemens.

23 C# Code Samples

Dan Fernandez points us to a new post on MSDN:

We recently posted 23 C# Code Samples on MSDN for your development pleasure.&nbsp_place_holder; The samples&nbsp_place_holder;answer some popular questions and&nbsp_place_holder;should “just work”.&nbsp_place_holder;&nbsp_place_holder;Here are just some of the&nbsp_place_holder;topics covered to wet your appetite:&nbsp_place_holder;

  • Custom Attributes
  • Code Access Security
  • Callbacks and Delegates
  • COM+

Thanks Dan. These could be useful to have for training/mentoring purposes.

Outlook Theme

OK. So my last post was a bit negative. I just love what CSS promises and am continually disappointed when I try to do anything cool with it. It is so annoying to use table for complicated layout.

Regardless, I went ahead and redid it with tables. Here is a screenshot of my html prototype. The problem now, as I see it, is going to be making dasBlog work like the prototype works.

What I’d like is to have the reading pane only display one posting. To display an entry in the reading pane, you select it from the list in the middle pane (or something like that). I suppose I’ll need to do some serious digging in the dasBlog code to make this work. Oh well… maybe some day.

I Hate Web Browsers

Just when I thought things were getting better in browser land, I’m pissed off again.

I wanted to create a javascript/css weblog layout that looks like Outlook 2003. It took me about an hour to code it and test it using IE6. Then I decided to test it in Mozilla.

That’s when all hell broke loose. I thought Mozilla and IE6 were pretty darn close in how they render CSS, but apparently I was wrong. Simple things are still complicated by all kinds of stupid browser checking code.

For example, this is the only safe way to get the height of the document:

function getDocumentHeight()  
{  
&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;d = document ? document : 0  
&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;db = d.body ? d.body : 0;  
&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;de = d.documentElement ? d.documentElement : 0;  
&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;winHeight = (de && de.clientHeight) ? de.clientHeight : (db && db.clientHeight) ?   
&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder; db.clientHeight : (window.innerHeight) ? window.innerHeight : 0;  
&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;return winHeight;&nbsp_place_holder;&nbsp_place_holder;&nbsp_place_holder;  
}

You’ve got to be kidding me! Does the W3C DOM standard define this? Honestly I don’t care if I have to use one way (document.body.offsetHeight for IE) or the other way (document.body.clientHeight for Mozilla). I just don’t want to have to play these stupid games anymore.

Once I had solved that problem, I ran into a problem with sizes. I still havent’ solved this one, but it is really pissing me off.

I have a DIV inside of another DIV. The parent DIV is positioned correctly. The child has its position style attribute set to relative. Then from script I set the inner element to be slightly smaller and centered in the parent. According to the style, it is correct. But according to the offsetHeight and offsetWidth property, Mozilla is using something else!

What the hell is going on here? I fucking hate web browsers. Just when you think you can do something cool, you end up spending all your time fighting stupid crap like this.

Compression in IIS6

Donnie Mack reminds me of a post Brad Wilson made a few months ago about how to enable compression in IIS6 on Windows Server 2003. Since I just moved all of my sites onto a new IIS6 machine, I suppose I should turn this stuff on too.

I wonder…

a) Why isn’t it on be default?

b) Why isn’t it easier to setup?

Someone should write a little utility to do this for us…