How to write confusing angular - Changing the default angular delimiter.

I just spent a wasted hour trying to figure out why an angular app written by one of my employers contracts was behaving so strangely. Apparently in angular you can override the default {{}} delimiter like so:

var myApp = angular.module('myApp', [], function($interpolateProvider) {
    $interpolateProvider.startSymbol('[[');
    $interpolateProvider.endSymbol(']]');
});
You would now define a template{{ var }} as [[ var ]]

Check the documentation on the $interpolate service here: http://docs.angularjs.org/api/ng.$interpolate
I really can't think of a reason why you would want to do this offhand - unless you are trying to be a troll Javascript hipster!

Great trap for young players.

WCFExtras XML comment doesn't work?

WCFExtra's is an awesome addition to any WCF project which enables you to include your code comments as documentation in the generated wsdl.

The documentation is pretty ordinary though. To make the XMLComments work first we need to follow the instructions here: https://wcfextrasplus.codeplex.com/wikipage?title=XML%20Comments&referringTitle=Documentation

Next, you need to enable XML document generation in your WCF project properties as follows: 
  1. Right click on your project and select properties
  2. Go to the build tab
  3. Tick XML documentation file. Leave the generated filename as is.

Repeat this process for any other references projects that are used in your service contract.

Now we should see wsdl:documentation tag appeared in our WSDL

How to ignore non-trival differences in files with Beyond Compare

If you want to ignore something that can't be handled by a replacements because the to-state isn't easily defined such as mismatching page numbers you need to use a regular expression grammer to ignore certain strings.
In my case I needed to ignore Page numbers in a document footer
Here is how to do it:
  1. Load your comparison in Beyond Compare
  2. Click the Rules toolbar button (referee icon).
  3. On the Importance tab, click Edit Grammar.
  4. Click New.
  5. In Text matching enter your regex e.g. "Page\s\d{1,3}\sof\s\d{1,3}"
  6. Tick Regular Expression
  7. Click OK.
  8. Click OK.
  9. Un-check the element in the Grammar elements list to make it unimportant.
  10. Click OK
Your grammar should now be marked as unimportant (blue text)