Frans Bouma's blog

Generator.CreateCoolTool();

Syndication

News




    Add to Technorati Favorites

About me

Fun stuff I created

My work

August 2005 - Posts

CommentStripper: strip out xml comments and/or normal comments from C# code

A customer of ours asked me if there was an option in LLBLGen Pro to not generate XML comments into the generated code. As there isn't such an option, I though it would be cool to write a little command line app to strip out any xml comment and/or normal comment from C# sourcecode. It might sound to you like the most worthless piece of code ever cooked up, I mean: why would you remove comments from your code, right? . There are situations however, where you have to distribute sourcecode to your client, but you don't want your client to have all the comments, so in a way you give the client the feeling they have the sourcecode, but they also will have a hard time reading it.

My attempt to get such a command line app is available here: http://www.xs4all.nl/~perseus/CommentStripper.zip (5KB). It's C# sourcecode, and does basic comment stripping. It's not able to strip out multi-line /* */ comments, I leave that regexp voodoo requiring code to the reader . I tested it on a large pack of code and it's very fast and the code was even compilable afterwards .

Happy strippin'!

Posted Friday, August 19, 2005 11:40 AM by FransBouma | 3 comment(s)

Filed under:

IE7 not Acid test compliant? Why? Not enough programmers, Microsoft?

IE7 apparently won't pass a set of tests defined by the W3C (of which Microsoft is a member). What's the excuse? Not being able to write code which passes the test? If you are not able to implement it, Open Source shows it's a better method, as they are soon able to pass the acid tests.

IMHO this is just Microsoft being annoying on purpose, just for fun. There's a reason for this: the more IE will become standard compliant, the more IE isn't really needed, which means other browsers take over. If that happens, Microsoft can't swap IE with a XAML platform later on, as the alternative, a real browser with AJAX, has a too big marketshare.

Get a life, Microsoft. Implement these standards and give web-developers a browser which is standard compliant. After all, you too agreed on these standards, as member of the W3C. Without standards, web-developers have a hard(er) time to construct proper sites which look good in every browser. Wasn't it so, that developers were so important to you, Microsoft? Aha, I see.

Posted Tuesday, August 02, 2005 9:05 AM by FransBouma | 20 comment(s)

More Posts