Saturday, October 17, 2009

Problems with CSS and themes when using ASP.NET Forms Authentication

A while back, I wrote a blog post about how turning on Forms Authentication caused problems with stylesheets and Themes.  A lot of people found this post useful but had trouble finding it.  One reader suggested I change the title to get more hits.  So, I did, and this is it. 

Monday, July 27, 2009

ReSharper for Visual Studio 2010

rs I don’t know how I missed this for so long, but JetBrains have released a preview of ReSharper for Visual Studio 2010! They say this version is neither 4.5.1 nor 5.0, but a preview build with some of the new 5.0 features enabled.

Looking at the nightly builds, it seems that the first release was 9th July, but there was no news on their blog, which I’ve been checking daily since June (when they said it’d be ready).

Anyway, now I can give Visual Studio 2010 another try.  I just couldn’t use it, not even for evaluation, without ReSharper!

Also, let’s not forget that version 4.5.1 for Visual Studio 2005 and 2008 is also now available.

Thursday, June 04, 2009

Google Squared and sexy languages!

Google Squared looks like an interesting tool. 

“Google Squared is a search tool that helps you quickly build a collection of facts from the Web for any topic you specify.

  • Facts about your topic are organized as a table of items and attributes (we call them "Squares" for fun).
  • Customize these Squares to see just the items and attributes you're interested in.
  • See the websites that served as sources for the information in your Square.
  • Save and share Squares with others.”

 mk

There’s some interesting results.  I searched for ‘programming languages’

It displays a list of languages, a picture of the language, a description, and what it was influenced by.

I was very surprised to see the Miranda language (apparently influenced by Haskell).  Try it yourself:  scroll down to Miranda.  I must take a closer look at this one!

limbo Another one that might get you excited is Limbo.  Scroll down and take a look (but be careful if you’re at work!!). Apparently influenced from Stackless Python.  I’d say more like alcohol!

Monday, May 25, 2009

Updated: Tree Trim

Tree Trim is a command line tool that trims your source code tree.  It removes debug files, source control bindings, and temporary files.

It’s integrated with Windows Explorer: when you right click a folder you’re given the option to clean the folder.

Massive thanks to Scott Hanselman for blogging about it and for providing some great and detailed feedback.

If you’re interested in doing your own Tree Trim plugin, there’s now a Wiki page to take you through the process.  If you’d like to contribute your plugin or fix any issues, then take a look at this page.

Friday, May 15, 2009

Updated: Code Formatter Plugin for Windows Live Writer

Version 2.0.0.2 of the Code Formatter Plugin can be downloaded here.  This has a fix for when the plugin tried to load configuration from the wrong location on disk.

Monday, April 13, 2009

New tool: TreeTrim

hammer I've recently been working on a tool based on Jeff Atwoods Clean Sources Plus

It's called TreeTrim.  It's a tool that strips out debug files and folders in your source code tree and also zips and emails amongst other things.

One of the BIG requests for CleanSourcePlus (well, amongst the 5 people in the comments section of the tool's page!) is for the tool to make a working copy of your source before it deletes and zips.  TreeTrim does this.

It's plug-in based, so if it doesn't do something that you want, you can write your own plug-in, plonk it in the directory, and have the tool run it alongside the other plugins.

The installer and source code is available for download at http://code.google.com/p/treetrim/

Friday, March 13, 2009

ReSharper 4.5 Beta

Nice

Thursday, March 12, 2009

Update to the Code Formatter Plugin

Version 2.0.0.1 of the Code Formatter Plugin is now available.

New in this version:

  1. Enhanced support for Syntax Highlighter 2x
    You can now specify things such as tab size, show ruler, collapseshow toolbar, show line numbers, starting line number, and highlighting specific line numbers
    image
  2. Configuration screens for the different providers
    image
    You can now add and remove languages and generally configure each provider.  You can also edit the files manually – they are called SyntaxHightlighter2xConfiguration.xml and ActiProConfiguration.xml.  They are located in the Plugins folder.
  3. Preview window for Syntax Highlighter formatted code.
    image 
    This was added because the Preview tab in Windows Live Writer doesn’t include the scripts and styles used in your blog engine’s templates and hence previewing Syntax Highlighted code means it looks plain.  Click the Show Preview button to see this window.

Code Formatter Plugin home-page
Direct download link

Friday, March 06, 2009

IDisposable alerts

Types that implement IDisposable usually do so for a reason.  They probably consume resources that should be released as early as possible.

In a recent project, I came across a very neat idea.  In the destructor/finalizer/finaliser of your IDisposable type, do something to alert the consumer that you’re being collected by the Garbage Collector and hence you haven’t been disposed of correctly.

But how does this type know it’s not been disposed correctly?  Well, if you follow the IDisposable pattern to the letter (described in the excellent book Effective C# (Item 18), and about 3,000 places around t’internet), in your Dispose method, you’ll call GC.SupressFinalize(this);  meaning the Garbage Collector won’t call your finalizer.  So if you ever end up in the finalizer, the naughty user hasn’t called Dispose or hasn’t put the construction of your type in a using block.

There’s two bits to this

The constructor:

public MyResourceHungryType( )
{
  _stackTrace = new StackTrace( ) ;
}

The finalizer:
~MyResourceHungryType( )
{
  Debug.WriteLine( _stackTrace.ToString( ) ) ;
}

Then, if the finalizer is ever called, you’ll get a call stack printed up to the point where you created this type – something like:
at Namespace.MyResourceHungryType..ctor()
   at Namespace.MyType.DoSomething()
   at SomeNamespace.SomeMethod()

Handy.

New version of the Code Formatter Plugin

Version 2.0 of the Code Formatter Plugin for Windows Live Writer is now available.

New in this version is the ability to use different formatting engines – in this version: ActiPro and SyntaxHighlighter 2.0

Also new is the ability to output either formatted code as text or as a bitmap.

A massive thank you to ActiPro for donating the ActiPro Syntax Editor component – the best code editor available!

If you’re reading this in an aggregator, the following code snippets may look unformatted (apart from the bitmap), but if you’re not, then it should be all nicely formatted.

Here’s some output from ActiPro as text:

public int TabWidth
{
  get
  {
      return _content.GetInt(@"TabWidth", 4);
  }
  set
  {
      _content.SetInt(@"TabWidth", value);
  }
}

Here it is again as a bitmap:

image

and here it is using SyntaxHighlighter 2.0

public int TabWidth
{
  get
  {
      return _content.GetInt(@"TabWidth", 4);
  }
  set
  {
      _content.SetInt(@"TabWidth", value);
  }
}

Please feel free to read more and download it.