In Valid Logic

Endlessly expanding technology

Archive for August, 2006

Vista ready for desktop use?

with 4 comments

With the August CTP of Vista now released and on MSDN, anyone have any feedback on whether it is actually ready for use?  I know Dan has been using it on his laptop and had some assorted issues, though curious if I should give it a shot on my desktop.  I know there is no upgrade path to future versions, so that is kind of a deterant.  Though I do use Acronis TrueImage, so I could easily switch back to another drive image with XP.

I’ve been using the July CTP on my Media Center PC, and it has been running pretty smooth.  Few hiccups here and there, but nothing too major.  Don’t want to mess with it though, since new seasons are starting next week, and I don’t want to miss them.

Or, perhaps I should hold off until they get the driver situation figured out… don’t believe I saw any drivers for my RAID card, and remember issues with my integrated sound card.  Then again, I think the main issue was I was trying it out on a x64 system before.

Written by krobertson

August 31st, 2006 at 5:55 pm

Posted in Archive

Clean Sources Plus

with 2 comments

Scott "The Tool Man" Hanselman just posted his 2006 Ultimate Developer/Power Users Tool List.  One of the ones on the list that I have been falling in love with that is incredibly simple is the Clean Sources utility.  Scott's list points to Omar Shahine's original Clean Sources tool, but I've actually been loving Clean Sources Plus by Jeff Atwood.

The main advantage to Jeff Atwood's utility is that you can specify additional regex patterns for files/directories that should be deleted.  So in my case, when I have it clean source, I want it to also removed the ReSharper cache directories and all of the backup directories from the SourceGear Vault client.  So in the program's CleanSourcesPlus.exe.config, I exnteded its "DirectoryDeletionPattern to the following:

<add key="DirectoryDeletionPattern" value="^bin$|^obj$|^Debug$|^Release$|^_ReSharper.|^_sgbak$" />

This will have it delete any directory named _ReSharper.* and any directory named _sgbak.  Excellent utility.  Absolutely love it.

 

Written by krobertson

August 29th, 2006 at 2:29 pm

Posted in Archive

Passing on CodeRush, keeping ReSharper

with one comment

After reading some of the reviews on CodeRush, and finally getting around to seeing Scott Hanselman’s Developer Productivity Tools 4 video, I decided to finally give CodeRush a try.

On the surface and in the videos, it looks really cool.  It has a great collection of templates and its visual indicators are great.  I love how it visualizes breaks/returns, how it helps visualize different code blocks, and everything about it is excellent.  I could totally see myself leveraging and enjoying all that it has to offer.

The problem though, is that it lacks a number of features from ReSharper that I have come to depend on.  Right after I opened a project and was trying CodeRush, I was messing around with code and changed the name of a variable on a line.  I paused for a second, expecting the name to turn red because it didn’t exist, but it didn’t.  I added some code and realized I was missing a using, and it didn’t prompt me.  I then manually used ‘us<space>’ and ‘usx<space>’ to add some using clauses, and it didn’t tell me when I had some references I didn’t need.  Right away, I missing something.  While CodeRush is a strong templating engine, it lacks what I love so much about ReSharper… its live evaluation of the code and syntax highlighting.  I love being aware of errors before I go to compile.  I love its side bar indicating where all of the errors and warnings are in the current document.  I love its navigation features, being able to quickly find all references to a method/property/variable.  Some of them are features that are in Visual Studio without ReSharper, but ReSharper simply makes them better.

I suppose I thought I’d enjoy CodeRush because it looked new and exciting, and since I’ve been using ReSharper for 2 years already, I had become so used to it that the line of what features were ReSharper and which were Visual Studio had been blurred.  I’d right click to look for “Find Usages Advanced” and say to myself, “Ohh yeah, that was a part of ReSharper”.

If I had found CodeRush before ReSharper, I would have loved it and probably come to depend on it as much as I have with ReSharper.  However, I’ve instead become dependent upon ReSharper.  If in a future version, they add some of the things like live code analysis, then I will definitely give it another try, though for now, my first love is still ReSharper.

Written by krobertson

August 18th, 2006 at 9:40 am

Posted in Archive

Forbes Best States For Business

without comments

Just saw this while killing some tonight… Forbes came out with its Best States For Business (the list).  Interestingly, California is way down at #36 (or the 15th worst state).  However, Texas is all the way at #2.

Written by krobertson

August 18th, 2006 at 12:15 am

Posted in Archive

Implementing newMediaObject in CS’s MetaWeblog API

with 9 comments

Quite a while ago, I’d made a reference that I’d written an extension to Community Server’s MetaWeblog API to enable the use of the newMediaObject function, but to my recent realization, I never released the code for it!

With the recent release of Windows Live Writer by Microsoft, I’ve gotten a couple requests for this module and I could have sworn I had packaged it up and posted it, though haven’t been able to find it… so I guess I never did!

Anyway, for all you who are looking for it, I will be posting it either tomorrow or Friday. I’ve gone through and made a couple of updates to it and will be retesting it before releasing it. Main change is that before, it put the files in the File Gallery, though I figured that could quickly get used up by sites using the Express version of Community Server, so instead, it will simply write it to the filesystem. Figure might as well keep it simple. It’ll also support creating individual folders for each blog so that a site using it with multiple users won’t run into naming conflicts on the filenames.

Written by krobertson

August 16th, 2006 at 10:50 pm

Posted in Archive

Improved Lightbox2 JS for Community Server

with 6 comments

Qgyen.Lightbox v2.0.60809

A while ago, I'd released my Lightbox2 JS module for Community Server.  One of the difficulties people have in using though is that it requires you to either set of disable this cache location, but it uses a custom configuration section in the web.config.  The problem with this is that custom configuration sections are not allowed under a stock medium trust configuration, which you'll find on most webhosts.  While updating Scott's Flickr for Community Server module to be compatible with my module, I noticed that he coded it to use a <Flickr /> section in the communityserver.org to set those values, bypassing the need for the web.config configuration section.  So, I've updated the Flickr Lightbox module to support reading the cache configuration values from the same location.

Download here

If you are on a web host, I'd recommend using the communityserver.config to configure the module.  At the bare minimum, I'd recommend adding this piece inside the root element:

    <Flickr disableCache="true" /> 

This will disable the FlickrNet module from caching any data and causing any errors.  If you do want it to be able to cache, you could set the location for it using this inside the root CommunityServer element:

    <Flickr disableCache="false" cacheLocation="e:\path\to\folder" />

Written by krobertson

August 9th, 2006 at 6:35 pm

Posted in Archive

Scott’s Flickr for Community Server (Updated)

with 4 comments

Scott had previously released an add-on for Community Server that added a browseable list of images from a user's Flickr account.  As some people had noted though, it was incompatible with my Flickr Lightbox module because they used different versions of the FlickrNet library.

I'd downloaded Scott's code for his module and took the liberty of updating it to use the latest build of FlickrNet, so that users can now make use of both modules side-by-side.  Since Scott is going to be out of town on vacation, he'd said he wouldn't mind if I went ahead and released, and so without further ado, please feel free to download it below.

Download it now!

Written by krobertson

August 9th, 2006 at 6:21 pm

Posted in Archive

RTM time for Community Server 2.1

without comments

As the whole team is reporting it, Community Server 2.1 has been officially released!

Read the official announcement

If you haven’t already tried out 2.1, beyond our usually truck loads of fixes/improvements, here is a little taste of what is new in this release:

Improvements to existing Features

  • New blogs skins – some professionally design blog skins to help make your blog stand-out.
  • Improved Editor – simple to use WYSIWYG editor.
  • Improved blog authoring experience – simplified workflow for creating, editing, and saving posts.
  • Improved comment editing/management tools for blogs – designed to help you edit and manage a large number of comments quickly.
  • Better SPAM Protection – changes to the built-in spam rules to more effectively deal with spam.
  • New reports – new reports for a variety of statistics maintained by the Community Server database.
  • Per-post answer status – allows users to track answer status on a per-post level for forum posts.
  • Better fixed-width support – design changes to enable better support for fixed width sites.

New Features

  • Tags – ability to add free form tags to content and then use tag clouds and other tools to filter content.
  • Content Mirroring – ability to configure a blog to be subscribed to one or more external RSS sources bringing that content into the site for visitors and making the content searchable.
  • Post Relevance sorting – allows site owners to use new post relevance algorithm (optional) for blog aggregation page. This feature allows popular content to stay “above the fold” longer.
  • Invitations – ability to configure site so that only invited users can join the community.
  • Badges – members of the site each receive a community badge that can easily be displayed in a variety of locations, such as external blogs.
  • Feedburner / external RSS support – easily use tools, such as Feedburner, for sharing your RSS feeds on blogs.
  • Runs in Medium Trust – better support for hosting organizations that want to run ASP.NET applications in a reduced trust level.

We are also going to include the source code for both the File Gallery and the Reader in the SDK with the CS 2.1 release as well.

Also, to celebrate the release, Rob also announced a limited time sale on all licenses:

To help celebrate this release all commercial Editions and add-ons for Community Server (sold by Telligent) will be available starting August 10th at a 20% discount (for a limited time). Of course you can use the 100% free Express Edition too — visit www.communityserver.org to learn more.

So go get it already! Download details!

Written by krobertson

August 9th, 2006 at 4:53 pm

Posted in Archive

Deployments made easy

with one comment

One thing I’ve been after for a while is a nice and easy way to roll out new builds of Community Server to my website. Though my site isn’t 100% stock. I don’t employ any custom code changes to the core libraries. All of my customizations are leveraged through external libraries and adjustments to the configuration and skins.

I like keeping my site up to date, so I wanted to find an easy way to apply the necessary changes as painlessly as possible.

My first way was to create a small console application in .Net that copies the files/folders and opens the XML configuration files and makes the changes/adds the new pieces. The problem with this way was when I wanted to make changes to the modifications it made. Did I copy the new binary over? Did I remember to update the version? Did I build it in Debug or Release? So the problem became that while it made the necessary changes, it wasn’t as easy to change what it did. If while deploying a new build, I remembered I needed to have it copy a new file, it wasn’t necessarily a simply 30 second change.

Then recently, I saw Scott Hanselman’s video #3 on developer productivity tools featuring PowerShell. I was immediately impressed with how you can interact with XML files in an almost object-oriented manner. I thought perhaps I could write a small PowerShell script to handle the deployment and changes. Though after trying it out, I realized that it was easy to change existing elements, but not quite as easy to add new elements (maybe it would be if we had a true schema, but we don’t).

I recently got a license to Beyond Compare and had been checking it out. It dawned on me that perhaps I could utilize beyond compare to generate a CVS or unix diff style patch file. Unfortunately, Beyond Compare doesn’t seem to support generating patches. However after some searching, I found the UnxUtils project which is to port a number of unix utilities to Windows. In includes ports of the diff and patch utilities. And with this, I was on my way to an easy deployment that is flexible to alterations…

First, I needed to create a series of patch files for all the files I needed modified. For this, you use the diff command to create a file detailing the changes. Two important things to note when using it is that we want the context, or some of the lines around it included to help it locate where the change is. Also, we want it to ignore whitespace. The reason is that between builds, the spacing and line numbers can very easily change, causing it to then patch wrong. But if I have it include the 2 lines above and below, it would be less prone to patch incorrectly and more likely to fail, which will let me know to take a quick look at it.

diff -c -w orig\communityserver.config mine\communityserver.config > communityserver.patch
diff -c -w orig\siteurls.config mine\siteurls.config > siteurls.patch
diff -c -w orig\web.config mine\web.config > web.patch

This will generate all the necessary patch files that I’ll need. These are the main files I need changes to and cover some simple things like adding some CSModules and disable database storage in the communityserver.config, updating my connection string, and adding the ExtendedUrlMapper settings to the SiteUrls.config.

After that, I just need to have my filesystem arranged. My live site is always in the ‘wwwroot’ directory, while the new build is always put into a Web.rar file that gets extracted to a ‘web’ folder. And then alongside that, I have a ‘patch’ folder which stores all my patch files. The changes themselves are scripted out in a ‘update.bat’ file at the root of all of this.

/wwwroot    = Live site
/web        = New site, extracted from an archive
/patches    = Stores all the patch files
/update.bat = Batch file containing all the commands to run

Once you have all of that laid out, all you need to do is create the batch file itself. It is essentially going to perform two tasks… copy the files/directories you need, and apply the patches to the config files.

rem root
copy wwwroot\robots.txt web\

rem bin
copy wwwroot\bin\FlickrNet.dll web\bin\
copy wwwroot\bin\Qgyen.ExtendedUrlMapping.dll web\bin\
copy wwwroot\bin\Qgyen.Lightbox.dll web\bin\

rem utility
xcopy /e /y /r wwwroot\utility\lightbox web\utility\lightbox

rem patch config files
patches\patch.exe -l web\communityserver.config patches\communityserver.patch
patches\patch.exe -l web\siteurls.config patches\siteurls.patch
patches\patch.exe -l web\web.config patches\web.patch

You can simply use the copy command to copy individual files, and use the xcopy command to copy entire directories. It copies some of the files from my ‘wwwroot’ directory of my old build to the ‘web’ directory containing the new build. After that, it will use patch to apply the patches in the ‘patches’ directory to the files in the ‘web’ directory. Also specify the -l option for it to ignore whitespace as well.

Now, once you have batch file and have run it, all you need to do is move the files into the wwwroot directory. This could be added to the batch file as well, though I prefer to manually flip the switch and give a quick glance at the files to make sure they all succeeded. Then I usually archive the ‘wwwroot’ folder, delete its contents, and then move the contents into it from the ‘web’ folder.

This process is mostly useful if you have your own server or access to the console, though it could be useful even when a webhost. It is always a good idea to keep a local mirror of what is on your webhost, so you could always run the batch file on the files locally, and then copy them to your webhost. It would still eliminate, or at least easy, the changes needed.

Written by krobertson

August 8th, 2006 at 5:00 pm

Posted in Archive

Qgyen.AllCommentRss for CS v2.1 RC1

with 6 comments

Qgyen.AllCommentRss v1.0.60804

Jose had previously mentioned the Community Server Code Contest II on his blog, and after talking to ScottW, he said it was ok for me to post my contest entry.

My contest entry was a secure RSS feed of all of the comments within a certain blog, no matter which post the comment is too. It also provides information like if it is an actual comment or a trackback, the post's name, URL, if it is approved, and then it gives quick links to approve/disapprove, view, or delete the comment.

I've been using the module on my own site for a while now and love it. The point is that I don't use the email notifications in CS regularly (it doesn't go to my telligent box, and I don't like non-work stuff there a whole lot), but I do use my RSS reader throughout the day, so I would easily notice new posts there. I can also quickly view the comments and delete the spam.

Download (Requires on Community Server v2.1 RC1 and newer)

The download includes the source, as well as instructions on how to do a quick xcopy install of it. One you enable Secure Syndication on your site, the "RSS Available" button with a picture of a lock will show up on the Review Comments page in the Control Panel, which is a link to the RSS feed.

Written by krobertson

August 4th, 2006 at 2:55 pm

Posted in Archive