IIS7 is GREAT

Ok, so Vista still has performance problems on my beefy laptop. But IIS7 ROCKS. I wish I could have IIS7 on Windows 2003....but Microsoft has some brain fart about it and will require all of us to buy a whole new server. Let me sum it up:

IIS7 allows .NET to intercept and handle ALL requests. (optional) so that you can now secure your jpg files with a web.config and the same ASP.NET authentication that your website uses. (Currently, you have to write an HttpHandler and add tons of configurations for each file type, and read the file from disk to send in the response.)

Not only that, but it also means that ASP.NET HttpModules (or filters) can be installed to process any requests going through the server. This is a good thing...especially for projects like CS-Wiki that need to do URL masaging or returning data from a DB (the URL dosn't specify a physical path).

Why can't IIS be a server that can be upgraded seperately from the OS???? Microsoft, Listen up!

Windows Vista: Day 2

Today I had to disable desktop compositing and switch to Aero Basic theme. My sytem's processor ranks only a 3.2 (althought it says 3.8 after I added 256 megs of flash memory for ReadyBoost). The processor is a PentiumM 1.8 and screamed under XP. But this are very sluggish running Vista, and the Desktop Compositing is a memory hog: Using more than 180 megs of memory. I liked it, but it was just too expensive to run.

People who know me know that I always get a gig of memory....but that's no longer true. Working on CS-Wiki, Visual Studio always seems to need more and more. 1 GB of memory is minimum for running Vista. I strongly suggest 2+ before considering upgrading.

The Sidebar was useful, but used another 80+ megs of memory. So it had to go.

The security popups are annoying, and I'm dealing with them. I think they are bearable. But that's very different from liking it.

The biggest problem I've found so far is that File Type associations are VERY different now under Vista. We used to add our registry keys to HKEY_CLASSES_ROOT, but Vista now allows programs to register as a type handler, and let's the user pick which application they want from a list of registered applications. Unfortunately, this means that Winamp, Media Player Classic, iTunes, and the million other applications out there which rely on file type associations need to be updated to work with Vista. I like the new setup, but it would have been nice for Microsoft to leave things backwards compatible for us for a little longer.

I hate popups, and they don't like that.

Today is day 1 running Windows Vista as my primary OS. I'm really liking IE7. I've been running it for a few months now, and am very happy with it. Firefox 2.0 is good too, Especially with the "IE-Tab" Plug-In that I blogged about a few days ago.

This isn't a feature of IE, but I happened to stop by one of my favorite websites: Gamespot.com and they had the nerve to display a Pop-In (shown as part of the webpage, but hovering over the webpage content) telling me that I had blocked their Pop-up. Hehehe. I love it! The notice reads: "You may be missing special offers or importaint information brought to you by Gamespot and it's affiliates.".... Oh Reeeaaaaally? I didn't know. Excuse me, but isn't that the whole point of pop-up blockers???

I even pay Gamespot money to be a subscriber. The least they can do is knock it off with the pop-ups. (although I do say that it is much better as a paid user....there are a LOT less advertisements) Free content is dead...and annoying content providers are endangered. Don't let your website fall prey to darwin.

I am mocking you.

Mock objects are cool. I've always been a fan of unit tests and TDD, but it's always begged the issue of a stack of functionality. You have to write a new test for each layer of functionality, but in doing so, you typically end up testing all lower level functionality in addition to the single bit that you're trying to test. That's where mock objects come into play. There are a few tools out there that let you swap out lower levels of functionality with proxy objects which, instead of doing things like going to the db and retrieving data, will just return hardcoded/expected data instead. This, of course, makes the assumption that the functionality being mocked is tested elsewhere. This is a great breakthrough. Here are some .NET-based mocking packages:

NMock2: String-based/reflective interfaces. Very nice to use. Cheap and easy, but more difficult to maintain in rapidly-changing environment because of the lack of compiler checking. Free

Rhino.Mocks: Interface-based declaritive testing. Compiler checked, and maintainable, but limited to testing/mocking interfaces or virtual methods. Free

TypeMock: Community/Personal version + commercial version available. Larger, most powerful package. Uses type interception and CLI integration to "swap out" functionality for mocked fuctionality. Lots of features, can test/mock just about anything. $$$

UTF File names solved

Use Windows Server 2003 or better. It works fine. IIS on XP Pro dosn't work worth a dime.

IE7 will automatically send UTF-8 Http GET request. Firefox Url-encodes the extended characters. Does IE6 work? Someone click this link and tell me if it works: http://developer.db4o.com/Sandbox/view.aspx/日本語

IIS and Unicode URLs

I'd really like to support ALL languages out there, but IIS just isn't very nice today. Given that I have a file: 日本語.txt on my IIS folder, why can't I use http://localhost/日本語.txt to make it work? Firefox automatically UrlEncodes the url to look like: http://localhost/%E6%97%A5%E6%9C%AC%E8%AA%9E.txt which at least is half correct. But all my debugging, IIS either gives me http://localhost/default???.aspx or a bunch of garbage extended characters.

Does anyone know how to make this work? I find it very annoying that wikipedia supports URLs like http://ja.wikipedia.org/wiki/日本語, but I can't get IIS to even give me the light of day.

PS: Extended latin characters (like Français or Español) work fine.

IE in FireFox

Here's something for all my FireFox-loving friends and coworkers. https://addons.mozilla.org/firefox/1419/

It's an add-in that adds an "Open in IE" button to your firefox toolbar. Not only that, but it opens it in a tab within firefox!! Hehehe. I love it.


I need a PDF solution

I'm generating some beautiful HTML in this wiki, and it's printable too. But now I need to save them as PDF. Does anyone know a good PDF capture (or HTML-PDF conversion) tool that I can automate? The accuracy of the output should be true to what I see in my browser. Is this possible?

CS-Wiki: Attachments and Code Snippets

First, as I announced last week, attachments are working great. you can use the Topic Set Manage screen to upload new attachments. Then you can either link to them as if they were a topic [[AttachmentName.Ext]] or use the special attachment syntax: [attachment=AttachmentName.Ext]

Second, Code snippets are also working. They're beautiful! After uploading a source code file, you can use [code=SourceCode.Ext]. If you want to upload a ZIP with many files in it, you can use [code=Archive.zip#SourceCode.Ext]. (yes, relative paths are allowed in all of the above) Some supported file formats: .xml, .htm(l), .cs, .vb, .java, .css, js, .vbs, .txt, .config, .aspx, .asmx, .ashx, .ascx (Sorry C++ users). The syntax area has full smart member outlining/collapsing in supported languages too, but only if you use IE.

Don't forget that CS-Wiki now has a new home on GotDotNet. Post your bugs, suggestions, and thanks on the messageboard there.

CS-Wiki: dedicated bug tracker and message board

I opened a workspace over at GotDotNet. This is where I will be posting notices of new releases and new binaries. You can also use the Message Board and Bug Tracker. The project homepage is still hosted by db4o. That's where you can find design documents for upcoming features and test the latest sandbox.

CS-Wiki: Attachments fully implemented

Just posted the latest update to CS-Wiki over in the db4o Community Site. This latest update now includes full support for Attachments, as well as a few bug fixes. I chose to implement attachments as topics named identically to the files you've uploaded. I got this idea from MediaWiki's caption pages. (If you click on an image, you see a page with the image and a description of the image and its history.) This means that not only do you get to upload a topic (via the Topic Set management page) but you also get to click on the attachment (once uploaded) and edit its discription as if it were any other topic.

Future updates will display image attachments, the contents of a text file, and the files within an archive inline in their topic pages.

Topic attachments can be linked to just like any other topic using [[MyFileName.ext]] links. But you can also use special attachment notation [Attachment=MyFileName.ext]. Instead of a link, you'll get a pretty box with the file name, size, download link, and icon (+thumbnail, eventually).

Thoughts on Religion and Culture

I've had these thoughts for a while now, but this will be my first attempt to put them into words. For a long time, I've been comparing Eastern vs Western (and now) Middle-eastern religions and cultural values. One of the things which becomes apparent almost immediately, is the complete lack of religious wars in asian history. It's just never happened. They have millions and millions of people squeezed into China, Japan, and the rest of Asia, but they've never had cause for a religious war. People aren't killing each other because of their religion. Christians and Catholics have been killing each other right up until about 200 years ago. Jews and Muslims are just as guilty. But Buddhists, Shintos, Confucians, Taoists ... none of them are killing each other.

And so I've turned to comparing these two sets of religions to look for commonalities. Unfortunately, I've found quite a few factors which would cause Western religions to appear more aggressive. Think of it this way: In almost all Eastern religions, there is no single god. In fact, some of them don't even have a concept of supreme being. Here in america, we are taught that Monotheism is the signature of a "modern" religion. I don't agree with that at all. But I do believe that almost all monotheistic religions are patriarchies. They are almost always hierarchal, male-dominated, with a single figure-head who is "entitled" to make known "god's will on earth". This may be called a prophet, the Pope, etc. This person may be alive or dead. But it still comes back to ONE MAN. Each of the eastern religions are structured into a male-dominated hierarchy, with power and control feeding into a central religious body. And in every one of them is a central core belief that each religion is the ONE TRUE religion and that all others are unworthy, incorrect, dirty, or sinners.

Now compare all that with Asian religions.... None of them preach the exclusion of any other religion; in fact most Asian religions are completely interoperable with others. You can worship multiple religions at the same time without any conflict of interest or teaching. Until the 1600's, the every person in Japan was both Shinto AND Buddhist. It wasn't until Catholicism was introduced there that they had any conflict over religion. On top of that, very few of the Asian religions have any sort of "Godhead". Buddhism is also called non-theistic. It is a common misconception that Buddhism has many gods, but in fact they are common individuals who have perfected their inner peace and "ascended" from the mortal plane....something any of us could eventually accomplish. There is no hierarchy of priests or bishops. There is no prophet; no holy doctrine of righteousness; no snobbishness; and no power-mongering. Instead, they worship inner peace, social inclusion, friendship and kindness, karma (doing good to others causes good to be done to you), respect for knowledge and elders and contentment. Many Western religions teach some of these values as well, but they either don't operate by them, or they include many others which are counter-productive.

I'm not saying which is right and which is wrong. But it's enough to make you question if it's enough to base our country's future on.