Decaying Code

Where code comes to die

#SideWaffle – Or why people are cheering every time it’s mentioned

So I discovered SideWaffle at the MVP Summit this year. Every time someone mentioned “SideWaffle” there was a lot of cheering at the simple mention of the name.

I was curious. Or rather, intrigued. Why would someone cheer for a product that much? I haven’t seen anyone cheering for jQuery or StructureMap or Ninject or whatever. It might have been guys working on the tool but I was too curious to just drop the ball. So… Googled it (sorry Microsoft) and ended up on their website.

So what is SideWaffle?

It’s a Visual Studio Extension that contains templates for technology that you might use.

So you want to make an AngularJS project but you don’t know where to start? It’s there. Nancy? It’s there too. Google Chrome Extension? Yep. Knockout Binding? Also.

It’s insane. You absolutely need to download this thing. It will save you time.

Here’s an example.

New NancyFX project.

So I do File –> New Project and I click on C# and look for Nancy:


Then, I click OK, press F5, hit the page with Chrome (Sorry Microsoft) and I get this:


That’s it. Now Nancy is up and running and self-hosted on my machine.

List of supported tech (as of March 27th 2014)

AngularJS, Durandal, Robots.txt, Human.txt, RequireJS, Nancy, Offline Application Cache Manifest (HTML5), KnockoutJS, Jasmine, jQuery Plugin, GruntJS configuration file, and a whole lot more.

Hit for the complete list.


Download. Contribute. And don’t forget to cheer every time you hear SideWaffle.

Community Update 2014-03-26 – Google #oauth #openid endpoints, #sublime, #tdd with Google Spreadsheet, and more

So first of all, Google is retiring some of its OAuth/OpenID endpoints. You NEED to read the first article. It will let you know what is going obsolete and when.

Then we have a video worth watching. Doing TDD with Google Spreadsheet. It’s crazy, it’s insane and obviously… I love it!

Beside that, enjoy the read!

Web Development

Migrating to Google+ Sign-In - Google+ Platform — Google Developers ( – Google is shutting down some OAuth/OpenID endpoints. You should update your apps. Some as soon s April 30th.

Sublime is Sublime 10 | Greg Young's Blog on (

Minified.js – A Tiny Alternative To jQuery (

WebAIM: Accessibility Lipstick on a Usability Pig (

5 Truly Effective CSS Boilerplates and Frameworks (


Avoiding problems with relative and absolute URLs in ASP.NET - Fabrice's weblog (

ASP.NET Web Optimization Framework - CodeProject (

Architecture and Methodology

Using Google Spreadsheet as a simple TDD/BDD environment on Vimeo ( – this is a must watch.

2 Lessons Learned, And 3 Resources For For Learning RabbitMQ On NodeJS (

Windows Azure

Caching on Windows Azure - Azure AppFabric Cache, Azure Cache Service, Managed Cache, Dedicated Cache, In-Role Cache, Co-located Cache, Shared Cache, Azure Role-based Cache - Clarifying the naming confusion (

Storage (SQL, NoSQL, etc.)

Differences in Map/Reduce between RavenDB & MongoDB - Ayende @ Rahien (

Search Engine (Solr, ElasticSearch, etc.)

How we use Elasticsearch to enhance our web products | Browser ( This Week In Elasticsearch | Blog | Elasticsearch (

Community Update 2014-03-25 – #webdev, #aspnet, #windowsazure, #nuget packages of the week

Here are the links for now.

I couldn’t get everything today since I had a medical emergency.

I’ll keep you all posted tomorrow.


Web Development

New Breeze Angular Service | John Papa (


Five Reasons ASP.NET Developers Shouldn’t Worry About Node | Wintellect (

Page Instrumentation in ASP.NET 4.5 - Imran Baloch's Blog (

Using Google Authenticator with ASP.NET Identity - Be A Big Rockstar (

Introducing ASP.NET Web API Throttling handler - Stefan's Tech Notes - Blog (

Windows Azure

Getting Started with Azure Storage (

Windows Azure Multi-Factor Authentication Overview (


NuGet Package of the Week: Canopy Web Testing Framework with F# - Scott Hanselman (

Community Update 2014-03-24–Follow-up on #sublime, #nodejs articles, #angularjs, #dotnet, #aspnet and package management

As with every Monday, the flood gates are open. Greg Young submitted another blog post on Sublime, we have a few NodeJS/AngularJS posts and of course… a truckload of ASP.NET links.

I hope you enjoyed your weekend, enjoy the read and see you next time!


Greg Young Sublime’s series

Sublime is Sublime 8 | Greg Young's Blog on ( – Yep. one more!

Web Development

Creating a REST API using Node.js, Express, and MongoDB | Christophe Coenraets (

Jonathan Channon Blog - Using NodeJS and FTP with Promises (

Responsive-Design Intranets with Apt Content Prioritization (

Dynamic Routes with AngularJS (


Package Management And Dependencies: Still A Human Problem (


Discovering System.Threading namespace, the Thread class - Tymoteusz Kęstowicz .NET developer blog (


The Web API v2 OAuth2 Authorization Server Middleware–Is it worth it? | on (

Investigating ASP.Net Memory Dumps for Idiots (like Me) - Diary Of A Ninja (

Troy Hunt: Understanding (and testing for) view state MAC in ASP.NET web forms (

Getting a MIME type from a file extension in ASP.NET 4.5 (

Secure ASP.NET Web API with Windows Azure AD - IBlog<Johan> (

jQuery DataTables With ASP.NET Web API 2 OData Service | TechBrij (

The ASP.NET Web API 2.2 for OData release and the OData Client Code Generator release (

Solved: Getting 401 Unauthorized while calling an ASMX service using windows authentication | jgauffin's coding den (

Podcasts & Books & Videos

Guy Barrette | Visual Studio Talk Show: Mathieu Richard - Web moderne ( – This one is in French

Personal Branding book - How to Be a Rock Star Developer (

Search Engines (Solr, ElasticSearch, etc.)

Realtime Search: Solr vs Elasticsearch (

My talk from Comminity Stack Exchange day – Introduction to ElasticSearch » Steven Chapman (

Community Update 2014-03-22 – #WebAPI and #WCF

As with every weekend, things are sparse.



What is New in ASP.Net Web API 2 IHttpActionResult and CORS - Part 2 (

Difference between WCF and ASP.NET Web Service (

Measure twice, cut once – or profile before optimizing your code

Too often we see smart code. I’m not talking about a trademarked product or something science fiction here. I’m talking about code that was written with the goal of making it faster or asynchronous. By smarter I mean, too smart for its own needs. The code should be as simple as it is required to maintain it efficiently and so that other developer can maintain it.

But as the application is being developed, at some point, we realize that it’s slow. So we run the debugger a few times, identify the module from which it’s coming from, assume it’s a certain piece of code and… we optimize.

What did we just optimize? Was it the real problem? Of course since it’s gone now! But right now, the code is unreadable. You’ve added caching, async loading, static dictionary and what not. It’s 20 times faster than it was before! Of course it’s better!

What we don’t realize however is that, we patched the problem. We put a Band-Aid on an open profusely bleeding wound. It will work for now but then you’ll have other problems related to the way you resolved your problem. Caching? Your cache doesn’t invalidate properly… Async? Partial data or 100% CPU every time the task is executed… Dictionary? Thread locking and exception for already existing keys… etc.. etc.. All those problems will gnaw at your time and for what? For some performance issue that you patched by dropping quick hacks on them.

What should we do?


Your application was slow. You saw it in your browser. It took forever to load. Each page load were slow as hell. Is it coming from your application startup code? From which layer?

Most of the developer I’ve worked with will normally comment out code and try to reproduce the speed issue. Did it work? No? Comment out some more. Rinse and repeat until the performance issue is resolved. Once they found the source of the problem, they “optimize” or fix this block of code.  Most of the time, it might be a “WHERE” on a SQL query that is missing. Sometimes however, I see train wrecks.

The best way to know if your code is slow and what part of your code is slow is to use a profiler. There’s many kind of profiler but I’m going to talk about 2 kinds. Performance profiler and Database profiler.

Measuring performance

Here are some tools that most .NET Developers use: dotTrace ($), ANTS Performance Profiler ($), slimtune (open source)

Those tools will measure the time spent on each methods in your code. They will allow you to home in on code that is invoked too often or few times but that takes an eternity to answer (we’re talking seconds here). This will allow you to find the hotspots in your code. It will tell you where your time should be spent rather than modifying your code to find problems. Maybe your loading huge amount of items in memory and it’s slowing down your app. Maybe an external resource is slow…. whatever it is… those tools will find it.

But what if your code is working fast but its your ORM that is slow?

Measuring database

Here are some tools that most .NET Developers use: Hibernating Rhinos profilers for Entity Framework, NHibernate and more ($), MiniProfiler (open source)

When you realise that your problem is part of your database requests, it’s where you start using database profilers to find your problems. Maybe a badly configured ORM sends SELECT * requests to a table with millions of row while you only need one of them? What is the scenario… knowing what is slow when accessing the database could increase the performance of your application exponentially.


Once you are at that step, you know exactly what is slow and what to do to fix it. This is actually the easiest step since you already spent a lot of time understanding the problem. Okay, maybe I’m exaggerating a little but we get the point. Once you know what is the problem, it becomes a lot easier to fix it.


Measure first. Optimize. Measure again. If what you did didn’t improve the running time of your application, you only peddled code around. If you gained 2% gain in speed while making the code unreadable to anyone but yourself, you’ve only muddled the water for little to no gain.

Measuring is pretty much the main recommendation of this article. You don’t measure before optimizing, somewhere in the world a kitten dies.

Stop killing kittens.

Related articles

Community Update 2014-03-21–Follow up on Greg Young series on #Sublime, #webdev, #aspnet, #fsharp, #resharper release and more

So last post before the slow weekend. I hope that you enjoy yours as I will spend mine coding. As always.

Don’t miss out on the follow-up on Sublime by Greg young, Identity 2.0 released to RTM, ReSharper 8.2 releases and more.


Follow-up on the Sublime series by Greg Young

Sublime is Sublime 5 | Greg Young's Blog on (

Sublime is Sublime 6 | Greg Young's Blog on (

Sublime is Sublime 7 | Greg Young's Blog on (

Web development (HTML5, JavaScript, etc.)

Important Developer Resources for a JavaScript Newbie - Evangelism - Blog (


Announcing RTM of ASP.NET Identity 2.0.0 (

Social Login in ASP.NET MVC (

C# Fundamentals for Absolute Beginners: (01) Series Introduction (

Genetic Algorithms with F# - my tech blog (

Visual Studio

Open Source and Microsoft Developer Tools (

ReSharper 8.2 is Released Along with dotTrace, dotCover Updates | JetBrains .NET Tools Blog (

Methodology / Agility

The Corruption of Agile | Dr Dobb's (

Architecture / CQRS

EventStore - from streams to read models (

Windows Azure

Rockin’ Windows Azure with Visual Studio (


Elasticsearch: When giving it more memory causes more OutOfMemory errrors — Makina Corpus (

New article: Elasticsearch as a NoSQL Database (beta version) | Hadoop Magazine (

Community Update 2014-03-20 – #sublime series by Greg Young, #tdd in #javascript, #donet, #aspnet and #WindowsAzure

Guy Barrette is looking for people who want to submit video content for a website focusing on Azure. You can check it out here: Azure Rocks

Hello everyone!

So Greg Young was on fire last night/this morning. He wrote 4 blog posts on Sublime Text. A must read! I have a few links in web development, including OAuth, but most importantly, TDD in Javascript.

So with the usual .NET, ASP.NET,etc. I wish you all an happy reading.

Also, if you are not aware yet, the MVP Program is changing its guideline for admission. You can view here on YouTube. So if you are part of an Open Source project involving .NET, you might be eligible for becoming an MVP on that alone.


Sublime Series by Greg Young

Sublime is Sublime Part 1 | Greg Young's Blog on (

Sublime is Sublime 2 | Greg Young's Blog on (

Sublime is Sublime 3 | Greg Young's Blog on (

Sublime is Sublime 4 | Greg Young's Blog on (

Web development (HTML5, JavaScript, etc.)

Test-driven development in Javascript | dotnet thoughts (

webdesignrepo - a compact list of helpful webdesign links (

10 Things You Should Know about Tokens ( – We’re talking OAuth over there.


Using AutoMapper to Map Abstract Classes | Patrick Desjardins' Blog (

Successful IoC container usage | Jimmy Bogard's Blog (

C# performance tips & tricks | Raygun Blog (


Kris' blog - Designing Evolvable Web APIs with ASP.NET now as a free ebook (

LIDNUG — Katana Authentication Middleware | brockallen on (

Stopping concurrent logins | (

CORS support in WebAPI, MVC and IIS with Thinktecture.IdentityModel | brockallen on (

DarksideCookie | What is OWIN, and what is it doing in my new ASP.NET MVC project? (

ASP.NET Web API exception logging with - StrathWeb (

More HTTP Flushing in ASP.NET MVC | nik codes on (

Storage (NoSQL, SQL, or Event Stores)

Event Store 3.0.0 Release Candidate available – Event Store (

Windows Azure

Windows Azure = Security + Privacy + Compliance (

Azure Rocks! (

Search Engines (ElasticSearch, Solr, etc…)

Legume for Logstash ( Logstash 1.4.0 GA Has Been Unleashed | Blog | Elasticsearch ( Elasticsearch - The Definitive Guide | Blog | Elasticsearch (

Community Update 2014-03-19 – #webdev, #dotnet, #aspnet, #cqrs and some more #elasticsearch

First of all, I would like to mention that there is less than 19 days left until Windows XP support goes out. It’s been a nice 12 years and a half going. That means that if your child was born on the day of the release, he would now be in 7th grade. It’s been a nice and long run but it’s time to pull the plug. If your enterprise is still running Windows XP (other than in a VM to show rookies what it looked like back in the days), then it’s time to change.

That being said, here are today’s link!


Web Development

JavaScript Promises: There and back again - HTML5 Rocks ( ( – NodeJS tutorial videos

A DOM Manipulation Class in 100 Lines of JavaScript | Flippin' Awesome (

jsDelivr – The advanced open source public CDN ✩ Mozilla Hacks – the Web developer blog (

JavaScript MVC Style Guide (

.NET / ASP.NET / Web API Web Api 101 | codeCloudy on (

Being Cellfish: Tail Recursion and C# (

ASP.NET MVC – URL routing (

Obtaining Twitter Access Tokens with ASP.NET Identity Geeks With Blogs (

Using the ASP.NET Bundling Pipeline with OWIN - Michael Sarchet (

Jeff Byboth: Machine Key when load balancing web applications (

How to automatically notify the user that it's time to upgrade a Windows App - Scott Hanselman (

NuGet packages

NuGet Gallery | AspNet.Identity.RavenDB 2.0.0-beta1-01 (

Architecture and CQRS

Busting some CQRS myths | Jimmy Bogard's Blog (

Open Source

Showcasing interesting projects in Explore · GitHub (


Elasticsearch Image Demo (

Deploying Elasticsearch with OpsWorks - Application Management Blog (

Indexing Project Gutenberg with MongoDB and Elasticsearch » anystacker (

Getting Started with elasticsearch and AngularJS: Part1 - Searching (

Getting Started with elasticsearch and AngularJS: Part2 - Faceting ( This Week In Elasticsearch | Blog | Elasticsearch (

Community Update 2014-03-18 – #webdevelopment, #javascript, #dotnet, #aspnet, #testing and #opensource

Here’s a lot of new content about Javascript, CSS, .NET and ASP.NET.

I’ve included some nice article about ElasticSearch as always. Since I’m not in a chatty mood, I’ll leave you, dear reader, the time to read.


Web Development

Reassign JavaScript Function Parameters In Reverse Order, Or Lose Your Params | :derick_bailey (

(cs)spinner | pure CSS loading animations with minimal effort. (

Welcome - Polymer (

gremlins.js/ at master · marmelab/gremlins.js · GitHub ( – Simulate huge amount of click everywhere on your screen.

jQuery Mambo Plugin (


How to create a FileStreamResult from a string | andrewlocatelliwoodcock on (

EF6.1.0 RTM Available (

ASP.NET WEB API Validation (A One More Better Approach) | TypeCasted on (

Compiling your MVC views without IIS errors | Codes from the field on (

Important: Setting the Client Principal in ASP.NET Web API | on (

Using jQuery-UI Tabs With ASP.NET WebForm Validators (

WebAPI: Getting Headers, QueryString and Cookie Values - Rick Strahl's Web Log (


8 Tips For Writing a Good Bug Report (

Open Source

OSS Perks (

Up For Grabs (

Search Engines

Ecrypting Logs on Their Way to Elasticsearch | Sematext Blog on ( Kibana 3.0.0 GA Is Now Available! | Blog | Elasticsearch (